AzureDevOps.Services.OpenApi.psm1

$script:ModuleRoot = $PSScriptRoot
$script:ModuleVersion = (Import-PowerShellDataFile -Path "$($script:ModuleRoot)\AzureDevOps.Services.OpenApi.psd1").ModuleVersion

# Detect whether at some level dotsourcing was enforced
$script:doDotSource = Get-PSFConfigValue -FullName AzureDevOps.Services.OpenApi.Import.DoDotSource -Fallback $false
if ($AzureDevOps_Services_OpenApi_dotsourcemodule) { $script:doDotSource = $true }

<#
Note on Resolve-Path:
All paths are sent through Resolve-Path/Resolve-PSFPath in order to convert them to the correct path separator.
This allows ignoring path separators throughout the import sequence, which could otherwise cause trouble depending on OS.
Resolve-Path can only be used for paths that already exist, Resolve-PSFPath can accept that the last leaf my not exist.
This is important when testing for paths.
#>


# Detect whether at some level loading individual module files, rather than the compiled module was enforced
$importIndividualFiles = Get-PSFConfigValue -FullName AzureDevOps.Services.OpenApi.Import.IndividualFiles -Fallback $false
if ($AzureDevOps_Services_OpenApi_importIndividualFiles) { $importIndividualFiles = $true }
if (Test-Path (Resolve-PSFPath -Path "$($script:ModuleRoot)\..\.git" -SingleItem -NewChild)) { $importIndividualFiles = $true }
if ("<was compiled>" -eq '<was not compiled>') { $importIndividualFiles = $true }
    
function Import-ModuleFile
{
    <#
        .SYNOPSIS
            Loads files into the module on module import.
         
        .DESCRIPTION
            This helper function is used during module initialization.
            It should always be dotsourced itself, in order to proper function.
             
            This provides a central location to react to files being imported, if later desired
         
        .PARAMETER Path
            The path to the file to load
         
        .EXAMPLE
            PS C:\> . Import-ModuleFile -File $function.FullName
     
            Imports the file stored in $function according to import policy
    #>

    [CmdletBinding()]
    Param (
        [string]
        $Path
    )
    
    $resolvedPath = $ExecutionContext.SessionState.Path.GetResolvedPSPathFromPSPath($Path).ProviderPath
    if ($doDotSource) { . $resolvedPath }
    else { $ExecutionContext.InvokeCommand.InvokeScript($false, ([scriptblock]::Create([io.file]::ReadAllText($resolvedPath))), $null, $null) }
}

#region Load individual files
if ($importIndividualFiles)
{
    # Execute Preimport actions
    foreach ($path in (& "$ModuleRoot\internal\scripts\preimport.ps1")) {
        . Import-ModuleFile -Path $path
    }
    
    # Import all internal functions
    foreach ($function in (Get-ChildItem "$ModuleRoot\internal\functions" -Filter "*.ps1" -Recurse -ErrorAction Ignore))
    {
        . Import-ModuleFile -Path $function.FullName
    }
    
    # Import all public functions
    foreach ($function in (Get-ChildItem "$ModuleRoot\functions" -Filter "*.ps1" -Recurse -ErrorAction Ignore))
    {
        . Import-ModuleFile -Path $function.FullName
    }
    
    # Execute Postimport actions
    foreach ($path in (& "$ModuleRoot\internal\scripts\postimport.ps1")) {
        . Import-ModuleFile -Path $path
    }
    
    # End it here, do not load compiled code below
    return
}
#endregion Load individual files

#region Load compiled code
<#
This file loads the strings documents from the respective language folders.
This allows localizing messages and errors.
Load psd1 language files for each language you wish to support.
Partial translations are acceptable - when missing a current language message,
it will fallback to English or another available language.
#>

Import-PSFLocalizedString -Path "$($script:ModuleRoot)\en-us\*.psd1" -Module 'AzureDevOps.Services.OpenApi' -Language 'en-US'

function ConvertTo-Hashtable {
    <#
    .SYNOPSIS
        Converts an inputobject into a hashtable.
 
    .DESCRIPTION
        Converts an inputobject into a hashtable.
        Allows remapping keys as needed.
 
    .PARAMETER Include
        Which properties / keys to include.
        Only properties that exist on the input will be included, no matter what.
 
    .PARAMETER Mapping
        A hashtable mapping keys to another name.
        This is used to change the keys on hashtables.
        Specifically, this allows providing PowerShell-compliant parameter names, while passing them to the REST api how the API wants them.
 
    .PARAMETER InputObject
        The object to convert into a hashtable.
 
    .EXAMPLE
        PS C:\> $PSBoundParameters | ConvertTo-Hashtable -Include Name, Description, ID -Mapping @{ ID = 'objectId; Name = 'name' }
 
        Converts the $PSBoundParameters system-variable into a regular hashtable, discarding all entries but Name, Description and ID.
        "Name" will be renamed to be lowercase if specified, "ID" will be renamed to "objectId" if specified.
#>

    [OutputType([Hashtable])]
    [CmdletBinding()]
    param (
        [AllowEmptyCollection()]
        [string[]]
        $Include,

        [Hashtable]
        $Mapping = @{ },

        [Parameter(ValueFromPipeline = $true)]
        $InputObject
    )

    process {
        $result = @{ }
        # Empty includes lead to empty hashtable; Otherwhise it would be the same as $Include='*'
        if ($Include) {
            if ($InputObject -is [System.Collections.IDictionary]) {
                foreach ($pair in $InputObject.GetEnumerator()) {
                    if ($Include -and $pair.Key -notin $Include) { continue }
                    if ($Mapping[$pair.Key]) { $result[$Mapping[$pair.Key]] = $pair.Value }
                    else { $result[$pair.Key] = $pair.Value }
                }
            }
            else {
                foreach ($property in $InputObject.PSObject.Properties) {
                    if ($Include -and $property.Name -notin $Include) { continue }
                    if ($Mapping[$property.Name]) { $result[$Mapping[$property.Name]] = $property.Value }
                    else { $result[$property.Name] = $property.Value }
                }
            }
          }
        $result
    }
}

function Test-Overlap {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true)]
        [string]
        $Value,

        [Parameter(Mandatory = $true)]
        [string[]]
        $Filter,

        [switch]
        $Not
    )

    foreach ($filterString in $Filter) {
        if ($Value -like $filterString) { return $Not -eq $false }
    }
    $Not -eq $true
}

function Get-AdsRepositoryFile {
    <#
    .SYNOPSIS
        Search an Azure DevOps repository for files.
     
    .DESCRIPTION
        Search an Azure DevOps repository for files.
        This does NOT use the search API but instead enumerates the entire content of each repository in each project of an organization.
        This will be fairly slow, but should work in all project/organization configurations.
     
    .PARAMETER Organization
        The organizations to search.
     
    .PARAMETER Project
        The projects to inspect.
        Defaults to '*'
     
    .PARAMETER Repository
        The repositories to inspect.
        Defaults to '*'
     
    .PARAMETER Branch
        The branches to look at.
        Defaults to '*'
     
    .PARAMETER Name
        A name filter to apply to all files.
        For example, set this to '*.ps1' to search all PowerShell script files.
        Defaults to '*'
     
    .PARAMETER IncludeContent
        Whether the actual file content should be included in the output
     
    .PARAMETER ApiVersion
        The API version to use for this request.
        Defaults to '6.0'
     
    .EXAMPLE
        PS C:\> Get-AdsRepositoryFile -Organization myOrg
 
        Returns all files in all branches of all repositories of all projects of myOrg
     
    .EXAMPLE
        PS C:\> Get-AdsRepositoryFile -Organization myOrg -Name *.ps1,*.psm1
 
        Returns all PowerShell script & module files in all branches of all repositories of all projects of myOrg
 
    .EXAMPLE
        PS C:\> Get-AdsRepositoryFile -Organization Contoso -Name *.ps1,*.psm1 -Project ContosoTools -Branch master
 
        Returns all PowerShell script & module files in the master branch of all repositories in the ContosoTools project under the Contoso organization.
    #>

    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [string[]]
        $Organization,

        [string[]]
        $Project = '*',

        [string[]]
        $Repository = '*',

        [string[]]
        $Branch = '*',

        [string[]]
        $Name = '*',

        [switch]
        $IncludeContent,

        [string]
        $ApiVersion = '6.0'
    )

    begin {
        $apiParam = @{
            ApiVersion = $ApiVersion
        }
    }
    process {
        foreach ($orgName in $Organization) {
            $projects = Get-AdsProject @apiParam -Organization $orgName
            foreach ($projectItem in $projects) {
                if (Test-Overlap -Value $projectItem.Name -Filter $Project -Not) { continue }
                $projectParam = $apiParam.Clone() + @{
                    Organization = $orgName
                    Project      = $projectItem.id
                }
                
                try { $repositories = Get-AdsGitRepository @projectParam -ErrorAction Stop }
                catch {
                    # Project doesn't have any repos
                    if ($_.Exception.Response.StatusCode -eq 'NotFound') { continue }

                    throw
                }

                foreach ($repositoryItem in $repositories) {
                    if (Test-Overlap -Value $repositoryItem.Name -Filter $Repository -Not) { continue }

                    $branches = Get-AdsGitRepositoryBranchStatistics @projectParam -RepositoryId $repositoryItem.id
                    foreach ($branchItem in $branches) {
                        if (Test-Overlap -Value $branchItem.Name -Filter $Branch -Not) { continue }

                        $files = Get-AdsGitRepositoryItem @projectParam -RepositoryId $repositoryItem.id -RecursionLevel Full -IncludeContentMetadata $true -VersionType branch -Version $branchItem.name
                        foreach ($fileItem in $files) {
                            if ($fileItem.isFolder) { continue }
                            $fileName = Split-Path -Path $fileItem.path -Leaf
                            $folderPath = (Split-Path -Path $fileItem.path) -replace '\\', '/'
                            if ($folderPath -notlike "*/") { $folderPath += "/" }
                            if (Test-Overlap -Value $fileName -Filter $Name -Not) { continue }

                            $result = [PSCustomObject]@{
                                PSTypeName     = 'AzureDevOps.Git.File'
                                Name           = '{0}/{1}/{2}{3} [{4}]' -f $orgName, $projectItem.Name, $repositoryItem.name, $fileItem.path, $branchItem.Name
                                FileName       = $fileName
                                FilePath       = $fileItem.path
                                FolderPath     = $folderPath
                                Content        = ""
                                Organization   = $orgName
                                ProjectName    = $projectItem.name
                                ProjectID      = $projectItem.id
                                RepositoryName = $repositoryItem.name
                                RepositoryID   = $repositoryItem.id
                                Branch         = $branchItem.name
                                url            = $fileItem.url
                                FileID         = $fileItem.ObjectID
                                CommitID       = $fileItem.commitId
                            }
                            if ($IncludeContent) {
                                $result.Content = Get-AdsGitRepositoryItem @projectParam -RepositoryId $repositoryItem.id -Version $branchItem.name -ScopePath $fileItem.path
                            }
                            $result
                        }
                    }
                }
            }
        }
    }
}

function Connect-AdsService {
    <#
    .SYNOPSIS
        Connect to Azure DevOps Services
     
    .DESCRIPTION
        Connect to Azure DevOps Services
        Use either a PAT or Azure AD Authentication.
 
        Note: AzureAD auth is currently broken, cause is being investigated.
     
    .PARAMETER ClientID
        The ClientID of the App Registration to use.
        Used for AzureAD Authentication.
     
    .PARAMETER TenantID
        The ID of the Tenant to log in for.
        Used for AzureAD Authentication.
     
    .PARAMETER Credential
        The credentials to use for authenticating to Azure DevOps Services.
        This expects the user UPN as username and a PAT as password.
     
    .EXAMPLE
        PS C:\> Connect-AdsService -Credential $cred
 
        Log into the Azure DevOps API using a Personal Access Token
    #>

    [CmdletBinding(DefaultParameterSetName = 'AzureAD')]
    param (
        [Parameter(Mandatory = $true, ParameterSetName = 'AzureAD')]
        [string]
        $ClientID,
        
        [Parameter(Mandatory = $true, ParameterSetName = 'AzureAD')]
        [string]
        $TenantID,

        [Parameter(Mandatory = $true, ParameterSetName = 'PAT')]
        [PSCredential]
        $Credential
    )

    switch ($PSCmdlet.ParameterSetName) {
        'AzureAD' {
            $param = @{
                Service    = 'AzureDevOps'
                ServiceUrl = 'https://dev.azure.com'
                ClientID   = $ClientID
                TenantID   = $TenantID
                Scopes     = 'https://app.vssps.visualstudio.com/.default'
                DeviceCode = $true
            }
            Connect-RestService @param
            # Disable Redirects on authorization errors
            Set-RestConnection -Service AzureDevOps -ExtraHeaderContent @{ 'X-TFS-FedAuthRedirect' = 'Suppress' }
        }
        'PAT' {
            $param = @{
                Service       = 'AzureDevOps'
                ServiceUrl    = 'https://dev.azure.com'
                Data          = @{ Credential = $Credential }
                ValidUntil    = (Get-Date).AddYears(1)
                GetHeaderCode = {
                    param ( $Token )

                    $credential = $Token.Data.Credential
                    if (-not $credential) { throw "No Credentials provided for connecting to Azure DevOps Services via PAT!" }
                    $string = $credential.UserName, $credential.GetNetworkCredential().Password -join ":"
                    $bytes = [System.Text.Encoding]::UTF8.GetBytes($string)
                    $base64 = [convert]::ToBase64String($bytes)
                    @{ Authorization = "Basic $base64" }
                }
                ExtraHeaderContent = @{ 'X-TFS-FedAuthRedirect' = 'Suppress' }
            }
            Set-RestConnection @param
        }
    }
}

function Get-AdsAccount {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER MemberId
    ID for a member of the accounts.
 
.PARAMETER OwnerId
    ID for the owner of the accounts.
 
.PARAMETER Properties
     
 
.EXAMPLE
    PS C:\> Get-AdsAccount -ApiVersion $apiversion
 
    Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MemberId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $OwnerId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Properties
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'MemberId' = 'memberId'
            'OwnerId' = 'ownerId'
            'Properties' = 'properties'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','MemberId','OwnerId','Properties') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://app.vssps.visualstudio.com/_apis/accounts'

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPipelineApproval {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    List Approvals. This can be used to get a set of pending approvals in a pipeline, on an user or for a resource..
 
.PARAMETER Expand
     
 
.PARAMETER ApprovalId
    Id of the approval.
 
.PARAMETER ApprovalIds
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPipelineApproval -ApprovalId $approvalid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get an approval.
 
.EXAMPLE
    PS C:\> Get-AdsPipelineApproval -Project $project -Organization $organization -ApiVersion $apiversion
 
    List Approvals. This can be used to get a set of pending approvals in a pipeline, on an user or for a resource..
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Approvals_Get')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Approvals_Get')]
        [string]
        $ApprovalId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApprovalIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Approvals_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Approvals_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Approvals_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApprovalIds' = 'approvalIds'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApprovalIds','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/approvals' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($ApprovalId) { $__path += "/$ApprovalId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPipelineApproval {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update approvals.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPipelineApproval -Organization $organization -Project $project -ApiVersion $apiversion
 
    Update approvals.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/approvals' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsAuditAction {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all auditable actions filterable by area.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER AreaName
    Optional. Get actions scoped to area
 
.EXAMPLE
    PS C:\> Get-AdsAuditAction -Organization $organization -ApiVersion $apiversion
 
    Get all auditable actions filterable by area.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AreaName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'AreaName' = 'areaName'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','AreaName') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://auditservice.dev.azure.com/{organization}/_apis/audit/actions' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsAuditAuditlog {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Queries audit log entries
 
.PARAMETER ContinuationToken
    Token used for returning next set of results from previous query. Optional
 
.PARAMETER BatchSize
    Max number of results to return. Optional
 
.PARAMETER SkipAggregation
    Skips aggregating events and leaves them as individual entries instead. By default events are aggregated. Event types that are aggregated: AuditLog.AccessLog.
 
.PARAMETER StartTime
    Start time of download window. Optional
 
.PARAMETER EndTime
    End time of download window. Optional
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsAuditAuditlog -Organization $organization -ApiVersion $apiversion
 
    Queries audit log entries
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $BatchSize,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $SkipAggregation,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StartTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EndTime,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'BatchSize' = 'batchSize'
            'SkipAggregation' = 'skipAggregation'
            'StartTime' = 'startTime'
            'EndTime' = 'endTime'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','BatchSize','SkipAggregation','StartTime','EndTime','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://auditservice.dev.azure.com/{organization}/_apis/audit/auditlog' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsAuditDownloadlog {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Downloads audit log entries.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Format
    File format for download. Can be "json" or "csv".
 
.PARAMETER StartTime
    Start time of download window. Optional
 
.PARAMETER EndTime
    End time of download window. Optional
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsAuditDownloadlog -Organization $organization -Format $format -ApiVersion $apiversion
 
    Downloads audit log entries.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Format,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StartTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EndTime,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Format' = 'format'
            'StartTime' = 'startTime'
            'EndTime' = 'endTime'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Format','StartTime','EndTime','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://auditservice.dev.azure.com/{organization}/_apis/audit/downloadlog' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsAuditStream {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Return all Audit Streams scoped to an organization
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER StreamId
    Id of stream entry to retrieve
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsAuditStream -Organization $organization -StreamId $streamid -ApiVersion $apiversion
 
    Return Audit Stream with id of streamId if one exists otherwise throw
 
.EXAMPLE
    PS C:\> Get-AdsAuditStream -Organization $organization -ApiVersion $apiversion
 
    Return all Audit Streams scoped to an organization
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Streams_Query Stream By Id')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Streams_Query Stream By Id')]
        [string]
        $StreamId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Streams_Query Stream By Id')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://auditservice.dev.azure.com/{organization}/_apis/audit/streams' -Replace '{organization}',$Organization
        if ($StreamId) { $__path += "/$StreamId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsAuditStream {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update existing Audit Stream
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER StreamId
    Id of stream entry to be updated
 
.PARAMETER Status
    Status of the stream
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsAuditStream -Organization $organization -StreamId $streamid -Status $status -ApiVersion $apiversion
 
    Update existing Audit Stream status
 
.EXAMPLE
    PS C:\> New-AdsAuditStream -Organization $organization -ApiVersion $apiversion
 
    Update existing Audit Stream
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Streams_Update Status')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Streams_Update Status')]
        [string]
        $StreamId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Streams_Update Status')]
        [string]
        $Status,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Streams_Update Status')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Status' = 'status'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Status','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://auditservice.dev.azure.com/{organization}/_apis/audit/streams' -Replace '{organization}',$Organization
        if ($StreamId) { $__path += "/$StreamId" }

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsAuditStream {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete Audit Stream
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER StreamId
    Id of stream entry to delete
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsAuditStream -Organization $organization -StreamId $streamid -ApiVersion $apiversion
 
    Delete Audit Stream
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StreamId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://auditservice.dev.azure.com/{organization}/_apis/audit/streams/{streamId}' -Replace '{organization}',$Organization -Replace '{streamId}',$StreamId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsAuditStream {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create new Audit Stream
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DaysToBackfill
    The number of days of previously recorded audit data that will be replayed into the stream. A value of zero will result in only new events being streamed.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsAuditStream -Organization $organization -DaysToBackfill $daystobackfill -ApiVersion $apiversion
 
    Create new Audit Stream
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $DaysToBackfill,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'DaysToBackfill' = 'daysToBackfill'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('DaysToBackfill','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://auditservice.dev.azure.com/{organization}/_apis/audit/streams' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildAuthorizedresource {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
     
 
.PARAMETER Type
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildAuthorizedresource -Organization $organization -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Id' = 'id'
            'Type' = 'type'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Id','Type','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/authorizedresources' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildBuild {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a list of builds.
 
.PARAMETER BuildNumber
    If specified, filters to builds that match this build number. Append * to do a prefix search.
 
.PARAMETER QueryOrder
    The order in which builds should be returned.
 
.PARAMETER Top
    The maximum number of builds to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER MaxBuildsPerDefinition
    The maximum number of builds to return per definition.
 
.PARAMETER PropertyFilters
     
 
.PARAMETER RepositoryType
    If specified, filters to builds that built from repositories of this type.
 
.PARAMETER StatusFilter
    If specified, filters to builds that match this status.
 
.PARAMETER BuildIds
    A comma-delimited list that specifies the IDs of builds to retrieve.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Queues
    A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.7' to use this version of the api.
 
.PARAMETER DeletedFilter
    Indicates whether to exclude, include, or only return deleted builds.
 
.PARAMETER MaxTime
    If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified.
 
.PARAMETER ContinuationToken
    A continuation token, returned by a previous call to this method, that can be used to return the next set of builds.
 
.PARAMETER RequestedFor
    If specified, filters to builds requested for the specified user.
 
.PARAMETER MinTime
    If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified.
 
.PARAMETER ResultFilter
    If specified, filters to builds that match this result.
 
.PARAMETER Properties
    A comma-delimited list of properties to retrieve.
 
.PARAMETER ReasonFilter
    If specified, filters to builds that match this reason.
 
.PARAMETER TagFilters
    A comma-delimited list of tags. If specified, filters to builds that have the specified tags.
 
.PARAMETER BuildId
     
 
.PARAMETER BranchName
    If specified, filters to builds that built branches that built this branch.
 
.PARAMETER Definitions
    A comma-delimited list of definition IDs. If specified, filters to builds for these definitions.
 
.PARAMETER RepositoryId
    If specified, filters to builds that built from this repository.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuild -BuildId $buildid -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets a build
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuild -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets a list of builds.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildNumber,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $QueryOrder,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $MaxBuildsPerDefinition,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get')]
        [string]
        $PropertyFilters,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StatusFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Queues,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DeletedFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MaxTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RequestedFor,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MinTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResultFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Properties,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReasonFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TagFilters,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get')]
        [string]
        $BuildId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BranchName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Definitions,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId
    )
    process {
        $__mapping = @{
            'BuildNumber' = 'buildNumber'
            'BranchName' = 'branchName'
            'TagFilters' = 'tagFilters'
            'ReasonFilter' = 'reasonFilter'
            'Properties' = 'properties'
            'ResultFilter' = 'resultFilter'
            'MinTime' = 'minTime'
            'RequestedFor' = 'requestedFor'
            'ContinuationToken' = 'continuationToken'
            'MaxTime' = 'maxTime'
            'Definitions' = 'definitions'
            'DeletedFilter' = 'deletedFilter'
            'Queues' = 'queues'
            'BuildIds' = 'buildIds'
            'StatusFilter' = 'statusFilter'
            'RepositoryType' = 'repositoryType'
            'PropertyFilters' = 'propertyFilters'
            'MaxBuildsPerDefinition' = 'maxBuildsPerDefinition'
            'Top' = '$top'
            'QueryOrder' = 'queryOrder'
            'ApiVersion' = 'api-version'
            'RepositoryId' = 'repositoryId'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('BuildNumber','BranchName','TagFilters','ReasonFilter','Properties','ResultFilter','MinTime','RequestedFor','ContinuationToken','MaxTime','Definitions','DeletedFilter','Queues','BuildIds','StatusFilter','RepositoryType','PropertyFilters','MaxBuildsPerDefinition','Top','QueryOrder','ApiVersion','RepositoryId') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($BuildId) { $__path += "/$BuildId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildBuildArtifact {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets all artifacts for a build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.5' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuildArtifact -Organization $organization -ApiVersion $apiversion -Project $project -BuildId $buildid
 
    Gets all artifacts for a build.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/artifacts' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildBuildAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a specific attachment.
 
.PARAMETER Type
    The type of the attachment.
 
.PARAMETER RecordId
    The ID of the timeline record.
 
.PARAMETER TimelineId
    The ID of the timeline.
 
.PARAMETER Name
    The name of the attachment.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuildAttachment -Type $type -RecordId $recordid -TimelineId $timelineid -Name $name -Project $project -BuildId $buildid -Organization $organization -ApiVersion $apiversion
 
    Gets a specific attachment.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RecordId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TimelineId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/{timelineId}/{recordId}/attachments/{type}/{name}' -Replace '{type}',$Type -Replace '{recordId}',$RecordId -Replace '{timelineId}',$TimelineId -Replace '{name}',$Name -Replace '{project}',$Project -Replace '{buildId}',$BuildId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildBuildChange {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the changes associated with a build
 
.PARAMETER ContinuationToken
     
 
.PARAMETER IncludeSourceChange
     
 
.PARAMETER Top
    The maximum number of changes to return
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuildChange -Project $project -BuildId $buildid -Organization $organization -ApiVersion $apiversion
 
    Gets the changes associated with a build
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeSourceChange,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'IncludeSourceChange' = 'includeSourceChange'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','IncludeSourceChange','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/changes' -Replace '{project}',$Project -Replace '{buildId}',$BuildId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildBuildLease {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets all retention leases that apply to a specific build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuildLease -Organization $organization -ApiVersion $apiversion -Project $project -BuildId $buildid
 
    Gets all retention leases that apply to a specific build.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/leases' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildBuildLog {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the logs for a build.
 
.PARAMETER EndLine
    The end line.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER StartLine
    The start line.
 
.PARAMETER LogId
    The ID of the log file.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuildLog -Project $project -BuildId $buildid -Organization $organization -LogId $logid -ApiVersion $apiversion
 
    Gets an individual log file for a build.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuildLog -Project $project -BuildId $buildid -Organization $organization -ApiVersion $apiversion
 
    Gets the logs for a build.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get Build Log')]
        [int64]
        $EndLine,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get Build Log')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get Build Log')]
        [string]
        $BuildId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get Build Log')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get Build Log')]
        [int64]
        $StartLine,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get Build Log')]
        [string]
        $LogId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Get Build Log')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'EndLine' = 'endLine'
            'StartLine' = 'startLine'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('EndLine','StartLine','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/logs' -Replace '{project}',$Project -Replace '{buildId}',$BuildId -Replace '{organization}',$Organization
        if ($LogId) { $__path += "/$LogId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildBuildPropertie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets properties for a build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Filter
    A comma-delimited list of properties. If specified, filters to these specific properties.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuildPropertie -Organization $organization -ApiVersion $apiversion -Project $project -BuildId $buildid
 
    Gets properties for a build.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Filter,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Filter' = 'filter'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Filter') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/properties' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildBuildReport {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a build report.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Type
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuildReport -Organization $organization -ApiVersion $apiversion -Project $project -BuildId $buildid
 
    Gets a build report.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Type' = 'type'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Type') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/report' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildBuildTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the tags for a build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuildTag -Organization $organization -ApiVersion $apiversion -Project $project -BuildId $buildid
 
    Gets the tags for a build.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/tags' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildBuildTimeline {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets details for a build
 
.PARAMETER ChangeId
     
 
.PARAMETER TimelineId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PlanId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuildTimeline -TimelineId $timelineid -Project $project -BuildId $buildid -Organization $organization -ApiVersion $apiversion
 
    Gets details for a build
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $ChangeId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TimelineId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ChangeId' = 'changeId'
            'PlanId' = 'planId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ChangeId','PlanId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/timeline/{timelineId}' -Replace '{timelineId}',$TimelineId -Replace '{project}',$Project -Replace '{buildId}',$BuildId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildBuildWorkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the work items associated with a build. Only work items in the same project are returned.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Top
    The maximum number of work items to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Get-AdsBuildBuildWorkitem -Organization $organization -ApiVersion $apiversion -Project $project -BuildId $buildid
 
    Gets the work items associated with a build. Only work items in the same project are returned.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Top' = '$top'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Top') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/workitems' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildChange {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the changes made to the repository between two given builds.
 
.PARAMETER ToBuildId
    The ID of the last build.
 
.PARAMETER Top
    The maximum number of changes to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FromBuildId
    The ID of the first build.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildChange -Project $project -Organization $organization -ApiVersion $apiversion
 
    Gets the changes made to the repository between two given builds.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $ToBuildId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $FromBuildId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ToBuildId' = 'toBuildId'
            'Top' = '$top'
            'FromBuildId' = 'fromBuildId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ToBuildId','Top','FromBuildId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/changes' -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildController {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets controller, optionally filtered by name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Name
     
 
.PARAMETER ControllerId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildController -Organization $organization -ControllerId $controllerid -ApiVersion $apiversion
 
    Gets a controller
 
.EXAMPLE
    PS C:\> Get-AdsBuildController -Organization $organization -ApiVersion $apiversion
 
    Gets controller, optionally filtered by name
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Controllers_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Controllers_Get')]
        [string]
        $ControllerId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Controllers_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Name' = 'name'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Name','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/build/controllers' -Replace '{organization}',$Organization
        if ($ControllerId) { $__path += "/$ControllerId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildDefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a list of definitions.
 
.PARAMETER IncludeLatestBuilds
    Indicates whether to return the latest and latest completed builds for this definition.
 
.PARAMETER DefinitionIds
    A comma-delimited list that specifies the IDs of definitions to retrieve.
 
.PARAMETER QueryOrder
    Indicates the order in which definitions should be returned.
 
.PARAMETER Top
    The maximum number of definitions to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IncludeAllProperties
    Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned.
 
.PARAMETER MinMetricsTime
    If specified, indicates the date from which metrics should be included.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER RepositoryType
    If specified, filters to definitions that have a repository of this type.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER NotBuiltAfter
    If specified, filters to definitions that do not have builds after this date.
 
.PARAMETER PropertyFilters
    A comma-delimited list of properties to include in the results.
 
.PARAMETER YamlFilename
    If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true
 
.PARAMETER Path
    If specified, filters to definitions under this folder.
 
.PARAMETER ProcessType
    If specified, filters to definitions with the given process type.
 
.PARAMETER BuiltAfter
    If specified, filters to definitions that have builds after this date.
 
.PARAMETER Revision
    The revision number to retrieve. If this is not specified, the latest version will be returned.
 
.PARAMETER ContinuationToken
    A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions.
 
.PARAMETER Name
    If specified, filters to definitions whose names match this pattern.
 
.PARAMETER TaskIdFilter
    If specified, filters to definitions that use the specified task.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.7' to use this version of the api.
 
.PARAMETER RepositoryId
    A repository ID. If specified, filters to definitions that use this repository.
 
.EXAMPLE
    PS C:\> Get-AdsBuildDefinition -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets a list of definitions.
 
.EXAMPLE
    PS C:\> Get-AdsBuildDefinition -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    Gets a definition, optionally at a specific revision.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [boolean]
        $IncludeLatestBuilds,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionIds,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $QueryOrder,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeAllProperties,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [string]
        $MinMetricsTime,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [string]
        $DefinitionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $NotBuiltAfter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [string]
        $PropertyFilters,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $YamlFilename,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $ProcessType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuiltAfter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [int32]
        $Revision,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TaskIdFilter,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId
    )
    process {
        $__mapping = @{
            'IncludeLatestBuilds' = 'includeLatestBuilds'
            'TaskIdFilter' = 'taskIdFilter'
            'Name' = 'name'
            'ContinuationToken' = 'continuationToken'
            'Revision' = 'revision'
            'BuiltAfter' = 'builtAfter'
            'ProcessType' = 'processType'
            'Path' = 'path'
            'YamlFilename' = 'yamlFilename'
            'PropertyFilters' = 'propertyFilters'
            'NotBuiltAfter' = 'notBuiltAfter'
            'RepositoryType' = 'repositoryType'
            'MinMetricsTime' = 'minMetricsTime'
            'IncludeAllProperties' = 'includeAllProperties'
            'Top' = '$top'
            'QueryOrder' = 'queryOrder'
            'DefinitionIds' = 'definitionIds'
            'ApiVersion' = 'api-version'
            'RepositoryId' = 'repositoryId'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeLatestBuilds','TaskIdFilter','Name','ContinuationToken','Revision','BuiltAfter','ProcessType','Path','YamlFilename','PropertyFilters','NotBuiltAfter','RepositoryType','MinMetricsTime','IncludeAllProperties','Top','QueryOrder','DefinitionIds','ApiVersion','RepositoryId') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($DefinitionId) { $__path += "/$DefinitionId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildDefinitionMetric {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets build metrics for a definition.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER MinMetricsTime
    The date from which to calculate metrics.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildDefinitionMetric -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    Gets build metrics for a definition.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MinMetricsTime,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'MinMetricsTime' = 'minMetricsTime'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('MinMetricsTime','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}/metrics' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildDefinitionPropertie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets properties for a definition.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER Filter
    A comma-delimited list of properties. If specified, filters to these specific properties.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildDefinitionPropertie -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    Gets properties for a definition.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Filter,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Filter' = 'filter'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Filter','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}/properties' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildDefinitionResource {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildDefinitionResource -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}/resources' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildDefinitionRevision {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets all revisions of a definition.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildDefinitionRevision -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    Gets all revisions of a definition.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}/revisions' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildDefinitionTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the tags for a definition.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER Revision
    The definition revision number. If not specified, uses the latest revision of the definition.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildDefinitionTag -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    Gets the tags for a definition.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Revision,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Revision' = 'revision'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Revision','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{DefinitionId}/tags' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildDefinitionTemplate {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets all definition templates.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TemplateId
    The ID of the requested template.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildDefinitionTemplate -Organization $organization -TemplateId $templateid -Project $project -ApiVersion $apiversion
 
    Gets a specific build definition template.
 
.EXAMPLE
    PS C:\> Get-AdsBuildDefinitionTemplate -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets all definition templates.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Templates_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Templates_Get')]
        [string]
        $TemplateId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Templates_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Templates_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/templates' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($TemplateId) { $__path += "/$TemplateId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildDefinitionYaml {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Converts a definition to YAML, optionally at a specific revision.
 
.PARAMETER PropertyFilters
    A comma-delimited list of properties to include in the results.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER IncludeLatestBuilds
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER MinMetricsTime
    If specified, indicates the date from which metrics should be included.
 
.PARAMETER Revision
    The revision number to retrieve. If this is not specified, the latest version will be returned.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildDefinitionYaml -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    Converts a definition to YAML, optionally at a specific revision.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PropertyFilters,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLatestBuilds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MinMetricsTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Revision,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'PropertyFilters' = 'propertyFilters'
            'IncludeLatestBuilds' = 'includeLatestBuilds'
            'MinMetricsTime' = 'minMetricsTime'
            'Revision' = 'revision'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('PropertyFilters','IncludeLatestBuilds','MinMetricsTime','Revision','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}/yaml' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildFolder {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a list of build definition folders.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Path
    The path to start with.
 
.PARAMETER QueryOrder
    The order in which folders should be returned.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildFolder -Organization $organization -Path $path -Project $project -ApiVersion $apiversion
 
    Gets a list of build definition folders.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $QueryOrder,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'QueryOrder' = 'queryOrder'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('QueryOrder','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/folders/{path}' -Replace '{organization}',$Organization -Replace '{path}',$Path -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildGeneralsetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets pipeline general settings.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildGeneralsetting -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets pipeline general settings.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/generalsettings' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildLatest {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the latest build for a definition, optionally scoped to a specific branch.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Definition
    definition name with optional leading folder path, or the definition id
 
.PARAMETER BranchName
    optional parameter that indicates the specific branch to use. If not specified, the default branch is used.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildLatest -Organization $organization -Definition $definition -Project $project -ApiVersion $apiversion
 
    Gets the latest build for a definition, optionally scoped to a specific branch.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Definition,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BranchName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'BranchName' = 'branchName'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('BranchName','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/latest/{definition}' -Replace '{organization}',$Organization -Replace '{definition}',$Definition -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildMetric {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets build metrics for a project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER MinMetricsTime
    The date from which to calculate metrics.
 
.PARAMETER MetricAggregationType
    The aggregation type to use (hourly, daily).
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildMetric -Organization $organization -MetricAggregationType $metricaggregationtype -Project $project -ApiVersion $apiversion
 
    Gets build metrics for a project.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MinMetricsTime,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MetricAggregationType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'MinMetricsTime' = 'minMetricsTime'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('MinMetricsTime','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/metrics/{metricAggregationType}' -Replace '{organization}',$Organization -Replace '{metricAggregationType}',$MetricAggregationType -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildOption {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets all build definition options supported by the system.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildOption -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets all build definition options supported by the system.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/options' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildRepoBadge {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a badge that indicates the status of the most recent build for the specified branch.
 
.PARAMETER RepoType
    The repository type.
 
.PARAMETER RepoId
    The repository ID.
 
.PARAMETER BranchName
    The branch name.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildRepoBadge -RepoType $repotype -Project $project -Organization $organization -ApiVersion $apiversion
 
    Gets a badge that indicates the status of the most recent build for the specified branch.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepoType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepoId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BranchName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'RepoId' = 'repoId'
            'BranchName' = 'branchName'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('RepoId','BranchName','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/repos/{repoType}/badge' -Replace '{repoType}',$RepoType -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildResourceusage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets information about build resources in the system.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Get-AdsBuildResourceusage -ApiVersion $apiversion -Organization $organization
 
    Gets information about build resources in the system.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/build/resourceusage' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildRetention {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the project's retention settings.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildRetention -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets the project's retention settings.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/retention' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildRetentionHistory {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DaysToLookback
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildRetentionHistory -Organization $organization -ApiVersion $apiversion
 
    Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $DaysToLookback,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'DaysToLookback' = 'daysToLookback'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('DaysToLookback','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/build/retention/history' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildRetentionLease {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns any leases matching the specified MinimalRetentionLeases
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER LeaseId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER LeasesToFetch
    List of JSON-serialized MinimalRetentionLeases separated by '|'
 
.EXAMPLE
    PS C:\> Get-AdsBuildRetentionLease -Organization $organization -ApiVersion $apiversion -LeaseId $leaseid -Project $project
 
    Returns the details of the retention lease given a lease id.
 
.EXAMPLE
    PS C:\> Get-AdsBuildRetentionLease -Organization $organization -ApiVersion $apiversion -Project $project -LeasesToFetch $leasestofetch
 
    Returns any leases matching the specified MinimalRetentionLeases
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Leases_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Leases_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Leases_Get')]
        [string]
        $LeaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Leases_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $LeasesToFetch
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'LeasesToFetch' = 'leasesToFetch'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','LeasesToFetch') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/retention/leases' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($LeaseId) { $__path += "/$LeaseId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildSetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the build settings.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildSetting -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets the build settings.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/settings' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildStatu {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    <p>Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.</p> <p>If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.</p>
 
.PARAMETER JobName
    Use this job within a stage of the pipeline to render the status.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER BranchName
    Only consider the most recent build for this branch. If not specified, the default branch is used.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Definition
    Either the definition name with optional leading folder path, or the definition id.
 
.PARAMETER StageName
    Use this stage within the pipeline to render the status.
 
.PARAMETER Label
    Replaces the default text on the left side of the badge.
 
.PARAMETER Configuration
    Use this job configuration to render the status
 
.EXAMPLE
    PS C:\> Get-AdsBuildStatu -Organization $organization -ApiVersion $apiversion -Project $project -Definition $definition
 
    <p>Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.</p> <p>If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.</p>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $JobName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BranchName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Definition,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StageName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Label,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Configuration
    )
    process {
        $__mapping = @{
            'JobName' = 'jobName'
            'BranchName' = 'branchName'
            'ApiVersion' = 'api-version'
            'StageName' = 'stageName'
            'Label' = 'label'
            'Configuration' = 'configuration'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('JobName','BranchName','ApiVersion','StageName','Label','Configuration') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/status/{definition}' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{definition}',$Definition

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a list of all build tags in the project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildTag -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets a list of all build tags in the project.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/tags' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsBuildWorkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets all the work items between two builds.
 
.PARAMETER ToBuildId
    The ID of the last build.
 
.PARAMETER Top
    The maximum number of work items to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FromBuildId
    The ID of the first build.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsBuildWorkitem -ToBuildId $tobuildid -Project $project -Organization $organization -FromBuildId $frombuildid -ApiVersion $apiversion
 
    Gets all the work items between two builds.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $ToBuildId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $FromBuildId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ToBuildId' = 'toBuildId'
            'Top' = '$top'
            'FromBuildId' = 'fromBuildId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ToBuildId','Top','FromBuildId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/workitems' -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPublicBuildDefinitionBadge {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    This endpoint is deprecated. Please see the Build Status REST endpoint.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER BranchName
    The name of the branch.
 
.PARAMETER Project
    The project ID or name.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPublicBuildDefinitionBadge -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    This endpoint is deprecated. Please see the Build Status REST endpoint.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BranchName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'BranchName' = 'branchName'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('BranchName','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/public/build/definitions/{project}/{definitionId}/badge' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSourceprovider {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of source providers and their capabilities.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSourceprovider -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get a list of source providers and their capabilities.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/sourceproviders' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSourceproviderBranche {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a list of branches for the given source code repository.
 
.PARAMETER Repository
    The vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER BranchName
    If supplied, the name of the branch to check for specifically.
 
.PARAMETER ServiceEndpointId
    If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ProviderName
    The name of the source provider.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSourceproviderBranche -Organization $organization -Project $project -ProviderName $providername -ApiVersion $apiversion
 
    Gets a list of branches for the given source code repository.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Repository,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BranchName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ServiceEndpointId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProviderName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Repository' = 'repository'
            'BranchName' = 'branchName'
            'ServiceEndpointId' = 'serviceEndpointId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Repository','BranchName','ServiceEndpointId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/sourceProviders/{providerName}/branches' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{providerName}',$ProviderName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSourceproviderFilecontent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the contents of a file in the given source code repository.
 
.PARAMETER Repository
    If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Path
    The path to the file to retrieve, relative to the root of the repository.
 
.PARAMETER ServiceEndpointId
    If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ProviderName
    The name of the source provider.
 
.PARAMETER CommitOrBranch
    The identifier of the commit or branch from which a file's contents are retrieved.
 
.EXAMPLE
    PS C:\> Get-AdsSourceproviderFilecontent -Organization $organization -Project $project -ApiVersion $apiversion -ProviderName $providername
 
    Gets the contents of a file in the given source code repository.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Repository,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ServiceEndpointId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProviderName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommitOrBranch
    )
    process {
        $__mapping = @{
            'Repository' = 'repository'
            'Path' = 'path'
            'ServiceEndpointId' = 'serviceEndpointId'
            'ApiVersion' = 'api-version'
            'CommitOrBranch' = 'commitOrBranch'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Repository','Path','ServiceEndpointId','ApiVersion','CommitOrBranch') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/sourceProviders/{providerName}/filecontents' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{providerName}',$ProviderName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSourceproviderPathcontent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the contents of a directory in the given source code repository.
 
.PARAMETER Repository
    If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Path
    The path contents to list, relative to the root of the repository.
 
.PARAMETER ServiceEndpointId
    If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ProviderName
    The name of the source provider.
 
.PARAMETER CommitOrBranch
    The identifier of the commit or branch from which a file's contents are retrieved.
 
.EXAMPLE
    PS C:\> Get-AdsSourceproviderPathcontent -Organization $organization -Project $project -ApiVersion $apiversion -ProviderName $providername
 
    Gets the contents of a directory in the given source code repository.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Repository,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ServiceEndpointId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProviderName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommitOrBranch
    )
    process {
        $__mapping = @{
            'Repository' = 'repository'
            'Path' = 'path'
            'ServiceEndpointId' = 'serviceEndpointId'
            'ApiVersion' = 'api-version'
            'CommitOrBranch' = 'commitOrBranch'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Repository','Path','ServiceEndpointId','ApiVersion','CommitOrBranch') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/sourceProviders/{providerName}/pathcontents' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{providerName}',$ProviderName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSourceproviderPullrequest {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a pull request object from source provider.
 
.PARAMETER PullRequestId
    Vendor-specific id of the pull request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ServiceEndpointId
    If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ProviderName
    The name of the source provider.
 
.PARAMETER RepositoryId
    Vendor-specific identifier or the name of the repository that contains the pull request.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSourceproviderPullrequest -PullRequestId $pullrequestid -Organization $organization -Project $project -ProviderName $providername -ApiVersion $apiversion
 
    Gets a pull request object from source provider.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ServiceEndpointId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProviderName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ServiceEndpointId' = 'serviceEndpointId'
            'RepositoryId' = 'repositoryId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ServiceEndpointId','RepositoryId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/sourceProviders/{providerName}/pullrequests/{pullRequestId}' -Replace '{pullRequestId}',$PullRequestId -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{providerName}',$ProviderName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSourceproviderRepositorie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a list of source code repositories.
 
.PARAMETER Repository
    If specified, the vendor-specific identifier or the name of a single repository to get.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PageResults
    If set to true, this will limit the set of results and will return a continuation token to continue the query.
 
.PARAMETER ContinuationToken
    When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories.
 
.PARAMETER ResultSet
    'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set.
 
.PARAMETER ServiceEndpointId
    If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ProviderName
    The name of the source provider.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSourceproviderRepositorie -Organization $organization -Project $project -ProviderName $providername -ApiVersion $apiversion
 
    Gets a list of source code repositories.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Repository,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $PageResults,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResultSet,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ServiceEndpointId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProviderName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Repository' = 'repository'
            'PageResults' = 'pageResults'
            'ContinuationToken' = 'continuationToken'
            'ResultSet' = 'resultSet'
            'ServiceEndpointId' = 'serviceEndpointId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Repository','PageResults','ContinuationToken','ResultSet','ServiceEndpointId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/sourceProviders/{providerName}/repositories' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{providerName}',$ProviderName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSourceproviderWebhook {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a list of webhooks installed in the given source code repository.
 
.PARAMETER Repository
    If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ServiceEndpointId
    If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ProviderName
    The name of the source provider.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSourceproviderWebhook -Organization $organization -Project $project -ProviderName $providername -ApiVersion $apiversion
 
    Gets a list of webhooks installed in the given source code repository.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Repository,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ServiceEndpointId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProviderName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Repository' = 'repository'
            'ServiceEndpointId' = 'serviceEndpointId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Repository','ServiceEndpointId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/sourceProviders/{providerName}/webhooks' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{providerName}',$ProviderName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsBuildBuildTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds a tag to a build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER Tag
    The tag to add.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> New-AdsBuildBuildTag -Organization $organization -ApiVersion $apiversion -Tag $tag -Project $project -BuildId $buildid
 
    Adds a tag to a build.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Tag,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/tags/{tag}' -Replace '{organization}',$Organization -Replace '{tag}',$Tag -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsBuildDefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT.
 
.PARAMETER SecretsSourceDefinitionRevision
     
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SecretsSourceDefinitionId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.7' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsBuildDefinition -DefinitionId $definitionid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $SecretsSourceDefinitionRevision,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $SecretsSourceDefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'SecretsSourceDefinitionRevision' = 'secretsSourceDefinitionRevision'
            'SecretsSourceDefinitionId' = 'secretsSourceDefinitionId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('SecretsSourceDefinitionRevision','SecretsSourceDefinitionId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}' -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsBuildDefinitionTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds a tag to a definition
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER Tag
    The tag to add.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsBuildDefinitionTag -Organization $organization -DefinitionId $definitionid -Tag $tag -Project $project -ApiVersion $apiversion
 
    Adds a tag to a definition
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Tag,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{DefinitionId}/tags/{tag}' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{tag}',$Tag -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsBuildDefinitionTemplate {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates an existing build definition template.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TemplateId
    The ID of the template.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsBuildDefinitionTemplate -Organization $organization -TemplateId $templateid -Project $project -ApiVersion $apiversion
 
    Updates an existing build definition template.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TemplateId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/templates/{templateId}' -Replace '{organization}',$Organization -Replace '{templateId}',$TemplateId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsBuildFolder {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a new folder.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Path
    The full path of the folder.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsBuildFolder -Organization $organization -Path $path -Project $project -ApiVersion $apiversion
 
    Creates a new folder.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Path' = 'path'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Path','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/folders' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsBuildBuild {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes a build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.7' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Remove-AdsBuildBuild -Organization $organization -ApiVersion $apiversion -Project $project -BuildId $buildid
 
    Deletes a build.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsBuildBuildTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER Tag
    The tag to remove.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Remove-AdsBuildBuildTag -Organization $organization -ApiVersion $apiversion -Tag $tag -Project $project -BuildId $buildid
 
    Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Tag,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/tags/{tag}' -Replace '{organization}',$Organization -Replace '{tag}',$Tag -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsBuildDefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes a definition and all associated builds.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.7' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsBuildDefinition -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    Deletes a definition and all associated builds.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsBuildDefinitionTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER Tag
    The tag to remove.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsBuildDefinitionTag -Organization $organization -DefinitionId $definitionid -Tag $tag -Project $project -ApiVersion $apiversion
 
    Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Tag,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{DefinitionId}/tags/{tag}' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{tag}',$Tag -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsBuildDefinitionTemplate {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes a build definition template.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TemplateId
    The ID of the template.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsBuildDefinitionTemplate -Organization $organization -TemplateId $templateid -Project $project -ApiVersion $apiversion
 
    Deletes a build definition template.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TemplateId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/templates/{templateId}' -Replace '{organization}',$Organization -Replace '{templateId}',$TemplateId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsBuildFolder {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes a definition folder. Definitions and their corresponding builds will also be deleted.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Path
    The full path to the folder.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsBuildFolder -Organization $organization -Path $path -Project $project -ApiVersion $apiversion
 
    Deletes a definition folder. Definitions and their corresponding builds will also be deleted.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Path' = 'path'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Path','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/folders' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsBuildRetentionLease {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes specific retention leases.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Ids
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsBuildRetentionLease -Organization $organization -Ids $ids -Project $project -ApiVersion $apiversion
 
    Removes specific retention leases.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Ids,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Ids' = 'ids'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Ids','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/retention/leases' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsBuildTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a tag from builds, definitions, and from the tag store
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Tag
    The tag to remove.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsBuildTag -Organization $organization -Tag $tag -Project $project -ApiVersion $apiversion
 
    Removes a tag from builds, definitions, and from the tag store
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Tag,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/tags/{tag}' -Replace '{organization}',$Organization -Replace '{tag}',$Tag -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildAuthorizedresource {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsBuildAuthorizedresource -Organization $organization -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/authorizedresources' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildBuild {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates multiple builds.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Retry
     
 
.PARAMETER BuildId
    The ID of the build.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.7' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsBuildBuild -Organization $organization -BuildId $buildid -Project $project -ApiVersion $apiversion
 
    Updates a build.
 
.EXAMPLE
    PS C:\> Set-AdsBuildBuild -Organization $organization -Project $project -ApiVersion $apiversion
 
    Updates multiple builds.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Update Build')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Update Build')]
        [boolean]
        $Retry,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Update Build')]
        [string]
        $BuildId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Update Build')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Builds_Update Build')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Retry' = 'retry'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Retry','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($BuildId) { $__path += "/$BuildId" }

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildBuildArtifact {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Associates an artifact with a build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.5' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Set-AdsBuildBuildArtifact -Organization $organization -ApiVersion $apiversion -Project $project -BuildId $buildid
 
    Associates an artifact with a build.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/artifacts' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildBuildPropertie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates properties for a build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Set-AdsBuildBuildPropertie -Organization $organization -ApiVersion $apiversion -Project $project -BuildId $buildid
 
    Updates properties for a build.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/properties' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildBuildStage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a build stage
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER StageRefName
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
     
 
.EXAMPLE
    PS C:\> Set-AdsBuildBuildStage -Organization $organization -ApiVersion $apiversion -StageRefName $stagerefname -Project $project -BuildId $buildid
 
    Update a build stage
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StageRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/stages/{stageRefName}' -Replace '{organization}',$Organization -Replace '{stageRefName}',$StageRefName -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildBuildTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds/Removes tags from a build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Set-AdsBuildBuildTag -Organization $organization -ApiVersion $apiversion -Project $project -BuildId $buildid
 
    Adds/Removes tags from a build.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/tags' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildBuildWorkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the work items associated with a build, filtered to specific commits.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Top
    The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    The ID of the build.
 
.EXAMPLE
    PS C:\> Set-AdsBuildBuildWorkitem -Organization $organization -ApiVersion $apiversion -Project $project -BuildId $buildid
 
    Gets the work items associated with a build, filtered to specific commits.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Top' = '$top'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Top') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/workitems' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{buildId}',$BuildId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildDefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Restores a deleted definition
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The identifier of the definition to restore.
 
.PARAMETER Deleted
    When false, restores a deleted definition.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.7' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsBuildDefinition -Organization $organization -DefinitionId $definitionid -Deleted $deleted -Project $project -ApiVersion $apiversion
 
    Restores a deleted definition
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Deleted,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Deleted' = 'deleted'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Deleted','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildDefinitionPropertie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates properties for a definition.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsBuildDefinitionPropertie -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    Updates properties for a definition.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}/properties' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildDefinitionResource {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsBuildDefinitionResource -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}/resources' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildDefinitionTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds/Removes tags from a definition.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    The ID of the definition.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsBuildDefinitionTag -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    Adds/Removes tags from a definition.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{DefinitionId}/tags' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildFolder {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates an existing folder at given existing path
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Path
    The full path to the folder.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsBuildFolder -Organization $organization -Path $path -Project $project -ApiVersion $apiversion
 
    Updates an existing folder at given existing path
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Path' = 'path'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Path','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/folders' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildGeneralsetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates pipeline general settings.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsBuildGeneralsetting -Organization $organization -Project $project -ApiVersion $apiversion
 
    Updates pipeline general settings.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/generalsettings' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildRetention {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates the project's retention settings.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsBuildRetention -Organization $organization -Project $project -ApiVersion $apiversion
 
    Updates the project's retention settings.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/retention' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildRetentionLease {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds new leases for pipeline runs.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsBuildRetentionLease -Organization $organization -Project $project -ApiVersion $apiversion
 
    Adds new leases for pipeline runs.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/retention/leases' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsBuildSetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates the build settings.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsBuildSetting -Organization $organization -Project $project -ApiVersion $apiversion
 
    Updates the build settings.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/build/settings' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsSourceproviderWebhook {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Recreates the webhooks for the specified triggers in the given source code repository.
 
.PARAMETER Repository
    If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ServiceEndpointId
    If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ProviderName
    The name of the source provider.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsSourceproviderWebhook -Organization $organization -Project $project -ProviderName $providername -ApiVersion $apiversion
 
    Recreates the webhooks for the specified triggers in the given source code repository.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Repository,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ServiceEndpointId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProviderName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Repository' = 'repository'
            'ServiceEndpointId' = 'serviceEndpointId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Repository','ServiceEndpointId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/sourceProviders/{providerName}/webhooks' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{providerName}',$ProviderName

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltAgentgroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER AgentGroupName
    Name of the agent group
 
.PARAMETER AgentGroupId
    The agent group identifier
 
.PARAMETER MachineSetupInput
     
 
.PARAMETER OutgoingRequestUrls
     
 
.PARAMETER MachineAccessData
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsCltAgentgroup -AgentGroupId $agentgroupid -Organization $organization -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentGroupName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentGroupId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $MachineSetupInput,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $OutgoingRequestUrls,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $MachineAccessData,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'AgentGroupName' = 'agentGroupName'
            'MachineSetupInput' = 'machineSetupInput'
            'OutgoingRequestUrls' = 'outgoingRequestUrls'
            'MachineAccessData' = 'machineAccessData'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('AgentGroupName','MachineSetupInput','OutgoingRequestUrls','MachineAccessData','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/agentgroups/{agentGroupId}' -Replace '{agentGroupId}',$AgentGroupId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltAgentgroupAgent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER AgentGroupId
    The agent group identifier
 
.PARAMETER AgentName
    Name of the static agent
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsCltAgentgroupAgent -Organization $organization -AgentGroupId $agentgroupid -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentGroupId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'AgentName' = 'agentName'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('AgentName','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/agentGroups/{agentGroupId}/agents' -Replace '{organization}',$Organization -Replace '{agentGroupId}',$AgentGroupId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltApmApplication {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Type
    Filters the results based on the plugin type.
 
.PARAMETER ApplicationId
    Filter by APM application identifier.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsCltApmApplication -Organization $organization -ApplicationId $applicationid -ApiVersion $apiversion
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Get-AdsCltApmApplication -Organization $organization -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Applications_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Applications_Get')]
        [string]
        $ApplicationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Applications_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Type' = 'type'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Type','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/apm/applications' -Replace '{organization}',$Organization
        if ($ApplicationId) { $__path += "/$ApplicationId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltApmCounter {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Plugintype
    Currently ApplicationInsights is the only available plugin type.
 
.PARAMETER ApplicationId
    Filter by APM application identifier.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsCltApmCounter -Organization $organization -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Plugintype,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApplicationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Plugintype' = 'plugintype'
            'ApplicationId' = 'applicationId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Plugintype','ApplicationId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/apm/counters' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltApmPlugin {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Type
    Currently ApplicationInsights is the only available plugin type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsCltApmPlugin -Organization $organization -Type $type -ApiVersion $apiversion
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Get-AdsCltApmPlugin -Organization $organization -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Plugins_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Plugins_Get')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Plugins_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/apm/plugins' -Replace '{organization}',$Organization
        if ($Type) { $__path += "/$Type" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltTestdefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER TestDefinitionId
    The test definition identifier
 
.PARAMETER FromDate
    Date after which test definitions were created
 
.PARAMETER ToDate
    Date before which test definitions were crated
 
.PARAMETER Top
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsCltTestdefinition -TestDefinitionId $testdefinitionid -Organization $organization -ApiVersion $apiversion
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Get-AdsCltTestdefinition -Organization $organization -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Definitions_Get')]
        [string]
        $TestDefinitionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FromDate,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ToDate,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Definitions_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Definitions_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'FromDate' = 'fromDate'
            'ToDate' = 'toDate'
            'Top' = 'top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('FromDate','ToDate','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testdefinitions' -Replace '{organization}',$Organization
        if ($TestDefinitionId) { $__path += "/$TestDefinitionId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltTestdrop {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestDropId
    The test drop identifier
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsCltTestdrop -Organization $organization -TestDropId $testdropid -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestDropId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testdrops/{testDropId}' -Replace '{organization}',$Organization -Replace '{testDropId}',$TestDropId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltTestrun {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns test runs based on the filter specified. Returns all runs of the tenant if there is no filter.
 
.PARAMETER Name
    Name for the test run. Names are not unique. Test runs with same name are assigned sequential rolling numbers.
 
.PARAMETER TestRunId
    Unique ID of the test run
 
.PARAMETER Status
    Filter by the test run status.
 
.PARAMETER Detailed
    Include the detailed test run attributes.
 
.PARAMETER Top
    The maximum number of test runs to return.
 
.PARAMETER RetentionState
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FromDate
    Filter by the test runs that have been modified after the fromDate timestamp.
 
.PARAMETER RunType
    Valid values include: null, one of TestRunType, or "*"
 
.PARAMETER Runsourceidentifier
     
 
.PARAMETER ToDate
    Filter by the test runs that have been modified before the toDate timestamp.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.PARAMETER RequestedBy
    Filter by the user who requested the test run. Here requestedBy should be the display name of the user.
 
.EXAMPLE
    PS C:\> Get-AdsCltTestrun -TestRunId $testrunid -Organization $organization -ApiVersion $apiversion
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Get-AdsCltTestrun -Organization $organization -ApiVersion $apiversion
 
    Returns test runs based on the filter specified. Returns all runs of the tenant if there is no filter.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Runs_Get Test Run')]
        [string]
        $TestRunId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Status,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Detailed,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RetentionState,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Runs_Get Test Run')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FromDate,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Runsourceidentifier,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ToDate,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Runs_Get Test Run')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RequestedBy
    )
    process {
        $__mapping = @{
            'Name' = 'name'
            'Status' = 'status'
            'Detailed' = 'detailed'
            'Top' = 'top'
            'RetentionState' = 'retentionState'
            'FromDate' = 'fromDate'
            'RunType' = 'runType'
            'Runsourceidentifier' = 'runsourceidentifier'
            'ToDate' = 'toDate'
            'ApiVersion' = 'api-version'
            'RequestedBy' = 'requestedBy'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Name','Status','Detailed','Top','RetentionState','FromDate','RunType','Runsourceidentifier','ToDate','ApiVersion','RequestedBy') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testruns' -Replace '{organization}',$Organization
        if ($TestRunId) { $__path += "/$TestRunId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltTestrunCounterinstance {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.PARAMETER GroupNames
    Comma separated names of counter groups, such as 'Application', 'Performance' and 'Throughput'
 
.PARAMETER TestRunId
    The test run identifier
 
.PARAMETER IncludeSummary
     
 
.EXAMPLE
    PS C:\> Get-AdsCltTestrunCounterinstance -Organization $organization -ApiVersion $apiversion -GroupNames $groupnames -TestRunId $testrunid
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupNames,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestRunId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeSummary
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'GroupNames' = 'groupNames'
            'IncludeSummary' = 'includeSummary'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','GroupNames','IncludeSummary') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testRuns/{testRunId}/counterinstances' -Replace '{organization}',$Organization -Replace '{testRunId}',$TestRunId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltTestrunError {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Type
    Filter for the particular type of errors.
 
.PARAMETER Detailed
    To include the details of test errors such as messagetext, request, stacktrace, testcasename, scenarioname, and lasterrordate.
 
.PARAMETER TestRunId
    The test run identifier
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.2' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubType
    Filter for a particular subtype of errors. You should not provide error subtype without error type.
 
.EXAMPLE
    PS C:\> Get-AdsCltTestrunError -TestRunId $testrunid -ApiVersion $apiversion -Organization $organization
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Detailed,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestRunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubType
    )
    process {
        $__mapping = @{
            'Type' = 'type'
            'Detailed' = 'detailed'
            'ApiVersion' = 'api-version'
            'SubType' = 'subType'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Type','Detailed','ApiVersion','SubType') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testRuns/{testRunId}/errors' -Replace '{testRunId}',$TestRunId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltTestrunMessage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestRunId
    Id of the test run
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsCltTestrunMessage -Organization $organization -TestRunId $testrunid -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestRunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testRuns/{testRunId}/messages' -Replace '{organization}',$Organization -Replace '{testRunId}',$TestRunId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsCltTestrunResult {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestRunId
    The test run identifier
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsCltTestrunResult -Organization $organization -TestRunId $testrunid -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestRunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testRuns/{testRunId}/results' -Replace '{organization}',$Organization -Replace '{testRunId}',$TestRunId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsCltTestdefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> New-AdsCltTestdefinition -ApiVersion $apiversion -Organization $organization
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testdefinitions' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsCltAgentgroupAgent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER AgentGroupId
    The agent group identifier
 
.PARAMETER AgentName
    Name of the static agent
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsCltAgentgroupAgent -Organization $organization -AgentGroupId $agentgroupid -AgentName $agentname -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentGroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'AgentName' = 'agentName'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('AgentName','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/agentGroups/{agentGroupId}/agents' -Replace '{organization}',$Organization -Replace '{agentGroupId}',$AgentGroupId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsCltAgentgroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsCltAgentgroup -ApiVersion $apiversion -Organization $organization
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/agentgroups' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsCltTestdefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsCltTestdefinition -ApiVersion $apiversion -Organization $organization
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testdefinitions' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsCltTestdrop {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsCltTestdrop -ApiVersion $apiversion -Organization $organization
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testdrops' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsCltTestrun {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestRunId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsCltTestrun -Organization $organization -TestRunId $testrunid -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestRunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testruns/{testRunId}' -Replace '{organization}',$Organization -Replace '{testRunId}',$TestRunId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsCltTestrunCountersample {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestRunId
    The test run identifier
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsCltTestrunCountersample -Organization $organization -TestRunId $testrunid -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestRunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsclt.dev.azure.com/{organization}/_apis/clt/testRuns/{testRunId}/countersamples' -Replace '{organization}',$Organization -Replace '{testRunId}',$TestRunId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsProcesProcesse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of processes.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    ID for a process.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsProcesProcesse -Organization $organization -ProcessId $processid -ApiVersion $apiversion
 
    Get a process by ID.
 
.EXAMPLE
    PS C:\> Get-AdsProcesProcesse -Organization $organization -ApiVersion $apiversion
 
    Get a list of processes.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Processes_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Processes_Get')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Processes_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/process/processes' -Replace '{organization}',$Organization
        if ($ProcessId) { $__path += "/$ProcessId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsProject {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all projects in the organization that the authenticated user has access to.
 
.PARAMETER ContinuationToken
     
 
.PARAMETER Skip
     
 
.PARAMETER IncludeHistory
    Search within renamed projects (that had such name in the past).
 
.PARAMETER GetDefaultTeamImageUrl
     
 
.PARAMETER ProjectId
     
 
.PARAMETER IncludeCapabilities
    Include capabilities (such as source control) in the team project result (default: false).
 
.PARAMETER Top
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.PARAMETER StateFilter
    Filter on team projects in a specific team project state (default: WellFormed).
 
.EXAMPLE
    PS C:\> Get-AdsProject -ProjectId $projectid -Organization $organization -ApiVersion $apiversion
 
    Get project with the specified id or name, optionally including capabilities.
 
.EXAMPLE
    PS C:\> Get-AdsProject -Organization $organization -ApiVersion $apiversion
 
    Get all projects in the organization that the authenticated user has access to.
 
.LINK
    https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/list
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Projects_Get')]
        [boolean]
        $IncludeHistory,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $GetDefaultTeamImageUrl,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Projects_Get')]
        [string]
        $ProjectId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Projects_Get')]
        [boolean]
        $IncludeCapabilities,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Projects_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Projects_Get')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StateFilter
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'Skip' = '$skip'
            'IncludeHistory' = 'includeHistory'
            'GetDefaultTeamImageUrl' = 'getDefaultTeamImageUrl'
            'IncludeCapabilities' = 'includeCapabilities'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
            'StateFilter' = 'stateFilter'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','Skip','IncludeHistory','GetDefaultTeamImageUrl','IncludeCapabilities','Top','ApiVersion','StateFilter') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/projects' -Replace '{organization}',$Organization
        if ($ProjectId) { $__path += "/$ProjectId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsProjectPropertie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a collection of team project properties.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ProjectId
    The team project ID.
 
.PARAMETER Keys
    A comma-delimited string of team project property names. Wildcard characters ("?" and "*") are supported. If no key is specified, all properties will be returned.
 
.EXAMPLE
    PS C:\> Get-AdsProjectPropertie -Organization $organization -ApiVersion $apiversion -ProjectId $projectid
 
    Get a collection of team project properties.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Keys
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Keys' = 'keys'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Keys') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/projects/{projectId}/properties' -Replace '{organization}',$Organization -Replace '{projectId}',$ProjectId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsProjectTeam {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of teams.
 
.PARAMETER Mine
    If true return all the teams requesting user is member, otherwise return all the teams user has read access.
 
.PARAMETER Skip
    Number of teams to skip.
 
.PARAMETER TeamId
    The name or ID (GUID) of the team.
 
.PARAMETER ProjectId
     
 
.PARAMETER Top
    Maximum number of teams to return.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER ExpandIdentity
    A value indicating whether or not to expand Identity information in the result WebApiTeam object.
 
.EXAMPLE
    PS C:\> Get-AdsProjectTeam -TeamId $teamid -ProjectId $projectid -Organization $organization -ApiVersion $apiversion
 
    Get a specific team.
 
.EXAMPLE
    PS C:\> Get-AdsProjectTeam -ProjectId $projectid -Organization $organization -ApiVersion $apiversion
 
    Get a list of teams.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Mine,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Teams_Get')]
        [string]
        $TeamId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Teams_Get')]
        [string]
        $ProjectId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Teams_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Teams_Get')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Teams_Get')]
        [boolean]
        $ExpandIdentity
    )
    process {
        $__mapping = @{
            'Mine' = '$mine'
            'Skip' = '$skip'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
            'ExpandIdentity' = '$expandIdentity'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Mine','Skip','Top','ApiVersion','ExpandIdentity') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/projects/{projectId}/teams' -Replace '{projectId}',$ProjectId -Replace '{organization}',$Organization
        if ($TeamId) { $__path += "/$TeamId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsProjectTeamMember {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of members for a specific team.
 
.PARAMETER Skip
     
 
.PARAMETER TeamId
    The name or ID (GUID) of the team .
 
.PARAMETER ProjectId
    The name or ID (GUID) of the team project the team belongs to.
 
.PARAMETER Top
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsProjectTeamMember -TeamId $teamid -ProjectId $projectid -Organization $organization -ApiVersion $apiversion
 
    Get a list of members for a specific team.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TeamId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Skip' = '$skip'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/projects/{projectId}/teams/{teamId}/members' -Replace '{teamId}',$TeamId -Replace '{projectId}',$ProjectId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTeam {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of all teams.
 
.PARAMETER Mine
    If true, then return all teams requesting user is member. Otherwise return all teams user has read access.
 
.PARAMETER Skip
    Number of teams to skip.
 
.PARAMETER Top
    Maximum number of teams to return.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER ExpandIdentity
    A value indicating whether or not to expand Identity information in the result WebApiTeam object.
 
.EXAMPLE
    PS C:\> Get-AdsTeam -Organization $organization -ApiVersion $apiversion
 
    Get a list of all teams.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Mine,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ExpandIdentity
    )
    process {
        $__mapping = @{
            'Mine' = '$mine'
            'Skip' = '$skip'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
            'ExpandIdentity' = '$expandIdentity'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Mine','Skip','Top','ApiVersion','ExpandIdentity') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/teams' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsProjectAvatar {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Sets the avatar for the project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProjectId
    The ID or name of the project.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsProjectAvatar -Organization $organization -ProjectId $projectid -ApiVersion $apiversion
 
    Sets the avatar for the project.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/projects/{projectId}/avatar' -Replace '{organization}',$Organization -Replace '{projectId}',$ProjectId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsProject {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProjectId
    The project id of the project to delete.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsProject -Organization $organization -ProjectId $projectid -ApiVersion $apiversion
 
    Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/projects/{projectId}' -Replace '{organization}',$Organization -Replace '{projectId}',$ProjectId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsProjectAvatar {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes the avatar for the project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProjectId
    The ID or name of the project.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsProjectAvatar -Organization $organization -ProjectId $projectid -ApiVersion $apiversion
 
    Removes the avatar for the project.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/projects/{projectId}/avatar' -Replace '{organization}',$Organization -Replace '{projectId}',$ProjectId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsProjectTeam {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a team.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProjectId
    The name or ID (GUID) of the team project containing the team to delete.
 
.PARAMETER TeamId
    The name or ID of the team to delete.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsProjectTeam -Organization $organization -ProjectId $projectid -TeamId $teamid -ApiVersion $apiversion
 
    Delete a team.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TeamId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/projects/{projectId}/teams/{teamId}' -Replace '{organization}',$Organization -Replace '{projectId}',$ProjectId -Replace '{teamId}',$TeamId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsProject {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update an existing project's name, abbreviation, description, or restore a project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProjectId
    The project id of the project to update.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsProject -Organization $organization -ProjectId $projectid -ApiVersion $apiversion
 
    Update an existing project's name, abbreviation, description, or restore a project.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/projects/{projectId}' -Replace '{organization}',$Organization -Replace '{projectId}',$ProjectId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsProjectPropertie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create, update, and delete team project properties.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProjectId
    The team project ID.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsProjectPropertie -Organization $organization -ProjectId $projectid -ApiVersion $apiversion
 
    Create, update, and delete team project properties.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/projects/{projectId}/properties' -Replace '{organization}',$Organization -Replace '{projectId}',$ProjectId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsProjectTeam {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a team in a team project.
 
Possible failure scenarios
Invalid project name/ID (project doesn't exist) 404
Invalid team name or description 400
Team already exists 400
Insufficient privileges 400
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProjectId
    The name or ID (GUID) of the team project in which to create the team.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsProjectTeam -Organization $organization -ProjectId $projectid -ApiVersion $apiversion
 
    Create a team in a team project.
 
Possible failure scenarios
Invalid project name/ID (project doesn't exist) 404
Invalid team name or description 400
Team already exists 400
Insufficient privileges 400
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/projects/{projectId}/teams' -Replace '{organization}',$Organization -Replace '{projectId}',$ProjectId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDashboardDashboard {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of dashboards under a project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER DashboardId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDashboardDashboard -Organization $organization -Team $team -DashboardId $dashboardid -Project $project -ApiVersion $apiversion
 
    Get a dashboard by its ID.
 
.EXAMPLE
    PS C:\> Get-AdsDashboardDashboard -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Get a list of dashboards under a project.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Get')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Get')]
        [string]
        $DashboardId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/dashboard/dashboards' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project
        if ($DashboardId) { $__path += "/$DashboardId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDashboardDashboardWidget {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get widgets contained on the specified dashboard.
 
.PARAMETER ETag
    Dashboard Widgets Version
 
.PARAMETER WidgetId
    ID of the widget to read.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DashboardId
    ID of the dashboard to read.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Get-AdsDashboardDashboardWidget
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Get-AdsDashboardDashboardWidget -WidgetId $widgetid -Project $project -Organization $organization -DashboardId $dashboardid -ApiVersion $apiversion -Team $team
 
    Get the current state of the specified widget.
 
.EXAMPLE
    PS C:\> Get-AdsDashboardDashboardWidget -Project $project -Organization $organization -DashboardId $dashboardid -ApiVersion $apiversion -Team $team
 
    Get widgets contained on the specified dashboard.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')]
        [string]
        $ETag,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Get Widget')]
        [string]
        $WidgetId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Get Widget')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Get Widget')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Get Widget')]
        [string]
        $DashboardId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Get Widget')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Get Widget')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'ETag' = 'eTag'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @('ETag') -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}/widgets' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{dashboardId}',$DashboardId -Replace '{team}',$Team
        if ($WidgetId) { $__path += "/$WidgetId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDashboardWidgettype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all available widget metadata in alphabetical order, including widgets marked with isVisibleFromCatalog == false.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ContributionId
    The ID of Contribution for the Widget
 
.PARAMETER Scope
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDashboardWidgettype -Organization $organization -ContributionId $contributionid -Project $project -ApiVersion $apiversion
 
    Get the widget metadata satisfying the specified contribution ID.
 
.EXAMPLE
    PS C:\> Get-AdsDashboardWidgettype -Organization $organization -Scope $scope -Project $project -ApiVersion $apiversion
 
    Get all available widget metadata in alphabetical order, including widgets marked with isVisibleFromCatalog == false.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widget Types_Get Widget Metadata')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widget Types_Get Widget Metadata')]
        [string]
        $ContributionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Scope,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widget Types_Get Widget Metadata')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widget Types_Get Widget Metadata')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Scope' = '$scope'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Scope','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/dashboard/widgettypes' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($ContributionId) { $__path += "/$ContributionId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsDashboardDashboard {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER DashboardId
    ID of the dashboard to replace.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsDashboardDashboard -Organization $organization -Team $team -DashboardId $dashboardid -Project $project -ApiVersion $apiversion
 
    Replace configuration for the specified dashboard. Replaces Widget list on Dashboard, only if property is supplied.
 
.EXAMPLE
    PS C:\> New-AdsDashboardDashboard -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')]
        [string]
        $DashboardId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/dashboard/dashboards' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project
        if ($DashboardId) { $__path += "/$DashboardId" }

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsDashboardDashboardWidget {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Replace the widgets on specified dashboard with the supplied widgets.
 
.PARAMETER ETag
    Dashboard Widgets Version
 
.PARAMETER WidgetId
    ID of the widget to update.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DashboardId
    ID of the Dashboard to modify.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> New-AdsDashboardDashboardWidget
 
    <insert description here>
 
.EXAMPLE
    PS C:\> New-AdsDashboardDashboardWidget -WidgetId $widgetid -Project $project -Organization $organization -DashboardId $dashboardid -ApiVersion $apiversion -Team $team
 
    Override the state of the specified widget.
 
.EXAMPLE
    PS C:\> New-AdsDashboardDashboardWidget -Project $project -Organization $organization -DashboardId $dashboardid -ApiVersion $apiversion -Team $team
 
    Replace the widgets on specified dashboard with the supplied widgets.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')]
        [string]
        $ETag,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Replace Widget')]
        [string]
        $WidgetId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Replace Widget')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Replace Widget')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Replace Widget')]
        [string]
        $DashboardId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Replace Widget')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Replace Widget')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'ETag' = 'eTag'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @('ETag') -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}/widgets' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{dashboardId}',$DashboardId -Replace '{team}',$Team
        if ($WidgetId) { $__path += "/$WidgetId" }

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDashboardDashboard {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a dashboard given its ID. This also deletes the widgets associated with this dashboard.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER DashboardId
    ID of the dashboard to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsDashboardDashboard -Organization $organization -Team $team -DashboardId $dashboardid -Project $project -ApiVersion $apiversion
 
    Delete a dashboard given its ID. This also deletes the widgets associated with this dashboard.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DashboardId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{dashboardId}',$DashboardId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDashboardDashboardWidget {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete the specified widget.
 
.PARAMETER WidgetId
    ID of the widget to update.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DashboardId
    ID of the dashboard containing the widget.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Remove-AdsDashboardDashboardWidget -WidgetId $widgetid -Project $project -Organization $organization -DashboardId $dashboardid -ApiVersion $apiversion -Team $team
 
    Delete the specified widget.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WidgetId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DashboardId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}/widgets/{widgetId}' -Replace '{widgetId}',$WidgetId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{dashboardId}',$DashboardId -Replace '{team}',$Team

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDashboardDashboard {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create the supplied dashboard.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsDashboardDashboard -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Create the supplied dashboard.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/dashboard/dashboards' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDashboardDashboardWidget {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update the supplied widgets on the dashboard using supplied state. State of existing Widgets not passed in the widget list is preserved.
 
.PARAMETER ETag
    Dashboard Widgets Version
 
.PARAMETER WidgetId
    ID of the widget to update.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DashboardId
    ID of the Dashboard to modify.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Set-AdsDashboardDashboardWidget
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Set-AdsDashboardDashboardWidget -WidgetId $widgetid -Project $project -Organization $organization -DashboardId $dashboardid -ApiVersion $apiversion -Team $team
 
    Perform a partial update of the specified widget.
 
.EXAMPLE
    PS C:\> Set-AdsDashboardDashboardWidget -Project $project -Organization $organization -DashboardId $dashboardid -ApiVersion $apiversion -Team $team
 
    Update the supplied widgets on the dashboard using supplied state. State of existing Widgets not passed in the widget list is preserved.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')]
        [string]
        $ETag,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Update Widget')]
        [string]
        $WidgetId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Update Widget')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Update Widget')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Update Widget')]
        [string]
        $DashboardId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Update Widget')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Widgets_Update Widget')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'ETag' = 'eTag'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @('ETag') -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}/widgets' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{dashboardId}',$DashboardId -Replace '{team}',$Team
        if ($WidgetId) { $__path += "/$WidgetId" }

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskElasticpool {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of all Elastic Pools.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PoolId
    Pool Id of the associated TaskAgentPool
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskElasticpool -Organization $organization -PoolId $poolid -ApiVersion $apiversion
 
    Returns the Elastic Pool with the specified Pool Id.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskElasticpool -Organization $organization -ApiVersion $apiversion
 
    Get a list of all Elastic Pools.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Elasticpools_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Elasticpools_Get')]
        [string]
        $PoolId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Elasticpools_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/elasticpools' -Replace '{organization}',$Organization
        if ($PoolId) { $__path += "/$PoolId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskElasticpoolLog {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get elastic pool diagnostics logs for a specified Elastic Pool.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PoolId
    Pool Id of the Elastic Pool
 
.PARAMETER Top
    Number of elastic pool logs to retrieve
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskElasticpoolLog -Organization $organization -PoolId $poolid -ApiVersion $apiversion
 
    Get elastic pool diagnostics logs for a specified Elastic Pool.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PoolId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/elasticpools/{poolId}/logs' -Replace '{organization}',$Organization -Replace '{poolId}',$PoolId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskElasticpoolNode {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of ElasticNodes currently in the ElasticPool
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PoolId
    Pool id of the ElasticPool
 
.PARAMETER State
    Optional: Filter to only retrieve ElasticNodes in the given ElasticNodeState
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskElasticpoolNode -Organization $organization -PoolId $poolid -ApiVersion $apiversion
 
    Get a list of ElasticNodes currently in the ElasticPool
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PoolId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $State,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'State' = '$state'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('State','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/elasticpools/{poolId}/nodes' -Replace '{organization}',$Organization -Replace '{poolId}',$PoolId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskElasticpool {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update settings on a specified Elastic Pool.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PoolId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskElasticpool -Organization $organization -PoolId $poolid -ApiVersion $apiversion
 
    Update settings on a specified Elastic Pool.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PoolId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/elasticpools/{poolId}' -Replace '{organization}',$Organization -Replace '{poolId}',$PoolId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskElasticpoolNode {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update properties on a specified ElasticNode
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PoolId
     
 
.PARAMETER ElasticNodeId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskElasticpoolNode -Organization $organization -PoolId $poolid -ElasticNodeId $elasticnodeid -ApiVersion $apiversion
 
    Update properties on a specified ElasticNode
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PoolId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ElasticNodeId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/elasticpools/{poolId}/nodes/{elasticNodeId}' -Replace '{organization}',$Organization -Replace '{poolId}',$PoolId -Replace '{elasticNodeId}',$ElasticNodeId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsExtensionmanagementInstalledextension {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    List the installed extensions in the account / project collection.
 
.PARAMETER AssetTypes
    Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types.
 
.PARAMETER IncludeInstallationIssues
     
 
.PARAMETER IncludeErrors
    If true, include installed extensions with errors.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER IncludeDisabledExtensions
    If true (the default), include disabled extensions in the results.
 
.EXAMPLE
    PS C:\> Get-AdsExtensionmanagementInstalledextension -Organization $organization -ApiVersion $apiversion
 
    List the installed extensions in the account / project collection.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AssetTypes,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeInstallationIssues,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeErrors,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeDisabledExtensions
    )
    process {
        $__mapping = @{
            'AssetTypes' = 'assetTypes'
            'IncludeInstallationIssues' = 'includeInstallationIssues'
            'IncludeErrors' = 'includeErrors'
            'ApiVersion' = 'api-version'
            'IncludeDisabledExtensions' = 'includeDisabledExtensions'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('AssetTypes','IncludeInstallationIssues','IncludeErrors','ApiVersion','IncludeDisabledExtensions') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://extmgmt.dev.azure.com/{organization}/_apis/extensionmanagement/installedextensions' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsExtensionmanagementInstalledextensionsbyname {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get an installed extension by its publisher and extension name.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PublisherName
    Name of the publisher. Example: "fabrikam".
 
.PARAMETER ExtensionName
    Name of the extension. Example: "ops-tools".
 
.PARAMETER AssetTypes
    Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsExtensionmanagementInstalledextensionsbyname -Organization $organization -PublisherName $publishername -ExtensionName $extensionname -ApiVersion $apiversion
 
    Get an installed extension by its publisher and extension name.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PublisherName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ExtensionName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AssetTypes,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'AssetTypes' = 'assetTypes'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('AssetTypes','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://extmgmt.dev.azure.com/{organization}/_apis/extensionmanagement/installedextensionsbyname/{publisherName}/{extensionName}' -Replace '{organization}',$Organization -Replace '{publisherName}',$PublisherName -Replace '{extensionName}',$ExtensionName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsExtensionmanagementInstalledextensionsbyname {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Uninstall the specified extension from the account / project collection.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Reason
     
 
.PARAMETER ExtensionName
    Name of the extension. Example: "ops-tools".
 
.PARAMETER PublisherName
    Name of the publisher. Example: "fabrikam".
 
.PARAMETER ReasonCode
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsExtensionmanagementInstalledextensionsbyname -Organization $organization -ExtensionName $extensionname -PublisherName $publishername -ApiVersion $apiversion
 
    Uninstall the specified extension from the account / project collection.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Reason,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ExtensionName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PublisherName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReasonCode,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Reason' = 'reason'
            'ReasonCode' = 'reasonCode'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Reason','ReasonCode','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://extmgmt.dev.azure.com/{organization}/_apis/extensionmanagement/installedextensionsbyname/{publisherName}/{extensionName}' -Replace '{organization}',$Organization -Replace '{extensionName}',$ExtensionName -Replace '{publisherName}',$PublisherName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsExtensionmanagementInstalledextension {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update an installed extension. Typically this API is used to enable or disable an extension.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsExtensionmanagementInstalledextension -ApiVersion $apiversion -Organization $organization
 
    Update an installed extension. Typically this API is used to enable or disable an extension.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://extmgmt.dev.azure.com/{organization}/_apis/extensionmanagement/installedextensions' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsExtensionmanagementInstalledextensionsbyname {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Install the specified extension into the account / project collection.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER PublisherName
    Name of the publisher. Example: "fabrikam".
 
.PARAMETER ExtensionName
    Name of the extension. Example: "ops-tools".
 
.PARAMETER Version
     
 
.EXAMPLE
    PS C:\> Set-AdsExtensionmanagementInstalledextensionsbyname -Organization $organization -ApiVersion $apiversion -PublisherName $publishername -ExtensionName $extensionname -Version $version
 
    Install the specified extension into the account / project collection.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PublisherName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ExtensionName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://extmgmt.dev.azure.com/{organization}/_apis/extensionmanagement/installedextensionsbyname/{publisherName}/{extensionName}/{version}' -Replace '{organization}',$Organization -Replace '{publisherName}',$PublisherName -Replace '{extensionName}',$ExtensionName -Replace '{version}',$Version

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeed {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all feeds in an account where you have the provided role access.
 
If the project parameter is present, gets all feeds in the given project.
If omitted, gets all feeds in the organization.
 
.PARAMETER IncludeDeletedUpstreams
    Include upstreams that have been deleted in the response.
 
.PARAMETER FeedRole
    Filter by this role, either Administrator(4), Contributor(3), or Reader(2) level permissions.
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IncludeUrls
    Resolve names if true
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeed -FeedId $feedid -Project $project -ApiVersion $apiversion -Organization $organization
 
    Get the settings for a specific feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeed -Project $project -ApiVersion $apiversion -Organization $organization
 
    Get all feeds in an account where you have the provided role access.
 
If the project parameter is present, gets all feeds in the given project.
If omitted, gets all feeds in the organization.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Feed Management_Get Feed')]
        [boolean]
        $IncludeDeletedUpstreams,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedRole,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Feed Management_Get Feed')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Feed Management_Get Feed')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Feed Management_Get Feed')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Feed Management_Get Feed')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeUrls
    )
    process {
        $__mapping = @{
            'IncludeDeletedUpstreams' = 'includeDeletedUpstreams'
            'FeedRole' = 'feedRole'
            'ApiVersion' = 'api-version'
            'IncludeUrls' = 'includeUrls'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeDeletedUpstreams','FeedRole','ApiVersion','IncludeUrls') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feeds' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($FeedId) { $__path += "/$FeedId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedchange {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Query to determine which feeds have changed since the last call, tracked through the provided continuationToken. Only changes to a feed itself are returned and impact the continuationToken, not additions or alterations to packages within the feeds.
 
If the project parameter is present, gets all feed changes in the given project.
If omitted, gets all feed changes in the organization.
 
.PARAMETER ContinuationToken
    A continuation token which acts as a bookmark to a previously retrieved change. This token allows the user to continue retrieving changes in batches, picking up where the previous batch left off. If specified, all the changes that occur strictly after the token will be returned. If not specified or 0, iteration will start with the first change.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER BatchSize
    Number of package changes to fetch. The default value is 1000. The maximum value is 2000.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IncludeDeleted
    If true, get changes for all feeds including deleted feeds. The default value is false.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedchange -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Query a feed to determine its current state.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedchange -Organization $organization -Project $project -ApiVersion $apiversion
 
    Query to determine which feeds have changed since the last call, tracked through the provided continuationToken. Only changes to a feed itself are returned and impact the continuationToken, not additions or alterations to packages within the feeds.
 
If the project parameter is present, gets all feed changes in the given project.
If omitted, gets all feed changes in the organization.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int64]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Change Tracking_Get Feed Change')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $BatchSize,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Change Tracking_Get Feed Change')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Change Tracking_Get Feed Change')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeDeleted,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Change Tracking_Get Feed Change')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'BatchSize' = 'batchSize'
            'IncludeDeleted' = 'includeDeleted'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','BatchSize','IncludeDeleted','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feedchanges' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($FeedId) { $__path += "/$FeedId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedPackage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get details about all of the packages in the feed. Use the various filters to include or exclude information from the result set.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER IncludeDeleted
    Return deleted or unpublished versions of packages in the response. Default is False.
 
.PARAMETER IsListed
    Only applicable for NuGet packages, setting it for other package types will result in a 404. If false, delisted package versions will be returned. Use this to filter the response when includeAllVersions is set to true. Default is unset (do not return delisted packages).
 
.PARAMETER Top
    Get the top N packages (or package versions where getTopPackageVersions=true)
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IncludeAllVersions
    True to return all versions of the package in the response. Default is false (latest version only).
 
.PARAMETER PackageNameQuery
    Filter to packages that contain the provided string. Characters in the string must conform to the package name constraints.
 
.PARAMETER GetTopPackageVersions
    Changes the behavior of $top and $skip to return all versions of each package up to $top. Must be used in conjunction with includeAllVersions=true
 
.PARAMETER IsCached
    [Obsolete] Used for legacy scenarios and may be removed in future versions.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Skip
    Skip the first N packages (or package versions where getTopPackageVersions=true)
 
.PARAMETER IncludeDescription
    Return the description for every version of each package in the response. Default is False.
 
.PARAMETER IncludeUrls
    True to return REST Urls with the response. Default is True.
 
.PARAMETER PackageId
    The package Id (GUID Id, not the package name).
 
.PARAMETER IsRelease
    Only applicable for Nuget packages. Use this to filter the response when includeAllVersions is set to true. Default is True (only return packages without prerelease versioning).
 
.PARAMETER ProtocolType
    One of the supported artifact package types.
 
.PARAMETER NormalizedPackageName
    [Obsolete] Used for legacy scenarios and may be removed in future versions.
 
.PARAMETER DirectUpstreamId
    Filter results to return packages from a specific upstream.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedPackage -PackageId $packageid -FeedId $feedid -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get details about a specific package.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedPackage -FeedId $feedid -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get details about all of the packages in the feed. Use the various filters to include or exclude information from the result set.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package')]
        [boolean]
        $IncludeDeleted,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package')]
        [boolean]
        $IsListed,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package')]
        [boolean]
        $IncludeAllVersions,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageNameQuery,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $GetTopPackageVersions,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IsCached,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package')]
        [string]
        $FeedId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package')]
        [boolean]
        $IncludeDescription,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package')]
        [boolean]
        $IncludeUrls,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package')]
        [string]
        $PackageId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package')]
        [boolean]
        $IsRelease,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProtocolType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $NormalizedPackageName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DirectUpstreamId
    )
    process {
        $__mapping = @{
            'IncludeDeleted' = 'includeDeleted'
            'ProtocolType' = 'protocolType'
            'IsRelease' = 'isRelease'
            'IncludeUrls' = 'includeUrls'
            'IncludeDescription' = 'includeDescription'
            'Skip' = '$skip'
            'NormalizedPackageName' = 'normalizedPackageName'
            'IsCached' = 'isCached'
            'GetTopPackageVersions' = 'getTopPackageVersions'
            'PackageNameQuery' = 'packageNameQuery'
            'IncludeAllVersions' = 'includeAllVersions'
            'Top' = '$top'
            'IsListed' = 'isListed'
            'ApiVersion' = 'api-version'
            'DirectUpstreamId' = 'directUpstreamId'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeDeleted','ProtocolType','IsRelease','IncludeUrls','IncludeDescription','Skip','NormalizedPackageName','IsCached','GetTopPackageVersions','PackageNameQuery','IncludeAllVersions','Top','IsListed','ApiVersion','DirectUpstreamId') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/packages' -Replace '{feedId}',$FeedId -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($PackageId) { $__path += "/$PackageId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedPackagechange {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a batch of package changes made to a feed. The changes returned are 'most recent change' so if an Add is followed by an Update before you begin enumerating, you'll only see one change in the batch. While consuming batches using the continuation token, you may see changes to the same package version multiple times if they are happening as you enumerate.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER ContinuationToken
    A continuation token which acts as a bookmark to a previously retrieved change. This token allows the user to continue retrieving changes in batches, picking up where the previous batch left off. If specified, all the changes that occur strictly after the token will be returned. If not specified or 0, iteration will start with the first change.
 
.PARAMETER BatchSize
    Number of package changes to fetch. The default value is 1000. The maximum value is 2000.
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedPackagechange -FeedId $feedid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a batch of package changes made to a feed. The changes returned are 'most recent change' so if an Add is followed by an Update before you begin enumerating, you'll only see one change in the batch. While consuming batches using the continuation token, you may see changes to the same package version multiple times if they are happening as you enumerate.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int64]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $BatchSize,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'BatchSize' = 'batchSize'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','BatchSize','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/packagechanges' -Replace '{feedId}',$FeedId -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of package versions, optionally filtering by state.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER IsListed
    Only applicable for NuGet packages. If false, delisted package versions will be returned.
 
.PARAMETER PackageVersionId
    Id of the package version (GUID Id, not name).
 
.PARAMETER IsDeleted
    If set specifies whether to return only deleted or non-deleted versions of packages in the response. Default is unset (return all versions).
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PackageId
    Id of the package (GUID Id, not name).
 
.PARAMETER IncludeUrls
    True to include urls for each version. Default is true.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedPackageVersion -PackageVersionId $packageversionid -FeedId $feedid -Project $project -ApiVersion $apiversion -Organization $organization -PackageId $packageid
 
    Get details about a specific package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedPackageVersion -FeedId $feedid -Project $project -ApiVersion $apiversion -Organization $organization -PackageId $packageid
 
    Get a list of package versions, optionally filtering by state.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package Version')]
        [boolean]
        $IsListed,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package Version')]
        [string]
        $PackageVersionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package Version')]
        [boolean]
        $IsDeleted,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package Version')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package Version')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package Version')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package Version')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package Version')]
        [string]
        $PackageId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Artifact Details_Get Package Version')]
        [boolean]
        $IncludeUrls
    )
    process {
        $__mapping = @{
            'IsListed' = 'isListed'
            'IsDeleted' = 'isDeleted'
            'ApiVersion' = 'api-version'
            'IncludeUrls' = 'includeUrls'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IsListed','IsDeleted','ApiVersion','IncludeUrls') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/Packages/{packageId}/versions' -Replace '{feedId}',$FeedId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{packageId}',$PackageId
        if ($PackageVersionId) { $__path += "/$PackageVersionId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedPackageVersionProvenance {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets provenance for a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER PackageVersionId
    Id of the package version (GUID Id, not name).
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PackageId
    Id of the package (GUID Id, not name).
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedPackageVersionProvenance -PackageVersionId $packageversionid -FeedId $feedid -Project $project -Organization $organization -PackageId $packageid -ApiVersion $apiversion
 
    Gets provenance for a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/Packages/{packageId}/Versions/{packageVersionId}/provenance' -Replace '{packageVersionId}',$PackageVersionId -Replace '{feedId}',$FeedId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{packageId}',$PackageId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedPermission {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the permissions for a feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER IncludeDeletedFeeds
    If includeDeletedFeeds is true, then feedId must be specified by name and not by Guid.
 
.PARAMETER ExcludeInheritedPermissions
    True to only return explicitly set permissions on the feed. Default is false.
 
.PARAMETER IdentityDescriptor
    Filter permissions to the provided identity.
 
.PARAMETER IncludeIds
    True to include user Ids in the response. Default is false.
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedPermission -FeedId $feedid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get the permissions for a feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeDeletedFeeds,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ExcludeInheritedPermissions,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IdentityDescriptor,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IncludeDeletedFeeds' = 'includeDeletedFeeds'
            'ExcludeInheritedPermissions' = 'excludeInheritedPermissions'
            'IdentityDescriptor' = 'identityDescriptor'
            'IncludeIds' = 'includeIds'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeDeletedFeeds','ExcludeInheritedPermissions','IdentityDescriptor','IncludeIds','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/permissions' -Replace '{feedId}',$FeedId -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedrecyclebin {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Query for feeds within the recycle bin.
 
If the project parameter is present, gets all feeds in recycle bin in the given project.
If omitted, gets all feeds in recycle bin in the organization.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedrecyclebin -Organization $organization -Project $project -ApiVersion $apiversion
 
    Query for feeds within the recycle bin.
 
If the project parameter is present, gets all feeds in recycle bin in the given project.
If omitted, gets all feeds in recycle bin in the organization.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feedrecyclebin' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedRecyclebinPackage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Query for packages within the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Skip
    Skip the first N packages.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ProtocolType
    Type of package (e.g. NuGet, npm, ...).
 
.PARAMETER Top
    Get the top N packages.
 
.PARAMETER IncludeAllVersions
    True to return all versions of the package in the response. Default is false (latest version only).
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageNameQuery
    Filter to packages matching this name.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PackageId
    The package Id (GUID Id, not the package name).
 
.PARAMETER IncludeUrls
    True to return REST Urls with the response. Default is True.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedRecyclebinPackage -ApiVersion $apiversion -FeedId $feedid -Project $project -Organization $organization -PackageId $packageid
 
    Get information about a package and all its versions within the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedRecyclebinPackage -ApiVersion $apiversion -FeedId $feedid -Project $project -Organization $organization
 
    Query for packages within the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProtocolType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeAllVersions,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageNameQuery,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package')]
        [string]
        $PackageId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package')]
        [boolean]
        $IncludeUrls
    )
    process {
        $__mapping = @{
            'Skip' = '$skip'
            'ApiVersion' = 'api-version'
            'ProtocolType' = 'protocolType'
            'Top' = '$top'
            'IncludeAllVersions' = 'includeAllVersions'
            'PackageNameQuery' = 'packageNameQuery'
            'IncludeUrls' = 'includeUrls'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','ApiVersion','ProtocolType','Top','IncludeAllVersions','PackageNameQuery','IncludeUrls') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/RecycleBin/Packages' -Replace '{feedId}',$FeedId -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($PackageId) { $__path += "/$PackageId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of package versions within the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER PackageVersionId
    The package version Id 9guid Id, not the version string).
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PackageId
    The package Id (GUID Id, not the package name).
 
.PARAMETER IncludeUrls
    True to return REST Urls with the response. Default is True.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedRecyclebinPackageVersion -PackageVersionId $packageversionid -FeedId $feedid -Project $project -ApiVersion $apiversion -Organization $organization -PackageId $packageid
 
    Get information about a package version within the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedRecyclebinPackageVersion -FeedId $feedid -Project $project -ApiVersion $apiversion -Organization $organization -PackageId $packageid
 
    Get a list of package versions within the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package Version')]
        [string]
        $PackageVersionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package Version')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package Version')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package Version')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package Version')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package Version')]
        [string]
        $PackageId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recycle Bin_Get Recycle Bin Package Version')]
        [boolean]
        $IncludeUrls
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'IncludeUrls' = 'includeUrls'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','IncludeUrls') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/RecycleBin/Packages/{packageId}/Versions' -Replace '{feedId}',$FeedId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{packageId}',$PackageId
        if ($PackageVersionId) { $__path += "/$PackageVersionId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedRetentionpolicie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the retention policy for a feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedRetentionpolicie -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Get the retention policy for a feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/retentionpolicies' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedView {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all views for a feed.
 
The project parameter must be supplied if the feed was created in a project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER ViewId
    Name or Id of the view.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedView -Organization $organization -FeedId $feedid -ViewId $viewid -Project $project -ApiVersion $apiversion
 
    Get a view by Id.
 
The project parameter must be supplied if the feed was created in a project.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedView -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Get all views for a feed.
 
The project parameter must be supplied if the feed was created in a project.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Feed Management_Get Feed View')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Feed Management_Get Feed View')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Feed Management_Get Feed View')]
        [string]
        $ViewId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Feed Management_Get Feed View')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Feed Management_Get Feed View')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/views' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project
        if ($ViewId) { $__path += "/$ViewId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingGlobalpermission {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all service-wide feed creation and administration permissions.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IncludeIds
    Set to true to add IdentityIds to the permission objects.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingGlobalpermission -Organization $organization -ApiVersion $apiversion
 
    Get all service-wide feed creation and administration permissions.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IncludeIds' = 'includeIds'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeIds','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/_apis/packaging/globalpermissions' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPublicPackagingFeedPackageBadge {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Generate a SVG badge for the latest version of a package. The generated SVG is typically used as the image in an HTML link which takes users to the feed containing the package to accelerate discovery and consumption.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PackageId
    Id of the package (GUID Id, not name).
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPublicPackagingFeedPackageBadge -Organization $organization -PackageId $packageid -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Generate a SVG badge for the latest version of a package. The generated SVG is typically used as the image in an HTML link which takes users to the feed containing the package to accelerate discovery and consumption.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/public/packaging/Feeds/{feedId}/Packages/{packageId}/badge' -Replace '{organization}',$Organization -Replace '{packageId}',$PackageId -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsPackagingFeedRetentionpolicie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Set the retention policy for a feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsPackagingFeedRetentionpolicie -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Set the retention policy for a feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/retentionpolicies' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeed {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Remove a feed and all its packages. The feed moves to the recycle bin and is reversible.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeed -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Remove a feed and all its packages. The feed moves to the recycle bin and is reversible.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedrecyclebin {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedrecyclebin -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feedrecyclebin/{feedId}' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedRecyclebinPackage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Queues a job to remove all package versions from a feed's recycle bin
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or Id of the feed
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedRecyclebinPackage -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Queues a job to remove all package versions from a feed's recycle bin
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/RecycleBin/Packages' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedRetentionpolicie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete the retention policy for a feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedRetentionpolicie -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Delete the retention policy for a feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/retentionpolicies' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedView {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a feed view.
 
The project parameter must be supplied if the feed was created in a project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ViewId
    Name or Id of the view.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedView -Organization $organization -ApiVersion $apiversion -FeedId $feedid -Project $project -ViewId $viewid
 
    Delete a feed view.
 
The project parameter must be supplied if the feed was created in a project.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ViewId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/views/{viewId}' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project -Replace '{viewId}',$ViewId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeed {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a feed, a container for various package types.
 
Feeds can be created in a project if the project parameter is included in the request url.
If the project parameter is omitted, the feed will not be associated with a project and will be created at the organization level.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeed -Organization $organization -Project $project -ApiVersion $apiversion
 
    Create a feed, a container for various package types.
 
Feeds can be created in a project if the project parameter is included in the request url.
If the project parameter is omitted, the feed will not be associated with a project and will be created at the organization level.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feeds' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedPackagemetricsbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedPackagemetricsbatch -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/packagemetricsbatch' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedPackageVersionmetricsbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PackageId
     
 
.PARAMETER FeedId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedPackageVersionmetricsbatch -Organization $organization -PackageId $packageid -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/Packages/{packageId}/versionmetricsbatch' -Replace '{organization}',$Organization -Replace '{packageId}',$PackageId -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedPermission {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update the permissions on a feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedPermission -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Update the permissions on a feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/permissions' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedrecyclebin {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedrecyclebin -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feedrecyclebin/{feedId}' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedView {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a view.
 
The project parameter must be supplied if the feed was created in a project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER FeedId
    Name or Id of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ViewId
    Name or Id of the view.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedView -Organization $organization -ApiVersion $apiversion -FeedId $feedid -Project $project -ViewId $viewid
 
    Update a view.
 
The project parameter must be supplied if the feed was created in a project.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ViewId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/Feeds/{feedId}/views/{viewId}' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project -Replace '{viewId}',$ViewId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingGlobalpermission {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Set service-wide permissions that govern feed creation and administration.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingGlobalpermission -ApiVersion $apiversion -Organization $organization
 
    Set service-wide permissions that govern feed creation and administration.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://feeds.dev.azure.com/{organization}/_apis/packaging/globalpermissions' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitDeletedRepository {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve deleted git repositories.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitDeletedRepository -Organization $organization -Project $project -ApiVersion $apiversion
 
    Retrieve deleted git repositories.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/deletedrepositories' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitFavoriteRef {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the refs favorites for a repo and an identity.
 
.PARAMETER RepositoryId
    The id of the repository.
 
.PARAMETER FavoriteId
    The Id of the requested ref favorite.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IdentityId
    The id of the identity whose favorites are to be retrieved. If null, the requesting identity is used.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitFavoriteRef -FavoriteId $favoriteid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Gets the refs favorite for a favorite Id.
 
.EXAMPLE
    PS C:\> Get-AdsGitFavoriteRef -Project $project -Organization $organization -ApiVersion $apiversion
 
    Gets the refs favorites for a repo and an identity.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Refs Favorites_Get')]
        [string]
        $FavoriteId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Refs Favorites_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Refs Favorites_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IdentityId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Refs Favorites_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'RepositoryId' = 'repositoryId'
            'IdentityId' = 'identityId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('RepositoryId','IdentityId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/favorites/refs' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($FavoriteId) { $__path += "/$FavoriteId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitPolicyConfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve a list of policy configurations by a given set of scope/filtering criteria.
 
Below is a short description of how all of the query parameters interact with each other:
- repositoryId set, refName set: returns all policy configurations that *apply* to a particular branch in a repository
- repositoryId set, refName unset: returns all policy configurations that *apply* to a particular repository
- repositoryId unset, refName unset: returns all policy configurations that are *defined* at the project level
- repositoryId unset, refName set: returns all project-level branch policies, plus the project level configurations
For all of the examples above, when policyType is set, it'll restrict results to the given policy type
 
.PARAMETER ContinuationToken
    Pass a policy configuration ID to fetch the next page of results, up to top number of results, for this endpoint.
 
.PARAMETER PolicyType
    The policy type filter.
 
.PARAMETER Top
    Maximum number of policies to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository id.
 
.PARAMETER RefName
    The fully-qualified Git ref name (e.g. refs/heads/master).
 
.EXAMPLE
    PS C:\> Get-AdsGitPolicyConfiguration -Project $project -ApiVersion $apiversion -Organization $organization
 
    Retrieve a list of policy configurations by a given set of scope/filtering criteria.
 
Below is a short description of how all of the query parameters interact with each other:
- repositoryId set, refName set: returns all policy configurations that *apply* to a particular branch in a repository
- repositoryId set, refName unset: returns all policy configurations that *apply* to a particular repository
- repositoryId unset, refName unset: returns all policy configurations that are *defined* at the project level
- repositoryId unset, refName set: returns all project-level branch policies, plus the project level configurations
For all of the examples above, when policyType is set, it'll restrict results to the given policy type
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PolicyType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RefName
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'PolicyType' = 'policyType'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
            'RepositoryId' = 'repositoryId'
            'RefName' = 'refName'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','PolicyType','Top','ApiVersion','RepositoryId','RefName') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/policy/configurations' -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitPullrequest {
<#
.SYNOPSIS
    Retrieve all pull requests matching a specified criteria.
 
.DESCRIPTION
    Retrieve all pull requests matching a specified criteria.
 
Please note that description field will be truncated up to 400 symbols in the result.
 
.PARAMETER Top
    The number of pull requests to retrieve.
 
.PARAMETER ReviewerID
    If set, search for pull requests that have this identity as a reviewer.
 
.PARAMETER TargetRefName
    If set, search for pull requests into this branch.
 
.PARAMETER SourceRepositoryId
    If set, search for pull requests whose source branch is in this repository.
 
.PARAMETER CreatorId
    If set, search for pull requests that were created by this identity.
 
.PARAMETER PullRequestId
    The ID of the pull request to retrieve.
 
.PARAMETER IncludeLinks
    Whether to include the _links field on the shallow references
 
.PARAMETER Skip
    The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER MaxCommentLength
    Not used.
 
.PARAMETER SourceRefName
    If set, search for pull requests from this branch.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Status
    If set, search for pull requests that are in this state. Defaults to Active if unset.
 
.PARAMETER RepositoryId
    If set, search for pull requests whose target branch is in this repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitPullrequest -PullRequestId $pullrequestid -Organization $organization -Project $project -ApiVersion $apiversion
 
    Retrieve a pull request.
 
.EXAMPLE
    PS C:\> Get-AdsGitPullrequest -Organization $organization -Project $project -ApiVersion $apiversion
 
    Retrieve all pull requests matching a specified criteria.
 
Please note that description field will be truncated up to 400 symbols in the result.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReviewerID,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TargetRefName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SourceRepositoryId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CreatorId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request By Id')]
        [string]
        $PullRequestId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request By Id')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $MaxCommentLength,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SourceRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request By Id')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Status,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request By Id')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Top' = '$top'
            'ReviewerID' = 'searchCriteria.reviewerId'
            'TargetRefName' = 'searchCriteria.targetRefName'
            'SourceRepositoryId' = 'searchCriteria.sourceRepositoryId'
            'CreatorId' = 'searchCriteria.creatorId'
            'IncludeLinks' = 'searchCriteria.includeLinks'
            'Skip' = '$skip'
            'MaxCommentLength' = 'maxCommentLength'
            'SourceRefName' = 'searchCriteria.sourceRefName'
            'Status' = 'searchCriteria.status'
            'RepositoryId' = 'searchCriteria.repositoryId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Top','ReviewerID','TargetRefName','SourceRepositoryId','CreatorId','IncludeLinks','Skip','MaxCommentLength','SourceRefName','Status','RepositoryId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/pullrequests' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($PullRequestId) { $__path += "/$PullRequestId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRecyclebinRepository {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve soft-deleted git repositories from the recycle bin.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRecyclebinRepository -Organization $organization -Project $project -ApiVersion $apiversion
 
    Retrieve soft-deleted git repositories from the recycle bin.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/recycleBin/repositories' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepository {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve git repositories.
 
.PARAMETER IncludeHidden
    [optional] True to include hidden repositories. The default value is false.
 
.PARAMETER IncludeLinks
    [optional] True to include reference links. The default value is false.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.PARAMETER IncludeAllUrls
    [optional] True to include all remote URLs. The default value is false.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepository -Project $project -ApiVersion $apiversion -Organization $organization -RepositoryId $repositoryid
 
    Retrieve a git repository.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepository -Project $project -ApiVersion $apiversion -Organization $organization
 
    Retrieve git repositories.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeHidden,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Repositories_Get Repository')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Repositories_Get Repository')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Repositories_Get Repository')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Repositories_Get Repository')]
        [string]
        $RepositoryId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeAllUrls
    )
    process {
        $__mapping = @{
            'IncludeHidden' = 'includeHidden'
            'IncludeLinks' = 'includeLinks'
            'ApiVersion' = 'api-version'
            'IncludeAllUrls' = 'includeAllUrls'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeHidden','IncludeLinks','ApiVersion','IncludeAllUrls') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($RepositoryId) { $__path += "/$RepositoryId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryAnnotatedtag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get an annotated tag.
 
Repositories have both a name and an identifier. Identifiers are globally unique, but several projects
may contain a repository of the same name. You don't need to include the project if you specify a
repository by ID. However, if you specify a repository by name, you must also specify the project (by name or ID).
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ObjectId
    ObjectId (Sha1Id) of tag to get.
 
.PARAMETER RepositoryId
    ID or name of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryAnnotatedtag -Organization $organization -ObjectId $objectid -RepositoryId $repositoryid -Project $project -ApiVersion $apiversion
 
    Get an annotated tag.
 
Repositories have both a name and an identifier. Identifiers are globally unique, but several projects
may contain a repository of the same name. You don't need to include the project if you specify a
repository by ID. However, if you specify a repository by name, you must also specify the project (by name or ID).
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ObjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/annotatedtags/{objectId}' -Replace '{organization}',$Organization -Replace '{objectId}',$ObjectId -Replace '{repositoryId}',$RepositoryId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryBlob {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a single blob.
 
Repositories have both a name and an identifier. Identifiers are globally unique,
but several projects may contain a repository of the same name. You don't need to include
the project if you specify a repository by ID. However, if you specify a repository by name,
you must also specify the project (by name or ID).
 
.PARAMETER ResolveLfs
    If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types
 
.PARAMETER Sha1
    SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.
 
.PARAMETER FileName
    Provide a fileName to use for a download.
 
.PARAMETER Download
    If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip
 
.PARAMETER Format
    Options: json, zip, text, octetstream. If not set, defaults to the MIME type set in the Accept header.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryBlob -Sha1 $sha1 -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Get a single blob.
 
Repositories have both a name and an identifier. Identifiers are globally unique,
but several projects may contain a repository of the same name. You don't need to include
the project if you specify a repository by ID. However, if you specify a repository by name,
you must also specify the project (by name or ID).
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ResolveLfs,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Sha1,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FileName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Download,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Format,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ResolveLfs' = 'resolveLfs'
            'FileName' = 'fileName'
            'Download' = 'download'
            'Format' = '$format'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ResolveLfs','FileName','Download','Format','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/blobs/{sha1}' -Replace '{sha1}',$Sha1 -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryBranchStatistics {
<#
.SYNOPSIS
    Retrieve statistics about all branches within a repository.
 
.DESCRIPTION
    Retrieve statistics about all branches within a repository.
 
.PARAMETER VersionOptions
    Version options - Specify additional modifiers to version (e.g Previous)
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Version
    Version string identifier (name of tag/branch, SHA1 of commit)
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER VersionType
    Version type (branch, tag, or commit). Determines how Id is interpreted
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryBranchStatistics -Organization $organization -Project $project -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve statistics about all branches within a repository.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseSingularNouns', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionOptions,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionType
    )
    process {
        $__mapping = @{
            'VersionOptions' = 'baseVersionDescriptor.versionOptions'
            'Version' = 'baseVersionDescriptor.version'
            'ApiVersion' = 'api-version'
            'VersionType' = 'baseVersionDescriptor.versionType'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('VersionOptions','Version','ApiVersion','VersionType') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/stats/branches' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryCherrypick {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations.
 
.PARAMETER RefName
    The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    ID of the repository.
 
.PARAMETER CherryPickId
    ID of the cherry pick.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryCherrypick -Project $project -Organization $organization -RepositoryId $repositoryid -CherryPickId $cherrypickid -ApiVersion $apiversion
 
    Retrieve information about a cherry pick operation by cherry pick Id.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryCherrypick -RefName $refname -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Cherry Picks_Get Cherry Pick')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Cherry Picks_Get Cherry Pick')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Cherry Picks_Get Cherry Pick')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Cherry Picks_Get Cherry Pick')]
        [string]
        $CherryPickId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Cherry Picks_Get Cherry Pick')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'RefName' = 'refName'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('RefName','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/cherryPicks' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($CherryPickId) { $__path += "/$CherryPickId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryCommit {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve a list of commits associated with a particular push.
 
.PARAMETER ChangeCount
    The number of changes to include in the result.
 
.PARAMETER Skip
    The number of commits to skip.
 
.PARAMETER IncludeLinks
    Set to false to avoid including REST Url links for resources. Defaults to true.
 
.PARAMETER CommitId
    The id of the commit.
 
.PARAMETER Top
    The maximum number of commits to return ("get the top x commits").
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PushId
    The id of the push.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryCommit -CommitId $commitid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve a particular commit.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryCommit -Project $project -PushId $pushid -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve a list of commits associated with a particular push.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Commits_Get')]
        [int32]
        $ChangeCount,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Commits_Get')]
        [string]
        $CommitId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Commits_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $PushId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Commits_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Commits_Get')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Commits_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ChangeCount' = 'changeCount'
            'Skip' = 'skip'
            'IncludeLinks' = 'includeLinks'
            'Top' = 'top'
            'PushId' = 'pushId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ChangeCount','Skip','IncludeLinks','Top','PushId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($CommitId) { $__path += "/$CommitId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryCommitChange {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve changes for a particular commit.
 
.PARAMETER Skip
    The number of changes to skip.
 
.PARAMETER Top
    The maximum number of changes to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER CommitId
    The id of the commit.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryCommitChange -Project $project -CommitId $commitid -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve changes for a particular commit.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommitId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Skip' = 'skip'
            'Top' = 'top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/changes' -Replace '{project}',$Project -Replace '{commitId}',$CommitId -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryCommitMergebase {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Find the merge bases of two commits, optionally across forks. If otherRepositoryId is not specified, the merge bases will only be calculated within the context of the local repositoryNameOrId.
 
.PARAMETER CommitId
    First commit, usually the tip of the target branch of the potential merge.
 
.PARAMETER OtherCollectionId
    The collection ID where otherCommitId lives.
 
.PARAMETER RepositoryNameOrId
    ID or name of the local repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER OtherCommitId
    Other commit, usually the tip of the source branch of the potential merge.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER OtherRepositoryId
    The repository ID where otherCommitId lives.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryCommitMergebase -CommitId $commitid -RepositoryNameOrId $repositorynameorid -ApiVersion $apiversion -Project $project -OtherCommitId $othercommitid -Organization $organization
 
    Find the merge bases of two commits, optionally across forks. If otherRepositoryId is not specified, the merge bases will only be calculated within the context of the local repositoryNameOrId.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommitId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $OtherCollectionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryNameOrId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $OtherCommitId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $OtherRepositoryId
    )
    process {
        $__mapping = @{
            'OtherCollectionId' = 'otherCollectionId'
            'ApiVersion' = 'api-version'
            'OtherCommitId' = 'otherCommitId'
            'OtherRepositoryId' = 'otherRepositoryId'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('OtherCollectionId','ApiVersion','OtherCommitId','OtherRepositoryId') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryNameOrId}/commits/{commitId}/mergebases' -Replace '{commitId}',$CommitId -Replace '{repositoryNameOrId}',$RepositoryNameOrId -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryCommitStatuse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get statuses associated with the Git commit.
 
.PARAMETER Skip
    Optional. The number of statuses to ignore. Default is 0. For example, to retrieve results 101-150, set top to 50 and skip to 100.
 
.PARAMETER LatestOnly
    The flag indicates whether to get only latest statuses grouped by `Context.Name` and `Context.Genre`.
 
.PARAMETER Top
    Optional. The number of statuses to retrieve. Default is 1000.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER CommitId
    ID of the Git commit.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    ID of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryCommitStatuse -Project $project -CommitId $commitid -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Get statuses associated with the Git commit.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $LatestOnly,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommitId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Skip' = 'skip'
            'LatestOnly' = 'latestOnly'
            'Top' = 'top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','LatestOnly','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/statuses' -Replace '{project}',$Project -Replace '{commitId}',$CommitId -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryDiffCommit {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Find the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits.
 
.PARAMETER TargetVersionType
    Version type (branch, tag, or commit). Determines how Id is interpreted
 
.PARAMETER TargetVersion
    Version string identifier (name of tag/branch, SHA1 of commit)
 
.PARAMETER Skip
    Number of changes to skip
 
.PARAMETER BaseVersion
    Version string identifier (name of tag/branch, SHA1 of commit)
 
.PARAMETER BaseVersionOptions
    Version options - Specify additional modifiers to version (e.g Previous)
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DiffCommonCommit
    If true, diff between common and target commits. If false, diff between base and target commits.
 
.PARAMETER TargetVersionOptions
    Version options - Specify additional modifiers to version (e.g Previous)
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BaseVersionType
    Version type (branch, tag, or commit). Determines how Id is interpreted
 
.PARAMETER Top
    Maximum number of changes to return. Defaults to 100.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryDiffCommit -Organization $organization -Project $project -ApiVersion $apiversion -RepositoryId $repositoryid
 
    Find the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TargetVersionType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TargetVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BaseVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BaseVersionOptions,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $DiffCommonCommit,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TargetVersionOptions,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BaseVersionType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId
    )
    process {
        $__mapping = @{
            'TargetVersionType' = 'targetVersionType'
            'TargetVersion' = 'targetVersion'
            'Skip' = '$skip'
            'BaseVersion' = 'baseVersion'
            'BaseVersionOptions' = 'baseVersionOptions'
            'DiffCommonCommit' = 'diffCommonCommit'
            'TargetVersionOptions' = 'targetVersionOptions'
            'BaseVersionType' = 'baseVersionType'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('TargetVersionType','TargetVersion','Skip','BaseVersion','BaseVersionOptions','DiffCommonCommit','TargetVersionOptions','BaseVersionType','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/diffs/commits' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryFork {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve all forks of a repository in the collection.
 
.PARAMETER IncludeLinks
    True to include links.
 
.PARAMETER RepositoryNameOrId
    The name or ID of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER CollectionId
    Team project collection ID.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryFork -RepositoryNameOrId $repositorynameorid -Project $project -Organization $organization -ApiVersion $apiversion -CollectionId $collectionid
 
    Retrieve all forks of a repository in the collection.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryNameOrId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CollectionId
    )
    process {
        $__mapping = @{
            'IncludeLinks' = 'includeLinks'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeLinks','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryNameOrId}/forks/{collectionId}' -Replace '{repositoryNameOrId}',$RepositoryNameOrId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{collectionId}',$CollectionId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryForksyncrequest {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve all requested fork sync operations on this repository.
 
.PARAMETER IncludeLinks
    True to include links.
 
.PARAMETER RepositoryNameOrId
    The name or ID of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ForkSyncOperationId
    OperationId of the sync request.
 
.PARAMETER IncludeAbandoned
    True to include abandoned requests.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryForksyncrequest -RepositoryNameOrId $repositorynameorid -Project $project -Organization $organization -ForkSyncOperationId $forksyncoperationid -ApiVersion $apiversion
 
    Get a specific fork sync operation's details.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryForksyncrequest -RepositoryNameOrId $repositorynameorid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Retrieve all requested fork sync operations on this repository.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Forks_Get fork sync request')]
        [boolean]
        $IncludeLinks,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Forks_Get fork sync request')]
        [string]
        $RepositoryNameOrId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Forks_Get fork sync request')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Forks_Get fork sync request')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Forks_Get fork sync request')]
        [string]
        $ForkSyncOperationId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeAbandoned,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Forks_Get fork sync request')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IncludeLinks' = 'includeLinks'
            'IncludeAbandoned' = 'includeAbandoned'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeLinks','IncludeAbandoned','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests' -Replace '{repositoryNameOrId}',$RepositoryNameOrId -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($ForkSyncOperationId) { $__path += "/$ForkSyncOperationId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryImportrequest {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve import requests for a repository.
 
.PARAMETER ImportRequestId
    The unique identifier for the import request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.PARAMETER IncludeAbandoned
    True to include abandoned import requests in the results.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryImportrequest -ImportRequestId $importrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve a particular import request.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryImportrequest -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve import requests for a repository.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Import Requests_Get')]
        [string]
        $ImportRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Import Requests_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Import Requests_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Import Requests_Get')]
        [string]
        $RepositoryId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeAbandoned,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Import Requests_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IncludeAbandoned' = 'includeAbandoned'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeAbandoned','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/importRequests' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($ImportRequestId) { $__path += "/$ImportRequestId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryItem {
<#
.SYNOPSIS
    Get Item Metadata and/or Content for a collection of items.
 
.DESCRIPTION
    Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
 
.PARAMETER Format
    If specified, this overrides the HTTP Accept request header to return either 'json' or 'zip'. If $format is specified, then api-version should also be specified as a query parameter.
 
.PARAMETER Download
    Set to true to download the response as a file. Default is false.
 
.PARAMETER VersionType
    Version type (branch, tag, or commit). Determines how Id is interpreted
 
.PARAMETER ScopePath
    The path scope. The default is null.
 
.PARAMETER VersionOptions
    Version options - Specify additional modifiers to version (e.g Previous)
 
.PARAMETER IncludeLinks
    Set to true to include links to items. Default is false.
 
.PARAMETER LatestProcessedChange
    Set to true to include the latest changes. Default is false.
 
.PARAMETER IncludeContentMetadata
    Set to true to include content metadata. Default is false.
 
.PARAMETER RecursionLevel
    The recursion level of this request. The default is 'none', no recursion.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Version
    Version string identifier (name of tag/branch, SHA1 of commit)
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryItem -Organization $organization -Project $project -ApiVersion $apiversion -RepositoryId $repositoryid
 
    Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Format,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Download,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ScopePath,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionOptions,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $LatestProcessedChange,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeContentMetadata,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RecursionLevel,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId
    )
    process {
        $__mapping = @{
            'Format' = '$format'
            'Download' = 'download'
            'VersionType' = 'versionDescriptor.versionType'
            'ScopePath' = 'scopePath'
            'VersionOptions' = 'versionDescriptor.versionOptions'
            'IncludeLinks' = 'includeLinks'
            'LatestProcessedChange' = 'latestProcessedChange'
            'IncludeContentMetadata' = 'includeContentMetadata'
            'RecursionLevel' = 'recursionLevel'
            'Version' = 'versionDescriptor.version'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Format','Download','VersionType','ScopePath','VersionOptions','IncludeLinks','LatestProcessedChange','IncludeContentMetadata','RecursionLevel','Version','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/items' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryMerge {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a specific merge operation's details.
 
.PARAMETER IncludeLinks
    True to include links
 
.PARAMETER RepositoryNameOrId
    The name or ID of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER MergeOperationId
    OperationId of the merge request.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryMerge -RepositoryNameOrId $repositorynameorid -Project $project -Organization $organization -MergeOperationId $mergeoperationid -ApiVersion $apiversion
 
    Get a specific merge operation's details.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryNameOrId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MergeOperationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IncludeLinks' = 'includeLinks'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeLinks','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryNameOrId}/merges/{mergeOperationId}' -Replace '{repositoryNameOrId}',$RepositoryNameOrId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{mergeOperationId}',$MergeOperationId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequest {
<#
.SYNOPSIS
    Retrieve all pull requests matching a specified criteria.
 
.DESCRIPTION
    Retrieve all pull requests matching a specified criteria.
 
Please note that description field will be truncated up to 400 symbols in the result.
 
.PARAMETER Top
    The number of pull requests to retrieve.
 
.PARAMETER SearchRepositoryId
    If set, search for pull requests whose target branch is in this repository.
 
.PARAMETER Status
    If set, search for pull requests that are in this state. Defaults to Active if unset.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER SourceRefName
    If set, search for pull requests from this branch.
 
.PARAMETER MaxCommentLength
    Not used.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Skip
    The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
 
.PARAMETER IncludeWorkItemRefs
    If true, the pull request will be returned with the associated work item references.
 
.PARAMETER IncludeLinks
    Whether to include the _links field on the shallow references
 
.PARAMETER PullRequestId
    The ID of the pull request to retrieve.
 
.PARAMETER CreatorId
    If set, search for pull requests that were created by this identity.
 
.PARAMETER IncludeCommits
    If true, the pull request will be returned with the associated commits.
 
.PARAMETER SourceRepositoryId
    If set, search for pull requests whose source branch is in this repository.
 
.PARAMETER TargetRefName
    If set, search for pull requests into this branch.
 
.PARAMETER ReviewerID
    If set, search for pull requests that have this identity as a reviewer.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequest -Organization $organization -Project $project -ApiVersion $apiversion -RepositoryId $repositoryid
 
    Retrieve all pull requests matching a specified criteria.
 
Please note that description field will be truncated up to 400 symbols in the result.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequest -PullRequestId $pullrequestid -Organization $organization -Project $project -ApiVersion $apiversion -RepositoryId $repositoryid
 
    Retrieve a pull request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SearchRepositoryId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Status,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SourceRefName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request')]
        [int32]
        $MaxCommentLength,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request')]
        [boolean]
        $IncludeWorkItemRefs,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request')]
        [string]
        $PullRequestId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CreatorId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request')]
        [boolean]
        $IncludeCommits,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SourceRepositoryId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TargetRefName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReviewerID,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Requests_Get Pull Request')]
        [string]
        $RepositoryId
    )
    process {
        $__mapping = @{
            'Top' = '$top'
            'ReviewerID' = 'searchCriteria.reviewerId'
            'TargetRefName' = 'searchCriteria.targetRefName'
            'SourceRepositoryId' = 'searchCriteria.sourceRepositoryId'
            'IncludeCommits' = 'includeCommits'
            'CreatorId' = 'searchCriteria.creatorId'
            'IncludeLinks' = 'searchCriteria.includeLinks'
            'IncludeWorkItemRefs' = 'includeWorkItemRefs'
            'Skip' = '$skip'
            'MaxCommentLength' = 'maxCommentLength'
            'SourceRefName' = 'searchCriteria.sourceRefName'
            'Status' = 'searchCriteria.status'
            'SearchRepositoryId' = 'searchCriteria.repositoryId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Top','ReviewerID','TargetRefName','SourceRepositoryId','IncludeCommits','CreatorId','IncludeLinks','IncludeWorkItemRefs','Skip','MaxCommentLength','SourceRefName','Status','SearchRepositoryId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId
        if ($PullRequestId) { $__path += "/$PullRequestId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of files attached to a given pull request.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER FileName
    The name of the attachment.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestAttachment -PullRequestId $pullrequestid -FileName $filename -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Get the file content of a pull request attachment.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestAttachment -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Get a list of files attached to a given pull request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Attachments_Get')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Attachments_Get')]
        [string]
        $FileName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Attachments_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Attachments_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Attachments_Get')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Attachments_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($FileName) { $__path += "/$FileName" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestCommit {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the commits for the specified pull request.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER ContinuationToken
    The continuation token used for pagination.
 
.PARAMETER Top
    Maximum number of commits to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    ID or name of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestCommit -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Get the commits for the specified pull request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/commits' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestIteration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the list of iterations for the specified pull request.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER IncludeCommits
    If true, include the commits associated with each iteration in the response.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    ID or name of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER IterationId
    ID of the pull request iteration to return.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestIteration -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion -IterationId $iterationid
 
    Get the specified iteration for a pull request.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestIteration -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Get the list of iterations for the specified pull request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iterations_Get')]
        [string]
        $PullRequestId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeCommits,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iterations_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iterations_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iterations_Get')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iterations_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iterations_Get')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'IncludeCommits' = 'includeCommits'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeCommits','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($IterationId) { $__path += "/$IterationId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestIterationChange {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve the changes made in a pull request between two iterations.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Skip
    Optional. The number of changes to ignore. For example, to retrieve changes 101-150, set top 50 and skip to 100.
 
.PARAMETER CompareTo
    ID of the pull request iteration to compare against. The default value is zero which indicates the comparison is made against the common commit between the source and target branches
 
.PARAMETER Top
    Optional. The number of changes to retrieve. The default value is 100 and the maximum value is 2000.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER IterationId
    ID of the pull request iteration. <br /> Iteration one is the head of the source branch at the time the pull request is created and subsequent iterations are created when there are pushes to the source branch. Allowed values are between 1 and the maximum iteration on this pull request.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestIterationChange -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion -IterationId $iterationid
 
    Retrieve the changes made in a pull request between two iterations.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $CompareTo,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'Skip' = '$skip'
            'CompareTo' = '$compareTo'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','CompareTo','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/changes' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestIterationCommit {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the commits for the specified iteration of a pull request.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Skip
    Number of commits to skip.
 
.PARAMETER Top
    Maximum number of commits to return. The maximum number of commits that can be returned per batch is 500.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    ID or name of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER IterationId
    ID of the iteration from which to get the commits.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestIterationCommit -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion -IterationId $iterationid
 
    Get the commits for the specified iteration of a pull request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'Skip' = 'skip'
            'Top' = 'top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/commits' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestIterationStatuse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all the statuses associated with a pull request iteration.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER StatusId
    ID of the pull request status.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER IterationId
    ID of the pull request iteration.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestIterationStatuse -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -StatusId $statusid -ApiVersion $apiversion -IterationId $iterationid
 
    Get the specific pull request iteration status by ID. The status ID is unique within the pull request across all iterations.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestIterationStatuse -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion -IterationId $iterationid
 
    Get all the statuses associated with a pull request iteration.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iteration Statuses_Get')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iteration Statuses_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iteration Statuses_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iteration Statuses_Get')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iteration Statuses_Get')]
        [string]
        $StatusId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iteration Statuses_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Iteration Statuses_Get')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{iterationId}',$IterationId
        if ($StatusId) { $__path += "/$StatusId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestLabel {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all the labels assigned to a pull request.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER ProjectId
    Project ID or project name.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER LabelIdOrName
    The name or ID of the label requested.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestLabel -PullRequestId $pullrequestid -Project $project -LabelIdOrName $labelidorname -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieves a single label that has been assigned to a pull request.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestLabel -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Get all the labels assigned to a pull request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Labels_Get')]
        [string]
        $PullRequestId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Labels_Get')]
        [string]
        $ProjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Labels_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Labels_Get')]
        [string]
        $LabelIdOrName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Labels_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Labels_Get')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Labels_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ProjectId' = 'projectId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ProjectId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($LabelIdOrName) { $__path += "/$LabelIdOrName" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestPropertie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get external properties of the pull request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestPropertie -Organization $organization -Project $project -PullRequestId $pullrequestid -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Get external properties of the pull request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pullRequestId}',$PullRequestId -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestReviewer {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve the reviewers for a pull request
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ReviewerId
    ID of the reviewer.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestReviewer -PullRequestId $pullrequestid -Project $project -ReviewerId $reviewerid -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve information about a particular reviewer on a pull request
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestReviewer -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve the reviewers for a pull request
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Get')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Get')]
        [string]
        $ReviewerId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Get')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($ReviewerId) { $__path += "/$ReviewerId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestStatuse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all the statuses associated with a pull request.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER StatusId
    ID of the pull request status.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestStatuse -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion -StatusId $statusid
 
    Get the specific pull request status by ID. The status ID is unique within the pull request across all iterations.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestStatuse -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Get all the statuses associated with a pull request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Statuses_Get')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Statuses_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Statuses_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Statuses_Get')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Statuses_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Statuses_Get')]
        [string]
        $StatusId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($StatusId) { $__path += "/$StatusId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestThread {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve all threads in a pull request.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Iteration
    If specified, thread positions will be tracked using this iteration as the right side of the diff.
 
.PARAMETER BaseIteration
    If specified, thread positions will be tracked using this iteration as the left side of the diff.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ThreadId
    ID of the thread.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestThread -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion -ThreadId $threadid
 
    Retrieve a thread in a pull request.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestThread -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve all threads in a pull request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Threads_Get')]
        [string]
        $PullRequestId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Threads_Get')]
        [int32]
        $Iteration,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Threads_Get')]
        [int32]
        $BaseIteration,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Threads_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Threads_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Threads_Get')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Threads_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Threads_Get')]
        [string]
        $ThreadId
    )
    process {
        $__mapping = @{
            'Iteration' = '$iteration'
            'BaseIteration' = '$baseIteration'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Iteration','BaseIteration','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($ThreadId) { $__path += "/$ThreadId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestThreadComment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve all comments associated with a specific thread in a pull request.
 
.PARAMETER ThreadId
    ID of the thread.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER CommentId
    ID of the comment.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestThreadComment -ThreadId $threadid -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -CommentId $commentid -ApiVersion $apiversion
 
    Retrieve a comment associated with a specific thread in a pull request.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestThreadComment -ThreadId $threadid -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve all comments associated with a specific thread in a pull request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Thread Comments_Get')]
        [string]
        $ThreadId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Thread Comments_Get')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Thread Comments_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Thread Comments_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Thread Comments_Get')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Thread Comments_Get')]
        [string]
        $CommentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Thread Comments_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments' -Replace '{threadId}',$ThreadId -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($CommentId) { $__path += "/$CommentId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestThreadCommentLike {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get likes for a comment.
 
.PARAMETER ThreadId
    The ID of the thread that contains the comment.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER CommentId
    The ID of the comment.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestThreadCommentLike -ThreadId $threadid -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -CommentId $commentid -ApiVersion $apiversion
 
    Get likes for a comment.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ThreadId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes' -Replace '{threadId}',$ThreadId -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{commentId}',$CommentId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPullrequestWorkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve a list of work items associated with a pull request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER RepositoryId
    ID or name of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPullrequestWorkitem -Organization $organization -Project $project -PullRequestId $pullrequestid -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve a list of work items associated with a pull request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/workitems' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pullRequestId}',$PullRequestId -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryPush {
<#
.SYNOPSIS
    Retrieves pushes associated with the specified repository.
 
.DESCRIPTION
    Retrieves pushes associated with the specified repository.
 
.PARAMETER IncludeCommits
    The number of commits to include in the result.
 
.PARAMETER PusherId
    Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references.
 
.PARAMETER SearchIncludeRefUpdates
    Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references.
 
.PARAMETER RefName
    Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references.
 
.PARAMETER FromDate
    Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references.
 
.PARAMETER Skip
    Number of pushes to skip.
 
.PARAMETER PushId
    ID of the push.
 
.PARAMETER ToDate
    Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references.
 
.PARAMETER IncludeRefUpdates
    If true, include the list of refs that were updated by the push.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IncludeLinks
    Whether to include the _links field on the shallow references
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Top
    Number of pushes to return.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPush -PushId $pushid -Organization $organization -Project $project -ApiVersion $apiversion -RepositoryId $repositoryid
 
    Retrieves a particular push.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryPush -Organization $organization -Project $project -ApiVersion $apiversion -RepositoryId $repositoryid
 
    Retrieves pushes associated with the specified repository.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pushes_Get')]
        [int32]
        $IncludeCommits,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PusherId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $SearchIncludeRefUpdates,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RefName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FromDate,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pushes_Get')]
        [string]
        $PushId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ToDate,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pushes_Get')]
        [boolean]
        $IncludeRefUpdates,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pushes_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pushes_Get')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pushes_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pushes_Get')]
        [string]
        $RepositoryId
    )
    process {
        $__mapping = @{
            'IncludeCommits' = 'includeCommits'
            'PusherId' = 'searchCriteria.pusherId'
            'SearchIncludeRefUpdates' = 'searchCriteria.includeRefUpdates'
            'RefName' = 'searchCriteria.refName'
            'FromDate' = 'searchCriteria.fromDate'
            'Skip' = '$skip'
            'ToDate' = 'searchCriteria.toDate'
            'IncludeRefUpdates' = 'includeRefUpdates'
            'IncludeLinks' = 'searchCriteria.includeLinks'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeCommits','PusherId','SearchIncludeRefUpdates','RefName','FromDate','Skip','ToDate','IncludeRefUpdates','IncludeLinks','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pushes' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId
        if ($PushId) { $__path += "/$PushId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryRef {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Queries the provided repository for its refs and returns them.
 
.PARAMETER IncludeStatuses
    [optional] Includes up to the first 1000 commit statuses for each ref. The default value is false.
 
.PARAMETER IncludeLinks
    [optional] Specifies if referenceLinks should be included in the result. default is false.
 
.PARAMETER ContinuationToken
    The continuation token used for pagination.
 
.PARAMETER Filter
    [optional] A filter to apply to the refs (starts with).
 
.PARAMETER LatestStatusesOnly
    [optional] True to include only the tip commit status for each ref. This option requires `includeStatuses` to be true. The default value is false.
 
.PARAMETER IncludeMyBranches
    [optional] Includes only branches that the user owns, the branches the user favorites, and the default branch. The default value is false. Cannot be combined with the filter parameter.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Top
    [optional] Maximum number of refs to return. It cannot be bigger than 1000. If it is not provided but continuationToken is, top will default to 100.
 
.PARAMETER PeelTags
    [optional] Annotated tags will populate the PeeledObjectId property. default is false.
 
.PARAMETER FilterContains
    [optional] A filter to apply to the refs (contains).
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryRef -ApiVersion $apiversion -Organization $organization -Project $project -RepositoryId $repositoryid
 
    Queries the provided repository for its refs and returns them.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeStatuses,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Filter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $LatestStatusesOnly,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeMyBranches,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $PeelTags,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FilterContains,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId
    )
    process {
        $__mapping = @{
            'IncludeStatuses' = 'includeStatuses'
            'IncludeLinks' = 'includeLinks'
            'ContinuationToken' = 'continuationToken'
            'Filter' = 'filter'
            'LatestStatusesOnly' = 'latestStatusesOnly'
            'IncludeMyBranches' = 'includeMyBranches'
            'ApiVersion' = 'api-version'
            'Top' = '$top'
            'PeelTags' = 'peelTags'
            'FilterContains' = 'filterContains'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeStatuses','IncludeLinks','ContinuationToken','Filter','LatestStatusesOnly','IncludeMyBranches','ApiVersion','Top','PeelTags','FilterContains') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/refs' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryRevert {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve information about a revert operation for a specific branch.
 
.PARAMETER RefName
    The GitAsyncRefOperationParameters generatedRefName used for the revert operation.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    ID of the repository.
 
.PARAMETER RevertId
    ID of the revert operation.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryRevert -Project $project -Organization $organization -RepositoryId $repositoryid -RevertId $revertid -ApiVersion $apiversion
 
    Retrieve information about a revert operation by revert Id.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryRevert -RefName $refname -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve information about a revert operation for a specific branch.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Reverts_Get Revert')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Reverts_Get Revert')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Reverts_Get Revert')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Reverts_Get Revert')]
        [string]
        $RevertId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Reverts_Get Revert')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'RefName' = 'refName'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('RefName','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/reverts' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($RevertId) { $__path += "/$RevertId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositorySuggestion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve a pull request suggestion for a particular repository or team project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER RepositoryId
    ID of the git repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositorySuggestion -Organization $organization -Project $project -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve a pull request suggestion for a particular repository or team project.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/suggestions' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGitRepositoryTree {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository.
 
Repositories have both a name and an identifier. Identifiers are globally unique, but several projects may contain a repository of the same name. You don't need to include the project if you specify a repository by ID. However, if you specify a repository by name, you must also specify the project (by name or ID.
 
.PARAMETER Sha1
    SHA1 hash of the tree object.
 
.PARAMETER FileName
    Name to use if a .zip file is returned. Default is the object ID.
 
.PARAMETER ProjectId
    Project Id.
 
.PARAMETER Format
    Use "zip". Defaults to the MIME type set in the Accept header.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Recursive
    Search recursively. Include trees underneath this tree. Default is false.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    Repository Id.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGitRepositoryTree -Sha1 $sha1 -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository.
 
Repositories have both a name and an identifier. Identifiers are globally unique, but several projects may contain a repository of the same name. You don't need to include the project if you specify a repository by ID. However, if you specify a repository by name, you must also specify the project (by name or ID.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Sha1,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FileName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Format,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Recursive,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'FileName' = 'fileName'
            'ProjectId' = 'projectId'
            'Format' = '$format'
            'Recursive' = 'recursive'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('FileName','ProjectId','Format','Recursive','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/trees/{sha1}' -Replace '{sha1}',$Sha1 -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsGitRepositoryPullrequestReviewer {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add an unmaterialized identity to the reviewers of a pull request.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ReviewerId
    ID of the reviewer.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsGitRepositoryPullrequestReviewer -PullRequestId $pullrequestid -Project $project -ReviewerId $reviewerid -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Add a reviewer to a pull request or cast a vote.
 
.EXAMPLE
    PS C:\> New-AdsGitRepositoryPullrequestReviewer -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Add an unmaterialized identity to the reviewers of a pull request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Create Pull Request Reviewer')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Create Pull Request Reviewer')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Create Pull Request Reviewer')]
        [string]
        $ReviewerId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Create Pull Request Reviewer')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Create Pull Request Reviewer')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pull Request Reviewers_Create Pull Request Reviewer')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId
        if ($ReviewerId) { $__path += "/$ReviewerId" }

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGitFavoriteRef {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes the refs favorite specified
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FavoriteId
    The Id of the ref favorite to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGitFavoriteRef -Organization $organization -FavoriteId $favoriteid -Project $project -ApiVersion $apiversion
 
    Deletes the refs favorite specified
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FavoriteId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/favorites/refs/{favoriteId}' -Replace '{organization}',$Organization -Replace '{favoriteId}',$FavoriteId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGitRecyclebinRepository {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Destroy (hard delete) a soft-deleted Git repository.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The ID of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGitRecyclebinRepository -Organization $organization -RepositoryId $repositoryid -Project $project -ApiVersion $apiversion
 
    Destroy (hard delete) a soft-deleted Git repository.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/recycleBin/repositories/{repositoryId}' -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGitRepository {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a git repository
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER RepositoryId
    The ID of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGitRepository -Organization $organization -Project $project -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Delete a git repository
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGitRepositoryPullrequestAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a pull request attachment.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER FileName
    The name of the attachment to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGitRepositoryPullrequestAttachment -PullRequestId $pullrequestid -FileName $filename -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Delete a pull request attachment.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FileName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}' -Replace '{pullRequestId}',$PullRequestId -Replace '{fileName}',$FileName -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGitRepositoryPullrequestIterationStatuse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete pull request iteration status.
 
You can remove multiple statuses in one call by using Update operation.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER StatusId
    ID of the pull request status.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER IterationId
    ID of the pull request iteration.
 
.EXAMPLE
    PS C:\> Remove-AdsGitRepositoryPullrequestIterationStatuse -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -StatusId $statusid -ApiVersion $apiversion -IterationId $iterationid
 
    Delete pull request iteration status.
 
You can remove multiple statuses in one call by using Update operation.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StatusId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{statusId}',$StatusId -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGitRepositoryPullrequestLabel {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a label from the set of those assigned to the pull request.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProjectId
    Project ID or project name.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER LabelIdOrName
    The name or ID of the label requested.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGitRepositoryPullrequestLabel -PullRequestId $pullrequestid -Organization $organization -Project $project -LabelIdOrName $labelidorname -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Removes a label from the set of those assigned to the pull request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $LabelIdOrName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ProjectId' = 'projectId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ProjectId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}' -Replace '{pullRequestId}',$PullRequestId -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{labelIdOrName}',$LabelIdOrName -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGitRepositoryPullrequestReviewer {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Remove a reviewer from a pull request.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ReviewerId
    ID of the reviewer to remove.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGitRepositoryPullrequestReviewer -PullRequestId $pullrequestid -Project $project -ReviewerId $reviewerid -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Remove a reviewer from a pull request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReviewerId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{reviewerId}',$ReviewerId -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGitRepositoryPullrequestStatuse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete pull request status.
 
You can remove multiple statuses in one call by using Update operation.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER StatusId
    ID of the pull request status.
 
.EXAMPLE
    PS C:\> Remove-AdsGitRepositoryPullrequestStatuse -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion -StatusId $statusid
 
    Delete pull request status.
 
You can remove multiple statuses in one call by using Update operation.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StatusId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{statusId}',$StatusId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGitRepositoryPullrequestThreadComment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a comment associated with a specific thread in a pull request.
 
.PARAMETER ThreadId
    ID of the thread that the desired comment is in.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER CommentId
    ID of the comment.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGitRepositoryPullrequestThreadComment -ThreadId $threadid -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -CommentId $commentid -ApiVersion $apiversion
 
    Delete a comment associated with a specific thread in a pull request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ThreadId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}' -Replace '{threadId}',$ThreadId -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{commentId}',$CommentId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGitRepositoryPullrequestThreadCommentLike {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a like on a comment.
 
.PARAMETER ThreadId
    The ID of the thread that contains the comment.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER CommentId
    The ID of the comment.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGitRepositoryPullrequestThreadCommentLike -ThreadId $threadid -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -CommentId $commentid -ApiVersion $apiversion
 
    Delete a like on a comment.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ThreadId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes' -Replace '{threadId}',$ThreadId -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{commentId}',$CommentId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitFavoriteRef {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a ref favorite
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitFavoriteRef -Organization $organization -Project $project -ApiVersion $apiversion
 
    Creates a ref favorite
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/favorites/refs' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRecyclebinRepository {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The ID of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRecyclebinRepository -Organization $organization -RepositoryId $repositoryid -Project $project -ApiVersion $apiversion
 
    Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/recycleBin/repositories/{repositoryId}' -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepository {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a git repository in a team project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SourceRef
    [optional] Specify the source refs to use while creating a fork repo
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepository -Organization $organization -Project $project -ApiVersion $apiversion
 
    Create a git repository in a team project.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SourceRef,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'SourceRef' = 'sourceRef'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('SourceRef','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryAnnotatedtag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create an annotated tag.
 
Repositories have both a name and an identifier. Identifiers are globally unique, but several projects
may contain a repository of the same name. You don't need to include the project if you specify a
repository by ID. However, if you specify a repository by name, you must also specify the project (by name or ID).
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    ID or name of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryAnnotatedtag -Organization $organization -RepositoryId $repositoryid -Project $project -ApiVersion $apiversion
 
    Create an annotated tag.
 
Repositories have both a name and an identifier. Identifiers are globally unique, but several projects
may contain a repository of the same name. You don't need to include the project if you specify a
repository by ID. However, if you specify a repository by name, you must also specify the project (by name or ID).
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/annotatedtags' -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryBlob {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets one or more blobs in a zip file download.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.PARAMETER Filename
     
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryBlob -Organization $organization -ApiVersion $apiversion -Project $project -RepositoryId $repositoryid
 
    Gets one or more blobs in a zip file download.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Filename
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Filename' = 'filename'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Filename') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/blobs' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryCherrypick {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Cherry pick a specific commit or commits that are associated to a pull request into a new branch.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    ID of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryCherrypick -Organization $organization -RepositoryId $repositoryid -Project $project -ApiVersion $apiversion
 
    Cherry pick a specific commit or commits that are associated to a pull request into a new branch.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/cherryPicks' -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryCommitsbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve git commits for a project matching the search criteria
 
.PARAMETER Skip
    Number of commits to skip.
 
.PARAMETER IncludeStatuses
    True to include additional commit status information.
 
.PARAMETER Top
    Maximum number of commits to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryCommitsbatch -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Retrieve git commits for a project matching the search criteria
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeStatuses,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Skip' = '$skip'
            'IncludeStatuses' = 'includeStatuses'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','IncludeStatuses','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commitsbatch' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryCommitStatuse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create Git commit status.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER CommitId
    ID of the Git commit.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER RepositoryId
    ID of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryCommitStatuse -Organization $organization -CommitId $commitid -Project $project -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Create Git commit status.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommitId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/statuses' -Replace '{organization}',$Organization -Replace '{commitId}',$CommitId -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryForksyncrequest {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Request that another repository's refs be fetched into this one. It syncs two existing forks. To create a fork, please see the <a href="https://docs.microsoft.com/en-us/rest/api/vsts/git/repositories/create?view=azure-devops-rest-5.1"> repositories endpoint</a>
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IncludeLinks
    True to include links
 
.PARAMETER RepositoryNameOrId
    The name or ID of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryForksyncrequest -Organization $organization -RepositoryNameOrId $repositorynameorid -Project $project -ApiVersion $apiversion
 
    Request that another repository's refs be fetched into this one. It syncs two existing forks. To create a fork, please see the <a href="https://docs.microsoft.com/en-us/rest/api/vsts/git/repositories/create?view=azure-devops-rest-5.1"> repositories endpoint</a>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryNameOrId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IncludeLinks' = 'includeLinks'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeLinks','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests' -Replace '{organization}',$Organization -Replace '{repositoryNameOrId}',$RepositoryNameOrId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryImportrequest {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create an import request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryImportrequest -Organization $organization -RepositoryId $repositoryid -Project $project -ApiVersion $apiversion
 
    Create an import request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/importRequests' -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryItemsbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER RepositoryId
    The name or ID of the repository
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryItemsbatch -Organization $organization -Project $project -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/itemsbatch' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryMerge {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Request a git merge operation. Currently we support merging only 2 commits.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IncludeLinks
    True to include links
 
.PARAMETER RepositoryNameOrId
    The name or ID of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryMerge -Organization $organization -RepositoryNameOrId $repositorynameorid -Project $project -ApiVersion $apiversion
 
    Request a git merge operation. Currently we support merging only 2 commits.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryNameOrId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IncludeLinks' = 'includeLinks'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeLinks','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryNameOrId}/merges' -Replace '{organization}',$Organization -Replace '{repositoryNameOrId}',$RepositoryNameOrId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequest {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a pull request
 
These are the properties that can be updated with the API:
 - Status
 - Title
 - Description (up to 4000 characters)
 - CompletionOptions
 - MergeOptions
 - AutoCompleteSetBy.Id
 - TargetRefName (when the PR retargeting feature is enabled)
 Attempting to update other properties outside of this list will either cause the server to throw an `InvalidArgumentValueException`,
 or to silently ignore the update.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PullRequestId
    ID of the pull request to update.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequest -Organization $organization -Project $project -PullRequestId $pullrequestid -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Update a pull request
 
These are the properties that can be updated with the API:
 - Status
 - Title
 - Description (up to 4000 characters)
 - CompletionOptions
 - MergeOptions
 - AutoCompleteSetBy.Id
 - TargetRefName (when the PR retargeting feature is enabled)
 Attempting to update other properties outside of this list will either cause the server to throw an `InvalidArgumentValueException`,
 or to silently ignore the update.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pullRequestId}',$PullRequestId -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequestAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Attach a new file to a pull request.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER FileName
    The name of the file.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequestAttachment -PullRequestId $pullrequestid -FileName $filename -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Attach a new file to a pull request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FileName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}' -Replace '{pullRequestId}',$PullRequestId -Replace '{fileName}',$FileName -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequestIterationStatuse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update pull request iteration statuses collection. The only supported operation type is `remove`.
 
This operation allows to delete multiple statuses in one call.
The path of the `remove` operation should refer to the ID of the pull request status.
For example `path="/1"` refers to the pull request status with ID 1.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER IterationId
    ID of the pull request iteration.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequestIterationStatuse -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion -IterationId $iterationid
 
    Update pull request iteration statuses collection. The only supported operation type is `remove`.
 
This operation allows to delete multiple statuses in one call.
The path of the `remove` operation should refer to the ID of the pull request status.
For example `path="/1"` refers to the pull request status with ID 1.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequestLabel {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a label for a specified pull request. The only required field is the name of the new label.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER ProjectId
    Project ID or project name.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequestLabel -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Create a label for a specified pull request. The only required field is the name of the new label.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ProjectId' = 'projectId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ProjectId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels' -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequestPropertie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create or update pull request external properties. The patch operation can be `add`, `replace` or `remove`. For `add` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For `replace` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For `remove` operation, the path cannot be empty. If the path does not exist, no action will be performed.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequestPropertie -Organization $organization -Project $project -PullRequestId $pullrequestid -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Create or update pull request external properties. The patch operation can be `add`, `replace` or `remove`. For `add` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For `replace` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For `remove` operation, the path cannot be empty. If the path does not exist, no action will be performed.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pullRequestId}',$PullRequestId -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequestquery {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    This API is used to find what pull requests are related to a given commit. It can be used to either find the pull request that created a particular merge commit or it can be used to find all pull requests that have ever merged a particular commit. The input is a list of queries which each contain a list of commits. For each commit that you search against, you will get back a dictionary of commit -> pull requests.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER RepositoryId
    ID of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequestquery -Organization $organization -Project $project -RepositoryId $repositoryid -ApiVersion $apiversion
 
    This API is used to find what pull requests are related to a given commit. It can be used to either find the pull request that created a particular merge commit or it can be used to find all pull requests that have ever merged a particular commit. The input is a list of queries which each contain a list of commits. For each commit that you search against, you will get back a dictionary of commit -> pull requests.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequestquery' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequestReviewer {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add reviewers to a pull request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequestReviewer -Organization $organization -Project $project -PullRequestId $pullrequestid -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Add reviewers to a pull request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pullRequestId}',$PullRequestId -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequestShare {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Sends an e-mail notification about a specific pull request to a set of recipients
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER RepositoryId
    ID of the git repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequestShare -Organization $organization -Project $project -PullRequestId $pullrequestid -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Sends an e-mail notification about a specific pull request to a set of recipients
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/share' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pullRequestId}',$PullRequestId -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequestStatuse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update pull request statuses collection. The only supported operation type is `remove`.
 
This operation allows to delete multiple statuses in one call.
The path of the `remove` operation should refer to the ID of the pull request status.
For example `path="/1"` refers to the pull request status with ID 1.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER RepositoryId
    The repository ID of the pull request’s target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequestStatuse -Organization $organization -Project $project -PullRequestId $pullrequestid -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Update pull request statuses collection. The only supported operation type is `remove`.
 
This operation allows to delete multiple statuses in one call.
The path of the `remove` operation should refer to the ID of the pull request status.
For example `path="/1"` refers to the pull request status with ID 1.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pullRequestId}',$PullRequestId -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequestThread {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a thread in a pull request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER RepositoryId
    Repository ID of the pull request's target branch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequestThread -Organization $organization -Project $project -PullRequestId $pullrequestid -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Create a thread in a pull request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pullRequestId}',$PullRequestId -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequestThreadComment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a comment associated with a specific thread in a pull request.
 
.PARAMETER ThreadId
    ID of the thread that the desired comment is in.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER CommentId
    ID of the comment to update.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequestThreadComment -ThreadId $threadid -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -CommentId $commentid -ApiVersion $apiversion
 
    Update a comment associated with a specific thread in a pull request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ThreadId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}' -Replace '{threadId}',$ThreadId -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{commentId}',$CommentId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPullrequestThreadCommentLike {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add a like on a comment.
 
.PARAMETER ThreadId
    The ID of the thread that contains the comment.
 
.PARAMETER PullRequestId
    ID of the pull request.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The repository ID of the pull request's target branch.
 
.PARAMETER CommentId
    The ID of the comment.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPullrequestThreadCommentLike -ThreadId $threadid -PullRequestId $pullrequestid -Project $project -Organization $organization -RepositoryId $repositoryid -CommentId $commentid -ApiVersion $apiversion
 
    Add a like on a comment.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ThreadId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PullRequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes' -Replace '{threadId}',$ThreadId -Replace '{pullRequestId}',$PullRequestId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{commentId}',$CommentId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryPushe {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Push changes to the repository.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryPushe -Organization $organization -Project $project -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Push changes to the repository.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pushes' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryRef {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Lock or Unlock a branch.
 
.PARAMETER ProjectId
    ID or name of the team project. Optional if specifying an ID for repository.
 
.PARAMETER Filter
    The name of the branch to lock/unlock
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    The name or ID of the repository.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryRef -Filter $filter -Project $project -Organization $organization -RepositoryId $repositoryid -ApiVersion $apiversion
 
    Lock or Unlock a branch.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Filter,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ProjectId' = 'projectId'
            'Filter' = 'filter'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ProjectId','Filter','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/refs' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGitRepositoryRevert {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RepositoryId
    ID of the repository.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGitRepositoryRevert -Organization $organization -RepositoryId $repositoryid -Project $project -ApiVersion $apiversion
 
    Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RepositoryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/reverts' -Replace '{organization}',$Organization -Replace '{repositoryId}',$RepositoryId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGraphDescriptor {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Resolve a storage key to a descriptor
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER StorageKey
    Storage key of the subject (user, group, scope, etc.) to resolve
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGraphDescriptor -Organization $organization -StorageKey $storagekey -ApiVersion $apiversion
 
    Resolve a storage key to a descriptor
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StorageKey,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/descriptors/{storageKey}' -Replace '{organization}',$Organization -Replace '{storageKey}',$StorageKey

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGraphGroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a list of all groups in the current scope (usually organization or account).
 
The optional parameters are used to filter down the returned results. Returned results are in no guaranteed order.
 
 Since the list of groups may be large, results are returned in pages of groups. If there are more results
 than can be returned in a single page, the result set will contain a continuation token for retrieval of the
 next set of results.
 
.PARAMETER ContinuationToken
    An opaque data blob that allows the next page of data to resume immediately after where the previous page ended. The only reliable way to know if there is more data left is the presence of a continuation token.
 
.PARAMETER GroupDescriptor
    The descriptor of the desired graph group.
 
.PARAMETER SubjectTypes
    A comma separated list of user subject subtypes to reduce the retrieved results, e.g. Microsoft.IdentityModel.Claims.ClaimsIdentity
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ScopeDescriptor
    Specify a non-default scope (collection, project) to search for groups.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGraphGroup -Organization $organization -ApiVersion $apiversion
 
    Gets a list of all groups in the current scope (usually organization or account).
 
The optional parameters are used to filter down the returned results. Returned results are in no guaranteed order.
 
 Since the list of groups may be large, results are returned in pages of groups. If there are more results
 than can be returned in a single page, the result set will contain a continuation token for retrieval of the
 next set of results.
 
.EXAMPLE
    PS C:\> Get-AdsGraphGroup -GroupDescriptor $groupdescriptor -Organization $organization -ApiVersion $apiversion
 
    Get a group by its descriptor.
 
The group will be returned even if it has been deleted from the account or has had all its memberships
deleted.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Groups_Get')]
        [string]
        $GroupDescriptor,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectTypes,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Groups_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ScopeDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Groups_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'SubjectTypes' = 'subjectTypes'
            'ScopeDescriptor' = 'scopeDescriptor'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','SubjectTypes','ScopeDescriptor','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/groups' -Replace '{organization}',$Organization
        if ($GroupDescriptor) { $__path += "/$GroupDescriptor" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGraphIdentitytranslation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER LocalId
     
 
.PARAMETER MasterId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGraphIdentitytranslation -Organization $organization -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $LocalId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MasterId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'LocalId' = 'localId'
            'MasterId' = 'masterId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('LocalId','MasterId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/identitytranslation' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGraphMembership {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a membership relationship between a container and subject.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubjectDescriptor
    A descriptor to the child subject in the relationship.
 
.PARAMETER ContainerDescriptor
    A descriptor to the container in the relationship.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGraphMembership -Organization $organization -SubjectDescriptor $subjectdescriptor -ContainerDescriptor $containerdescriptor -ApiVersion $apiversion
 
    Get a membership relationship between a container and subject.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContainerDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/memberships/{subjectDescriptor}/{containerDescriptor}' -Replace '{organization}',$Organization -Replace '{subjectDescriptor}',$SubjectDescriptor -Replace '{containerDescriptor}',$ContainerDescriptor

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGraphMembershipstate {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Check whether a subject is active or inactive.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubjectDescriptor
    Descriptor of the subject (user, group, scope, etc.) to check state of
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGraphMembershipstate -Organization $organization -SubjectDescriptor $subjectdescriptor -ApiVersion $apiversion
 
    Check whether a subject is active or inactive.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/membershipstates/{subjectDescriptor}' -Replace '{organization}',$Organization -Replace '{subjectDescriptor}',$SubjectDescriptor

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGraphStoragekey {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Resolve a descriptor to a storage key.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubjectDescriptor
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGraphStoragekey -Organization $organization -SubjectDescriptor $subjectdescriptor -ApiVersion $apiversion
 
    Resolve a descriptor to a storage key.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/storagekeys/{subjectDescriptor}' -Replace '{organization}',$Organization -Replace '{subjectDescriptor}',$SubjectDescriptor

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGraphSubjectAvatar {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubjectDescriptor
     
 
.PARAMETER Size
     
 
.PARAMETER Format
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGraphSubjectAvatar -Organization $organization -SubjectDescriptor $subjectdescriptor -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptor,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Size,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Format,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Size' = 'size'
            'Format' = 'format'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Size','Format','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/Subjects/{subjectDescriptor}/avatars' -Replace '{organization}',$Organization -Replace '{subjectDescriptor}',$SubjectDescriptor

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGraphUser {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of all users in a given scope.
 
Since the list of users may be large, results are returned in pages of users. If there are more results
 than can be returned in a single page, the result set will contain a continuation token for retrieval of the
 next set of results.
 
.PARAMETER ContinuationToken
    An opaque data blob that allows the next page of data to resume immediately after where the previous page ended. The only reliable way to know if there is more data left is the presence of a continuation token.
 
.PARAMETER UserDescriptor
    The descriptor of the desired user.
 
.PARAMETER SubjectTypes
    A comma separated list of user subject subtypes to reduce the retrieved results, e.g. msa’, ‘aad’, ‘svc’ (service identity), ‘imp’ (imported identity), etc.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ScopeDescriptor
    Specify a non-default scope (collection, project) to search for users.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGraphUser -UserDescriptor $userdescriptor -Organization $organization -ApiVersion $apiversion
 
    Get a user by its descriptor.
 
.EXAMPLE
    PS C:\> Get-AdsGraphUser -Organization $organization -ApiVersion $apiversion
 
    Get a list of all users in a given scope.
 
Since the list of users may be large, results are returned in pages of users. If there are more results
 than can be returned in a single page, the result set will contain a continuation token for retrieval of the
 next set of results.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Users_Get')]
        [string]
        $UserDescriptor,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectTypes,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Users_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ScopeDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Users_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'SubjectTypes' = 'subjectTypes'
            'ScopeDescriptor' = 'scopeDescriptor'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','SubjectTypes','ScopeDescriptor','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/users' -Replace '{organization}',$Organization
        if ($UserDescriptor) { $__path += "/$UserDescriptor" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGraphUserProviderinfo {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER UserDescriptor
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGraphUserProviderinfo -Organization $organization -UserDescriptor $userdescriptor -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $UserDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/Users/{userDescriptor}/providerinfo' -Replace '{organization}',$Organization -Replace '{userDescriptor}',$UserDescriptor

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Invoke-AdsGraphMembership {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Check to see if a membership relationship between a container and subject exists.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubjectDescriptor
    The group or user that is a child subject of the relationship.
 
.PARAMETER ContainerDescriptor
    The group that is the container in the relationship.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Invoke-AdsGraphMembership -Organization $organization -SubjectDescriptor $subjectdescriptor -ContainerDescriptor $containerdescriptor -ApiVersion $apiversion
 
    Check to see if a membership relationship between a container and subject exists.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContainerDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/memberships/{subjectDescriptor}/{containerDescriptor}' -Replace '{organization}',$Organization -Replace '{subjectDescriptor}',$SubjectDescriptor -Replace '{containerDescriptor}',$ContainerDescriptor

        Invoke-RestRequest -Path $__path -Method head -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsGraphMembership {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a new membership between a container and subject.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubjectDescriptor
    A descriptor to a group or user that can be the child subject in the relationship.
 
.PARAMETER ContainerDescriptor
    A descriptor to a group that can be the container in the relationship.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsGraphMembership -Organization $organization -SubjectDescriptor $subjectdescriptor -ContainerDescriptor $containerdescriptor -ApiVersion $apiversion
 
    Create a new membership between a container and subject.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContainerDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/memberships/{subjectDescriptor}/{containerDescriptor}' -Replace '{organization}',$Organization -Replace '{subjectDescriptor}',$SubjectDescriptor -Replace '{containerDescriptor}',$ContainerDescriptor

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsGraphSubjectAvatar {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubjectDescriptor
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsGraphSubjectAvatar -Organization $organization -SubjectDescriptor $subjectdescriptor -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/Subjects/{subjectDescriptor}/avatars' -Replace '{organization}',$Organization -Replace '{subjectDescriptor}',$SubjectDescriptor

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGraphGroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes an Azure DevOps group from all of its parent groups.
 
The group will still be visible, but membership
 checks for the group, and all descendants which derive membership through it, will return false.”
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupDescriptor
    The descriptor of the group to delete.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGraphGroup -Organization $organization -GroupDescriptor $groupdescriptor -ApiVersion $apiversion
 
    Removes an Azure DevOps group from all of its parent groups.
 
The group will still be visible, but membership
 checks for the group, and all descendants which derive membership through it, will return false.”
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/groups/{groupDescriptor}' -Replace '{organization}',$Organization -Replace '{groupDescriptor}',$GroupDescriptor

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGraphMembership {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes a membership between a container and subject.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubjectDescriptor
    A descriptor to a group or user that is the child subject in the relationship.
 
.PARAMETER ContainerDescriptor
    A descriptor to a group that is the container in the relationship.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGraphMembership -Organization $organization -SubjectDescriptor $subjectdescriptor -ContainerDescriptor $containerdescriptor -ApiVersion $apiversion
 
    Deletes a membership between a container and subject.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContainerDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/memberships/{subjectDescriptor}/{containerDescriptor}' -Replace '{organization}',$Organization -Replace '{subjectDescriptor}',$SubjectDescriptor -Replace '{containerDescriptor}',$ContainerDescriptor

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGraphSubjectAvatar {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubjectDescriptor
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGraphSubjectAvatar -Organization $organization -SubjectDescriptor $subjectdescriptor -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/Subjects/{subjectDescriptor}/avatars' -Replace '{organization}',$Organization -Replace '{subjectDescriptor}',$SubjectDescriptor

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGraphUser {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Disables a user.
 
The user will still be visible, but membership checks for the user will return false.”
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER UserDescriptor
    The descriptor of the user to delete.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsGraphUser -Organization $organization -UserDescriptor $userdescriptor -ApiVersion $apiversion
 
    Disables a user.
 
The user will still be visible, but membership checks for the user will return false.”
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $UserDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/users/{userDescriptor}' -Replace '{organization}',$Organization -Replace '{userDescriptor}',$UserDescriptor

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Request-AdsGraphAccess {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Request-AdsGraphAccess -ApiVersion $apiversion -Organization $organization
 
    <insert description here>
 
.LINK
    https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/request-access/request-access?view=azure-devops-rest-6.0
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseSingularNouns', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/requestaccess' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGraphGroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a new Azure DevOps group or materialize an existing AAD group.
 
The body of the request must be a derived type of GraphGroupCreationContext:
  * GraphGroupVstsCreationContext - Create a new Azure DevOps group that is not backed by an external provider.
  * GraphGroupMailAddressCreationContext - Create a new group using the mail address as a reference to an existing group from an external AD or AAD backed provider.
  * GraphGroupOriginIdCreationContext - Create a new group using the OriginID as a reference to a group from an external AD or AAD backed provider.
 
 Optionally, you can add the newly created group as a member of an existing Azure DevOps group and/or specify a custom storage key for the group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ScopeDescriptor
    A descriptor referencing the scope (collection, project) in which the group should be created. If omitted, will be created in the scope of the enclosing account or organization. Valid only for VSTS groups.
 
.PARAMETER GroupDescriptors
    A comma separated list of descriptors referencing groups you want the graph group to join
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGraphGroup -Organization $organization -ApiVersion $apiversion
 
    Create a new Azure DevOps group or materialize an existing AAD group.
 
The body of the request must be a derived type of GraphGroupCreationContext:
  * GraphGroupVstsCreationContext - Create a new Azure DevOps group that is not backed by an external provider.
  * GraphGroupMailAddressCreationContext - Create a new group using the mail address as a reference to an existing group from an external AD or AAD backed provider.
  * GraphGroupOriginIdCreationContext - Create a new group using the OriginID as a reference to a group from an external AD or AAD backed provider.
 
 Optionally, you can add the newly created group as a member of an existing Azure DevOps group and/or specify a custom storage key for the group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ScopeDescriptor,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupDescriptors,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ScopeDescriptor' = 'scopeDescriptor'
            'GroupDescriptors' = 'groupDescriptors'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ScopeDescriptor','GroupDescriptors','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/groups' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGraphSubjectlookup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Resolve descriptors to users, groups or scopes (Subjects) in a batch.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsGraphSubjectlookup -ApiVersion $apiversion -Organization $organization
 
    Resolve descriptors to users, groups or scopes (Subjects) in a batch.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/subjectlookup' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGraphSubjectquery {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Search for Azure Devops users, or/and groups. Results will be returned in a batch with no more than 100 graph subjects.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsGraphSubjectquery -ApiVersion $apiversion -Organization $organization
 
    Search for Azure Devops users, or/and groups. Results will be returned in a batch with no more than 100 graph subjects.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/subjectquery' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGraphUser {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Materialize an existing AAD or MSA user into the VSTS account.
 
NOTE: Created users are not active in an account unless they have been explicitly assigned a parent group at creation time or have signed in
  and been autolicensed through AAD group memberships.
 
 Adding a user to an account is required before the user can be added to VSTS groups or assigned an asset.
 
 The body of the request must be a derived type of GraphUserCreationContext:
  * GraphUserMailAddressCreationContext - Create a new user using the mail address as a reference to an existing user from an external AD or AAD backed provider.
  * GraphUserOriginIdCreationContext - Create a new user using the OriginID as a reference to an existing user from an external AD or AAD backed provider.
  * GraphUserPrincipalNameCreationContext - Create a new user using the principal name as a reference to an existing user from an external AD or AAD backed provider.
 
 If the user to be added corresponds to a user that was previously deleted, then that user will be restored.
 
 Optionally, you can add the newly created user as a member of an existing VSTS group and/or specify a custom storage key for the user.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupDescriptors
    A comma separated list of descriptors of groups you want the graph user to join
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGraphUser -Organization $organization -ApiVersion $apiversion
 
    Materialize an existing AAD or MSA user into the VSTS account.
 
NOTE: Created users are not active in an account unless they have been explicitly assigned a parent group at creation time or have signed in
  and been autolicensed through AAD group memberships.
 
 Adding a user to an account is required before the user can be added to VSTS groups or assigned an asset.
 
 The body of the request must be a derived type of GraphUserCreationContext:
  * GraphUserMailAddressCreationContext - Create a new user using the mail address as a reference to an existing user from an external AD or AAD backed provider.
  * GraphUserOriginIdCreationContext - Create a new user using the OriginID as a reference to an existing user from an external AD or AAD backed provider.
  * GraphUserPrincipalNameCreationContext - Create a new user using the principal name as a reference to an existing user from an external AD or AAD backed provider.
 
 If the user to be added corresponds to a user that was previously deleted, then that user will be restored.
 
 Optionally, you can add the newly created user as a member of an existing VSTS group and/or specify a custom storage key for the user.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupDescriptors,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'GroupDescriptors' = 'groupDescriptors'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('GroupDescriptors','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/graph/users' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsIdentitie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Resolve legacy identity information for use with older APIs such as the Security APIs
 
.PARAMETER QueryMembership
    The membership information to include with the identities. Values can be None for no membership data or Direct to include the groups that the identity is a member of and the identities that are a member of this identity (groups only)
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Descriptors
    A comma separated list of identity descriptors to resolve
 
.PARAMETER FilterValue
    The search value, as specified by the searchFilter.
 
.PARAMETER SearchFilter
    The type of search to perform. Values can be AccountName (domain\alias), DisplayName, MailAddress, General (display name, account name, or unique name), or LocalGroupName (only search Azure Devops groups).
 
.PARAMETER SubjectDescriptors
    A comma seperated list of subject descriptors to resolve
 
.PARAMETER IdentityIds
    A comma seperated list of storage keys to resolve
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsIdentitie -Organization $organization -ApiVersion $apiversion
 
    Resolve legacy identity information for use with older APIs such as the Security APIs
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $QueryMembership,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Descriptors,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FilterValue,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SearchFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptors,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IdentityIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'QueryMembership' = 'queryMembership'
            'Descriptors' = 'descriptors'
            'FilterValue' = 'filterValue'
            'SearchFilter' = 'searchFilter'
            'SubjectDescriptors' = 'subjectDescriptors'
            'IdentityIds' = 'identityIds'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('QueryMembership','Descriptors','FilterValue','SearchFilter','SubjectDescriptors','IdentityIds','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/identities' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedMavenContent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Fulfills Maven package file download requests by either returning the URL of the requested package file or, in the case of Azure DevOps Server (OnPrem), returning the content as a stream.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Version
    Version of the package
 
.PARAMETER FileName
    File name to download
 
.PARAMETER ArtifactId
    ArtifactId of the maven package
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    GroupId of the maven package
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedMavenContent -Version $version -FileName $filename -ArtifactId $artifactid -FeedId $feedid -Project $project -Organization $organization -GroupId $groupid -ApiVersion $apiversion
 
    Fulfills Maven package file download requests by either returning the URL of the requested package file or, in the case of Azure DevOps Server (OnPrem), returning the content as a stream.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FileName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/maven/{groupId}/{artifactId}/{version}/{fileName}/content' -Replace '{version}',$Version -Replace '{fileName}',$FileName -Replace '{artifactId}',$ArtifactId -Replace '{feedId}',$FeedId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedMavenGroupArtifactUpstreaming {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the upstreaming behavior of a package within the context of a feed
 
.PARAMETER ArtifactId
    The artifact id of the package
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Feed
    The name or id of the feed
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    The group id of the package
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedMavenGroupArtifactUpstreaming -ArtifactId $artifactid -Project $project -Feed $feed -Organization $organization -GroupId $groupid -ApiVersion $apiversion
 
    Get the upstreaming behavior of a package within the context of a feed
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Feed,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feed}/maven/groups/{groupId}/artifacts/{artifactId}/upstreaming' -Replace '{artifactId}',$ArtifactId -Replace '{project}',$Project -Replace '{feed}',$Feed -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedMavenGroupArtifactVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get information about a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Version
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ArtifactId
    Artifact ID of the package.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Feed
    Name or ID of the feed.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    Group ID of the package.
 
.PARAMETER ShowDeleted
    True to show information for deleted packages.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedMavenGroupArtifactVersion -Version $version -ApiVersion $apiversion -ArtifactId $artifactid -Project $project -Feed $feed -Organization $organization -GroupId $groupid
 
    Get information about a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Feed,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ShowDeleted
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'ShowDeleted' = 'showDeleted'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','ShowDeleted') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feed}/maven/groups/{groupId}/artifacts/{artifactId}/versions/{version}' -Replace '{version}',$Version -Replace '{artifactId}',$ArtifactId -Replace '{project}',$Project -Replace '{feed}',$Feed -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedMavenRecyclebinGroupArtifactVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get information about a package version in the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Version
    Version of the package.
 
.PARAMETER ArtifactId
    Artifact ID of the package.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Feed
    Name or ID of the feed.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    Group ID of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedMavenRecyclebinGroupArtifactVersion -Version $version -ArtifactId $artifactid -Project $project -Feed $feed -Organization $organization -GroupId $groupid -ApiVersion $apiversion
 
    Get information about a package version in the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Feed,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feed}/maven/RecycleBin/groups/{groupId}/artifacts/{artifactId}/versions/{version}' -Replace '{version}',$Version -Replace '{artifactId}',$ArtifactId -Replace '{project}',$Project -Replace '{feed}',$Feed -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedMavenGroupArtifactVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a package version from the feed and move it to the feed's recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Version
    Version of the package.
 
.PARAMETER ArtifactId
    Artifact ID of the package.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Feed
    Name or ID of the feed.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    Group ID of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedMavenGroupArtifactVersion -Version $version -ArtifactId $artifactid -Project $project -Feed $feed -Organization $organization -GroupId $groupid -ApiVersion $apiversion
 
    Delete a package version from the feed and move it to the feed's recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Feed,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feed}/maven/groups/{groupId}/artifacts/{artifactId}/versions/{version}' -Replace '{version}',$Version -Replace '{artifactId}',$ArtifactId -Replace '{project}',$Project -Replace '{feed}',$Feed -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedMavenRecyclebinGroupArtifactVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Permanently delete a package from a feed's recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Version
    Version of the package.
 
.PARAMETER ArtifactId
    Artifact ID of the package.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Feed
    Name or ID of the feed.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    Group ID of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedMavenRecyclebinGroupArtifactVersion -Version $version -ArtifactId $artifactid -Project $project -Feed $feed -Organization $organization -GroupId $groupid -ApiVersion $apiversion
 
    Permanently delete a package from a feed's recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Feed,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feed}/maven/RecycleBin/groups/{groupId}/artifacts/{artifactId}/versions/{version}' -Replace '{version}',$Version -Replace '{artifactId}',$ArtifactId -Replace '{project}',$Project -Replace '{feed}',$Feed -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedMavenGroupArtifactUpstreaming {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Set the upstreaming behavior of a package within the context of a feed
 
The package does not need to necessarily exist in the feed prior to setting the behavior.
This assists with packages that are not yet ingested from an upstream, yet the feed owner wants
to apply a specific behavior on the first ingestion.
 
.PARAMETER ArtifactId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Feed
    The name or id of the feed
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedMavenGroupArtifactUpstreaming -ArtifactId $artifactid -Project $project -Feed $feed -Organization $organization -GroupId $groupid -ApiVersion $apiversion
 
    Set the upstreaming behavior of a package within the context of a feed
 
The package does not need to necessarily exist in the feed prior to setting the behavior.
This assists with packages that are not yet ingested from an upstream, yet the feed owner wants
to apply a specific behavior on the first ingestion.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Feed,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feed}/maven/groups/{groupId}/artifacts/{artifactId}/upstreaming' -Replace '{artifactId}',$ArtifactId -Replace '{project}',$Project -Replace '{feed}',$Feed -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedMavenGroupArtifactVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update state for a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Version
    Version of the package.
 
.PARAMETER ArtifactId
    Artifact ID of the package.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Feed
    Name or ID of the feed.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    Group ID of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedMavenGroupArtifactVersion -Version $version -ArtifactId $artifactid -Project $project -Feed $feed -Organization $organization -GroupId $groupid -ApiVersion $apiversion
 
    Update state for a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Feed,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feed}/maven/groups/{groupId}/artifacts/{artifactId}/versions/{version}' -Replace '{version}',$Version -Replace '{artifactId}',$ArtifactId -Replace '{project}',$Project -Replace '{feed}',$Feed -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedMavenPackagesbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Feed which contains the packages to update.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedMavenPackagesbatch -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/maven/packagesbatch' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedMavenRecyclebinGroupArtifactVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Restore a package version from the recycle bin to its associated feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Version
    Version of the package.
 
.PARAMETER ArtifactId
    Artifact ID of the package.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Feed
    Name or ID of the feed.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    Group ID of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedMavenRecyclebinGroupArtifactVersion -Version $version -ArtifactId $artifactid -Project $project -Feed $feed -Organization $organization -GroupId $groupid -ApiVersion $apiversion
 
    Restore a package version from the recycle bin to its associated feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Feed,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feed}/maven/RecycleBin/groups/{groupId}/artifacts/{artifactId}/versions/{version}' -Replace '{version}',$Version -Replace '{artifactId}',$ArtifactId -Replace '{project}',$Project -Replace '{feed}',$Feed -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedMavenRecyclebinPackagesbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete or restore several package versions from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Feed
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedMavenRecyclebinPackagesbatch -Organization $organization -Feed $feed -Project $project -ApiVersion $apiversion
 
    Delete or restore several package versions from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Feed,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feed}/maven/RecycleBin/packagesBatch' -Replace '{organization}',$Organization -Replace '{feed}',$Feed -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGroupEntitlement {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the group entitlements for an account.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    ID of the group.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsGroupEntitlement -Organization $organization -GroupId $groupid -ApiVersion $apiversion
 
    Get a group entitlement.
 
If the group entitlement does not exist, returns null.
 
.EXAMPLE
    PS C:\> Get-AdsGroupEntitlement -Organization $organization -ApiVersion $apiversion
 
    Get the group entitlements for an account.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Group Entitlements_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Group Entitlements_Get')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Group Entitlements_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsaex.dev.azure.com/{organization}/_apis/groupentitlements' -Replace '{organization}',$Organization
        if ($GroupId) { $__path += "/$GroupId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsGroupEntitlementMember {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get direct members of a Group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER GroupId
    Id of the Group.
 
.PARAMETER PagingToken
    Paging Token from the previous page fetched. If the 'pagingToken' is null, the results would be fetched from the beginning of the Members List.
 
.PARAMETER MaxResults
    Maximum number of results to retrieve.
 
.EXAMPLE
    PS C:\> Get-AdsGroupEntitlementMember -Organization $organization -ApiVersion $apiversion -GroupId $groupid
 
    Get direct members of a Group.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PagingToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $MaxResults
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'PagingToken' = 'pagingToken'
            'MaxResults' = 'maxResults'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','PagingToken','MaxResults') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsaex.dev.azure.com/{organization}/_apis/GroupEntitlements/{groupId}/members' -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsUserEntitlement {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a paged set of user entitlements matching the filter and sort criteria built with properties that match the select input.
 
.PARAMETER ContinuationToken
    Continuation token for getting the next page of data set. If null is passed, gets the first page.
 
.PARAMETER Select
    Comma (",") separated list of properties to select in the result entitlements. names of the properties are - 'Projects, 'Extensions' and 'Grouprules'.
 
.PARAMETER UserId
    ID of the user.
 
.PARAMETER OrderBy
    PropertyName and Order (separated by a space ( )) to sort on (e.g. lastAccessed desc). Order defaults to ascending. valid properties to order by are dateCreated, lastAccessed, and name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Filter
    Equality operators relating to searching user entitlements seperated by and clauses. Valid filters include: licenseId, licenseStatus, userType, and name. licenseId: filters based on license assignment using license names. i.e. licenseId eq 'Account-Stakeholder' or licenseId eq 'Account-Express'. licenseStatus: filters based on license status. currently only supports disabled. i.e. licenseStatus eq 'Disabled'. To get disabled basic licenses, you would pass (licenseId eq 'Account-Express' and licenseStatus eq 'Disabled') userType: filters off identity type. Suppored types are member or guest i.e. userType eq 'member'. name: filters on if the user's display name or email contians given input. i.e. get all users with "test" in email or displayname is "name eq 'test'". A valid query could be: (licenseId eq 'Account-Stakeholder' or (licenseId eq 'Account-Express' and licenseStatus eq 'Disabled')) and name eq 'test' and userType eq 'guest'.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsUserEntitlement -UserId $userid -Organization $organization -ApiVersion $apiversion
 
    Get User Entitlement for a user.
 
.EXAMPLE
    PS C:\> Get-AdsUserEntitlement -Organization $organization -ApiVersion $apiversion
 
    Get a paged set of user entitlements matching the filter and sort criteria built with properties that match the select input.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Select,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'User Entitlements_Get')]
        [string]
        $UserId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $OrderBy,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'User Entitlements_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Filter,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'User Entitlements_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'Select' = 'select'
            'OrderBy' = '$orderBy'
            'Filter' = '$filter'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','Select','OrderBy','Filter','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsaex.dev.azure.com/{organization}/_apis/userentitlements' -Replace '{organization}',$Organization
        if ($UserId) { $__path += "/$UserId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsUserEntitlementsummary {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get summary of Licenses, Extension, Projects, Groups and their assignments in the collection.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Select
    Comma (",") separated list of properties to select. Supported property names are {AccessLevels, Licenses, Projects, Groups}.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsUserEntitlementsummary -Organization $organization -ApiVersion $apiversion
 
    Get summary of Licenses, Extension, Projects, Groups and their assignments in the collection.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Select,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Select' = 'select'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Select','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsaex.dev.azure.com/{organization}/_apis/userentitlementsummary' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsGroupEntitlementMember {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add a member to a Group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER GroupId
    Id of the Group.
 
.PARAMETER MemberId
    Id of the member to add.
 
.EXAMPLE
    PS C:\> New-AdsGroupEntitlementMember -Organization $organization -ApiVersion $apiversion -GroupId $groupid -MemberId $memberid
 
    Add a member to a Group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MemberId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsaex.dev.azure.com/{organization}/_apis/GroupEntitlements/{groupId}/members/{memberId}' -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId -Replace '{memberId}',$MemberId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGroupEntitlement {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a group entitlement.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER GroupId
    ID of the group to delete.
 
.PARAMETER RuleOption
    RuleOption [ApplyGroupRule/TestApplyGroupRule] - specifies if the rules defined in group entitlement should be deleted and the changes are applied to it’s members (default option) or just be tested
 
.PARAMETER RemoveGroupMembership
    Optional parameter that specifies whether the group with the given ID should be removed from all other groups
 
.EXAMPLE
    PS C:\> Remove-AdsGroupEntitlement -Organization $organization -ApiVersion $apiversion -GroupId $groupid
 
    Delete a group entitlement.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RuleOption,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $RemoveGroupMembership
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'RuleOption' = 'ruleOption'
            'RemoveGroupMembership' = 'removeGroupMembership'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','RuleOption','RemoveGroupMembership') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsaex.dev.azure.com/{organization}/_apis/groupentitlements/{groupId}' -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsGroupEntitlementMember {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Remove a member from a Group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER GroupId
    Id of the group.
 
.PARAMETER MemberId
    Id of the member to remove.
 
.EXAMPLE
    PS C:\> Remove-AdsGroupEntitlementMember -Organization $organization -ApiVersion $apiversion -GroupId $groupid -MemberId $memberid
 
    Remove a member from a Group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MemberId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsaex.dev.azure.com/{organization}/_apis/GroupEntitlements/{groupId}/members/{memberId}' -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId -Replace '{memberId}',$MemberId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsUserEntitlement {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a user from the account.
 
The delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships.
The user would continue to have access to the account if she is member of an AAD group, that is added directly to the account.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER UserId
    ID of the user.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsUserEntitlement -Organization $organization -UserId $userid -ApiVersion $apiversion
 
    Delete a user from the account.
 
The delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships.
The user would continue to have access to the account if she is member of an AAD group, that is added directly to the account.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $UserId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsaex.dev.azure.com/{organization}/_apis/userentitlements/{userId}' -Replace '{organization}',$Organization -Replace '{userId}',$UserId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsGroupEntitlement {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update entitlements (License Rule, Extensions Rule, Project memberships etc.) for a group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    ID of the group.
 
.PARAMETER RuleOption
    RuleOption [ApplyGroupRule/TestApplyGroupRule] - specifies if the rules defined in group entitlement should be updated and the changes are applied to it’s members (default option) or just be tested
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsGroupEntitlement -Organization $organization -GroupId $groupid -ApiVersion $apiversion
 
    Update entitlements (License Rule, Extensions Rule, Project memberships etc.) for a group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RuleOption,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'RuleOption' = 'ruleOption'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('RuleOption','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsaex.dev.azure.com/{organization}/_apis/groupentitlements/{groupId}' -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsUserEntitlement {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add a user, assign license and extensions and make them a member of a project group in an account.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsUserEntitlement -ApiVersion $apiversion -Organization $organization
 
    Add a user, assign license and extensions and make them a member of a project group in an account.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsaex.dev.azure.com/{organization}/_apis/userentitlements' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsNotificationDiagnosticlogEntrie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of diagnostic logs for this service.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER StartTime
    Start time for the time range to query in.
 
.PARAMETER EndTime
    End time for the time range to query in.
 
.PARAMETER EntryId
    The ID of the specific log to query for.
 
.PARAMETER Source
    ID specifying which type of logs to check diagnostics for.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsNotificationDiagnosticlogEntrie -Organization $organization -EntryId $entryid -Source $source -ApiVersion $apiversion
 
    Get a list of diagnostic logs for this service.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StartTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EndTime,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EntryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Source,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'StartTime' = 'startTime'
            'EndTime' = 'endTime'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('StartTime','EndTime','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/diagnosticlogs/{source}/entries/{entryId}' -Replace '{organization}',$Organization -Replace '{entryId}',$EntryId -Replace '{source}',$Source

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsNotificationEventtype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    List available event types for this service. Optionally filter by only event types for the specified publisher.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER EventType
    The ID of the event type.
 
.PARAMETER PublisherId
    Limit to event types for this publisher
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsNotificationEventtype -Organization $organization -EventType $eventtype -ApiVersion $apiversion
 
    Get a specific event type.
 
.EXAMPLE
    PS C:\> Get-AdsNotificationEventtype -Organization $organization -ApiVersion $apiversion
 
    List available event types for this service. Optionally filter by only event types for the specified publisher.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Event Types_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Event Types_Get')]
        [string]
        $EventType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PublisherId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Event Types_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'PublisherId' = 'publisherId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('PublisherId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/eventtypes' -Replace '{organization}',$Organization
        if ($EventType) { $__path += "/$EventType" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsNotificationSetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Get-AdsNotificationSetting -ApiVersion $apiversion -Organization $organization
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/settings' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsNotificationSubscriber {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get delivery preferences of a notifications subscriber.
 
.PARAMETER SubscriberId
    ID of the user or group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsNotificationSubscriber -SubscriberId $subscriberid -Organization $organization -ApiVersion $apiversion
 
    Get delivery preferences of a notifications subscriber.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubscriberId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/subscribers/{subscriberId}' -Replace '{subscriberId}',$SubscriberId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsNotificationSubscription {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group.
 
.PARAMETER TargetId
    User or Group ID
 
.PARAMETER SubscriptionId
     
 
.PARAMETER Ids
    List of subscription IDs
 
.PARAMETER QueryFlags
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsNotificationSubscription -SubscriptionId $subscriptionid -Organization $organization -ApiVersion $apiversion
 
    Get a notification subscription by its ID.
 
.EXAMPLE
    PS C:\> Get-AdsNotificationSubscription -Organization $organization -ApiVersion $apiversion
 
    Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TargetId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Subscriptions_Get')]
        [string]
        $SubscriptionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Ids,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Subscriptions_Get')]
        [string]
        $QueryFlags,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Subscriptions_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Subscriptions_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'TargetId' = 'targetId'
            'Ids' = 'ids'
            'QueryFlags' = 'queryFlags'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('TargetId','Ids','QueryFlags','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/subscriptions' -Replace '{organization}',$Organization
        if ($SubscriptionId) { $__path += "/$SubscriptionId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsNotificationSubscriptionDiagnostic {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the diagnostics settings for a subscription.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubscriptionId
    The id of the notifications subscription.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsNotificationSubscriptionDiagnostic -Organization $organization -SubscriptionId $subscriptionid -ApiVersion $apiversion
 
    Get the diagnostics settings for a subscription.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubscriptionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/subscriptions/{subscriptionId}/diagnostics' -Replace '{organization}',$Organization -Replace '{subscriptionId}',$SubscriptionId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsNotificationSubscriptiontemplate {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get available subscription templates.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Get-AdsNotificationSubscriptiontemplate -ApiVersion $apiversion -Organization $organization
 
    Get available subscription templates.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/subscriptiontemplates' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsNotificationSubscriptionDiagnostic {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update the diagnostics settings for a subscription.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubscriptionId
    The id of the notifications subscription.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsNotificationSubscriptionDiagnostic -Organization $organization -SubscriptionId $subscriptionid -ApiVersion $apiversion
 
    Update the diagnostics settings for a subscription.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubscriptionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/subscriptions/{subscriptionId}/diagnostics' -Replace '{organization}',$Organization -Replace '{subscriptionId}',$SubscriptionId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsNotificationSubscriptionUsersetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubscriptionId
     
 
.PARAMETER UserId
    ID of the user
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsNotificationSubscriptionUsersetting -Organization $organization -SubscriptionId $subscriptionid -UserId $userid -ApiVersion $apiversion
 
    Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubscriptionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $UserId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/Subscriptions/{subscriptionId}/usersettings/{userId}' -Replace '{organization}',$Organization -Replace '{subscriptionId}',$SubscriptionId -Replace '{userId}',$UserId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsNotificationSubscription {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a subscription.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubscriptionId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsNotificationSubscription -Organization $organization -SubscriptionId $subscriptionid -ApiVersion $apiversion
 
    Delete a subscription.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubscriptionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/subscriptions/{subscriptionId}' -Replace '{organization}',$Organization -Replace '{subscriptionId}',$SubscriptionId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsNotificationSetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsNotificationSetting -ApiVersion $apiversion -Organization $organization
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/settings' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsNotificationSubscriber {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update delivery preferences of a notifications subscriber.
 
.PARAMETER SubscriberId
    ID of the user or group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsNotificationSubscriber -SubscriberId $subscriberid -Organization $organization -ApiVersion $apiversion
 
    Update delivery preferences of a notifications subscriber.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubscriberId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/subscribers/{subscriberId}' -Replace '{subscriberId}',$SubscriberId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsNotificationSubscription {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubscriptionId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsNotificationSubscription -Organization $organization -SubscriptionId $subscriptionid -ApiVersion $apiversion
 
    Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubscriptionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/subscriptions/{subscriptionId}' -Replace '{organization}',$Organization -Replace '{subscriptionId}',$SubscriptionId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsNotificationSubscriptionquery {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsNotificationSubscriptionquery -ApiVersion $apiversion -Organization $organization
 
    Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://{service}.dev.azure.com/{organization}/_apis/notification/subscriptionquery' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedNpmPackageUpstreaming {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the upstreaming behavior of the (unscoped) package within the context of a feed
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    The name or id of the feed
 
.PARAMETER PackageName
    The name of the package
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedNpmPackageUpstreaming -Organization $organization -FeedId $feedid -PackageName $packagename -Project $project -ApiVersion $apiversion
 
    Get the upstreaming behavior of the (unscoped) package within the context of a feed
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/packages/{packageName}/upstreaming' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{packageName}',$PackageName -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedNpmPackageVersionContent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER UnscopedPackageName
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER FeedId
     
 
.PARAMETER PackageVersion
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PackageScope
     
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedNpmPackageVersionContent -UnscopedPackageName $unscopedpackagename -Project $project -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -PackageScope $packagescope
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $UnscopedPackageName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageScope
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/packages/@{packageScope}/{unscopedPackageName}/versions/{packageVersion}/content' -Replace '{unscopedPackageName}',$UnscopedPackageName -Replace '{project}',$Project -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{packageScope}',$PackageScope

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedNpmPackageVersionReadme {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the Readme for a package version that has no npm scope.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedNpmPackageVersionReadme -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Get the Readme for a package version that has no npm scope.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/packages/{packageName}/versions/{packageVersion}/readme' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedNpmRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get information about a scoped package version in the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER UnscopedPackageName
    Name of the package (the 'name' part of @scope/name).
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PackageScope
    Scope of the package (the 'scope' part of @scope/name)
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedNpmRecyclebinPackageVersion -UnscopedPackageName $unscopedpackagename -Project $project -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -PackageScope $packagescope
 
    Get information about a scoped package version in the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $UnscopedPackageName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageScope
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/RecycleBin/packages/@{packageScope}/{unscopedPackageName}/versions/{packageVersion}' -Replace '{unscopedPackageName}',$UnscopedPackageName -Replace '{project}',$Project -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{packageScope}',$PackageScope

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedNpmVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get information about a scoped package version (such as @scope/name).
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER UnscopedPackageName
    Name of the package (the 'name' part of @scope/name).
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PackageScope
    Scope of the package (the 'scope' part of @scope/name).
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedNpmVersion -UnscopedPackageName $unscopedpackagename -Project $project -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -PackageScope $packagescope
 
    Get information about a scoped package version (such as @scope/name).
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $UnscopedPackageName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageScope
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/@{packageScope}/{unscopedPackageName}/versions/{packageVersion}' -Replace '{unscopedPackageName}',$UnscopedPackageName -Replace '{project}',$Project -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{packageScope}',$PackageScope

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedNpmRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a package version without an npm scope from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedNpmRecyclebinPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Delete a package version without an npm scope from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/RecycleBin/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedNpmVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Unpublish an unscoped package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedNpmVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Unpublish an unscoped package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedNpmPackagesbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedNpmPackagesbatch -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/packagesbatch' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedNpmPackageUpstreaming {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Set the upstreaming behavior of a (scoped) package within the context of a feed
 
The package does not need to necessarily exist in the feed prior to setting the behavior.
This assists with packages that are not yet ingested from an upstream, yet the feed owner wants
to apply a specific behavior on the first ingestion.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    The name or id of the feed
 
.PARAMETER PackageName
    The name of the package
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedNpmPackageUpstreaming -Organization $organization -FeedId $feedid -PackageName $packagename -Project $project -ApiVersion $apiversion
 
    Set the upstreaming behavior of a (scoped) package within the context of a feed
 
The package does not need to necessarily exist in the feed prior to setting the behavior.
This assists with packages that are not yet ingested from an upstream, yet the feed owner wants
to apply a specific behavior on the first ingestion.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/packages/{packageName}/upstreaming' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{packageName}',$PackageName -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedNpmRecyclebinPackagesbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete or restore several package versions from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedNpmRecyclebinPackagesbatch -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Delete or restore several package versions from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/RecycleBin/PackagesBatch' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedNpmRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Restore a package version without an npm scope from the recycle bin to its feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedNpmRecyclebinPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Restore a package version without an npm scope from the recycle bin to its feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/RecycleBin/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedNpmVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER FeedId
     
 
.PARAMETER PackageVersion
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
     
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedNpmVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/npm/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedNugetPackageUpstreaming {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the upstreaming behavior of a package within the context of a feed
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    The name or id of the feed
 
.PARAMETER PackageName
    The name of the package
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedNugetPackageUpstreaming -Organization $organization -FeedId $feedid -PackageName $packagename -Project $project -ApiVersion $apiversion
 
    Get the upstreaming behavior of a package within the context of a feed
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/packages/{packageName}/upstreaming' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{packageName}',$PackageName -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedNugetPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get information about a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ShowDeleted
    True to include deleted packages in the response.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedNugetPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Get information about a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ShowDeleted,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'ShowDeleted' = 'showDeleted'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','ShowDeleted') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedNugetPackageVersionContent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Download a package version directly.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER SourceProtocolVersion
    Unused
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedNugetPackageVersionContent -ApiVersion $apiversion -FeedId $feedid -PackageVersion $packageversion -Organization $organization -Project $project -PackageName $packagename
 
    Download a package version directly.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SourceProtocolVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'SourceProtocolVersion' = 'sourceProtocolVersion'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','SourceProtocolVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/packages/{packageName}/versions/{packageVersion}/content' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedNugetRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    View a package version's deletion/recycled status
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedNugetRecyclebinPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    View a package version's deletion/recycled status
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/RecycleBin/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedNugetPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Send a package version from the feed to its paired recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package to delete.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package to delete.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedNugetPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Send a package version from the feed to its paired recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedNugetRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a package version from a feed's recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedNugetRecyclebinPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Delete a package version from a feed's recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/RecycleBin/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedNugetPackagesbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedNugetPackagesbatch -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/packagesbatch' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedNugetPackageUpstreaming {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Set the upstreaming behavior of a package within the context of a feed
 
The package does not need to necessarily exist in the feed prior to setting the behavior.
This assists with packages that are not yet ingested from an upstream, yet the feed owner wants
to apply a specific behavior on the first ingestion.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    The name or id of the feed
 
.PARAMETER PackageName
    The name of the package
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedNugetPackageUpstreaming -Organization $organization -FeedId $feedid -PackageName $packagename -Project $project -ApiVersion $apiversion
 
    Set the upstreaming behavior of a package within the context of a feed
 
The package does not need to necessarily exist in the feed prior to setting the behavior.
This assists with packages that are not yet ingested from an upstream, yet the feed owner wants
to apply a specific behavior on the first ingestion.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/packages/{packageName}/upstreaming' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{packageName}',$PackageName -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedNugetPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Set mutable state on a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package to update.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package to update.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedNugetPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Set mutable state on a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedNugetRecyclebinPackagesbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete or restore several package versions from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedNugetRecyclebinPackagesbatch -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Delete or restore several package versions from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/RecycleBin/packagesBatch' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedNugetRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Restore a package version from a feed's recycle bin back into the active feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedNugetRecyclebinPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Restore a package version from a feed's recycle bin back into the active feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/RecycleBin/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsOperation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets an operation from the the operationId using the given pluginId.
 
Some scenarios don’t require a pluginId. If a pluginId is not included in the call then just the operationId will be used to find an operation.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER PluginId
    The ID for the plugin.
 
.PARAMETER OperationId
    The ID for the operation.
 
.EXAMPLE
    PS C:\> Get-AdsOperation -Organization $organization -ApiVersion $apiversion -OperationId $operationid
 
    Gets an operation from the the operationId using the given pluginId.
 
Some scenarios don’t require a pluginId. If a pluginId is not included in the call then just the operationId will be used to find an operation.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PluginId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $OperationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'PluginId' = 'pluginId'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','PluginId') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/operations/{operationId}' -Replace '{organization}',$Organization -Replace '{operationId}',$OperationId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPermissionsreport {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of permissions reports
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    The ID (GUID) of the permissions report
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPermissionsreport -Organization $organization -Id $id -ApiVersion $apiversion
 
    Get a specific permissions report
 
.EXAMPLE
    PS C:\> Get-AdsPermissionsreport -Organization $organization -ApiVersion $apiversion
 
    Get a list of permissions reports
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Permissions Report_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Permissions Report_Get')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Permissions Report_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/permissionsreport' -Replace '{organization}',$Organization
        if ($Id) { $__path += "/$Id" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPermissionsreportDownload {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Download the json results of a permissions report
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    The ID (GUID) of the permissions report
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPermissionsreportDownload -Organization $organization -Id $id -ApiVersion $apiversion
 
    Download the json results of a permissions report
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/permissionsreport/{id}/download' -Replace '{organization}',$Organization -Replace '{id}',$Id

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPermissionsreport {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Request a permissions report to be created asyncronously
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsPermissionsreport -ApiVersion $apiversion -Organization $organization
 
    Request a permissions report to be created asyncronously
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/permissionsreport' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPipelinePipelinepermission {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Given a ResourceType and ResourceId, returns authorized definitions for that resource.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ResourceType
     
 
.PARAMETER ResourceId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPipelinePipelinepermission -Organization $organization -ResourceType $resourcetype -ResourceId $resourceid -Project $project -ApiVersion $apiversion
 
    Given a ResourceType and ResourceId, returns authorized definitions for that resource.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResourceType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResourceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/pipelinepermissions/{resourceType}/{resourceId}' -Replace '{organization}',$Organization -Replace '{resourceType}',$ResourceType -Replace '{resourceId}',$ResourceId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPipelinePipelinepermission {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Batch API to authorize/unauthorize a list of definitions for a multiple resources.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPipelinePipelinepermission -Organization $organization -Project $project -ApiVersion $apiversion
 
    Batch API to authorize/unauthorize a list of definitions for a multiple resources.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/pipelinepermissions' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPipeline {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of pipelines.
 
.PARAMETER ContinuationToken
    A continuation token from a previous request, to retrieve the next page of results
 
.PARAMETER PipelineVersion
    The pipeline version
 
.PARAMETER PipelineId
    The pipeline ID
 
.PARAMETER Top
    The maximum number of pipelines to return
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER OrderBy
    A sort expression. Defaults to "name asc"
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPipeline -PipelineId $pipelineid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Gets a pipeline, optionally at the specified version
 
.EXAMPLE
    PS C:\> Get-AdsPipeline -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a list of pipelines.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pipelines_Get')]
        [int32]
        $PipelineVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pipelines_Get')]
        [string]
        $PipelineId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pipelines_Get')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $OrderBy,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pipelines_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pipelines_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'PipelineVersion' = 'pipelineVersion'
            'Top' = '$top'
            'OrderBy' = 'orderBy'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','PipelineVersion','Top','OrderBy','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($PipelineId) { $__path += "/$PipelineId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPipelineRun {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets top 10000 runs for a particular pipeline.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER RunId
    The run id
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PipelineId
    The pipeline id
 
.EXAMPLE
    PS C:\> Get-AdsPipelineRun -Organization $organization -ApiVersion $apiversion -RunId $runid -Project $project -PipelineId $pipelineid
 
    Gets a run for a particular pipeline.
 
.EXAMPLE
    PS C:\> Get-AdsPipelineRun -Organization $organization -ApiVersion $apiversion -Project $project -PipelineId $pipelineid
 
    Gets top 10000 runs for a particular pipeline.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Runs_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Runs_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Runs_Get')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Runs_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Runs_Get')]
        [string]
        $PipelineId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pipelineId}',$PipelineId
        if ($RunId) { $__path += "/$RunId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPipelineRunArtifact {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a specific artifact from a pipeline run
 
.PARAMETER Expand
    Expand options. Default is None.
 
.PARAMETER ArtifactName
    Name of the artifact.
 
.PARAMETER PipelineId
    ID of the pipeline.
 
.PARAMETER RunId
    ID of the run of that pipeline.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPipelineRunArtifact -ArtifactName $artifactname -PipelineId $pipelineid -RunId $runid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a specific artifact from a pipeline run
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PipelineId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ArtifactName' = 'artifactName'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ArtifactName','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs/{runId}/artifacts' -Replace '{pipelineId}',$PipelineId -Replace '{runId}',$RunId -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPipelineRunLog {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of logs from a pipeline run.
 
.PARAMETER Expand
    Expand options. Default is None.
 
.PARAMETER PipelineId
    ID of the pipeline.
 
.PARAMETER RunId
    ID of the run of that pipeline.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER LogId
    ID of the log.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPipelineRunLog -PipelineId $pipelineid -RunId $runid -Project $project -Organization $organization -LogId $logid -ApiVersion $apiversion
 
    Get a specific log from a pipeline run
 
.EXAMPLE
    PS C:\> Get-AdsPipelineRunLog -PipelineId $pipelineid -RunId $runid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a list of logs from a pipeline run.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Logs_Get')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Logs_Get')]
        [string]
        $PipelineId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Logs_Get')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Logs_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Logs_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Logs_Get')]
        [string]
        $LogId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Logs_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs/{runId}/logs' -Replace '{pipelineId}',$PipelineId -Replace '{runId}',$RunId -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($LogId) { $__path += "/$LogId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPipeline {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a pipeline.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPipeline -Organization $organization -Project $project -ApiVersion $apiversion
 
    Create a pipeline.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPipelinePreview {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Queues a dry run of the pipeline and returns an object containing the final yaml.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PipelineVersion
    The pipeline version.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PipelineId
    The pipeline ID.
 
.EXAMPLE
    PS C:\> Set-AdsPipelinePreview -Organization $organization -ApiVersion $apiversion -Project $project -PipelineId $pipelineid
 
    Queues a dry run of the pipeline and returns an object containing the final yaml.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $PipelineVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PipelineId
    )
    process {
        $__mapping = @{
            'PipelineVersion' = 'pipelineVersion'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('PipelineVersion','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/preview' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pipelineId}',$PipelineId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPipelineRun {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Runs a pipeline.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PipelineVersion
    The pipeline version.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PipelineId
    The pipeline ID.
 
.EXAMPLE
    PS C:\> Set-AdsPipelineRun -Organization $organization -ApiVersion $apiversion -Project $project -PipelineId $pipelineid
 
    Runs a pipeline.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $PipelineVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PipelineId
    )
    process {
        $__mapping = @{
            'PipelineVersion' = 'pipelineVersion'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('PipelineVersion','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pipelineId}',$PipelineId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPipelineCheckConfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get Check configuration by resource type and id
 
.PARAMETER Expand
     
 
.PARAMETER Id
     
 
.PARAMETER ResourceId
    resource id
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ResourceType
    resource type
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPipelineCheckConfiguration -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get Check configuration by Id
 
.EXAMPLE
    PS C:\> Get-AdsPipelineCheckConfiguration -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get Check configuration by resource type and id
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Check Configurations_Get')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Check Configurations_Get')]
        [string]
        $Id,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResourceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Check Configurations_Get')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResourceType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Check Configurations_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Check Configurations_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ResourceId' = 'resourceId'
            'ResourceType' = 'resourceType'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ResourceId','ResourceType','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/configurations' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($Id) { $__path += "/$Id" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPipelineCheckRun {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get details for a specific check evaluation
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER CheckSuiteId
     
 
.PARAMETER Expand
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPipelineCheckRun -Organization $organization -CheckSuiteId $checksuiteid -Project $project -ApiVersion $apiversion
 
    Get details for a specific check evaluation
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CheckSuiteId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/runs/{checkSuiteId}' -Replace '{organization}',$Organization -Replace '{checkSuiteId}',$CheckSuiteId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPipelineCheckConfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete check configuration by id
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    check configuration id
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsPipelineCheckConfiguration -Organization $organization -Id $id -Project $project -ApiVersion $apiversion
 
    Delete check configuration by id
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/configurations/{id}' -Replace '{organization}',$Organization -Replace '{id}',$Id -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPipelineCheckConfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add a check configuration
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPipelineCheckConfiguration -Organization $organization -Project $project -ApiVersion $apiversion
 
    Add a check configuration
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/configurations' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPipelineCheckQueryconfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get check configurations for multiple resources by resource type and id.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Expand
    The properties that should be expanded in the list of check configurations.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPipelineCheckQueryconfiguration -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get check configurations for multiple resources by resource type and id.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/queryconfigurations' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPipelineCheckRun {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Initiate an evaluation for a check in a pipeline
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Expand
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPipelineCheckRun -Organization $organization -Project $project -ApiVersion $apiversion
 
    Initiate an evaluation for a check in a pipeline
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/runs' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPolicyConfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of policy configurations in a project.
 
The 'scope' parameter for this API should not be used, except for legacy compatability reasons. It returns specifically
scoped policies and does not support heirarchical nesting. Instead, use the /_apis/git/policy/configurations API, which provides
first class scope filtering support.
 
The optional `policyType` parameter can be used to filter the set of policies returned from this method.
 
.PARAMETER ContinuationToken
    The continuation token used for pagination.
 
.PARAMETER ConfigurationId
    ID of the policy configuration
 
.PARAMETER PolicyType
    Filter returned policies to only this type
 
.PARAMETER Scope
    [Provided for legacy reasons] The scope on which a subset of policies is defined.
 
.PARAMETER Top
    Maximum number of policies to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPolicyConfiguration -ConfigurationId $configurationid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a policy configuration by its ID.
 
.EXAMPLE
    PS C:\> Get-AdsPolicyConfiguration -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a list of policy configurations in a project.
 
The 'scope' parameter for this API should not be used, except for legacy compatability reasons. It returns specifically
scoped policies and does not support heirarchical nesting. Instead, use the /_apis/git/policy/configurations API, which provides
first class scope filtering support.
 
The optional `policyType` parameter can be used to filter the set of policies returned from this method.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Configurations_Get')]
        [string]
        $ConfigurationId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PolicyType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Scope,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Configurations_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Configurations_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Configurations_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'PolicyType' = 'policyType'
            'Scope' = 'scope'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','PolicyType','Scope','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/policy/configurations' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($ConfigurationId) { $__path += "/$ConfigurationId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPolicyConfigurationRevision {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve all revisions for a given policy.
 
.PARAMETER RevisionId
    The revision ID.
 
.PARAMETER Skip
    The number of revisions to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
 
.PARAMETER ConfigurationId
    The policy configuration ID.
 
.PARAMETER Top
    The number of revisions to retrieve.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPolicyConfigurationRevision -RevisionId $revisionid -ConfigurationId $configurationid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Retrieve a specific revision of a given policy by ID.
 
.EXAMPLE
    PS C:\> Get-AdsPolicyConfigurationRevision -ConfigurationId $configurationid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Retrieve all revisions for a given policy.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Revisions_Get')]
        [string]
        $RevisionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Revisions_Get')]
        [string]
        $ConfigurationId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Revisions_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Revisions_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Revisions_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Skip' = '$skip'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/policy/configurations/{configurationId}/revisions' -Replace '{configurationId}',$ConfigurationId -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($RevisionId) { $__path += "/$RevisionId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPolicyEvaluation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieves a list of all the policy evaluation statuses for a specific pull request.
 
Evaluations are retrieved using an artifact ID which uniquely identifies the pull request.
To generate an artifact ID for a pull request, use this template:
```
vstfs:///CodeReview/CodeReviewId/{projectId}/{pullRequestId}
```
 
.PARAMETER Skip
    The number of policy evaluation records to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
 
.PARAMETER EvaluationId
    ID of the policy evaluation to be retrieved.
 
.PARAMETER ArtifactId
    A string which uniquely identifies the target of a policy evaluation.
 
.PARAMETER Top
    The number of policy evaluation records to retrieve.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IncludeNotApplicable
    Some policies might determine that they do not apply to a specific pull request. Setting this parameter to true will return evaluation records even for policies which don't apply to this pull request.
 
.EXAMPLE
    PS C:\> Get-AdsPolicyEvaluation -EvaluationId $evaluationid -Project $project -ApiVersion $apiversion -Organization $organization
 
    Gets the present evaluation state of a policy.
 
Each policy which applies to a pull request will have an evaluation state which is specific to that policy running
in the context of that pull request. Each evaluation is uniquely identified via a Guid. You can find all the policy
evaluations for a specific pull request using the List operation of this controller.
 
.EXAMPLE
    PS C:\> Get-AdsPolicyEvaluation -ArtifactId $artifactid -Project $project -ApiVersion $apiversion -Organization $organization
 
    Retrieves a list of all the policy evaluation statuses for a specific pull request.
 
Evaluations are retrieved using an artifact ID which uniquely identifies the pull request.
To generate an artifact ID for a pull request, use this template:
```
vstfs:///CodeReview/CodeReviewId/{projectId}/{pullRequestId}
```
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Evaluations_Get')]
        [string]
        $EvaluationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Evaluations_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Evaluations_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Evaluations_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeNotApplicable
    )
    process {
        $__mapping = @{
            'Skip' = '$skip'
            'ArtifactId' = 'artifactId'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
            'IncludeNotApplicable' = 'includeNotApplicable'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','ArtifactId','Top','ApiVersion','IncludeNotApplicable') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/policy/evaluations' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($EvaluationId) { $__path += "/$EvaluationId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPolicyType {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve all available policy types.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TypeId
    The policy ID.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPolicyType -Organization $organization -TypeId $typeid -Project $project -ApiVersion $apiversion
 
    Retrieve a specific policy type by ID.
 
.EXAMPLE
    PS C:\> Get-AdsPolicyType -Organization $organization -Project $project -ApiVersion $apiversion
 
    Retrieve all available policy types.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Types_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Types_Get')]
        [string]
        $TypeId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Types_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Types_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/policy/types' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($TypeId) { $__path += "/$TypeId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsPolicyConfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a policy configuration by its ID.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ConfigurationId
    ID of the existing policy configuration to be updated.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsPolicyConfiguration -Organization $organization -ConfigurationId $configurationid -Project $project -ApiVersion $apiversion
 
    Update a policy configuration by its ID.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ConfigurationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/policy/configurations/{configurationId}' -Replace '{organization}',$Organization -Replace '{configurationId}',$ConfigurationId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPolicyConfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a policy configuration by its ID.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ConfigurationId
    ID of the policy configuration to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsPolicyConfiguration -Organization $organization -ConfigurationId $configurationid -Project $project -ApiVersion $apiversion
 
    Delete a policy configuration by its ID.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ConfigurationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/policy/configurations/{configurationId}' -Replace '{organization}',$Organization -Replace '{configurationId}',$ConfigurationId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPolicyConfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a policy configuration of a given policy type.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ConfigurationId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPolicyConfiguration -Organization $organization -ConfigurationId $configurationid -Project $project -ApiVersion $apiversion
 
    Create a policy configuration of a given policy type.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ConfigurationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/policy/configurations/{configurationId}' -Replace '{organization}',$Organization -Replace '{configurationId}',$ConfigurationId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPolicyEvaluation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Requeue the policy evaluation.
 
Some policies define a "requeue" action which performs some policy-specific operation.
You can trigger this operation by updating an existing policy evaluation and setting the
PolicyEvaluationRecord.Status field to Queued.
Although any policy evaluation can be requeued, at present only build policies perform any action
in response. Requeueing a build policy will queue a new build to run (cancelling any existing build which
is running).
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER EvaluationId
    ID of the policy evaluation to be retrieved.
 
.EXAMPLE
    PS C:\> Set-AdsPolicyEvaluation -Organization $organization -ApiVersion $apiversion -Project $project -EvaluationId $evaluationid
 
    Requeue the policy evaluation.
 
Some policies define a "requeue" action which performs some policy-specific operation.
You can trigger this operation by updating an existing policy evaluation and setting the
PolicyEvaluationRecord.Status field to Queued.
Although any policy evaluation can be requeued, at present only build policies perform any action
in response. Requeueing a build policy will queue a new build to run (cancelling any existing build which
is running).
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EvaluationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/policy/evaluations/{evaluationId}' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{evaluationId}',$EvaluationId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsProfileProfile {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a user profile.
 
.PARAMETER CoreAttributes
    A comma-delimited list of core profile attributes to return. Valid values are Email, Avatar, DisplayName, and ContactWithOffers.
 
.PARAMETER Details
    Return public profile information such as display name, email address, country, etc. If false, the withAttributes parameter is ignored.
 
.PARAMETER WithAttributes
    If true, gets the attributes (named key-value pairs of arbitrary data) associated with the profile. The partition parameter must also have a value.
 
.PARAMETER Id
    The ID of the target user profile within the same organization, or 'me' to get the profile of the current authenticated user.
 
.PARAMETER Partition
    The partition (named group) of attributes to return.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER ForceRefresh
    Not used in this version of the API.
 
.EXAMPLE
    PS C:\> Get-AdsProfileProfile -Id $id -ApiVersion $apiversion
 
    Gets a user profile.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CoreAttributes,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Details,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $WithAttributes,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Partition,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ForceRefresh
    )
    process {
        $__mapping = @{
            'CoreAttributes' = 'coreAttributes'
            'Details' = 'details'
            'WithAttributes' = 'withAttributes'
            'Partition' = 'partition'
            'ApiVersion' = 'api-version'
            'ForceRefresh' = 'forceRefresh'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('CoreAttributes','Details','WithAttributes','Partition','ApiVersion','ForceRefresh') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://app.vssps.visualstudio.com/_apis/profile/profiles/{id}' -Replace '{id}',$Id

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsProvenanceSession {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a session, a wrapper around a feed that can store additional metadata on the packages published to it.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Protocol
    The protocol that the session will target
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsProvenanceSession -Organization $organization -Protocol $protocol -Project $project -ApiVersion $apiversion
 
    Creates a session, a wrapper around a feed that can store additional metadata on the packages published to it.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Protocol,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/provenance/session/{protocol}' -Replace '{organization}',$Organization -Replace '{protocol}',$Protocol -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedPypiPackageUpstreaming {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the upstreaming behavior of a package within the context of a feed
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    The name or id of the feed
 
.PARAMETER PackageName
    The name of the package
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedPypiPackageUpstreaming -Organization $organization -FeedId $feedid -PackageName $packagename -Project $project -ApiVersion $apiversion
 
    Get the upstreaming behavior of a package within the context of a feed
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/packages/{packageName}/upstreaming' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{packageName}',$PackageName -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedPypiPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get information about a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ShowDeleted
    True to show information for deleted package versions.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedPypiPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Get information about a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ShowDeleted,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'ShowDeleted' = 'showDeleted'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','ShowDeleted') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedPypiPackageVersionContent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Download a python package file directly. This API is intended for manual UI download options, not for programmatic access and scripting.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FileName
    Name of the file in the package
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedPypiPackageVersionContent -FileName $filename -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Download a python package file directly. This API is intended for manual UI download options, not for programmatic access and scripting.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FileName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/packages/{packageName}/versions/{packageVersion}/{fileName}/content' -Replace '{fileName}',$FileName -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedPypiRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get information about a package version in the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedPypiRecyclebinPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Get information about a package version in the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/RecycleBin/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedPypiPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a package version, moving it to the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedPypiPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Delete a package version, moving it to the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedPypiRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a package version from the feed, moving it to the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedPypiRecyclebinPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Delete a package version from the feed, moving it to the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/RecycleBin/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedPypiPackagesbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedPypiPackagesbatch -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/packagesbatch' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedPypiPackageUpstreaming {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Set the upstreaming behavior of a package within the context of a feed
 
The package does not need to necessarily exist in the feed prior to setting the behavior.
This assists with packages that are not yet ingested from an upstream, yet the feed owner wants
to apply a specific behavior on the first ingestion.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    The name or id of the feed
 
.PARAMETER PackageName
    The name of the package
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedPypiPackageUpstreaming -Organization $organization -FeedId $feedid -PackageName $packagename -Project $project -ApiVersion $apiversion
 
    Set the upstreaming behavior of a package within the context of a feed
 
The package does not need to necessarily exist in the feed prior to setting the behavior.
This assists with packages that are not yet ingested from an upstream, yet the feed owner wants
to apply a specific behavior on the first ingestion.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/packages/{packageName}/upstreaming' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{packageName}',$PackageName -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedPypiPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update state for a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedPypiPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Update state for a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedPypiRecyclebinPackagesbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete or restore several package versions from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Feed which contains the packages to update.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedPypiRecyclebinPackagesbatch -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Delete or restore several package versions from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/RecycleBin/packagesBatch' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedPypiRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Restore a package version from the recycle bin to its associated feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedPypiRecyclebinPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Restore a package version from the recycle bin to its associated feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/RecycleBin/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseApproval {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of approvals
 
.PARAMETER StatusFilter
    Approvals with this status. Default is 'pending'.
 
.PARAMETER TypeFilter
    Approval with this type.
 
.PARAMETER IncludeMyGroupApprovals
    'true' to include my group approvals. Default is 'false'.
 
.PARAMETER ReleaseIdsFilter
    Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4.
 
.PARAMETER ContinuationToken
    Gets the approvals after the continuation token provided.
 
.PARAMETER Top
    Number of approvals to get. Default is 50.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER QueryOrder
    Gets the results in the defined order of created approvals. Default is 'descending'.
 
.PARAMETER AssignedToFilter
    Approvals assigned to this user.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseApproval -Project $project -ApiVersion $apiversion -Organization $organization
 
    Get a list of approvals
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StatusFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TypeFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeMyGroupApprovals,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseIdsFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $QueryOrder,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AssignedToFilter
    )
    process {
        $__mapping = @{
            'StatusFilter' = 'statusFilter'
            'TypeFilter' = 'typeFilter'
            'IncludeMyGroupApprovals' = 'includeMyGroupApprovals'
            'ReleaseIdsFilter' = 'releaseIdsFilter'
            'ContinuationToken' = 'continuationToken'
            'Top' = 'top'
            'ApiVersion' = 'api-version'
            'QueryOrder' = 'queryOrder'
            'AssignedToFilter' = 'assignedToFilter'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('StatusFilter','TypeFilter','IncludeMyGroupApprovals','ReleaseIdsFilter','ContinuationToken','Top','ApiVersion','QueryOrder','AssignedToFilter') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/approvals' -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseDefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of release definitions.
 
.PARAMETER SearchTextContainsFolderName
    'true' to get the release definitions under the folder with name as specified in searchText. Default is 'false'.
 
.PARAMETER Top
    Number of release definitions to get.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ArtifactSourceId
    Release definitions with given artifactSourceId will be returned. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json at https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions.
 
.PARAMETER PropertyFilters
    A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definitions will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release Definition from results irrespective of whether it has property set or not.
 
.PARAMETER IsDeleted
    'true' to get release definitions that has been deleted. Default is 'false'
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionIdFilter
    A comma-delimited list of release definitions to retrieve.
 
.PARAMETER DefinitionId
    Id of the release definition.
 
.PARAMETER ArtifactType
    Release definitions with given artifactType will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild.
 
.PARAMETER Path
    Gets the release definitions under the specified path.
 
.PARAMETER IsExactNameMatch
    'true'to gets the release definitions with exact match as specified in searchText. Default is 'false'.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.PARAMETER Expand
    The properties that should be expanded in the list of Release definitions.
 
.PARAMETER SearchText
    Get release definitions with names containing searchText.
 
.PARAMETER ContinuationToken
    Gets the release definitions after the continuation token provided.
 
.PARAMETER QueryOrder
    Gets the results in the defined order. Default is 'IdAscending'.
 
.PARAMETER TagFilter
    A comma-delimited list of tags. Only release definitions with these tags will be returned.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseDefinition -ApiVersion $apiversion -Organization $organization -Project $project
 
    Get a list of release definitions.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseDefinition -ApiVersion $apiversion -DefinitionId $definitionid -Organization $organization -Project $project
 
    Get a release definition.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $SearchTextContainsFolderName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactSourceId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [string]
        $PropertyFilters,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IsDeleted,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionIdFilter,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [string]
        $DefinitionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IsExactNameMatch,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Expand,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SearchText,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $QueryOrder,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TagFilter
    )
    process {
        $__mapping = @{
            'SearchTextContainsFolderName' = 'searchTextContainsFolderName'
            'ContinuationToken' = 'continuationToken'
            'SearchText' = 'searchText'
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
            'IsExactNameMatch' = 'isExactNameMatch'
            'Path' = 'path'
            'ArtifactType' = 'artifactType'
            'DefinitionIdFilter' = 'definitionIdFilter'
            'IsDeleted' = 'isDeleted'
            'PropertyFilters' = 'propertyFilters'
            'ArtifactSourceId' = 'artifactSourceId'
            'Top' = '$top'
            'QueryOrder' = 'queryOrder'
            'TagFilter' = 'tagFilter'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('SearchTextContainsFolderName','ContinuationToken','SearchText','Expand','ApiVersion','IsExactNameMatch','Path','ArtifactType','DefinitionIdFilter','IsDeleted','PropertyFilters','ArtifactSourceId','Top','QueryOrder','TagFilter') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($DefinitionId) { $__path += "/$DefinitionId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseDefinitionRevision {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get revision history for a release definition
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
    Id of the definition.
 
.PARAMETER Revision
    Id of the revision.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseDefinitionRevision -Organization $organization -DefinitionId $definitionid -Revision $revision -Project $project -ApiVersion $apiversion
 
    Get release definition for a given definitionId and revision
 
.EXAMPLE
    PS C:\> Get-AdsReleaseDefinitionRevision -Organization $organization -DefinitionId $definitionid -Project $project -ApiVersion $apiversion
 
    Get revision history for a release definition
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get Definition Revision')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get Definition Revision')]
        [string]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get Definition Revision')]
        [string]
        $Revision,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get Definition Revision')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Definitions_Get Definition Revision')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/Release/definitions/{definitionId}/revisions' -Replace '{organization}',$Organization -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project
        if ($Revision) { $__path += "/$Revision" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseDeployment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER CreatedBy
     
 
.PARAMETER DefinitionEnvironmentId
     
 
.PARAMETER QueryOrder
     
 
.PARAMETER Top
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER SourceBranch
     
 
.PARAMETER DeploymentStatus
     
 
.PARAMETER CreatedFor
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionId
     
 
.PARAMETER MaxModifiedTime
     
 
.PARAMETER MinModifiedTime
     
 
.PARAMETER ContinuationToken
     
 
.PARAMETER OperationStatus
     
 
.PARAMETER MinStartedTime
     
 
.PARAMETER LatestAttemptsOnly
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER MaxStartedTime
     
 
.EXAMPLE
    PS C:\> Get-AdsReleaseDeployment -Organization $organization -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CreatedBy,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $DefinitionEnvironmentId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $QueryOrder,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SourceBranch,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DeploymentStatus,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CreatedFor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $DefinitionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MaxModifiedTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MinModifiedTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $OperationStatus,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MinStartedTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $LatestAttemptsOnly,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MaxStartedTime
    )
    process {
        $__mapping = @{
            'CreatedBy' = 'createdBy'
            'LatestAttemptsOnly' = 'latestAttemptsOnly'
            'MinStartedTime' = 'minStartedTime'
            'OperationStatus' = 'operationStatus'
            'ContinuationToken' = 'continuationToken'
            'MinModifiedTime' = 'minModifiedTime'
            'MaxModifiedTime' = 'maxModifiedTime'
            'DefinitionId' = 'definitionId'
            'CreatedFor' = 'createdFor'
            'DeploymentStatus' = 'deploymentStatus'
            'SourceBranch' = 'sourceBranch'
            'Top' = '$top'
            'QueryOrder' = 'queryOrder'
            'DefinitionEnvironmentId' = 'definitionEnvironmentId'
            'ApiVersion' = 'api-version'
            'MaxStartedTime' = 'maxStartedTime'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('CreatedBy','LatestAttemptsOnly','MinStartedTime','OperationStatus','ContinuationToken','MinModifiedTime','MaxModifiedTime','DefinitionId','CreatedFor','DeploymentStatus','SourceBranch','Top','QueryOrder','DefinitionEnvironmentId','ApiVersion','MaxStartedTime') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/deployments' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseFolder {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets folders.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Path
    Path of the folder.
 
.PARAMETER QueryOrder
    Gets the results in the defined order. Default is 'None'.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseFolder -Organization $organization -Path $path -Project $project -ApiVersion $apiversion
 
    Gets folders.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $QueryOrder,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'QueryOrder' = 'queryOrder'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('QueryOrder','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/folders/{path}' -Replace '{organization}',$Organization -Replace '{path}',$Path -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseRelease {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of releases
 
.PARAMETER IsDeleted
    Gets the soft deleted releases, if true.
 
.PARAMETER Path
    Releases under this folder path will be returned
 
.PARAMETER QueryOrder
    Gets the results in the defined order of created date for releases. Default is descending.
 
.PARAMETER Top
    Number of releases to get. Default is 50.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ReleaseId
    Id of the release.
 
.PARAMETER TagFilter
    A comma-delimited list of tags. Only releases with these tags will be returned.
 
.PARAMETER SourceBranchFilter
    Releases with given sourceBranchFilter will be returned.
 
.PARAMETER StatusFilter
    Releases that have this status.
 
.PARAMETER MinCreatedTime
    Releases that were created after this time.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DefinitionSnapshotRevision
    Definition snapshot revision number.
 
.PARAMETER ReleaseIdFilter
    A comma-delimited list of releases Ids. Only releases with these Ids will be returned.
 
.PARAMETER SourceId
    Unique identifier of the artifact used. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions.
 
.PARAMETER DefinitionId
    Releases from this release definition Id.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.8' to use this version of the api.
 
.PARAMETER ContinuationToken
    Gets the releases after the continuation token provided.
 
.PARAMETER ArtifactTypeId
    Releases with given artifactTypeId will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild.
 
.PARAMETER Expand
    The property that should be expanded in the list of releases.
 
.PARAMETER SearchText
    Releases with names containing searchText.
 
.PARAMETER PropertyFilters
    A comma-delimited list of extended properties to be retrieved. If set, the returned Releases will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release from results irrespective of whether it has property set or not.
 
.PARAMETER MaxCreatedTime
    Releases that were created before this time.
 
.PARAMETER EnvironmentStatusFilter
     
 
.PARAMETER CreatedBy
    Releases created by this user.
 
.PARAMETER DefinitionEnvironmentId
     
 
.PARAMETER ArtifactVersionId
    Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseRelease -ApiVersion $apiversion -DefinitionSnapshotRevision $definitionsnapshotrevision -Organization $organization -ReleaseId $releaseid -Project $project
 
    Get release for a given revision number.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseRelease -ApiVersion $apiversion -Organization $organization -Project $project
 
    Get a list of releases
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IsDeleted,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $QueryOrder,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Releases_Get Release Revision')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Releases_Get Release Revision')]
        [string]
        $ReleaseId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TagFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SourceBranchFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StatusFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MinCreatedTime,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Releases_Get Release Revision')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Releases_Get Release Revision')]
        [int32]
        $DefinitionSnapshotRevision,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseIdFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SourceId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $DefinitionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Releases_Get Release Revision')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactTypeId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Expand,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SearchText,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PropertyFilters,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $MaxCreatedTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $EnvironmentStatusFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CreatedBy,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $DefinitionEnvironmentId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ArtifactVersionId
    )
    process {
        $__mapping = @{
            'IsDeleted' = 'isDeleted'
            'CreatedBy' = 'createdBy'
            'EnvironmentStatusFilter' = 'environmentStatusFilter'
            'MaxCreatedTime' = 'maxCreatedTime'
            'PropertyFilters' = 'propertyFilters'
            'SearchText' = 'searchText'
            'Expand' = '$expand'
            'ArtifactTypeId' = 'artifactTypeId'
            'ContinuationToken' = 'continuationToken'
            'ApiVersion' = 'api-version'
            'DefinitionId' = 'definitionId'
            'SourceId' = 'sourceId'
            'ReleaseIdFilter' = 'releaseIdFilter'
            'DefinitionSnapshotRevision' = 'definitionSnapshotRevision'
            'MinCreatedTime' = 'minCreatedTime'
            'StatusFilter' = 'statusFilter'
            'SourceBranchFilter' = 'sourceBranchFilter'
            'TagFilter' = 'tagFilter'
            'Top' = '$top'
            'QueryOrder' = 'queryOrder'
            'Path' = 'path'
            'DefinitionEnvironmentId' = 'definitionEnvironmentId'
            'ArtifactVersionId' = 'artifactVersionId'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IsDeleted','CreatedBy','EnvironmentStatusFilter','MaxCreatedTime','PropertyFilters','SearchText','Expand','ArtifactTypeId','ContinuationToken','ApiVersion','DefinitionId','SourceId','ReleaseIdFilter','DefinitionSnapshotRevision','MinCreatedTime','StatusFilter','SourceBranchFilter','TagFilter','Top','QueryOrder','Path','DefinitionEnvironmentId','ArtifactVersionId') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($ReleaseId) { $__path += "/$ReleaseId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseReleaseEnvironment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a release environment.
 
.PARAMETER Expand
    A property that should be expanded in the environment.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ReleaseId
    Id of the release.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.7' to use this version of the api.
 
.PARAMETER EnvironmentId
    Id of the release environment.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseReleaseEnvironment -Project $project -ReleaseId $releaseid -Organization $organization -ApiVersion $apiversion -EnvironmentId $environmentid
 
    Get a release environment.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}' -Replace '{project}',$Project -Replace '{releaseId}',$ReleaseId -Replace '{organization}',$Organization -Replace '{environmentId}',$EnvironmentId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseReleaseEnvironmentAttemptPlanAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the release task attachments.
 
.PARAMETER Type
    Type of the attachment.
 
.PARAMETER AttemptId
    Attempt number of deployment.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ReleaseId
    Id of the release.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PlanId
    Plan Id of the deploy phase.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER EnvironmentId
    Id of the release environment.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseReleaseEnvironmentAttemptPlanAttachment -Type $type -AttemptId $attemptid -Project $project -ReleaseId $releaseid -Organization $organization -PlanId $planid -ApiVersion $apiversion -EnvironmentId $environmentid
 
    Get the release task attachments.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AttemptId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/attachments/{type}' -Replace '{type}',$Type -Replace '{attemptId}',$AttemptId -Replace '{project}',$Project -Replace '{releaseId}',$ReleaseId -Replace '{organization}',$Organization -Replace '{planId}',$PlanId -Replace '{environmentId}',$EnvironmentId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseReleaseEnvironmentAttemptPlanTimelineRecordAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a release task attachment.
 
.PARAMETER Type
    Type of the attachment.
 
.PARAMETER RecordId
    Record Id of attachment.
 
.PARAMETER TimelineId
    Timeline Id of the task.
 
.PARAMETER AttemptId
    Attempt number of deployment.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ReleaseId
    Id of the release.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Name
    Name of the attachment.
 
.PARAMETER PlanId
    Plan Id of the deploy phase.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER EnvironmentId
    Id of the release environment.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseReleaseEnvironmentAttemptPlanTimelineRecordAttachment -Type $type -RecordId $recordid -TimelineId $timelineid -AttemptId $attemptid -Project $project -ReleaseId $releaseid -Organization $organization -Name $name -PlanId $planid -ApiVersion $apiversion -EnvironmentId $environmentid
 
    Get a release task attachment.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RecordId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TimelineId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AttemptId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}' -Replace '{type}',$Type -Replace '{recordId}',$RecordId -Replace '{timelineId}',$TimelineId -Replace '{attemptId}',$AttemptId -Replace '{project}',$Project -Replace '{releaseId}',$ReleaseId -Replace '{organization}',$Organization -Replace '{name}',$Name -Replace '{planId}',$PlanId -Replace '{environmentId}',$EnvironmentId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseReleaseEnvironmentAttemptTimelineAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    GetTaskAttachments API is deprecated. Use GetReleaseTaskAttachments API instead.
 
.PARAMETER Type
    Type of the attachment.
 
.PARAMETER TimelineId
    Timeline Id of the task.
 
.PARAMETER AttemptId
    Attempt number of deployment.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ReleaseId
    Id of the release.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER EnvironmentId
    Id of the release environment.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseReleaseEnvironmentAttemptTimelineAttachment -Type $type -TimelineId $timelineid -AttemptId $attemptid -Project $project -ReleaseId $releaseid -Organization $organization -ApiVersion $apiversion -EnvironmentId $environmentid
 
    GetTaskAttachments API is deprecated. Use GetReleaseTaskAttachments API instead.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TimelineId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AttemptId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/attachments/{type}' -Replace '{type}',$Type -Replace '{timelineId}',$TimelineId -Replace '{attemptId}',$AttemptId -Replace '{project}',$Project -Replace '{releaseId}',$ReleaseId -Replace '{organization}',$Organization -Replace '{environmentId}',$EnvironmentId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseReleaseEnvironmentAttemptTimelineRecordAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    GetTaskAttachmentContent API is deprecated. Use GetReleaseTaskAttachmentContent API instead.
 
.PARAMETER Type
    Type of the attachment.
 
.PARAMETER RecordId
    Record Id of attachment.
 
.PARAMETER TimelineId
    Timeline Id of the task.
 
.PARAMETER AttemptId
    Attempt number of deployment.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ReleaseId
    Id of the release.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Name
    Name of the attachment.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER EnvironmentId
    Id of the release environment.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseReleaseEnvironmentAttemptTimelineRecordAttachment -Type $type -RecordId $recordid -TimelineId $timelineid -AttemptId $attemptid -Project $project -ReleaseId $releaseid -Organization $organization -Name $name -ApiVersion $apiversion -EnvironmentId $environmentid
 
    GetTaskAttachmentContent API is deprecated. Use GetReleaseTaskAttachmentContent API instead.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RecordId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TimelineId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AttemptId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}' -Replace '{type}',$Type -Replace '{recordId}',$RecordId -Replace '{timelineId}',$TimelineId -Replace '{attemptId}',$AttemptId -Replace '{project}',$Project -Replace '{releaseId}',$ReleaseId -Replace '{organization}',$Organization -Replace '{name}',$Name -Replace '{environmentId}',$EnvironmentId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseReleaseEnvironmentDeployphaseTaskLog {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the task log of a release as a plain text file.
 
.PARAMETER EndLine
    Ending line number for logs
 
.PARAMETER TaskId
    ReleaseTask Id for the log.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ReleaseId
    Id of the release.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER StartLine
    Starting line number for logs
 
.PARAMETER ReleaseDeployPhaseId
    Release deploy phase Id.
 
.PARAMETER EnvironmentId
    Id of release environment.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseReleaseEnvironmentDeployphaseTaskLog -TaskId $taskid -ApiVersion $apiversion -Project $project -ReleaseId $releaseid -Organization $organization -ReleaseDeployPhaseId $releasedeployphaseid -EnvironmentId $environmentid
 
    Gets the task log of a release as a plain text file.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int64]
        $EndLine,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TaskId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int64]
        $StartLine,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseDeployPhaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId
    )
    process {
        $__mapping = @{
            'EndLine' = 'endLine'
            'ApiVersion' = 'api-version'
            'StartLine' = 'startLine'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('EndLine','ApiVersion','StartLine') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks/{taskId}/logs' -Replace '{taskId}',$TaskId -Replace '{project}',$Project -Replace '{releaseId}',$ReleaseId -Replace '{organization}',$Organization -Replace '{releaseDeployPhaseId}',$ReleaseDeployPhaseId -Replace '{environmentId}',$EnvironmentId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseReleaseLog {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get logs for a release Id.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ReleaseId
    Id of the release.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseReleaseLog -Organization $organization -ReleaseId $releaseid -Project $project -ApiVersion $apiversion
 
    Get logs for a release Id.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/logs' -Replace '{organization}',$Organization -Replace '{releaseId}',$ReleaseId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsReleaseReleaseManualintervention {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    List all manual interventions for a given release.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ManualInterventionId
    Id of the manual intervention.
 
.PARAMETER ReleaseId
    Id of the release.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseReleaseManualintervention -Organization $organization -ManualInterventionId $manualinterventionid -ReleaseId $releaseid -Project $project -ApiVersion $apiversion
 
    Get manual intervention for a given release and manual intervention id.
 
.EXAMPLE
    PS C:\> Get-AdsReleaseReleaseManualintervention -Organization $organization -ReleaseId $releaseid -Project $project -ApiVersion $apiversion
 
    List all manual interventions for a given release.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Manual Interventions_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Manual Interventions_Get')]
        [string]
        $ManualInterventionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Manual Interventions_Get')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Manual Interventions_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Manual Interventions_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/Release/releases/{releaseId}/manualinterventions' -Replace '{organization}',$Organization -Replace '{releaseId}',$ReleaseId -Replace '{project}',$Project
        if ($ManualInterventionId) { $__path += "/$ManualInterventionId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsReleaseDefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a release definition.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsReleaseDefinition -Organization $organization -Project $project -ApiVersion $apiversion
 
    Update a release definition.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsReleaseRelease {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a complete release object.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ReleaseId
    Id of the release to update.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.8' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsReleaseRelease -Organization $organization -ReleaseId $releaseid -Project $project -ApiVersion $apiversion
 
    Update a complete release object.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}' -Replace '{organization}',$Organization -Replace '{releaseId}',$ReleaseId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsReleaseDefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a release definition.
 
.PARAMETER Comment
    Comment for deleting a release definition.
 
.PARAMETER DefinitionId
    Id of the release definition.
 
.PARAMETER ForceDelete
    'true' to automatically cancel any in-progress release deployments and proceed with release definition deletion . Default is 'false'.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsReleaseDefinition -DefinitionId $definitionid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Delete a release definition.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Comment,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DefinitionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ForceDelete,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Comment' = 'comment'
            'ForceDelete' = 'forceDelete'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Comment','ForceDelete','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions/{definitionId}' -Replace '{definitionId}',$DefinitionId -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsReleaseFolder {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes a definition folder for given folder name and path and all it's existing definitions.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Path
    Path of the folder to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsReleaseFolder -Organization $organization -Path $path -Project $project -ApiVersion $apiversion
 
    Deletes a definition folder for given folder name and path and all it's existing definitions.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/folders/{path}' -Replace '{organization}',$Organization -Replace '{path}',$Path -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsReleaseApproval {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update status of an approval
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApprovalId
    Id of the approval.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsReleaseApproval -Organization $organization -ApprovalId $approvalid -Project $project -ApiVersion $apiversion
 
    Update status of an approval
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApprovalId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/approvals/{approvalId}' -Replace '{organization}',$Organization -Replace '{approvalId}',$ApprovalId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsReleaseDefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a release definition
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsReleaseDefinition -Organization $organization -Project $project -ApiVersion $apiversion
 
    Create a release definition
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsReleaseFolder {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates an existing folder at given existing path.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Path
    Path of the folder to update.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsReleaseFolder -Organization $organization -Path $path -Project $project -ApiVersion $apiversion
 
    Updates an existing folder at given existing path.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/folders/{path}' -Replace '{organization}',$Organization -Replace '{path}',$Path -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsReleaseGate {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates the gate for a deployment.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GateStepId
    Gate step Id.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsReleaseGate -Organization $organization -GateStepId $gatestepid -Project $project -ApiVersion $apiversion
 
    Updates the gate for a deployment.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GateStepId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/gates/{gateStepId}' -Replace '{organization}',$Organization -Replace '{gateStepId}',$GateStepId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsReleaseRelease {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update few properties of a release.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ReleaseId
    Id of the release to update.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.8' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsReleaseRelease -Organization $organization -ReleaseId $releaseid -Project $project -ApiVersion $apiversion
 
    Update few properties of a release.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}' -Replace '{organization}',$Organization -Replace '{releaseId}',$ReleaseId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsReleaseReleaseEnvironment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update the status of a release environment
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER EnvironmentId
    Id of release environment.
 
.PARAMETER ReleaseId
    Id of the release.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.7' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsReleaseReleaseEnvironment -Organization $organization -EnvironmentId $environmentid -ReleaseId $releaseid -Project $project -ApiVersion $apiversion
 
    Update the status of a release environment
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}' -Replace '{organization}',$Organization -Replace '{environmentId}',$EnvironmentId -Replace '{releaseId}',$ReleaseId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsReleaseReleaseManualintervention {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update manual intervention.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ManualInterventionId
    Id of the manual intervention.
 
.PARAMETER ReleaseId
    Id of the release.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsReleaseReleaseManualintervention -Organization $organization -ManualInterventionId $manualinterventionid -ReleaseId $releaseid -Project $project -ApiVersion $apiversion
 
    Update manual intervention.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ManualInterventionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReleaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/Release/releases/{releaseId}/manualinterventions/{manualInterventionId}' -Replace '{organization}',$Organization -Replace '{manualInterventionId}',$ManualInterventionId -Replace '{releaseId}',$ReleaseId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSearchStatuRepositorie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Provides status of Repository.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Repository
    Repository ID or repository name.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSearchStatuRepositorie -Organization $organization -Repository $repository -Project $project -ApiVersion $apiversion
 
    Provides status of Repository.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Repository,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://almsearch.dev.azure.com/{organization}/{project}/_apis/search/status/repositories/{repository}' -Replace '{organization}',$Organization -Replace '{repository}',$Repository -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSearchStatuTfvc {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Provides status of TFVC Repository.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSearchStatuTfvc -Organization $organization -Project $project -ApiVersion $apiversion
 
    Provides status of TFVC Repository.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://almsearch.dev.azure.com/{organization}/{project}/_apis/search/status/tfvc' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsSearchCodesearchresult {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Provides a set of results for the search text.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsSearchCodesearchresult -Organization $organization -Project $project -ApiVersion $apiversion
 
    Provides a set of results for the search text.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://almsearch.dev.azure.com/{organization}/{project}/_apis/search/codesearchresults' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsSearchPackagesearchresult {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Provides a set of results for the search text.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsSearchPackagesearchresult -ApiVersion $apiversion -Organization $organization
 
    Provides a set of results for the search text.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://almsearch.dev.azure.com/{organization}/_apis/search/packagesearchresults' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsSearchWikisearchresult {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Provides a set of results for the search request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsSearchWikisearchresult -Organization $organization -Project $project -ApiVersion $apiversion
 
    Provides a set of results for the search request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://almsearch.dev.azure.com/{organization}/{project}/_apis/search/wikisearchresults' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsSearchWorkitemsearchresult {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Provides a set of results for the search text.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsSearchWorkitemsearchresult -Organization $organization -Project $project -ApiVersion $apiversion
 
    Provides a set of results for the search text.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://almsearch.dev.azure.com/{organization}/{project}/_apis/search/workitemsearchresults' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsAccesscontrollist {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Return a list of access control lists for the specified security namespace and token. All ACLs in the security namespace will be retrieved if no optional parameters are provided.
 
.PARAMETER IncludeExtendedInfo
    If true, populate the extended information properties for the access control entries contained in the returned lists.
 
.PARAMETER Descriptors
    An optional filter string containing a list of identity descriptors separated by ',' whose ACEs should be retrieved. If this is left null, entire ACLs will be returned.
 
.PARAMETER Token
    Security token
 
.PARAMETER SecurityNamespaceId
    Security namespace identifier.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Recurse
    If true and this is a hierarchical namespace, return child ACLs of the specified token.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsAccesscontrollist -SecurityNamespaceId $securitynamespaceid -Organization $organization -ApiVersion $apiversion
 
    Return a list of access control lists for the specified security namespace and token. All ACLs in the security namespace will be retrieved if no optional parameters are provided.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeExtendedInfo,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Descriptors,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Token,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SecurityNamespaceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Recurse,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IncludeExtendedInfo' = 'includeExtendedInfo'
            'Descriptors' = 'descriptors'
            'Token' = 'token'
            'Recurse' = 'recurse'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeExtendedInfo','Descriptors','Token','Recurse','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/accesscontrollists/{securityNamespaceId}' -Replace '{securityNamespaceId}',$SecurityNamespaceId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPermission {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Evaluates whether the caller has the specified permissions on the specified set of security tokens.
 
.PARAMETER Delimiter
    Optional security token separator. Defaults to ",".
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Permissions
    Permissions to evaluate.
 
.PARAMETER Tokens
    One or more security tokens to evaluate.
 
.PARAMETER SecurityNamespaceId
    Security namespace identifier.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER AlwaysAllowAdministrators
    If true and if the caller is an administrator, always return true.
 
.EXAMPLE
    PS C:\> Get-AdsPermission -ApiVersion $apiversion -Permissions $permissions -SecurityNamespaceId $securitynamespaceid -Organization $organization
 
    Evaluates whether the caller has the specified permissions on the specified set of security tokens.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Delimiter,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Permissions,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Tokens,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SecurityNamespaceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $AlwaysAllowAdministrators
    )
    process {
        $__mapping = @{
            'Delimiter' = 'delimiter'
            'ApiVersion' = 'api-version'
            'Tokens' = 'tokens'
            'AlwaysAllowAdministrators' = 'alwaysAllowAdministrators'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Delimiter','ApiVersion','Tokens','AlwaysAllowAdministrators') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/permissions/{securityNamespaceId}/{permissions}' -Replace '{permissions}',$Permissions -Replace '{securityNamespaceId}',$SecurityNamespaceId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSecuritynamespace {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    List all security namespaces or just the specified namespace.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER LocalOnly
    If true, retrieve only local security namespaces.
 
.PARAMETER SecurityNamespaceId
    Security namespace identifier.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSecuritynamespace -Organization $organization -SecurityNamespaceId $securitynamespaceid -ApiVersion $apiversion
 
    List all security namespaces or just the specified namespace.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $LocalOnly,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SecurityNamespaceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'LocalOnly' = 'localOnly'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('LocalOnly','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/securitynamespaces/{securityNamespaceId}' -Replace '{organization}',$Organization -Replace '{securityNamespaceId}',$SecurityNamespaceId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsAccesscontrolentrie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Remove the specified ACEs from the ACL belonging to the specified token.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Token
    The token whose ACL should be modified.
 
.PARAMETER SecurityNamespaceId
    Security namespace identifier.
 
.PARAMETER Descriptors
    String containing a list of identity descriptors separated by ',' whose entries should be removed.
 
.EXAMPLE
    PS C:\> Remove-AdsAccesscontrolentrie -Organization $organization -ApiVersion $apiversion -SecurityNamespaceId $securitynamespaceid
 
    Remove the specified ACEs from the ACL belonging to the specified token.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Token,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SecurityNamespaceId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Descriptors
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Token' = 'token'
            'Descriptors' = 'descriptors'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Token','Descriptors') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/accesscontrolentries/{securityNamespaceId}' -Replace '{organization}',$Organization -Replace '{securityNamespaceId}',$SecurityNamespaceId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsAccesscontrollist {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Remove access control lists under the specfied security namespace.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Recurse
    If true and this is a hierarchical namespace, also remove child ACLs of the specified tokens.
 
.PARAMETER SecurityNamespaceId
    Security namespace identifier.
 
.PARAMETER Tokens
    One or more comma-separated security tokens
 
.EXAMPLE
    PS C:\> Remove-AdsAccesscontrollist -Organization $organization -ApiVersion $apiversion -SecurityNamespaceId $securitynamespaceid
 
    Remove access control lists under the specfied security namespace.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Recurse,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SecurityNamespaceId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Tokens
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Recurse' = 'recurse'
            'Tokens' = 'tokens'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Recurse','Tokens') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/accesscontrollists/{securityNamespaceId}' -Replace '{organization}',$Organization -Replace '{securityNamespaceId}',$SecurityNamespaceId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPermission {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes the specified permissions on a security token for a user or group.
 
.PARAMETER Token
    Security token to remove permissions for.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Permissions
    Permissions to remove.
 
.PARAMETER SecurityNamespaceId
    Security namespace identifier.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Descriptor
    Identity descriptor of the user to remove permissions for.
 
.EXAMPLE
    PS C:\> Remove-AdsPermission -ApiVersion $apiversion -Permissions $permissions -SecurityNamespaceId $securitynamespaceid -Organization $organization -Descriptor $descriptor
 
    Removes the specified permissions on a security token for a user or group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Token,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Permissions,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SecurityNamespaceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Descriptor
    )
    process {
        $__mapping = @{
            'Token' = 'token'
            'ApiVersion' = 'api-version'
            'Descriptor' = 'descriptor'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Token','ApiVersion','Descriptor') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/permissions/{securityNamespaceId}/{permissions}' -Replace '{permissions}',$Permissions -Replace '{securityNamespaceId}',$SecurityNamespaceId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsAccesscontrolentrie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add or update ACEs in the ACL for the provided token. The request body contains the target token, a list of [ACEs](https://docs.microsoft.com/en-us/rest/api/azure/devops/security/access%20control%20entries/set%20access%20control%20entries?#accesscontrolentry) and a optional merge parameter. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SecurityNamespaceId
    Security namespace identifier.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsAccesscontrolentrie -Organization $organization -SecurityNamespaceId $securitynamespaceid -ApiVersion $apiversion
 
    Add or update ACEs in the ACL for the provided token. The request body contains the target token, a list of [ACEs](https://docs.microsoft.com/en-us/rest/api/azure/devops/security/access%20control%20entries/set%20access%20control%20entries?#accesscontrolentry) and a optional merge parameter. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SecurityNamespaceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/accesscontrolentries/{securityNamespaceId}' -Replace '{organization}',$Organization -Replace '{securityNamespaceId}',$SecurityNamespaceId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsAccesscontrollist {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create or update one or more access control lists. All data that currently exists for the ACLs supplied will be overwritten.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SecurityNamespaceId
    Security namespace identifier.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsAccesscontrollist -Organization $organization -SecurityNamespaceId $securitynamespaceid -ApiVersion $apiversion
 
    Create or update one or more access control lists. All data that currently exists for the ACLs supplied will be overwritten.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SecurityNamespaceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/accesscontrollists/{securityNamespaceId}' -Replace '{organization}',$Organization -Replace '{securityNamespaceId}',$SecurityNamespaceId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsSecurityPermissionevaluationbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Evaluates multiple permissions for the calling user. Note: This method does not aggregate the results, nor does it short-circuit if one of the permissions evaluates to false.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsSecurityPermissionevaluationbatch -ApiVersion $apiversion -Organization $organization
 
    Evaluates multiple permissions for the calling user. Note: This method does not aggregate the results, nor does it short-circuit if one of the permissions evaluates to false.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/security/permissionevaluationbatch' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSecurityroleScopeRoleassignmentResource {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get role assignments for the resource
 
.PARAMETER ResourceId
    Id of the resource that is assigned the scope
 
.PARAMETER ScopeId
    Id of the assigned scope
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSecurityroleScopeRoleassignmentResource -ResourceId $resourceid -ScopeId $scopeid -Organization $organization -ApiVersion $apiversion
 
    Get role assignments for the resource
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResourceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ScopeId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/securityroles/scopes/{scopeId}/roleassignments/resources/{resourceId}' -Replace '{resourceId}',$ResourceId -Replace '{scopeId}',$ScopeId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSecurityroleScopeRoledefinition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ScopeId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSecurityroleScopeRoledefinition -Organization $organization -ScopeId $scopeid -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ScopeId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/securityroles/scopes/{scopeId}/roledefinitions' -Replace '{organization}',$Organization -Replace '{scopeId}',$ScopeId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsSecurityroleScopeRoleassignmentResource {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Set role assignment on a resource
 
.PARAMETER ResourceId
    Id of the resource on which the role is to be assigned
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ScopeId
    Id of the assigned scope
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IdentityId
     
 
.EXAMPLE
    PS C:\> New-AdsSecurityroleScopeRoleassignmentResource -ResourceId $resourceid -ApiVersion $apiversion -ScopeId $scopeid -Organization $organization -IdentityId $identityid
 
    Set role assignment on a resource
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResourceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ScopeId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IdentityId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/securityroles/scopes/{scopeId}/roleassignments/resources/{resourceId}/{identityId}' -Replace '{resourceId}',$ResourceId -Replace '{scopeId}',$ScopeId -Replace '{organization}',$Organization -Replace '{identityId}',$IdentityId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsSecurityroleScopeRoleassignmentResource {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Remove the role assignment on a resource
 
.PARAMETER ResourceId
    Id of the resource on which the role is to be removed
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ScopeId
    Id of the assigned scope
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IdentityId
    Identity on which the assignment is to be removed
 
.EXAMPLE
    PS C:\> Remove-AdsSecurityroleScopeRoleassignmentResource -ResourceId $resourceid -ApiVersion $apiversion -ScopeId $scopeid -Organization $organization -IdentityId $identityid
 
    Remove the role assignment on a resource
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResourceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ScopeId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IdentityId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/securityroles/scopes/{scopeId}/roleassignments/resources/{resourceId}/{identityId}' -Replace '{resourceId}',$ResourceId -Replace '{scopeId}',$ScopeId -Replace '{organization}',$Organization -Replace '{identityId}',$IdentityId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsSecurityroleScopeRoleassignmentResource {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER ResourceId
     
 
.PARAMETER ScopeId
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsSecurityroleScopeRoleassignmentResource -ResourceId $resourceid -ScopeId $scopeid -Organization $organization -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResourceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ScopeId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/securityroles/scopes/{scopeId}/roleassignments/resources/{resourceId}' -Replace '{resourceId}',$ResourceId -Replace '{scopeId}',$ScopeId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsServiceendpointEndpoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the service endpoints by name.
 
.PARAMETER Owner
    Owner for service endpoints.
 
.PARAMETER Type
    Type of the service endpoints.
 
.PARAMETER ActionFilter
    Action filter for the service connection. It specifies the action which can be performed on the service connection.
 
.PARAMETER EndpointNames
    Names of the service endpoints.
 
.PARAMETER EndpointId
    Id of the service endpoint.
 
.PARAMETER IncludeFailed
    Failed flag for service endpoints.
 
.PARAMETER IncludeDetails
    Flag to include more details for service endpoints. This is for internal use only and the flag will be treated as false for all other requests
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER AuthSchemes
    Authorization schemes used for service endpoints.
 
.EXAMPLE
    PS C:\> Get-AdsServiceendpointEndpoint -EndpointId $endpointid -Project $project -ApiVersion $apiversion -Organization $organization
 
    Get the service endpoint details.
 
.EXAMPLE
    PS C:\> Get-AdsServiceendpointEndpoint -EndpointNames $endpointnames -Project $project -ApiVersion $apiversion -Organization $organization
 
    Get the service endpoints by name.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Owner,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Endpoints_Get')]
        [string]
        $ActionFilter,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EndpointNames,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Endpoints_Get')]
        [string]
        $EndpointId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeFailed,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeDetails,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Endpoints_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Endpoints_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Endpoints_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AuthSchemes
    )
    process {
        $__mapping = @{
            'Owner' = 'owner'
            'Type' = 'type'
            'ActionFilter' = 'actionFilter'
            'EndpointNames' = 'endpointNames'
            'IncludeFailed' = 'includeFailed'
            'IncludeDetails' = 'includeDetails'
            'ApiVersion' = 'api-version'
            'AuthSchemes' = 'authSchemes'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Owner','Type','ActionFilter','EndpointNames','IncludeFailed','IncludeDetails','ApiVersion','AuthSchemes') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/serviceendpoint/endpoints' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($EndpointId) { $__path += "/$EndpointId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsServiceendpointExecutionhistory {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get service endpoint execution records.
 
.PARAMETER ContinuationToken
    A continuation token, returned by a previous call to this method, that can be used to return the next set of records
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Top
    Number of service endpoint execution records to get.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER EndpointId
    Id of the service endpoint.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsServiceendpointExecutionhistory -Organization $organization -Project $project -EndpointId $endpointid -ApiVersion $apiversion
 
    Get service endpoint execution records.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int64]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EndpointId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'Top' = 'top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/serviceendpoint/{endpointId}/executionhistory' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{endpointId}',$EndpointId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsServiceendpointType {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get service endpoint types.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Type
    Type of service endpoint.
 
.PARAMETER Scheme
    Scheme of service endpoint.
 
.EXAMPLE
    PS C:\> Get-AdsServiceendpointType -Organization $organization -ApiVersion $apiversion
 
    Get service endpoint types.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Scheme
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Type' = 'type'
            'Scheme' = 'scheme'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Type','Scheme') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/serviceendpoint/types' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsServiceendpointEndpoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update the service endpoints.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Operation
    operation type
 
.PARAMETER EndpointId
    Endpoint Id of the endpoint to update
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsServiceendpointEndpoint -Organization $organization -EndpointId $endpointid -ApiVersion $apiversion
 
    Update the service endpoint
 
.EXAMPLE
    PS C:\> New-AdsServiceendpointEndpoint -Organization $organization -ApiVersion $apiversion
 
    Update the service endpoints.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Endpoints_Update Service Endpoint')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Endpoints_Update Service Endpoint')]
        [string]
        $Operation,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Endpoints_Update Service Endpoint')]
        [string]
        $EndpointId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Endpoints_Update Service Endpoint')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Operation' = 'operation'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Operation','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/serviceendpoint/endpoints' -Replace '{organization}',$Organization
        if ($EndpointId) { $__path += "/$EndpointId" }

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsServiceendpointEndpoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a service endpoint
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.PARAMETER Deep
    delete the spn created by endpoint
 
.PARAMETER ProjectIds
    project Ids from which endpoint needs to be deleted
 
.PARAMETER EndpointId
    Endpoint Id of endpoint to delete
 
.EXAMPLE
    PS C:\> Remove-AdsServiceendpointEndpoint -Organization $organization -ApiVersion $apiversion -ProjectIds $projectids -EndpointId $endpointid
 
    Delete a service endpoint
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Deep,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EndpointId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Deep' = 'deep'
            'ProjectIds' = 'projectIds'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Deep','ProjectIds') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/serviceendpoint/endpoints/{endpointId}' -Replace '{organization}',$Organization -Replace '{endpointId}',$EndpointId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsServiceendpointEndpoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Share service endpoint across projects
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.PARAMETER EndpointId
    Endpoint Id of the endpoint to share
 
.EXAMPLE
    PS C:\> Set-AdsServiceendpointEndpoint -Organization $organization -ApiVersion $apiversion -EndpointId $endpointid
 
    Share service endpoint across projects
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EndpointId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/serviceendpoint/endpoints/{endpointId}' -Replace '{organization}',$Organization -Replace '{endpointId}',$EndpointId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsServiceendpointEndpointproxy {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Use ExecuteServiceEndpointRequest API Instead
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsServiceendpointEndpointproxy -Organization $organization -Project $project -ApiVersion $apiversion
 
    Use ExecuteServiceEndpointRequest API Instead
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/serviceendpoint/endpointproxy' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsHookConsumer {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of available service hook consumer services. Optionally filter by consumers that support at least one event type from the specific publisher.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ConsumerId
    ID for a consumer.
 
.PARAMETER PublisherId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsHookConsumer -Organization $organization -ConsumerId $consumerid -ApiVersion $apiversion
 
    Get a specific consumer service. Optionally filter out consumer actions that do not support any event types for the specified publisher.
 
.EXAMPLE
    PS C:\> Get-AdsHookConsumer -Organization $organization -ApiVersion $apiversion
 
    Get a list of available service hook consumer services. Optionally filter by consumers that support at least one event type from the specific publisher.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Consumers_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Consumers_Get')]
        [string]
        $ConsumerId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Consumers_Get')]
        [string]
        $PublisherId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Consumers_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'PublisherId' = 'publisherId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('PublisherId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/consumers' -Replace '{organization}',$Organization
        if ($ConsumerId) { $__path += "/$ConsumerId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsHookConsumerAction {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of consumer actions for a specific consumer.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ConsumerActionId
    ID for a consumerActionId.
 
.PARAMETER ConsumerId
    ID for a consumer.
 
.PARAMETER PublisherId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsHookConsumerAction -Organization $organization -ConsumerActionId $consumeractionid -ConsumerId $consumerid -ApiVersion $apiversion
 
    Get details about a specific consumer action.
 
.EXAMPLE
    PS C:\> Get-AdsHookConsumerAction -Organization $organization -ConsumerId $consumerid -ApiVersion $apiversion
 
    Get a list of consumer actions for a specific consumer.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Consumers_Get Consumer Action')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Consumers_Get Consumer Action')]
        [string]
        $ConsumerActionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Consumers_Get Consumer Action')]
        [string]
        $ConsumerId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Consumers_Get Consumer Action')]
        [string]
        $PublisherId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Consumers_Get Consumer Action')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'PublisherId' = 'publisherId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('PublisherId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/consumers/{consumerId}/actions' -Replace '{organization}',$Organization -Replace '{consumerId}',$ConsumerId
        if ($ConsumerActionId) { $__path += "/$ConsumerActionId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsHookPublisher {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of publishers.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PublisherId
    ID for a publisher.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsHookPublisher -Organization $organization -ApiVersion $apiversion
 
    Get a list of publishers.
 
.EXAMPLE
    PS C:\> Get-AdsHookPublisher -Organization $organization -PublisherId $publisherid -ApiVersion $apiversion
 
    Get a specific service hooks publisher.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Publishers_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Publishers_Get')]
        [string]
        $PublisherId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Publishers_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/publishers' -Replace '{organization}',$Organization
        if ($PublisherId) { $__path += "/$PublisherId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsHookPublisherEventtype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the event types for a specific publisher.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER EventTypeId
     
 
.PARAMETER PublisherId
    ID for a publisher.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsHookPublisherEventtype -Organization $organization -EventTypeId $eventtypeid -PublisherId $publisherid -ApiVersion $apiversion
 
    Get a specific event type.
 
.EXAMPLE
    PS C:\> Get-AdsHookPublisherEventtype -Organization $organization -PublisherId $publisherid -ApiVersion $apiversion
 
    Get the event types for a specific publisher.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Publishers_Get Event Type')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Publishers_Get Event Type')]
        [string]
        $EventTypeId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Publishers_Get Event Type')]
        [string]
        $PublisherId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Publishers_Get Event Type')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/publishers/{publisherId}/eventtypes' -Replace '{organization}',$Organization -Replace '{publisherId}',$PublisherId
        if ($EventTypeId) { $__path += "/$EventTypeId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsHookSubscription {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of subscriptions.
 
.PARAMETER PublisherId
    ID for a subscription.
 
.PARAMETER ConsumerId
    ID for a consumer.
 
.PARAMETER SubscriptionId
    ID for a subscription.
 
.PARAMETER ConsumerActionId
    ID for a consumerActionId.
 
.PARAMETER EventType
    The event type to filter on (if any).
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsHookSubscription -SubscriptionId $subscriptionid -Organization $organization -ApiVersion $apiversion
 
    Get a specific service hooks subscription.
 
.EXAMPLE
    PS C:\> Get-AdsHookSubscription -Organization $organization -ApiVersion $apiversion
 
    Get a list of subscriptions.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PublisherId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ConsumerId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Subscriptions_Get')]
        [string]
        $SubscriptionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ConsumerActionId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EventType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Subscriptions_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Subscriptions_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'PublisherId' = 'publisherId'
            'ConsumerId' = 'consumerId'
            'ConsumerActionId' = 'consumerActionId'
            'EventType' = 'eventType'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('PublisherId','ConsumerId','ConsumerActionId','EventType','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/subscriptions' -Replace '{organization}',$Organization
        if ($SubscriptionId) { $__path += "/$SubscriptionId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsHookSubscriptionDiagnostic {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubscriptionId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsHookSubscriptionDiagnostic -Organization $organization -SubscriptionId $subscriptionid -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubscriptionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/subscriptions/{subscriptionId}/diagnostics' -Replace '{organization}',$Organization -Replace '{subscriptionId}',$SubscriptionId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsHookSubscriptionNotification {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of notifications for a specific subscription. A notification includes details about the event, the request to and the response from the consumer service.
 
.PARAMETER SubscriptionId
    ID for a subscription.
 
.PARAMETER NotificationId
     
 
.PARAMETER Status
    Get only notifications with this status.
 
.PARAMETER Result
    Get only notifications with this result type.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER MaxResults
    Maximum number of notifications to return. Default is **100**.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsHookSubscriptionNotification -SubscriptionId $subscriptionid -NotificationId $notificationid -Organization $organization -ApiVersion $apiversion
 
    Get a specific notification for a subscription.
 
.EXAMPLE
    PS C:\> Get-AdsHookSubscriptionNotification -SubscriptionId $subscriptionid -Organization $organization -ApiVersion $apiversion
 
    Get a list of notifications for a specific subscription. A notification includes details about the event, the request to and the response from the consumer service.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Notifications_Get')]
        [string]
        $SubscriptionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Notifications_Get')]
        [string]
        $NotificationId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Status,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Result,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Notifications_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $MaxResults,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Notifications_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Status' = 'status'
            'Result' = 'result'
            'MaxResults' = 'maxResults'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Status','Result','MaxResults','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/subscriptions/{subscriptionId}/notifications' -Replace '{subscriptionId}',$SubscriptionId -Replace '{organization}',$Organization
        if ($NotificationId) { $__path += "/$NotificationId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsHookSubscription {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a subscription. <param name="subscriptionId">ID for a subscription that you wish to update.</param>
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubscriptionId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsHookSubscription -Organization $organization -SubscriptionId $subscriptionid -ApiVersion $apiversion
 
    Update a subscription. <param name="subscriptionId">ID for a subscription that you wish to update.</param>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubscriptionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/subscriptions/{subscriptionId}' -Replace '{organization}',$Organization -Replace '{subscriptionId}',$SubscriptionId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsHookSubscriptionDiagnostic {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubscriptionId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsHookSubscriptionDiagnostic -Organization $organization -SubscriptionId $subscriptionid -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubscriptionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/subscriptions/{subscriptionId}/diagnostics' -Replace '{organization}',$Organization -Replace '{subscriptionId}',$SubscriptionId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsHookSubscription {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a specific service hooks subscription.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubscriptionId
    ID for a subscription.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsHookSubscription -Organization $organization -SubscriptionId $subscriptionid -ApiVersion $apiversion
 
    Delete a specific service hooks subscription.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubscriptionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/subscriptions/{subscriptionId}' -Replace '{organization}',$Organization -Replace '{subscriptionId}',$SubscriptionId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsHookNotificationsquery {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Query for notifications. A notification includes details about the event, the request to and the response from the consumer service.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsHookNotificationsquery -ApiVersion $apiversion -Organization $organization
 
    Query for notifications. A notification includes details about the event, the request to and the response from the consumer service.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/notificationsquery' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsHookPublisherInputvaluesquery {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PublisherId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsHookPublisherInputvaluesquery -Organization $organization -PublisherId $publisherid -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PublisherId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/publishers/{publisherId}/inputValuesQuery' -Replace '{organization}',$Organization -Replace '{publisherId}',$PublisherId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsHookPublishersquery {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Query for service hook publishers.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsHookPublishersquery -ApiVersion $apiversion -Organization $organization
 
    Query for service hook publishers.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/publishersquery' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsHookSubscription {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a subscription.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsHookSubscription -ApiVersion $apiversion -Organization $organization
 
    Create a subscription.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/subscriptions' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsHookSubscriptionsquery {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Query for service hook subscriptions.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsHookSubscriptionsquery -ApiVersion $apiversion -Organization $organization
 
    Query for service hook subscriptions.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/subscriptionsquery' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsHookTestnotification {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Sends a test notification. This is useful for verifying the configuration of an updated or new service hooks subscription.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER UseRealData
    Only allow testing with real data in existing subscriptions.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsHookTestnotification -Organization $organization -ApiVersion $apiversion
 
    Sends a test notification. This is useful for verifying the configuration of an updated or new service hooks subscription.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $UseRealData,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'UseRealData' = 'useRealData'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('UseRealData','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/hooks/testnotifications' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsStatuHealth {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Queries status information for the service all-up, or scoped to a particular service and/or geography
 
.PARAMETER Services
    A comma-separated list of services for which to get status information for. Supported values: Artifacts, Boards, Core services, Other services, Pipelines, Repos, Test Plans.
 
.PARAMETER Geographies
    A comma-separated list of geographies for which to get status information for. Supported values: APAC, AU, BR, CA, EU, IN, UK, US.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsStatuHealth -ApiVersion $apiversion
 
    Queries status information for the service all-up, or scoped to a particular service and/or geography
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Services,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Geographies,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Services' = 'services'
            'Geographies' = 'geographies'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Services','Geographies','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://status.dev.azure.com/_apis/status/health'

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSymbolAvailability {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Check the availability of symbol service. This includes checking for feature flag, and possibly license in future. Note this is NOT an anonymous endpoint, and the caller will be redirected to authentication before hitting it.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Get-AdsSymbolAvailability -ApiVersion $apiversion -Organization $organization
 
    Check the availability of symbol service. This includes checking for feature flag, and possibly license in future. Note this is NOT an anonymous endpoint, and the caller will be redirected to authentication before hitting it.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://artifacts.dev.azure.com/{organization}/_apis/symbol/availability' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSymbolClient {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the client package.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ClientType
    Either "EXE" for a zip file containing a Windows symbol client (a.k.a. symbol.exe) along with dependencies, or "TASK" for a VSTS task that can be run on a VSTS build agent. All the other values are invalid. The parameter is case-insensitive.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSymbolClient -Organization $organization -ClientType $clienttype -ApiVersion $apiversion
 
    Get the client package.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ClientType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://artifacts.dev.azure.com/{organization}/_apis/symbol/client/{clientType}' -Replace '{organization}',$Organization -Replace '{clientType}',$ClientType

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSymbolRequest {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a symbol request by request name.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RequestName
    The symbol request name.
 
.PARAMETER RequestId
    The symbol request identifier.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSymbolRequest -Organization $organization -RequestName $requestname -ApiVersion $apiversion
 
    Get a symbol request by request name.
 
.EXAMPLE
    PS C:\> Get-AdsSymbolRequest -Organization $organization -RequestId $requestid -ApiVersion $apiversion
 
    Get a symbol request by request identifier.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Requests_Get Requests Request Id')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RequestName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Requests_Get Requests Request Id')]
        [string]
        $RequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Requests_Get Requests Request Id')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'RequestName' = 'requestName'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('RequestName','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://artifacts.dev.azure.com/{organization}/_apis/symbol/requests' -Replace '{organization}',$Organization
        if ($RequestId) { $__path += "/$RequestId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSymbolRequestContent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a stitched debug entry for a symbol request as specified by symbol request identifier and debug entry identifier.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DebugEntryId
    The debug entry identifier.
 
.PARAMETER RequestId
    The symbol request identifier.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSymbolRequestContent -Organization $organization -DebugEntryId $debugentryid -RequestId $requestid -ApiVersion $apiversion
 
    Get a stitched debug entry for a symbol request as specified by symbol request identifier and debug entry identifier.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DebugEntryId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://artifacts.dev.azure.com/{organization}/_apis/symbol/requests/{requestId}/contents/{debugEntryId}' -Replace '{organization}',$Organization -Replace '{debugEntryId}',$DebugEntryId -Replace '{requestId}',$RequestId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsSymbolSymsrv {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Given a client key, returns the best matched debug entry.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DebugEntryClientKey
    A "client key" used by both ends of Microsoft's symbol protocol to identify a debug entry. The semantics of client key is governed by symsrv and is beyond the scope of this documentation.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsSymbolSymsrv -Organization $organization -DebugEntryClientKey $debugentryclientkey -ApiVersion $apiversion
 
    Given a client key, returns the best matched debug entry.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DebugEntryClientKey,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://artifacts.dev.azure.com/{organization}/_apis/symbol/symsrv/{debugEntryClientKey}' -Replace '{organization}',$Organization -Replace '{debugEntryClientKey}',$DebugEntryClientKey

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Invoke-AdsSymbolClient {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get client version information.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Invoke-AdsSymbolClient -ApiVersion $apiversion -Organization $organization
 
    Get client version information.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://artifacts.dev.azure.com/{organization}/_apis/symbol/client' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method head -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsSymbolRequest {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a symbol request by request name.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RequestName
    The symbol request name.
 
.PARAMETER Synchronous
    If true, delete all the debug entries under this request synchronously in the current session. If false, the deletion will be postponed to a later point and be executed automatically by the system.
 
.PARAMETER RequestId
    The symbol request identifier.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsSymbolRequest -Organization $organization -RequestId $requestid -ApiVersion $apiversion
 
    Delete a symbol request by request identifier.
 
.EXAMPLE
    PS C:\> Remove-AdsSymbolRequest -Organization $organization -RequestName $requestname -ApiVersion $apiversion
 
    Delete a symbol request by request name.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Requests_Delete Requests Request Id')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RequestName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Requests_Delete Requests Request Id')]
        [boolean]
        $Synchronous,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Requests_Delete Requests Request Id')]
        [string]
        $RequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Requests_Delete Requests Request Id')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'RequestName' = 'requestName'
            'Synchronous' = 'synchronous'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('RequestName','Synchronous','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://artifacts.dev.azure.com/{organization}/_apis/symbol/requests' -Replace '{organization}',$Organization
        if ($RequestId) { $__path += "/$RequestId" }

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsSymbolRequest {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a symbol request by request name.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RequestName
    The symbol request name.
 
.PARAMETER RequestId
    The symbol request identifier.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsSymbolRequest -Organization $organization -RequestId $requestid -ApiVersion $apiversion
 
    Update a symbol request by request identifier.
 
.EXAMPLE
    PS C:\> Set-AdsSymbolRequest -Organization $organization -RequestName $requestname -ApiVersion $apiversion
 
    Update a symbol request by request name.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Requests_Update Requests Request Id')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RequestName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Requests_Update Requests Request Id')]
        [string]
        $RequestId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Requests_Update Requests Request Id')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'RequestName' = 'requestName'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('RequestName','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://artifacts.dev.azure.com/{organization}/_apis/symbol/requests' -Replace '{organization}',$Organization
        if ($RequestId) { $__path += "/$RequestId" }

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskAgentcloud {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER AgentCloudId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskAgentcloud -Organization $organization -AgentCloudId $agentcloudid -ApiVersion $apiversion
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskAgentcloud -Organization $organization -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Agentclouds_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Agentclouds_Get')]
        [string]
        $AgentCloudId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Agentclouds_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/agentclouds' -Replace '{organization}',$Organization
        if ($AgentCloudId) { $__path += "/$AgentCloudId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskAgentcloudRequest {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER AgentCloudId
     
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskAgentcloudRequest -Organization $organization -ApiVersion $apiversion -AgentCloudId $agentcloudid
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentCloudId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/agentclouds/{agentCloudId}/requests' -Replace '{organization}',$Organization -Replace '{agentCloudId}',$AgentCloudId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskAgentcloudtype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get agent cloud types.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskAgentcloudtype -ApiVersion $apiversion -Organization $organization
 
    Get agent cloud types.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/agentcloudtypes' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskDeploymentgroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of deployment groups by name or IDs.
 
.PARAMETER ContinuationToken
    Get deployment groups with names greater than this continuationToken lexicographically.
 
.PARAMETER Expand
    Include these additional details in the returned objects.
 
.PARAMETER ActionFilter
    Get only deployment groups on which this action can be performed.
 
.PARAMETER Name
    Name of the deployment group.
 
.PARAMETER Ids
    Comma separated list of IDs of the deployment groups.
 
.PARAMETER Top
    Maximum number of deployment groups to return. Default is **1000**.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DeploymentGroupId
    ID of the deployment group.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskDeploymentgroup -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a list of deployment groups by name or IDs.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskDeploymentgroup -Project $project -Organization $organization -DeploymentGroupId $deploymentgroupid -ApiVersion $apiversion
 
    Get a deployment group by its ID.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Deploymentgroups_Get')]
        [string]
        $Expand,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Deploymentgroups_Get')]
        [string]
        $ActionFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Ids,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Deploymentgroups_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Deploymentgroups_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Deploymentgroups_Get')]
        [string]
        $DeploymentGroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Deploymentgroups_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'Expand' = '$expand'
            'ActionFilter' = 'actionFilter'
            'Name' = 'name'
            'Ids' = 'ids'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','Expand','ActionFilter','Name','Ids','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/deploymentgroups' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($DeploymentGroupId) { $__path += "/$DeploymentGroupId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskDeploymentgroupTarget {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of deployment targets in a deployment group.
 
.PARAMETER PartialNameMatch
    When set to true, treats **name** as pattern. Else treats it as absolute match. Default is **false**.
 
.PARAMETER DeploymentGroupId
    ID of the deployment group.
 
.PARAMETER Name
    Name pattern of the deployment targets to return.
 
.PARAMETER ContinuationToken
    Get deployment targets with names greater than this continuationToken lexicographically.
 
.PARAMETER AgentJobResult
    Get only deployment targets that have this last job result.
 
.PARAMETER Expand
    Include these additional details in the returned objects.
 
.PARAMETER AgentStatus
    Get only deployment targets that have this status.
 
.PARAMETER TargetId
    ID of the deployment target to return.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Enabled
    Get only deployment targets that are enabled or disabled. Default is 'null' which returns all the targets.
 
.PARAMETER PropertyFilters
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Top
    Maximum number of deployment targets to return. Default is **1000**.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Tags
    Get only the deployment targets that contain all these comma separted list of tags.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskDeploymentgroupTarget -DeploymentGroupId $deploymentgroupid -TargetId $targetid -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get a deployment target by its ID in a deployment group
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskDeploymentgroupTarget -DeploymentGroupId $deploymentgroupid -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get a list of deployment targets in a deployment group.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $PartialNameMatch,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Targets_Get')]
        [string]
        $DeploymentGroupId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentJobResult,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Targets_Get')]
        [string]
        $Expand,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentStatus,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Targets_Get')]
        [string]
        $TargetId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Targets_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Enabled,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PropertyFilters,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Targets_Get')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Targets_Get')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Tags
    )
    process {
        $__mapping = @{
            'PartialNameMatch' = 'partialNameMatch'
            'Name' = 'name'
            'ContinuationToken' = 'continuationToken'
            'AgentJobResult' = 'agentJobResult'
            'Expand' = '$expand'
            'AgentStatus' = 'agentStatus'
            'Enabled' = 'enabled'
            'PropertyFilters' = 'propertyFilters'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
            'Tags' = 'tags'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('PartialNameMatch','Name','ContinuationToken','AgentJobResult','Expand','AgentStatus','Enabled','PropertyFilters','Top','ApiVersion','Tags') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets' -Replace '{deploymentGroupId}',$DeploymentGroupId -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($TargetId) { $__path += "/$TargetId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskEnvironment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all environments.
 
.PARAMETER Expands
    Include these additional details in the returned objects.
 
.PARAMETER ContinuationToken
     
 
.PARAMETER Name
     
 
.PARAMETER Top
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER EnvironmentId
    ID of the environment.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskEnvironment -Project $project -Organization $organization -ApiVersion $apiversion -EnvironmentId $environmentid
 
    Get an environment by its ID.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskEnvironment -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get all environments.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Environments_Get')]
        [string]
        $Expands,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Environments_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Environments_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Environments_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Environments_Get')]
        [string]
        $EnvironmentId
    )
    process {
        $__mapping = @{
            'Expands' = 'expands'
            'ContinuationToken' = 'continuationToken'
            'Name' = 'name'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expands','ContinuationToken','Name','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/environments' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($EnvironmentId) { $__path += "/$EnvironmentId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskEnvironmentEnvironmentdeploymentrecord {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get environment deployment execution history
 
.PARAMETER ContinuationToken
     
 
.PARAMETER Top
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER EnvironmentId
     
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskEnvironmentEnvironmentdeploymentrecord -Project $project -Organization $organization -ApiVersion $apiversion -EnvironmentId $environmentid
 
    Get environment deployment execution history
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'Top' = 'top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/environments/{environmentId}/environmentdeploymentrecords' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{environmentId}',$EnvironmentId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskEnvironmentProviderKubernete {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER EnvironmentId
     
 
.PARAMETER ResourceId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskEnvironmentProviderKubernete -Organization $organization -EnvironmentId $environmentid -ResourceId $resourceid -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResourceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/environments/{environmentId}/providers/kubernetes/{resourceId}' -Replace '{organization}',$Organization -Replace '{environmentId}',$EnvironmentId -Replace '{resourceId}',$ResourceId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskPool {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of agent pools.
 
.PARAMETER PoolId
    An agent pool ID
 
.PARAMETER ActionFilter
    Filter by whether the calling user has use or manage permissions
 
.PARAMETER PoolIds
    pool Ids to fetch
 
.PARAMETER Properties
    Agent pool properties (comma-separated)
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskPool -PoolId $poolid -Organization $organization -ApiVersion $apiversion
 
    Get information about an agent pool.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskPool -PoolIds $poolids -Organization $organization -ApiVersion $apiversion
 
    Get a list of agent pools.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pools_Get')]
        [string]
        $PoolId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pools_Get')]
        [string]
        $ActionFilter,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PoolIds,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pools_Get')]
        [string]
        $Properties,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pools_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pools_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ActionFilter' = 'actionFilter'
            'PoolIds' = 'poolIds'
            'Properties' = 'properties'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ActionFilter','PoolIds','Properties','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/pools' -Replace '{organization}',$Organization
        if ($PoolId) { $__path += "/$PoolId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskPoolAgent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of agents.
 
.PARAMETER PoolId
    The agent pool containing the agents
 
.PARAMETER IncludeAssignedRequest
    Whether to include details about the agents' current work
 
.PARAMETER IncludeLastCompletedRequest
    Whether to include details about the agents' most recent completed work
 
.PARAMETER PropertyFilters
    Filter which custom properties will be returned
 
.PARAMETER AgentId
    The agent ID to get information about
 
.PARAMETER IncludeCapabilities
    Whether to include the agents' capabilities in the response
 
.PARAMETER AgentName
    Filter on agent name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Demands
    Filter by demands the agents can satisfy
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskPoolAgent -PoolId $poolid -AgentId $agentid -Organization $organization -ApiVersion $apiversion
 
    Get information about an agent.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskPoolAgent -PoolId $poolid -Organization $organization -ApiVersion $apiversion
 
    Get a list of agents.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Agents_Get')]
        [string]
        $PoolId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Agents_Get')]
        [boolean]
        $IncludeAssignedRequest,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Agents_Get')]
        [boolean]
        $IncludeLastCompletedRequest,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Agents_Get')]
        [string]
        $PropertyFilters,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Agents_Get')]
        [string]
        $AgentId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Agents_Get')]
        [boolean]
        $IncludeCapabilities,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Agents_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Demands,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Agents_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IncludeAssignedRequest' = 'includeAssignedRequest'
            'IncludeLastCompletedRequest' = 'includeLastCompletedRequest'
            'PropertyFilters' = 'propertyFilters'
            'IncludeCapabilities' = 'includeCapabilities'
            'AgentName' = 'agentName'
            'Demands' = 'demands'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeAssignedRequest','IncludeLastCompletedRequest','PropertyFilters','IncludeCapabilities','AgentName','Demands','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/pools/{poolId}/agents' -Replace '{poolId}',$PoolId -Replace '{organization}',$Organization
        if ($AgentId) { $__path += "/$AgentId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskQueue {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of agent queues by pool ids
 
.PARAMETER ActionFilter
    Filter by whether the calling user has use or manage permissions
 
.PARAMETER PoolIds
    A comma-separated list of pool ids to get the corresponding queues for
 
.PARAMETER QueueId
    The agent queue to get information about
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskQueue -QueueId $queueid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get information about an agent queue.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskQueue -PoolIds $poolids -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a list of agent queues by pool ids
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queues_Get')]
        [string]
        $ActionFilter,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PoolIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queues_Get')]
        [string]
        $QueueId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queues_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queues_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queues_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ActionFilter' = 'actionFilter'
            'PoolIds' = 'poolIds'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ActionFilter','PoolIds','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/queues' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($QueueId) { $__path += "/$QueueId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskTaskgroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    List task groups.
 
.PARAMETER ContinuationToken
    Gets the task groups after the continuation token provided.
 
.PARAMETER Expanded
    'true' to recursively expand task groups. Default is 'false'.
 
.PARAMETER QueryOrder
    Gets the results in the defined order. Default is 'CreatedOnDescending'.
 
.PARAMETER Deleted
    'true'to include deleted task groups. Default is 'false'.
 
.PARAMETER TaskGroupId
    Id of the task group.
 
.PARAMETER Top
    Number of task groups to get.
 
.PARAMETER TaskIdFilter
    Guid of the taskId to filter.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskTaskgroup -TaskGroupId $taskgroupid -ApiVersion $apiversion -Organization $organization -Project $project
 
    List task groups.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Expanded,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $QueryOrder,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Deleted,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TaskGroupId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TaskIdFilter,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'Expanded' = 'expanded'
            'QueryOrder' = 'queryOrder'
            'Deleted' = 'deleted'
            'Top' = '$top'
            'TaskIdFilter' = 'taskIdFilter'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','Expanded','QueryOrder','Deleted','Top','TaskIdFilter','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/taskgroups/{taskGroupId}' -Replace '{taskGroupId}',$TaskGroupId -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskVariablegroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get variable groups by ids.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER GroupId
    Id of the variable group.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER GroupIds
    Comma separated list of Ids of variable groups.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskVariablegroup -Organization $organization -ApiVersion $apiversion -GroupId $groupid -Project $project
 
    Get a variable group.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskVariablegroup -Organization $organization -ApiVersion $apiversion -Project $project -GroupIds $groupids
 
    Get variable groups by ids.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variablegroups_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variablegroups_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variablegroups_Get')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variablegroups_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupIds
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'GroupIds' = 'groupIds'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','GroupIds') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/variablegroups' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($GroupId) { $__path += "/$GroupId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsDistributedtaskYamlschema {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    GET the Yaml schema used for Yaml file validation.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ValidateTaskNames
    Whether the schema should validate that tasks are actually installed (useful for offline tools where you don't want validation).
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsDistributedtaskYamlschema -Organization $organization -ApiVersion $apiversion
 
    GET the Yaml schema used for Yaml file validation.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ValidateTaskNames,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ValidateTaskNames' = 'validateTaskNames'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ValidateTaskNames','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/yamlschema' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsDistributedtaskPoolAgent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PoolId
    The agent pool to use
 
.PARAMETER AgentId
    The agent to replace
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsDistributedtaskPoolAgent -Organization $organization -PoolId $poolid -AgentId $agentid -ApiVersion $apiversion
 
    Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PoolId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/pools/{poolId}/agents/{agentId}' -Replace '{organization}',$Organization -Replace '{poolId}',$PoolId -Replace '{agentId}',$AgentId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsDistributedtaskTaskgroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a task group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TaskGroupId
    Id of the task group to update.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsDistributedtaskTaskgroup -Organization $organization -TaskGroupId $taskgroupid -Project $project -ApiVersion $apiversion
 
    Update a task group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TaskGroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/taskgroups/{taskGroupId}' -Replace '{organization}',$Organization -Replace '{taskGroupId}',$TaskGroupId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsDistributedtaskVariablegroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a variable group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    Id of the variable group to update.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsDistributedtaskVariablegroup -Organization $organization -GroupId $groupid -ApiVersion $apiversion
 
    Update a variable group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/variablegroups/{groupId}' -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDistributedtaskAgentcloud {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER AgentCloudId
     
 
.EXAMPLE
    PS C:\> Remove-AdsDistributedtaskAgentcloud -Organization $organization -ApiVersion $apiversion -AgentCloudId $agentcloudid
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentCloudId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/agentclouds/{agentCloudId}' -Replace '{organization}',$Organization -Replace '{agentCloudId}',$AgentCloudId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDistributedtaskDeploymentgroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a deployment group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DeploymentGroupId
    ID of the deployment group to be deleted.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsDistributedtaskDeploymentgroup -Organization $organization -DeploymentGroupId $deploymentgroupid -Project $project -ApiVersion $apiversion
 
    Delete a deployment group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DeploymentGroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}' -Replace '{organization}',$Organization -Replace '{deploymentGroupId}',$DeploymentGroupId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDistributedtaskDeploymentgroupTarget {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DeploymentGroupId
    ID of the deployment group in which deployment target is deleted.
 
.PARAMETER TargetId
    ID of the deployment target to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsDistributedtaskDeploymentgroupTarget -Organization $organization -DeploymentGroupId $deploymentgroupid -TargetId $targetid -Project $project -ApiVersion $apiversion
 
    Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DeploymentGroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TargetId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}' -Replace '{organization}',$Organization -Replace '{deploymentGroupId}',$DeploymentGroupId -Replace '{targetId}',$TargetId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDistributedtaskEnvironment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete the specified environment.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER EnvironmentId
    ID of the environment.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsDistributedtaskEnvironment -Organization $organization -EnvironmentId $environmentid -Project $project -ApiVersion $apiversion
 
    Delete the specified environment.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/environments/{environmentId}' -Replace '{organization}',$Organization -Replace '{environmentId}',$EnvironmentId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDistributedtaskEnvironmentProviderKubernete {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER EnvironmentId
     
 
.PARAMETER ResourceId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsDistributedtaskEnvironmentProviderKubernete -Organization $organization -EnvironmentId $environmentid -ResourceId $resourceid -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResourceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/environments/{environmentId}/providers/kubernetes/{resourceId}' -Replace '{organization}',$Organization -Replace '{environmentId}',$EnvironmentId -Replace '{resourceId}',$ResourceId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDistributedtaskPool {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete an agent pool.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PoolId
    ID of the agent pool to delete
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsDistributedtaskPool -Organization $organization -PoolId $poolid -ApiVersion $apiversion
 
    Delete an agent pool.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PoolId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/pools/{poolId}' -Replace '{organization}',$Organization -Replace '{poolId}',$PoolId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDistributedtaskPoolAgent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove an agent from your organization.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PoolId
    The pool ID to remove the agent from
 
.PARAMETER AgentId
    The agent ID to remove
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsDistributedtaskPoolAgent -Organization $organization -PoolId $poolid -AgentId $agentid -ApiVersion $apiversion
 
    Delete an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove an agent from your organization.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PoolId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/pools/{poolId}/agents/{agentId}' -Replace '{organization}',$Organization -Replace '{poolId}',$PoolId -Replace '{agentId}',$AgentId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDistributedtaskQueue {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes an agent queue from a project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER QueueId
    The agent queue to remove
 
.EXAMPLE
    PS C:\> Remove-AdsDistributedtaskQueue -Organization $organization -ApiVersion $apiversion -Project $project -QueueId $queueid
 
    Removes an agent queue from a project.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $QueueId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/queues/{queueId}' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{queueId}',$QueueId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDistributedtaskTaskgroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a task group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TaskGroupId
    Id of the task group to be deleted.
 
.PARAMETER Comment
    Comments to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsDistributedtaskTaskgroup -Organization $organization -TaskGroupId $taskgroupid -Project $project -ApiVersion $apiversion
 
    Delete a task group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TaskGroupId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Comment,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Comment' = 'comment'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Comment','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/taskgroups/{taskGroupId}' -Replace '{organization}',$Organization -Replace '{taskGroupId}',$TaskGroupId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsDistributedtaskVariablegroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a variable group
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER GroupId
    Id of the variable group.
 
.PARAMETER ProjectIds
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsDistributedtaskVariablegroup -Organization $organization -GroupId $groupid -ProjectIds $projectids -ApiVersion $apiversion
 
    Delete a variable group
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProjectIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ProjectIds' = 'projectIds'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ProjectIds','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/variablegroups/{groupId}' -Replace '{organization}',$Organization -Replace '{groupId}',$GroupId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskAgentcloud {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER AgentCloudId
     
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskAgentcloud -Organization $organization -ApiVersion $apiversion -AgentCloudId $agentcloudid
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentCloudId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/agentclouds/{agentCloudId}' -Replace '{organization}',$Organization -Replace '{agentCloudId}',$AgentCloudId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskDeploymentgroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a deployment group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskDeploymentgroup -Organization $organization -Project $project -ApiVersion $apiversion
 
    Create a deployment group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/deploymentgroups' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskDeploymentgroupTarget {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update tags of a list of deployment targets in a deployment group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DeploymentGroupId
    ID of the deployment group in which deployment targets are updated.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskDeploymentgroupTarget -Organization $organization -DeploymentGroupId $deploymentgroupid -Project $project -ApiVersion $apiversion
 
    Update tags of a list of deployment targets in a deployment group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DeploymentGroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets' -Replace '{organization}',$Organization -Replace '{deploymentGroupId}',$DeploymentGroupId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskEnvironment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create an environment.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskEnvironment -Organization $organization -Project $project -ApiVersion $apiversion
 
    Create an environment.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/environments' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskEnvironmentProviderKubernete {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER EnvironmentId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskEnvironmentProviderKubernete -Organization $organization -EnvironmentId $environmentid -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EnvironmentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/environments/{environmentId}/providers/kubernetes' -Replace '{organization}',$Organization -Replace '{environmentId}',$EnvironmentId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskPool {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create an agent pool.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskPool -ApiVersion $apiversion -Organization $organization
 
    Create an agent pool.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/pools' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskPoolAgent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update agent details.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PoolId
    The agent pool to use
 
.PARAMETER AgentId
    The agent to update
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskPoolAgent -Organization $organization -PoolId $poolid -AgentId $agentid -ApiVersion $apiversion
 
    Update agent details.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PoolId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AgentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/pools/{poolId}/agents/{agentId}' -Replace '{organization}',$Organization -Replace '{poolId}',$PoolId -Replace '{agentId}',$AgentId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskQueue {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a new agent queue to connect a project to an agent pool.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER AuthorizePipelines
    Automatically authorize this queue when using YAML
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskQueue -Organization $organization -Project $project -ApiVersion $apiversion
 
    Create a new agent queue to connect a project to an agent pool.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $AuthorizePipelines,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'AuthorizePipelines' = 'authorizePipelines'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('AuthorizePipelines','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/queues' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskTaskgroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a task group.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskTaskgroup -Organization $organization -Project $project -ApiVersion $apiversion
 
    Create a task group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/distributedtask/taskgroups' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsDistributedtaskVariablegroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add a variable group.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsDistributedtaskVariablegroup -ApiVersion $apiversion -Organization $organization
 
    Add a variable group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/distributedtask/variablegroups' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestCodecoverage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get code coverage data for a build.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Flags
    Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BuildId
    ID of the build for which code coverage data needs to be fetched.
 
.EXAMPLE
    PS C:\> Get-AdsTestCodecoverage -Organization $organization -ApiVersion $apiversion -Flags $flags -Project $project -BuildId $buildid
 
    Get code coverage data for a build.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Flags,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $BuildId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Flags' = 'flags'
            'BuildId' = 'buildId'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Flags','BuildId') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/codecoverage' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestPlanSuitePoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of test points.
 
.PARAMETER PointIds
    ID of the test point to get.
 
.PARAMETER TestPointIds
    Get test points for comma-separated list of test point IDs, valid only when configurationId and testCaseId are not set.
 
.PARAMETER WitFields
    Comma-separated list of work item field names.
 
.PARAMETER SuiteId
    ID of the suite that contains the points.
 
.PARAMETER IncludePointDetails
    Include all properties for the test point.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestCaseId
    Get test points for a specific test case, valid when configurationId is not set.
 
.PARAMETER PlanId
    ID of the test plan.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Top
    Number of test points to return.
 
.PARAMETER ConfigurationId
    Get test points for specific configuration.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Skip
    Number of test points to skip..
 
.EXAMPLE
    PS C:\> Get-AdsTestPlanSuitePoint -PointIds $pointids -SuiteId $suiteid -Organization $organization -PlanId $planid -Project $project -ApiVersion $apiversion
 
    Get a test point.
 
.EXAMPLE
    PS C:\> Get-AdsTestPlanSuitePoint -SuiteId $suiteid -Organization $organization -PlanId $planid -Project $project -ApiVersion $apiversion
 
    Get a list of test points.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Points_Get Point')]
        [string]
        $PointIds,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestPointIds,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Points_Get Point')]
        [string]
        $WitFields,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Points_Get Point')]
        [string]
        $SuiteId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludePointDetails,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Points_Get Point')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestCaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Points_Get Point')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Points_Get Point')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ConfigurationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Points_Get Point')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip
    )
    process {
        $__mapping = @{
            'TestPointIds' = 'testPointIds'
            'WitFields' = 'witFields'
            'IncludePointDetails' = 'includePointDetails'
            'TestCaseId' = 'testCaseId'
            'Top' = '$top'
            'ConfigurationId' = 'configurationId'
            'ApiVersion' = 'api-version'
            'Skip' = '$skip'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('TestPointIds','WitFields','IncludePointDetails','TestCaseId','Top','ConfigurationId','ApiVersion','Skip') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/points' -Replace '{suiteId}',$SuiteId -Replace '{organization}',$Organization -Replace '{planId}',$PlanId -Replace '{project}',$Project
        if ($PointIds) { $__path += "/$PointIds" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestPlanSuiteTestcase {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all test cases in a suite.
 
.PARAMETER TestCaseIds
    ID of the test case to get.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER PlanId
    ID of the test plan that contains the suites.
 
.PARAMETER SuiteId
    ID of the suite to get.
 
.EXAMPLE
    PS C:\> Get-AdsTestPlanSuiteTestcase -TestCaseIds $testcaseids -Organization $organization -Project $project -ApiVersion $apiversion -PlanId $planid -SuiteId $suiteid
 
    Get a specific test case in a test suite with test case id.
 
.EXAMPLE
    PS C:\> Get-AdsTestPlanSuiteTestcase -Organization $organization -Project $project -ApiVersion $apiversion -PlanId $planid -SuiteId $suiteid
 
    Get all test cases in a suite.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $TestCaseIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $SuiteId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Plans/{planId}/suites/{suiteId}/testcases' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{planId}',$PlanId -Replace '{suiteId}',$SuiteId
        if ($TestCaseIds) { $__path += "/$TestCaseIds" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestResultretentionsetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get test result retention settings
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestResultretentionsetting -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get test result retention settings
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/resultretentionsettings' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestRun {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of test runs.
 
.PARAMETER RunId
    ID of the run to get.
 
.PARAMETER Owner
    Team foundation ID of the owner of the runs.
 
.PARAMETER Skip
    Number of test runs to skip.
 
.PARAMETER IncludeRunDetails
    If true, include all the properties of the runs.
 
.PARAMETER TmiRunId
     
 
.PARAMETER BuildUri
    URI of the build that the runs used.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PlanId
    ID of the test plan that the runs are a part of.
 
.PARAMETER IncludeDetails
    Default value is true. It includes details like run statistics, release, build, test environment, post process state, and more.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Top
    Number of test runs to return.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER Automated
    If true, only returns automated runs.
 
.EXAMPLE
    PS C:\> Get-AdsTestRun -RunId $runid -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get a test run by its ID.
 
.EXAMPLE
    PS C:\> Get-AdsTestRun -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get a list of test runs.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Runs_Get Test Run By Id')]
        [string]
        $RunId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Owner,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeRunDetails,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TmiRunId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BuildUri,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Runs_Get Test Run By Id')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $PlanId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Runs_Get Test Run By Id')]
        [boolean]
        $IncludeDetails,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Runs_Get Test Run By Id')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Runs_Get Test Run By Id')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Automated
    )
    process {
        $__mapping = @{
            'Owner' = 'owner'
            'Skip' = '$skip'
            'IncludeRunDetails' = 'includeRunDetails'
            'TmiRunId' = 'tmiRunId'
            'BuildUri' = 'buildUri'
            'PlanId' = 'planId'
            'IncludeDetails' = 'includeDetails'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
            'Automated' = 'automated'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Owner','Skip','IncludeRunDetails','TmiRunId','BuildUri','PlanId','IncludeDetails','Top','ApiVersion','Automated') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/runs' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($RunId) { $__path += "/$RunId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestRunAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get list of test run attachments reference.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RunId
    ID of the test run.
 
.PARAMETER AttachmentId
    ID of the test run attachment to be downloaded.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestRunAttachment -Organization $organization -RunId $runid -AttachmentId $attachmentid -Project $project -ApiVersion $apiversion
 
    Download a test run attachment by its ID.
 
.EXAMPLE
    PS C:\> Get-AdsTestRunAttachment -Organization $organization -RunId $runid -Project $project -ApiVersion $apiversion
 
    Get list of test run attachments reference.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Attachments_Get Test Run Attachment Zip')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Attachments_Get Test Run Attachment Zip')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Attachments_Get Test Run Attachment Zip')]
        [string]
        $AttachmentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Attachments_Get Test Run Attachment Zip')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Attachments_Get Test Run Attachment Zip')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/attachments' -Replace '{organization}',$Organization -Replace '{runId}',$RunId -Replace '{project}',$Project
        if ($AttachmentId) { $__path += "/$AttachmentId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestRunCodecoverage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get code coverage data for a test run
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RunId
    ID of the test run for which code coverage data needs to be fetched.
 
.PARAMETER Flags
    Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestRunCodecoverage -Organization $organization -RunId $runid -Flags $flags -Project $project -ApiVersion $apiversion
 
    Get code coverage data for a test run
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Flags,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Flags' = 'flags'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Flags','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/codecoverage' -Replace '{organization}',$Organization -Replace '{runId}',$RunId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestRunResult {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get test results for a test run.
 
.PARAMETER Skip
    Number of test results to skip from beginning.
 
.PARAMETER TestCaseResultId
    Test result ID.
 
.PARAMETER DetailsToInclude
    Details to include with test results. Default is None. Other values are Iterations and WorkItems.
 
.PARAMETER Top
    Number of test results to return. Maximum is 1000 when detailsToInclude is None and 200 otherwise.
 
.PARAMETER RunId
    Test run ID of test results to fetch.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Outcomes
    Comma separated list of test outcomes to filter test results.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.6' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestRunResult -TestCaseResultId $testcaseresultid -RunId $runid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a test result for a test run.
 
.EXAMPLE
    PS C:\> Get-AdsTestRunResult -RunId $runid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get test results for a test run.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Results_Get')]
        [string]
        $TestCaseResultId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Results_Get')]
        [string]
        $DetailsToInclude,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Results_Get')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Results_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Results_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Outcomes,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Results_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Skip' = '$skip'
            'DetailsToInclude' = 'detailsToInclude'
            'Top' = '$top'
            'Outcomes' = 'outcomes'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','DetailsToInclude','Top','Outcomes','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results' -Replace '{runId}',$RunId -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($TestCaseResultId) { $__path += "/$TestCaseResultId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestRunResultAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get list of test result attachments reference.
 
.PARAMETER AttachmentId
    ID of the test result attachment to be downloaded.
 
.PARAMETER RunId
    ID of the test run that contains the result.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestCaseResultId
    ID of the test result.
 
.EXAMPLE
    PS C:\> Get-AdsTestRunResultAttachment -AttachmentId $attachmentid -RunId $runid -Project $project -ApiVersion $apiversion -Organization $organization -TestCaseResultId $testcaseresultid
 
    Download a test result attachment by its ID.
 
.EXAMPLE
    PS C:\> Get-AdsTestRunResultAttachment -RunId $runid -Project $project -ApiVersion $apiversion -Organization $organization -TestCaseResultId $testcaseresultid
 
    Get list of test result attachments reference.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Attachments_Get Test Result Attachment Zip')]
        [string]
        $AttachmentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Attachments_Get Test Result Attachment Zip')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Attachments_Get Test Result Attachment Zip')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Attachments_Get Test Result Attachment Zip')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Attachments_Get Test Result Attachment Zip')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Attachments_Get Test Result Attachment Zip')]
        [string]
        $TestCaseResultId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/attachments' -Replace '{runId}',$RunId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{testCaseResultId}',$TestCaseResultId
        if ($AttachmentId) { $__path += "/$AttachmentId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestRunResultIteration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get iterations for a result
 
.PARAMETER IncludeActionResults
    Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration.
 
.PARAMETER RunId
    ID of the test run that contains the result.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestCaseResultId
    ID of the test result that contains the iterations.
 
.PARAMETER IterationId
    Id of the test results Iteration.
 
.EXAMPLE
    PS C:\> Get-AdsTestRunResultIteration -RunId $runid -Project $project -ApiVersion $apiversion -Organization $organization -TestCaseResultId $testcaseresultid -IterationId $iterationid
 
    Get iteration for a result
 
.EXAMPLE
    PS C:\> Get-AdsTestRunResultIteration -RunId $runid -Project $project -ApiVersion $apiversion -Organization $organization -TestCaseResultId $testcaseresultid
 
    Get iterations for a result
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [boolean]
        $IncludeActionResults,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [string]
        $TestCaseResultId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'IncludeActionResults' = 'includeActionResults'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeActionResults','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/iterations' -Replace '{runId}',$RunId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{testCaseResultId}',$TestCaseResultId
        if ($IterationId) { $__path += "/$IterationId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestRunStatistic {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get test run statistics , used when we want to get summary of a run by outcome.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RunId
    ID of the run to get.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestRunStatistic -Organization $organization -RunId $runid -Project $project -ApiVersion $apiversion
 
    Get test run statistics , used when we want to get summary of a run by outcome.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/runs/{runId}/Statistics' -Replace '{organization}',$Organization -Replace '{runId}',$RunId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestSession {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of test sessions
 
.PARAMETER IncludeOnlyCompletedSessions
    If true, it returns test sessions in completed state. Otherwise, it returns test sessions for all states
 
.PARAMETER Period
    Period in days from now, for which test sessions are fetched.
 
.PARAMETER AllSessions
    If false, returns test sessions for current user. Otherwise, it returns test sessions for all users
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Source
    Source of the test session.
 
.PARAMETER IncludeAllProperties
    If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Get-AdsTestSession -Project $project -Organization $organization -ApiVersion $apiversion -Team $team
 
    Get a list of test sessions
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeOnlyCompletedSessions,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Period,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $AllSessions,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Source,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeAllProperties,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'IncludeOnlyCompletedSessions' = 'includeOnlyCompletedSessions'
            'Period' = 'period'
            'AllSessions' = 'allSessions'
            'Source' = 'source'
            'IncludeAllProperties' = 'includeAllProperties'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeOnlyCompletedSessions','Period','AllSessions','Source','IncludeAllProperties','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/test/session' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{team}',$Team

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsTestPlanSuiteTestcase {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently.
 
.PARAMETER TestCaseIds
    IDs of the test cases to remove from the suite.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER PlanId
    ID of the test plan that contains the suite.
 
.PARAMETER SuiteId
    ID of the suite to get.
 
.EXAMPLE
    PS C:\> Remove-AdsTestPlanSuiteTestcase -TestCaseIds $testcaseids -Organization $organization -Project $project -ApiVersion $apiversion -PlanId $planid -SuiteId $suiteid
 
    The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestCaseIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SuiteId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Plans/{planId}/suites/{suiteId}/testcases/{testCaseIds}' -Replace '{testCaseIds}',$TestCaseIds -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{planId}',$PlanId -Replace '{suiteId}',$SuiteId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsTestRun {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a test run by its ID.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RunId
    ID of the run to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsTestRun -Organization $organization -RunId $runid -Project $project -ApiVersion $apiversion
 
    Delete a test run by its ID.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/runs/{runId}' -Replace '{organization}',$Organization -Replace '{runId}',$RunId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsTestTestcase {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a test case.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestCaseId
    Id of test case to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsTestTestcase -Organization $organization -TestCaseId $testcaseid -Project $project -ApiVersion $apiversion
 
    Delete a test case.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestCaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/testcases/{testCaseId}' -Replace '{organization}',$Organization -Replace '{testCaseId}',$TestCaseId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestPlanSuitePoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update test points.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER PointIds
    ID of the test point to get. Use a comma-separated list of IDs to update multiple test points.
 
.PARAMETER PlanId
    ID of the test plan.
 
.PARAMETER SuiteId
    ID of the suite that contains the points.
 
.EXAMPLE
    PS C:\> Set-AdsTestPlanSuitePoint -Organization $organization -Project $project -ApiVersion $apiversion -PointIds $pointids -PlanId $planid -SuiteId $suiteid
 
    Update test points.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PointIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SuiteId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/points/{pointIds}' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{pointIds}',$PointIds -Replace '{planId}',$PlanId -Replace '{suiteId}',$SuiteId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestPlanSuiteTestcase {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates the properties of the test case association in a suite.
 
.PARAMETER TestCaseIds
    IDs of the test cases to add to the suite. Ids are specified in comma separated format.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER PlanId
    ID of the test plan that contains the suite.
 
.PARAMETER SuiteId
    ID of the test suite to which the test cases must be added.
 
.EXAMPLE
    PS C:\> Set-AdsTestPlanSuiteTestcase -TestCaseIds $testcaseids -Organization $organization -Project $project -ApiVersion $apiversion -PlanId $planid -SuiteId $suiteid
 
    Updates the properties of the test case association in a suite.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestCaseIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SuiteId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Plans/{planId}/suites/{suiteId}/testcases/{testCaseIds}' -Replace '{testCaseIds}',$TestCaseIds -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{planId}',$PlanId -Replace '{suiteId}',$SuiteId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestPoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get test points using query.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Skip
    Number of test points to skip..
 
.PARAMETER Top
    Number of test points to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestPoint -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get test points using query.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Skip' = '$skip'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/points' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestResultretentionsetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update test result retention settings
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestResultretentionsetting -Organization $organization -Project $project -ApiVersion $apiversion
 
    Update test result retention settings
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/resultretentionsettings' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestResultTesthistory {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get history of a test method using TestHistoryQuery
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestResultTesthistory -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get history of a test method using TestHistoryQuery
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Results/testhistory' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestRun {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create new test run.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestRun -Organization $organization -Project $project -ApiVersion $apiversion
 
    Create new test run.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/runs' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestRunAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Attach a file to a test run.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RunId
    ID of the test run against which attachment has to be uploaded.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestRunAttachment -Organization $organization -RunId $runid -Project $project -ApiVersion $apiversion
 
    Attach a file to a test run.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/attachments' -Replace '{organization}',$Organization -Replace '{runId}',$RunId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestRunResult {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add test results to a test run.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RunId
    Test run ID into which test results to add.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.6' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestRunResult -Organization $organization -RunId $runid -Project $project -ApiVersion $apiversion
 
    Add test results to a test run.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results' -Replace '{organization}',$Organization -Replace '{runId}',$RunId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestRunResultAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Attach a file to a test result.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RunId
    ID of the test run that contains the result.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER TestCaseResultId
    ID of the test result against which attachment has to be uploaded.
 
.EXAMPLE
    PS C:\> Set-AdsTestRunResultAttachment -Organization $organization -RunId $runid -ApiVersion $apiversion -Project $project -TestCaseResultId $testcaseresultid
 
    Attach a file to a test result.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestCaseResultId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/attachments' -Replace '{organization}',$Organization -Replace '{runId}',$RunId -Replace '{project}',$Project -Replace '{testCaseResultId}',$TestCaseResultId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestSession {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a test session
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestSession -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Create a test session
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/test/session' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestplanConfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of test configurations.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestConfigurationId
    ID of the test configuration to get.
 
.PARAMETER ContinuationToken
    If the list of configurations returned is not complete, a continuation token to query next batch of configurations is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test configurations.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanConfiguration -Organization $organization -TestConfigurationId $testconfigurationid -Project $project -ApiVersion $apiversion
 
    Get a test configuration
 
.EXAMPLE
    PS C:\> Get-AdsTestplanConfiguration -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get a list of test configurations.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Configurations_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Configurations_Get')]
        [string]
        $TestConfigurationId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Configurations_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Configurations_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/configurations' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($TestConfigurationId) { $__path += "/$TestConfigurationId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestplanPlan {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of test plans
 
.PARAMETER IncludePlanDetails
    Get all properties of the test plan
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FilterActivePlans
    Get just the active plans
 
.PARAMETER ContinuationToken
    If the list of plans returned is not complete, a continuation token to query next batch of plans is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test plans.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Owner
    Filter for test plan by owner ID or name
 
.PARAMETER PlanId
    ID of the test plan to get.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanPlan -Organization $organization -Project $project -PlanId $planid -ApiVersion $apiversion
 
    Get a test plan by Id.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanPlan -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get a list of test plans
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludePlanDetails,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Plans_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $FilterActivePlans,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Plans_Get')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Owner,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Plans_Get')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Plans_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IncludePlanDetails' = 'includePlanDetails'
            'FilterActivePlans' = 'filterActivePlans'
            'ContinuationToken' = 'continuationToken'
            'Owner' = 'owner'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludePlanDetails','FilterActivePlans','ContinuationToken','Owner','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/plans' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($PlanId) { $__path += "/$PlanId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestplanPlanCloneoperation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get clone information.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER CloneOperationId
    Operation ID returned when we queue a clone operation
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanPlanCloneoperation -Organization $organization -CloneOperationId $cloneoperationid -Project $project -ApiVersion $apiversion
 
    Get clone information.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CloneOperationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/CloneOperation/{cloneOperationId}' -Replace '{organization}',$Organization -Replace '{cloneOperationId}',$CloneOperationId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestplanPlanSuite {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get test suites for plan.
 
.PARAMETER ContinuationToken
    If the list of suites returned is not complete, a continuation token to query next batch of suites is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test suites.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER SuiteId
    ID of the suite to get.
 
.PARAMETER Expand
    Include the children suites and testers details.
 
.PARAMETER AsTreeView
    If the suites returned should be in a tree structure.
 
.PARAMETER PlanId
    ID of the test plan for which suites are requested.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanPlanSuite -Organization $organization -Project $project -SuiteId $suiteid -PlanId $planid -ApiVersion $apiversion
 
    Get test suite by suite id.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanPlanSuite -Organization $organization -Project $project -PlanId $planid -ApiVersion $apiversion
 
    Get test suites for plan.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $SuiteId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $Expand,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $AsTreeView,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'Expand' = 'expand'
            'AsTreeView' = 'asTreeView'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','Expand','AsTreeView','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/{planId}/suites' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{planId}',$PlanId
        if ($SuiteId) { $__path += "/$SuiteId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestplanPlanSuiteTestcase {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get Test Case List return those test cases which have all the configuration Ids as mentioned in the optional parameter. If configuration Ids is null, it return all the test cases
 
.PARAMETER Expand
    If set to false, will get a smaller payload containing only basic details about the suite test case object
 
.PARAMETER ReturnIdentityRef
    If set to true, returns all identity fields, like AssignedTo, ActivatedBy etc., as IdentityRef objects. If set to false, these fields are returned as unique names in string format. This is false by default.
 
.PARAMETER WitFields
    Get the list of witFields.
 
.PARAMETER SuiteId
    ID of the test suite for which test cases are requested.
 
.PARAMETER ContinuationToken
    If the list of test cases returned is not complete, a continuation token to query next batch of test cases is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test cases.
 
.PARAMETER ConfigurationIds
    Fetch Test Cases which contains all the configuration Ids specified.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestCaseId
    Test Case Id to be fetched.
 
.PARAMETER PlanId
    ID of the test plan for which test cases are requested.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IsRecursive
     
 
.PARAMETER ExcludeFlags
    Flag to exclude various values from payload. For example to remove point assignments pass exclude = 1. To remove extra information (links, test plan , test suite) pass exclude = 2. To remove both extra information and point assignments pass exclude = 3 (1 + 2).
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER TestIds
    Test Case Ids to be fetched.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanPlanSuiteTestcase -SuiteId $suiteid -Organization $organization -TestCaseId $testcaseid -PlanId $planid -Project $project -ApiVersion $apiversion
 
    Get a particular Test Case from a Suite.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanPlanSuiteTestcase -SuiteId $suiteid -Organization $organization -PlanId $planid -Project $project -ApiVersion $apiversion
 
    Get Test Case List return those test cases which have all the configuration Ids as mentioned in the optional parameter. If configuration Ids is null, it return all the test cases
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Expand,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Suite Test Case_Get Test Case')]
        [boolean]
        $ReturnIdentityRef,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Suite Test Case_Get Test Case')]
        [string]
        $WitFields,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Suite Test Case_Get Test Case')]
        [string]
        $SuiteId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ConfigurationIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Suite Test Case_Get Test Case')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Suite Test Case_Get Test Case')]
        [string]
        $TestCaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Suite Test Case_Get Test Case')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Suite Test Case_Get Test Case')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IsRecursive,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ExcludeFlags,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Suite Test Case_Get Test Case')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestIds
    )
    process {
        $__mapping = @{
            'Expand' = 'expand'
            'ReturnIdentityRef' = 'returnIdentityRef'
            'WitFields' = 'witFields'
            'ContinuationToken' = 'continuationToken'
            'ConfigurationIds' = 'configurationIds'
            'IsRecursive' = 'isRecursive'
            'ExcludeFlags' = 'excludeFlags'
            'ApiVersion' = 'api-version'
            'TestIds' = 'testIds'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ReturnIdentityRef','WitFields','ContinuationToken','ConfigurationIds','IsRecursive','ExcludeFlags','ApiVersion','TestIds') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase' -Replace '{suiteId}',$SuiteId -Replace '{organization}',$Organization -Replace '{planId}',$PlanId -Replace '{project}',$Project
        if ($TestCaseId) { $__path += "/$TestCaseId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestplanPlanSuiteTestpoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a particular Test Point from a suite.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ReturnIdentityRef
    If set to true, returns the AssignedTo field in TestCaseReference as IdentityRef object.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PointId
    ID of test point to be fetched.
 
.PARAMETER PlanId
    ID of the test plan for which test points are requested.
 
.PARAMETER IncludePointDetails
    If set to false, will get a smaller payload containing only basic details about the test point object
 
.PARAMETER SuiteId
    ID of the test suite for which test points are requested.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanPlanSuiteTestpoint -Organization $organization -ApiVersion $apiversion -Project $project -PointId $pointid -PlanId $planid -SuiteId $suiteid
 
    Get a particular Test Point from a suite.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ReturnIdentityRef,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PointId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludePointDetails,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SuiteId
    )
    process {
        $__mapping = @{
            'ReturnIdentityRef' = 'returnIdentityRef'
            'ApiVersion' = 'api-version'
            'PointId' = 'pointId'
            'IncludePointDetails' = 'includePointDetails'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ReturnIdentityRef','ApiVersion','PointId','IncludePointDetails') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestPoint' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{planId}',$PlanId -Replace '{suiteId}',$SuiteId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestplanSuite {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Find the list of all test suites in which a given test case is present. This is helpful if you need to find out which test suites are using a test case, when you need to make changes to a test case.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestCaseId
    ID of the test case for which suites need to be fetched.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanSuite -Organization $organization -TestCaseId $testcaseid -ApiVersion $apiversion
 
    Find the list of all test suites in which a given test case is present. This is helpful if you need to find out which test suites are using a test case, when you need to make changes to a test case.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $TestCaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'TestCaseId' = 'testCaseId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('TestCaseId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/testplan/suites' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestplanSuiteCloneoperation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get clone information.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER CloneOperationId
    Operation ID returned when we queue a clone operation
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanSuiteCloneoperation -Organization $organization -CloneOperationId $cloneoperationid -Project $project -ApiVersion $apiversion
 
    Get clone information.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CloneOperationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Suites/CloneOperation/{cloneOperationId}' -Replace '{organization}',$Organization -Replace '{cloneOperationId}',$CloneOperationId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestplanSuiteentry {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of test suite entries in the test suite.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER SuiteEntryType
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER SuiteId
    Id of the parent suite.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanSuiteentry -Organization $organization -ApiVersion $apiversion -Project $project -SuiteId $suiteid
 
    Get a list of test suite entries in the test suite.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SuiteEntryType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SuiteId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'SuiteEntryType' = 'suiteEntryType'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','SuiteEntryType') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/suiteentry/{suiteId}' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{suiteId}',$SuiteId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestplanTestcaseClonetestcaseoperation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get clone information.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER CloneOperationId
    Operation ID returned when we queue a clone operation
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanTestcaseClonetestcaseoperation -Organization $organization -CloneOperationId $cloneoperationid -Project $project -ApiVersion $apiversion
 
    Get clone information.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CloneOperationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/TestCases/CloneTestCaseOperation/{cloneOperationId}' -Replace '{organization}',$Organization -Replace '{cloneOperationId}',$CloneOperationId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestplanVariable {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of test variables.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ContinuationToken
    If the list of variables returned is not complete, a continuation token to query next batch of variables is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test variables.
 
.PARAMETER TestVariableId
    ID of the test variable to get.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanVariable -Organization $organization -TestVariableId $testvariableid -Project $project -ApiVersion $apiversion
 
    Get a test variable by its ID.
 
.EXAMPLE
    PS C:\> Get-AdsTestplanVariable -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get a list of test variables.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variables_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variables_Get')]
        [string]
        $TestVariableId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variables_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variables_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/variables' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($TestVariableId) { $__path += "/$TestVariableId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsTestplanConfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a test configuration by its ID.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestConfiguartionId
    ID of the test configuration to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsTestplanConfiguration -Organization $organization -TestConfiguartionId $testconfiguartionid -Project $project -ApiVersion $apiversion
 
    Delete a test configuration by its ID.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $TestConfiguartionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'TestConfiguartionId' = 'testConfiguartionId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('TestConfiguartionId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/configurations' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsTestplanPlan {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a test plan.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PlanId
    ID of the test plan to be deleted.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsTestplanPlan -Organization $organization -PlanId $planid -Project $project -ApiVersion $apiversion
 
    Delete a test plan.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/plans/{planId}' -Replace '{organization}',$Organization -Replace '{planId}',$PlanId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsTestplanPlanSuite {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete test suite.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER PlanId
    ID of the test plan that contains the suite.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER SuiteId
    ID of the test suite to delete.
 
.EXAMPLE
    PS C:\> Remove-AdsTestplanPlanSuite -Organization $organization -ApiVersion $apiversion -PlanId $planid -Project $project -SuiteId $suiteid
 
    Delete test suite.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SuiteId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/{planId}/suites/{suiteId}' -Replace '{organization}',$Organization -Replace '{planId}',$PlanId -Replace '{project}',$Project -Replace '{suiteId}',$SuiteId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsTestplanPlanSuiteTestcase {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes test cases from a suite based on the list of test case Ids provided. This API can be used to remove a larger number of test cases.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestIds
    Comma separated string of Test Case Ids to be removed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER PlanId
    ID of the test plan from which test cases are to be removed.
 
.PARAMETER SuiteId
    ID of the test suite from which test cases are to be removed.
 
.EXAMPLE
    PS C:\> Remove-AdsTestplanPlanSuiteTestcase -Organization $organization -TestIds $testids -Project $project -ApiVersion $apiversion -PlanId $planid -SuiteId $suiteid
 
    Removes test cases from a suite based on the list of test case Ids provided. This API can be used to remove a larger number of test cases.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SuiteId
    )
    process {
        $__mapping = @{
            'TestIds' = 'testIds'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('TestIds','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{planId}',$PlanId -Replace '{suiteId}',$SuiteId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsTestplanTestcase {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a test case.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestCaseId
    Id of test case to be deleted.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsTestplanTestcase -Organization $organization -TestCaseId $testcaseid -Project $project -ApiVersion $apiversion
 
    Delete a test case.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestCaseId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/testcases/{testCaseId}' -Replace '{organization}',$Organization -Replace '{testCaseId}',$TestCaseId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsTestplanVariable {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a test variable by its ID.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestVariableId
    ID of the test variable to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsTestplanVariable -Organization $organization -TestVariableId $testvariableid -Project $project -ApiVersion $apiversion
 
    Delete a test variable by its ID.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestVariableId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/variables/{testVariableId}' -Replace '{organization}',$Organization -Replace '{testVariableId}',$TestVariableId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestplanConfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a test configuration by its ID.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestConfiguartionId
    ID of the test configuration to update.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestplanConfiguration -Organization $organization -TestConfiguartionId $testconfiguartionid -Project $project -ApiVersion $apiversion
 
    Update a test configuration by its ID.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $TestConfiguartionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'TestConfiguartionId' = 'testConfiguartionId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('TestConfiguartionId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/configurations' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestplanPlan {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a test plan.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PlanId
    ID of the test plan to be updated.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestplanPlan -Organization $organization -PlanId $planid -Project $project -ApiVersion $apiversion
 
    Update a test plan.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/plans/{planId}' -Replace '{organization}',$Organization -Replace '{planId}',$PlanId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestplanPlanCloneoperation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Clone test plan
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DeepClone
    Clones all the associated test cases as well
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestplanPlanCloneoperation -Organization $organization -Project $project -ApiVersion $apiversion
 
    Clone test plan
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $DeepClone,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'DeepClone' = 'deepClone'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('DeepClone','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/CloneOperation' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestplanPlanSuite {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create test suite.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PlanId
    ID of the test plan that contains the suites.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestplanPlanSuite -Organization $organization -PlanId $planid -Project $project -ApiVersion $apiversion
 
    Create test suite.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/{planId}/suites' -Replace '{organization}',$Organization -Replace '{planId}',$PlanId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestplanPlanSuiteTestcase {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update the configurations for test cases
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER PlanId
    ID of the test plan to which test cases are to be updated.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER SuiteId
    ID of the test suite to which test cases are to be updated.
 
.EXAMPLE
    PS C:\> Set-AdsTestplanPlanSuiteTestcase -Organization $organization -ApiVersion $apiversion -PlanId $planid -Project $project -SuiteId $suiteid
 
    Update the configurations for test cases
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SuiteId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase' -Replace '{organization}',$Organization -Replace '{planId}',$PlanId -Replace '{project}',$Project -Replace '{suiteId}',$SuiteId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestplanPlanSuiteTestpoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update Test Points. This is used to Reset test point to active, update the outcome of a test point or update the tester of a test point
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ReturnIdentityRef
    If set to true, returns the AssignedTo field in TestCaseReference as IdentityRef object.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER PlanId
    ID of the test plan for which test points are requested.
 
.PARAMETER IncludePointDetails
    If set to false, will get a smaller payload containing only basic details about the test point object
 
.PARAMETER SuiteId
    ID of the test suite for which test points are requested.
 
.EXAMPLE
    PS C:\> Set-AdsTestplanPlanSuiteTestpoint -Organization $organization -Project $project -ApiVersion $apiversion -PlanId $planid -SuiteId $suiteid
 
    Update Test Points. This is used to Reset test point to active, update the outcome of a test point or update the tester of a test point
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ReturnIdentityRef,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PlanId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludePointDetails,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SuiteId
    )
    process {
        $__mapping = @{
            'ReturnIdentityRef' = 'returnIdentityRef'
            'ApiVersion' = 'api-version'
            'IncludePointDetails' = 'includePointDetails'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ReturnIdentityRef','ApiVersion','IncludePointDetails') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestPoint' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{planId}',$PlanId -Replace '{suiteId}',$SuiteId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestplanSuiteCloneoperation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Clone test suite
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DeepClone
    Clones all the associated test cases as well
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestplanSuiteCloneoperation -Organization $organization -Project $project -ApiVersion $apiversion
 
    Clone test suite
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $DeepClone,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'DeepClone' = 'deepClone'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('DeepClone','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Suites/CloneOperation' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestplanSuiteentry {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Reorder test suite entries in the test suite.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER SuiteId
    Id of the parent test suite.
 
.EXAMPLE
    PS C:\> Set-AdsTestplanSuiteentry -Organization $organization -ApiVersion $apiversion -Project $project -SuiteId $suiteid
 
    Reorder test suite entries in the test suite.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SuiteId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/suiteentry/{suiteId}' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{suiteId}',$SuiteId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestplanTestcaseClonetestcaseoperation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestplanTestcaseClonetestcaseoperation -Organization $organization -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/TestCases/CloneTestCaseOperation' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestplanVariable {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a test variable.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestplanVariable -Organization $organization -Project $project -ApiVersion $apiversion
 
    Create a test variable.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/variables' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestresultRunResultTestlog {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get list of test result attachments reference
 
.PARAMETER ContinuationToken
    Header to pass the continuationToken
 
.PARAMETER Type
    type of attachments to get
 
.PARAMETER FetchMetaData
    Default is false, set if metadata is needed
 
.PARAMETER FileNamePrefix
    file name prefix to filter the list of attachment
 
.PARAMETER ResultId
    Id of the test result
 
.PARAMETER RunId
    Id of the test run that contains the result
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DirectoryPath
    directory path of attachments to get
 
.PARAMETER Top
    Numbe of attachments reference to return
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestresultRunResultTestlog
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Get-AdsTestresultRunResultTestlog -Type $type -ResultId $resultid -RunId $runid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get list of test result attachments reference
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = '')]
        [string]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $FetchMetaData,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FileNamePrefix,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResultId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DirectoryPath,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'Type' = 'type'
            'FetchMetaData' = 'fetchMetaData'
            'FileNamePrefix' = 'fileNamePrefix'
            'DirectoryPath' = 'directoryPath'
            'Top' = 'top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Type','FetchMetaData','FileNamePrefix','DirectoryPath','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken') -Mapping $__mapping
        $__path = 'https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlog' -Replace '{resultId}',$ResultId -Replace '{runId}',$RunId -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestresultRunResultTestlogstoreendpoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get SAS Uri of a test results attachment
 
.PARAMETER Type
    type of the file
 
.PARAMETER FilePath
    filePath for which sas uri is needed
 
.PARAMETER ResultId
    Id of the test result whose files need to be downloaded
 
.PARAMETER RunId
    Id of the test run that contains result
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestresultRunResultTestlogstoreendpoint -Type $type -FilePath $filepath -ResultId $resultid -RunId $runid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get SAS Uri of a test results attachment
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FilePath,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResultId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Type' = 'type'
            'FilePath' = 'filePath'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Type','FilePath','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlogstoreendpoint' -Replace '{resultId}',$ResultId -Replace '{runId}',$RunId -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestresultRunTestlog {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get list of test run attachments reference
 
.PARAMETER ContinuationToken
    Header to pass the continuationToken
 
.PARAMETER Type
    type of the attachments to get
 
.PARAMETER FetchMetaData
    Default is false, set if metadata is needed
 
.PARAMETER FileNamePrefix
    file name prefix to filter the list of attachment
 
.PARAMETER RunId
    Id of the test run
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER DirectoryPath
    directory path for which attachments are needed
 
.PARAMETER Top
    Number of attachments reference to return
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestresultRunTestlog
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Get-AdsTestresultRunTestlog -Type $type -RunId $runid -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get list of test run attachments reference
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = '')]
        [string]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $FetchMetaData,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FileNamePrefix,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $DirectoryPath,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'Type' = 'type'
            'FetchMetaData' = 'fetchMetaData'
            'FileNamePrefix' = 'fileNamePrefix'
            'DirectoryPath' = 'directoryPath'
            'Top' = 'top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Type','FetchMetaData','FileNamePrefix','DirectoryPath','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken') -Mapping $__mapping
        $__path = 'https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/runs/{runId}/testlog' -Replace '{runId}',$RunId -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTestresultRunTestlogstoreendpoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get SAS Uri of a test run attachment
 
.PARAMETER Type
    type of the file
 
.PARAMETER FilePath
    filePath for which sas uri is needed
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER RunId
    Id of the test run whose file has to be downloaded
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTestresultRunTestlogstoreendpoint -Type $type -FilePath $filepath -Project $project -RunId $runid -Organization $organization -ApiVersion $apiversion
 
    Get SAS Uri of a test run attachment
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FilePath,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Type' = 'type'
            'FilePath' = 'filePath'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Type','FilePath','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/runs/{runId}/testlogstoreendpoint' -Replace '{project}',$Project -Replace '{runId}',$RunId -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestresultResultResultmetadata {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update properties of test result meta data
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TestCaseReferenceId
    TestCaseReference Id of Test Result to be updated.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.4' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestresultResultResultmetadata -Organization $organization -TestCaseReferenceId $testcasereferenceid -Project $project -ApiVersion $apiversion
 
    Update properties of test result meta data
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestCaseReferenceId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/results/resultmetadata/{testCaseReferenceId}' -Replace '{organization}',$Organization -Replace '{testCaseReferenceId}',$TestCaseReferenceId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestresultRunResultTestlogstoreendpoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create empty file for a result and Get Sas uri for the file
 
.PARAMETER FilePath
    file path inside the sub result for which sas uri is needed
 
.PARAMETER ResultId
    Id of the test results that contains sub result
 
.PARAMETER Type
    Type of the file for download
 
.PARAMETER RunId
    Id of the test run that contains the result
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubResultId
    Id of the test sub result whose file sas uri is needed
 
.EXAMPLE
    PS C:\> Set-AdsTestresultRunResultTestlogstoreendpoint -FilePath $filepath -ResultId $resultid -Type $type -RunId $runid -Project $project -ApiVersion $apiversion -Organization $organization -SubResultId $subresultid
 
    Create empty file for a result and Get Sas uri for the file
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FilePath,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ResultId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $SubResultId
    )
    process {
        $__mapping = @{
            'FilePath' = 'filePath'
            'Type' = 'type'
            'ApiVersion' = 'api-version'
            'SubResultId' = 'subResultId'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('FilePath','Type','ApiVersion','SubResultId') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlogstoreendpoint' -Replace '{resultId}',$ResultId -Replace '{runId}',$RunId -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTestresultRunTestlogstoreendpoint {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create empty file for a run and Get Sas uri for the file
 
.PARAMETER Type
    Default is GeneralAttachment, type of empty file to be created
 
.PARAMETER FilePath
    file path to create an empty file
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER TestLogStoreOperationType
    Type of operation to perform using sas uri
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RunId
    Id of the run to get endpoint details
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTestresultRunTestlogstoreendpoint -Project $project -TestLogStoreOperationType $testlogstoreoperationtype -Organization $organization -RunId $runid -ApiVersion $apiversion
 
    Create empty file for a run and Get Sas uri for the file
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FilePath,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TestLogStoreOperationType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RunId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Type' = 'type'
            'FilePath' = 'filePath'
            'TestLogStoreOperationType' = 'testLogStoreOperationType'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Type','FilePath','TestLogStoreOperationType','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/runs/{runId}/testlogstoreendpoint' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{runId}',$RunId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTfvcBranche {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get branch hierarchies below the specified scopePath
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IncludeLinks
    Return links. Default: False
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER IncludeDeleted
    Return deleted branches. Default: False
 
.PARAMETER ScopePath
    Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder.
 
.EXAMPLE
    PS C:\> Get-AdsTfvcBranche -Organization $organization -Project $project -ApiVersion $apiversion -ScopePath $scopepath
 
    Get branch hierarchies below the specified scopePath
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeDeleted,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ScopePath
    )
    process {
        $__mapping = @{
            'IncludeLinks' = 'includeLinks'
            'ApiVersion' = 'api-version'
            'IncludeDeleted' = 'includeDeleted'
            'ScopePath' = 'scopePath'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeLinks','ApiVersion','IncludeDeleted','ScopePath') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/tfvc/branches' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTfvcChangeset {
<#
.SYNOPSIS
    Retrieve Tfvc Changesets
 
.DESCRIPTION
    Retrieve Tfvc Changesets
 
.PARAMETER FromId
    If provided, only include changesets after this changesetID.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IncludeDetails
    Include policy details and check-in notes in the response. Default: false
 
.PARAMETER MaxCommentLength
    Include details about associated work items in the response. Default: null
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IncludeWorkItems
    Include workitems. Default: false
 
.PARAMETER Skip
    Number of results to skip. Default: null
 
.PARAMETER FromDate
    If provided, only include changesets created after this date (string).
 
.PARAMETER IncludeLinks
    Whether to include the _links field on the shallow references.
 
.PARAMETER Top
    The maximum number of results to return. Default: null
 
.PARAMETER FollowRenames
    Whether or not to follow renames for the given item being queried.
 
.PARAMETER Mappings
    Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null
 
.PARAMETER Id
    Changeset Id to retrieve.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER ItemPath
    Path of item to search under.
 
.PARAMETER Author
    Alias or display name of user who made the changes.
 
.PARAMETER Orderby
    Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order.
 
.PARAMETER IncludeSourceRename
    Include renames. Default: false
 
.PARAMETER MaxChangeCount
    Number of changes to return (maximum 100 changes) Default: 0
 
.PARAMETER ToId
    If provided, a version descriptor for the latest change list to include.
 
.PARAMETER ToDate
    If provided, only include changesets created before this date (string).
 
.EXAMPLE
    PS C:\> Get-AdsTfvcChangeset -ApiVersion $apiversion -Id $id -Organization $organization -Project $project
 
    Retrieve a Tfvc Changeset
 
.EXAMPLE
    PS C:\> Get-AdsTfvcChangeset -ApiVersion $apiversion -Organization $organization -Project $project
 
    Retrieve Tfvc Changesets
 
Note: This is a new version of the GetChangesets API that doesn't expose the unneeded queryParams
present in the 1.0 version of the API.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [int32]
        $FromId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [boolean]
        $IncludeDetails,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [int32]
        $MaxCommentLength,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [boolean]
        $IncludeWorkItems,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [string]
        $FromDate,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [boolean]
        $IncludeLinks,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [boolean]
        $FollowRenames,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [array]
        $Mappings,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [string]
        $ItemPath,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [string]
        $Author,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [string]
        $Orderby,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [boolean]
        $IncludeSourceRename,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [int32]
        $MaxChangeCount,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [int32]
        $ToId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Changesets_Get')]
        [string]
        $ToDate
    )
    process {
        $__mapping = @{
            'FromId' = 'searchCriteria.fromId'
            'MaxChangeCount' = 'maxChangeCount'
            'IncludeSourceRename' = 'includeSourceRename'
            'Orderby' = '$orderby'
            'Author' = 'searchCriteria.author'
            'ItemPath' = 'searchCriteria.itemPath'
            'ApiVersion' = 'api-version'
            'Mappings' = 'searchCriteria.mappings'
            'ToId' = 'searchCriteria.toId'
            'FollowRenames' = 'searchCriteria.followRenames'
            'IncludeLinks' = 'searchCriteria.includeLinks'
            'FromDate' = 'searchCriteria.fromDate'
            'Skip' = '$skip'
            'IncludeWorkItems' = 'includeWorkItems'
            'MaxCommentLength' = 'maxCommentLength'
            'IncludeDetails' = 'includeDetails'
            'Top' = '$top'
            'ToDate' = 'searchCriteria.toDate'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('FromId','MaxChangeCount','IncludeSourceRename','Orderby','Author','ItemPath','ApiVersion','Mappings','ToId','FollowRenames','IncludeLinks','FromDate','Skip','IncludeWorkItems','MaxCommentLength','IncludeDetails','Top','ToDate') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/tfvc/changesets' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($Id) { $__path += "/$Id" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTfvcChangesetChange {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieve Tfvc changes for a given changeset.
 
.PARAMETER ContinuationToken
    Return the next page of results. Default: null
 
.PARAMETER Skip
    Number of results to skip. Default: null
 
.PARAMETER Id
    ID of the changeset. Default: null
 
.PARAMETER Top
    The maximum number of results to return. Default: null
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTfvcChangesetChange -Id $id -Organization $organization -ApiVersion $apiversion
 
    Retrieve Tfvc changes for a given changeset.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'Skip' = '$skip'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','Skip','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/tfvc/changesets/{id}/changes' -Replace '{id}',$Id -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTfvcChangesetWorkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Retrieves the work items associated with a particular changeset.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    ID of the changeset.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTfvcChangesetWorkitem -Organization $organization -Id $id -ApiVersion $apiversion
 
    Retrieves the work items associated with a particular changeset.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/tfvc/changesets/{id}/workItems' -Replace '{organization}',$Organization -Replace '{id}',$Id

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTfvcItem {
<#
.SYNOPSIS
    Get a list of Tfvc items
 
.DESCRIPTION
    Get a list of Tfvc items
 
.PARAMETER Version
    Version object.
 
.PARAMETER VersionType
     
 
.PARAMETER IncludeLinks
    True to include links.
 
.PARAMETER VersionOption
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER RecursionLevel
    None (just the item), or OneLevel (contents of a folder).
 
.PARAMETER ScopePath
    Version control path of a folder to return multiple items.
 
.EXAMPLE
    PS C:\> Get-AdsTfvcItem -Project $project -ApiVersion $apiversion -Organization $organization
 
    Get a list of Tfvc items
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionOption,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RecursionLevel,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ScopePath
    )
    process {
        $__mapping = @{
            'Version' = 'versionDescriptor.version'
            'VersionType' = 'versionDescriptor.versionType'
            'IncludeLinks' = 'includeLinks'
            'VersionOption' = 'versionDescriptor.versionOption'
            'ApiVersion' = 'api-version'
            'RecursionLevel' = 'recursionLevel'
            'ScopePath' = 'scopePath'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Version','VersionType','IncludeLinks','VersionOption','ApiVersion','RecursionLevel','ScopePath') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/tfvc/items' -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTfvcLabel {
<#
.SYNOPSIS
    Get a collection of shallow label references.
 
.DESCRIPTION
    Get a collection of shallow label references.
 
.PARAMETER Name
    labelScope, name, owner, and itemLabelFilter
 
.PARAMETER IncludeLinks
    Whether to include the _links field on the shallow references
 
.PARAMETER Skip
    Number of labels to skip
 
.PARAMETER Owner
    labelScope, name, owner, and itemLabelFilter
 
.PARAMETER LabelScope
    labelScope, name, owner, and itemLabelFilter
 
.PARAMETER ItemLabelFilter
    labelScope, name, owner, and itemLabelFilter
 
.PARAMETER Top
    Max number of labels to return, defaults to 100 when undefined
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER MaxItemCount
    labelScope, name, owner, and itemLabelFilter
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER LabelId
    Unique identifier of label
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTfvcLabel -Project $project -Organization $organization -LabelId $labelid -ApiVersion $apiversion
 
    Get a single deep label.
 
.EXAMPLE
    PS C:\> Get-AdsTfvcLabel -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a collection of shallow label references.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Labels_Get')]
        [string]
        $Name,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Labels_Get')]
        [boolean]
        $IncludeLinks,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Labels_Get')]
        [string]
        $Owner,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Labels_Get')]
        [string]
        $LabelScope,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Labels_Get')]
        [string]
        $ItemLabelFilter,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Labels_Get')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Labels_Get')]
        [int32]
        $MaxItemCount,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Labels_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Labels_Get')]
        [string]
        $LabelId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Labels_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Name' = 'requestData.name'
            'IncludeLinks' = 'requestData.includeLinks'
            'Skip' = '$skip'
            'Owner' = 'requestData.owner'
            'LabelScope' = 'requestData.labelScope'
            'ItemLabelFilter' = 'requestData.itemLabelFilter'
            'Top' = '$top'
            'MaxItemCount' = 'requestData.maxItemCount'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Name','IncludeLinks','Skip','Owner','LabelScope','ItemLabelFilter','Top','MaxItemCount','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/tfvc/labels' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($LabelId) { $__path += "/$LabelId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTfvcLabelItem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get items under a label.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER LabelId
    Unique identifier of label
 
.PARAMETER Top
    Max number of items to return
 
.PARAMETER Skip
    Number of items to skip
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTfvcLabelItem -Organization $organization -LabelId $labelid -ApiVersion $apiversion
 
    Get items under a label.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $LabelId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Top' = '$top'
            'Skip' = '$skip'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Top','Skip','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/tfvc/labels/{labelId}/items' -Replace '{organization}',$Organization -Replace '{labelId}',$LabelId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTfvcShelveset {
<#
.SYNOPSIS
    Get a single deep shelveset.
 
.DESCRIPTION
    Get a single deep shelveset.
 
.PARAMETER Name
    Shelveset name
 
.PARAMETER IncludeDetails
    Whether to include policyOverride and notes Only applies when requesting a single deep shelveset
 
.PARAMETER IncludeLinks
    Whether to include the _links field on the shallow references. Does not apply when requesting a single deep shelveset object. Links will always be included in the deep shelveset.
 
.PARAMETER IncludeWorkItems
    Whether to include workItems
 
.PARAMETER Owner
    Owner's ID. Could be a name or a guid.
 
.PARAMETER MaxChangeCount
    Max number of changes to include
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ShelvesetId
    Shelveset's unique ID
 
.PARAMETER MaxCommentLength
    Max length of comment
 
.EXAMPLE
    PS C:\> Get-AdsTfvcShelveset -ApiVersion $apiversion -Organization $organization -ShelvesetId $shelvesetid
 
    Get a single deep shelveset.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeDetails,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLinks,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeWorkItems,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Owner,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $MaxChangeCount,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ShelvesetId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $MaxCommentLength
    )
    process {
        $__mapping = @{
            'Name' = 'requestData.name'
            'IncludeDetails' = 'requestData.includeDetails'
            'IncludeLinks' = 'requestData.includeLinks'
            'IncludeWorkItems' = 'requestData.includeWorkItems'
            'Owner' = 'requestData.owner'
            'MaxChangeCount' = 'requestData.maxChangeCount'
            'ApiVersion' = 'api-version'
            'ShelvesetId' = 'shelvesetId'
            'MaxCommentLength' = 'requestData.maxCommentLength'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Name','IncludeDetails','IncludeLinks','IncludeWorkItems','Owner','MaxChangeCount','ApiVersion','ShelvesetId','MaxCommentLength') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/tfvc/shelvesets' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTfvcShelvesetChange {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get changes included in a shelveset.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ShelvesetId
    Shelveset's unique ID
 
.PARAMETER Top
    Max number of changes to return
 
.PARAMETER Skip
    Number of changes to skip
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTfvcShelvesetChange -Organization $organization -ShelvesetId $shelvesetid -ApiVersion $apiversion
 
    Get changes included in a shelveset.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ShelvesetId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ShelvesetId' = 'shelvesetId'
            'Top' = '$top'
            'Skip' = '$skip'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ShelvesetId','Top','Skip','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/tfvc/shelvesets/changes' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTfvcShelvesetWorkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get work items associated with a shelveset.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ShelvesetId
    Shelveset's unique ID
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTfvcShelvesetWorkitem -Organization $organization -ShelvesetId $shelvesetid -ApiVersion $apiversion
 
    Get work items associated with a shelveset.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ShelvesetId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ShelvesetId' = 'shelvesetId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ShelvesetId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/tfvc/shelvesets/workitems' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTfvcChangeset {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Create a new changeset.
 
Accepts TfvcChangeset as JSON body
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTfvcChangeset -Organization $organization -Project $project -ApiVersion $apiversion
 
    Create a new changeset.
 
Accepts TfvcChangeset as JSON body
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/tfvc/changesets' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTfvcChangesetsbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns changesets for a given list of changeset Ids.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsTfvcChangesetsbatch -ApiVersion $apiversion -Organization $organization
 
    Returns changesets for a given list of changeset Ids.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/tfvc/changesetsbatch' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTfvcItembatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTfvcItembatch -Organization $organization -Project $project -ApiVersion $apiversion
 
    Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/tfvc/itembatch' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTokenadminPersonalaccesstoken {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Lists of all the session token details of the personal access tokens (PATs) for a particular user.
 
.PARAMETER ContinuationToken
    An opaque data blob that allows the next page of data to resume immediately after where the previous page ended. The only reliable way to know if there is more data left is the presence of a continuation token.
 
.PARAMETER IsPublic
    Set to false for PAT tokens and true for SSH tokens.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER SubjectDescriptor
    The descriptor of the target user.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER PageSize
    The maximum number of results to return on each page.
 
.EXAMPLE
    PS C:\> Get-AdsTokenadminPersonalaccesstoken -Organization $organization -SubjectDescriptor $subjectdescriptor -ApiVersion $apiversion
 
    Lists of all the session token details of the personal access tokens (PATs) for a particular user.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IsPublic,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptor,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $PageSize
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'IsPublic' = 'isPublic'
            'ApiVersion' = 'api-version'
            'PageSize' = 'pageSize'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','IsPublic','ApiVersion','PageSize') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/tokenadmin/personalaccesstokens/{subjectDescriptor}' -Replace '{organization}',$Organization -Replace '{subjectDescriptor}',$SubjectDescriptor

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTokenadminRevocation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Revokes the listed OAuth authorizations.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IsPublic
    Set to false for PAT tokens and true for SSH tokens.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTokenadminRevocation -Organization $organization -ApiVersion $apiversion
 
    Revokes the listed OAuth authorizations.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IsPublic,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IsPublic' = 'isPublic'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IsPublic','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/tokenadmin/revocations' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTokenadminRevocationrule {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a revocation rule to prevent the further usage of any OAuth authorizations that were created before the current point in time and which match the conditions in the rule.
 
Not all kinds of OAuth authorizations can be revoked directly.
Some, such as self-describing session tokens, must instead by revoked by creating a rule
which will be evaluated and used to reject matching OAuth credentials at authentication time.
Revocation rules created through this endpoint will apply to all credentials that were issued
before the datetime at which the rule was created and which match one or more additional conditions.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsTokenadminRevocationrule -ApiVersion $apiversion -Organization $organization
 
    Creates a revocation rule to prevent the further usage of any OAuth authorizations that were created before the current point in time and which match the conditions in the rule.
 
Not all kinds of OAuth authorizations can be revoked directly.
Some, such as self-describing session tokens, must instead by revoked by creating a rule
which will be evaluated and used to reject matching OAuth credentials at authentication time.
Revocation rules created through this endpoint will apply to all credentials that were issued
before the datetime at which the rule was created and which match one or more additional conditions.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/tokenadmin/revocationrules' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTokenadministrationTokenlistglobalidentitie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Revokes the listed OAuth authorizations.
 
.PARAMETER IsPublic
    Set to false for PAT tokens and true for SSH tokens.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '5.2-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTokenadministrationTokenlistglobalidentitie -ApiVersion $apiversion
 
    Revokes the listed OAuth authorizations.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IsPublic,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'IsPublic' = 'isPublic'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IsPublic','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/_apis/tokenadministration/tokenlistglobalidentities'

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTokenadministrationTokenpersonalaccesstoken {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Lists of all the session token details of the personal access tokens (PATs) for a particular user.
 
.PARAMETER SubjectDescriptor
    The descriptor of the target user.
 
.PARAMETER ContinuationToken
    An opaque data blob that allows the next page of data to resume immediately after where the previous page ended. The only reliable way to know if there is more data left is the presence of a continuation token.
 
.PARAMETER IsPublic
    Set to false for PAT tokens and true for SSH tokens.
 
.PARAMETER PageSize
    The maximum number of results to return on each page.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '5.2-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTokenadministrationTokenpersonalaccesstoken -SubjectDescriptor $subjectdescriptor -ApiVersion $apiversion
 
    Lists of all the session token details of the personal access tokens (PATs) for a particular user.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SubjectDescriptor,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IsPublic,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $PageSize,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'IsPublic' = 'isPublic'
            'PageSize' = 'pageSize'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','IsPublic','PageSize','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/_apis/tokenadministration/tokenpersonalaccesstokens/{subjectDescriptor}' -Replace '{subjectDescriptor}',$SubjectDescriptor

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTokenadministrationTokenrevocation {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Revokes the listed OAuth authorizations.
 
.PARAMETER HostId
    Host Id to display on the notification page to manage tokens.
 
.PARAMETER IsPublic
    Set to false for PAT tokens and true for SSH tokens.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '5.2-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsTokenadministrationTokenrevocation -HostId $hostid -ApiVersion $apiversion
 
    Revokes the listed OAuth authorizations.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $HostId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IsPublic,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'HostId' = 'hostId'
            'IsPublic' = 'isPublic'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('HostId','IsPublic','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/_apis/tokenadministration/tokenrevocations'

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsTokenPat {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a single personal access token (PAT).
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER AuthorizationId
    The authorizationId identifying a single, unique personal access token (PAT)
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsTokenPat -Organization $organization -AuthorizationId $authorizationid -ApiVersion $apiversion
 
    Gets a single personal access token (PAT).
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AuthorizationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'AuthorizationId' = 'authorizationId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('AuthorizationId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/tokens/pats' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsTokenPat {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates an existing personal access token (PAT) with the new parameters. To update a token, it must be valid (has not been revoked).
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> New-AdsTokenPat -ApiVersion $apiversion -Organization $organization
 
    Updates an existing personal access token (PAT) with the new parameters. To update a token, it must be valid (has not been revoked).
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/tokens/pats' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsTokenPat {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Revokes a personal access token (PAT) by authorizationId.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER AuthorizationId
    The authorizationId identifying a single, unique personal access token (PAT)
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsTokenPat -Organization $organization -AuthorizationId $authorizationid -ApiVersion $apiversion
 
    Revokes a personal access token (PAT) by authorizationId.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AuthorizationId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'AuthorizationId' = 'authorizationId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('AuthorizationId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/tokens/pats' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsTokenPat {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a new personal access token (PAT) for the requesting user.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsTokenPat -ApiVersion $apiversion -Organization $organization
 
    Creates a new personal access token (PAT) for the requesting user.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://vssps.dev.azure.com/{organization}/_apis/tokens/pats' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedUpackPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Show information about a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ShowDeleted
    True to show information for deleted versions
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedUpackPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Show information about a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ShowDeleted,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'ShowDeleted' = 'showDeleted'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','ShowDeleted') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/upack/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsPackagingFeedUpackRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get information about a package version in the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Get-AdsPackagingFeedUpackRecyclebinPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Get information about a package version in the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/upack/RecycleBin/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedUpackPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a package version from a feed's recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedUpackPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Delete a package version from a feed's recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/upack/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsPackagingFeedUpackRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a package version from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Remove-AdsPackagingFeedUpackRecyclebinPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Delete a package version from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/upack/RecycleBin/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedUpackPackagesbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedUpackPackagesbatch -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/upack/packagesbatch' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedUpackPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update information for a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedUpackPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Update information for a package version.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/upack/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedUpackRecyclebinPackagesbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete or restore several package versions from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FeedId
    Feed which contains the packages to update.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedUpackRecyclebinPackagesbatch -Organization $organization -FeedId $feedid -Project $project -ApiVersion $apiversion
 
    Delete or restore several package versions from the recycle bin.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/upack/RecycleBin/packagesBatch' -Replace '{organization}',$Organization -Replace '{feedId}',$FeedId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsPackagingFeedUpackRecyclebinPackageVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Restore a package version from the recycle bin to its associated feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.PARAMETER FeedId
    Name or ID of the feed.
 
.PARAMETER PackageVersion
    Version of the package.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER PackageName
    Name of the package.
 
.EXAMPLE
    PS C:\> Set-AdsPackagingFeedUpackRecyclebinPackageVersion -FeedId $feedid -PackageVersion $packageversion -ApiVersion $apiversion -Organization $organization -Project $project -PackageName $packagename
 
    Restore a package version from the recycle bin to its associated feed.
 
The project parameter must be supplied if the feed was created in a project.
If the feed is not associated with any project, omit the project parameter from the request.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FeedId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PackageName
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/upack/RecycleBin/packages/{packageName}/versions/{packageVersion}' -Replace '{feedId}',$FeedId -Replace '{packageVersion}',$PackageVersion -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{packageName}',$PackageName

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWiki {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets all wikis in a project or collection.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WikiIdentifier
    Wiki ID or wiki name.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWiki -Organization $organization -WikiIdentifier $wikiidentifier -Project $project -ApiVersion $apiversion
 
    Gets the wiki corresponding to the wiki ID or wiki name provided.
 
.EXAMPLE
    PS C:\> Get-AdsWiki -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets all wikis in a project or collection.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Wikis_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Wikis_Get')]
        [string]
        $WikiIdentifier,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Wikis_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Wikis_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($WikiIdentifier) { $__path += "/$WikiIdentifier" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWikiPage {
<#
.SYNOPSIS
    Gets metadata or content of the wiki page for the provided path.
 
.DESCRIPTION
    Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request.
 
.PARAMETER Version
    Version string identifier (name of tag/branch, SHA1 of commit)
 
.PARAMETER Path
    Wiki page path.
 
.PARAMETER IncludeContent
    True to include the content of the page in the response for Json content type. Defaults to false (Optional)
 
.PARAMETER WikiIdentifier
    Wiki ID or wiki name.
 
.PARAMETER Id
    Wiki page ID.
 
.PARAMETER VersionType
    Version type (branch, tag, or commit). Determines how Id is interpreted
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER VersionOptions
    Version options - Specify additional modifiers to version (e.g Previous)
 
.PARAMETER RecursionLevel
    Recursion level for subpages retrieval. Defaults to `None` (Optional).
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWikiPage -WikiIdentifier $wikiidentifier -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request.
 
.EXAMPLE
    PS C:\> Get-AdsWikiPage -WikiIdentifier $wikiidentifier -Project $project -Organization $organization -ApiVersion $apiversion
 
    Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Get Page By Id')]
        [boolean]
        $IncludeContent,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Get Page By Id')]
        [string]
        $WikiIdentifier,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Get Page By Id')]
        [string]
        $Id,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Get Page By Id')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Get Page By Id')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionOptions,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Get Page By Id')]
        [string]
        $RecursionLevel,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Get Page By Id')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Version' = 'versionDescriptor.version'
            'Path' = 'path'
            'IncludeContent' = 'includeContent'
            'VersionType' = 'versionDescriptor.versionType'
            'VersionOptions' = 'versionDescriptor.versionOptions'
            'RecursionLevel' = 'recursionLevel'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Version','Path','IncludeContent','VersionType','VersionOptions','RecursionLevel','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages' -Replace '{wikiIdentifier}',$WikiIdentifier -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($Id) { $__path += "/$Id" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWikiPageStat {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns page detail corresponding to Page ID.
 
.PARAMETER WikiIdentifier
    Wiki ID or wiki name.
 
.PARAMETER PageViewsForDays
    last N days from the current day for which page views is to be returned. It's inclusive of current day.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PageId
    Wiki page ID.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWikiPageStat -WikiIdentifier $wikiidentifier -Project $project -Organization $organization -PageId $pageid -ApiVersion $apiversion
 
    Returns page detail corresponding to Page ID.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WikiIdentifier,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $PageViewsForDays,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'PageViewsForDays' = 'pageViewsForDays'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('PageViewsForDays','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{pageId}/stats' -Replace '{wikiIdentifier}',$WikiIdentifier -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{pageId}',$PageId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Move-AdsWikiPage {
<#
.SYNOPSIS
    Creates a page move operation that updates the path and order of the page
 
.DESCRIPTION
    Creates a page move operation that updates the path and order of the page as provided in the parameters.
 
.PARAMETER Version
    Version string identifier (name of tag/branch, SHA1 of commit)
 
.PARAMETER VersionType
    Version type (branch, tag, or commit). Determines how Id is interpreted
 
.PARAMETER Comment
    Comment that is to be associated with this page move.
 
.PARAMETER WikiIdentifier
    Wiki ID or wiki name.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER VersionOptions
    Version options - Specify additional modifiers to version (e.g Previous)
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Move-AdsWikiPage -WikiIdentifier $wikiidentifier -Project $project -Organization $organization -ApiVersion $apiversion
 
    Creates a page move operation that updates the path and order of the page as provided in the parameters.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionType,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Comment,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WikiIdentifier,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionOptions,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Version' = 'versionDescriptor.version'
            'VersionType' = 'versionDescriptor.versionType'
            'Comment' = 'comment'
            'VersionOptions' = 'versionDescriptor.versionOptions'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Version','VersionType','Comment','VersionOptions','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pagemoves' -Replace '{wikiIdentifier}',$WikiIdentifier -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWikiAttachment {
<#
.SYNOPSIS
    Creates an attachment in the wiki.
 
.DESCRIPTION
    Creates an attachment in the wiki.
 
.PARAMETER Version
    Version string identifier (name of tag/branch, SHA1 of commit)
 
.PARAMETER VersionType
    Version type (branch, tag, or commit). Determines how Id is interpreted
 
.PARAMETER WikiIdentifier
    Wiki ID or wiki name.
 
.PARAMETER Name
    Wiki attachment name.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER VersionOptions
    Version options - Specify additional modifiers to version (e.g Previous)
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWikiAttachment -WikiIdentifier $wikiidentifier -Name $name -Project $project -Organization $organization -ApiVersion $apiversion
 
    Creates an attachment in the wiki.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WikiIdentifier,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionOptions,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Version' = 'versionDescriptor.version'
            'VersionType' = 'versionDescriptor.versionType'
            'Name' = 'name'
            'VersionOptions' = 'versionDescriptor.versionOptions'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Version','VersionType','Name','VersionOptions','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/attachments' -Replace '{wikiIdentifier}',$WikiIdentifier -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWikiPage {
<#
.SYNOPSIS
    Creates or edits a wiki page.
 
.DESCRIPTION
    Creates or edits a wiki page.
 
.PARAMETER Version
    Version of the page on which the change is to be made. Mandatory for `Edit` scenario. To be populated in the If-Match header of the request.
 
.PARAMETER Path
    Wiki page path.
 
.PARAMETER Comment
    Comment to be associated with the page operation.
 
.PARAMETER WikiIdentifier
    Wiki ID or wiki name.
 
.PARAMETER VersionType
    Version type (branch, tag, or commit). Determines how Id is interpreted
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER VersionOptions
    Version options - Specify additional modifiers to version (e.g Previous)
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER FilterVersion
    Version string identifier (name of tag/branch, SHA1 of commit)
 
.EXAMPLE
    PS C:\> New-AdsWikiPage -Version $version
 
    <insert description here>
 
.EXAMPLE
    PS C:\> New-AdsWikiPage -Path $path -WikiIdentifier $wikiidentifier -Project $project -Organization $organization -ApiVersion $apiversion
 
    Creates or edits a wiki page.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Wikis_Get')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Comment,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WikiIdentifier,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionOptions,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FilterVersion
    )
    process {
        $__mapping = @{
            'Version' = 'Version'
            'Path' = 'path'
            'Comment' = 'comment'
            'VersionType' = 'versionDescriptor.versionType'
            'VersionOptions' = 'versionDescriptor.versionOptions'
            'ApiVersion' = 'api-version'
            'FilterVersion' = 'versionDescriptor.version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Path','Comment','VersionType','VersionOptions','ApiVersion','FilterVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @('Version') -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages' -Replace '{wikiIdentifier}',$WikiIdentifier -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWiki {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes the wiki corresponding to the wiki ID or wiki name provided.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WikiIdentifier
    Wiki ID or wiki name.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWiki -Organization $organization -WikiIdentifier $wikiidentifier -Project $project -ApiVersion $apiversion
 
    Deletes the wiki corresponding to the wiki ID or wiki name provided.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WikiIdentifier,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}' -Replace '{organization}',$Organization -Replace '{wikiIdentifier}',$WikiIdentifier -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWikiPage {
<#
.SYNOPSIS
    Deletes a wiki page.
 
.DESCRIPTION
    Deletes a wiki page.
 
.PARAMETER Version
    Version string identifier (name of tag/branch, SHA1 of commit)
 
.PARAMETER Path
    Wiki page path.
 
.PARAMETER Comment
    Comment to be associated with this page delete.
 
.PARAMETER WikiIdentifier
    Wiki ID or wiki name.
 
.PARAMETER Id
    Wiki page ID.
 
.PARAMETER VersionType
    Version type (branch, tag, or commit). Determines how Id is interpreted
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER VersionOptions
    Version options - Specify additional modifiers to version (e.g Previous)
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWikiPage -WikiIdentifier $wikiidentifier -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Deletes a wiki page.
 
.EXAMPLE
    PS C:\> Remove-AdsWikiPage -Path $path -WikiIdentifier $wikiidentifier -Project $project -Organization $organization -ApiVersion $apiversion
 
    Deletes a wiki page.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Delete Page By Id')]
        [string]
        $Comment,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Delete Page By Id')]
        [string]
        $WikiIdentifier,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Delete Page By Id')]
        [string]
        $Id,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Delete Page By Id')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Delete Page By Id')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionOptions,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Delete Page By Id')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Version' = 'versionDescriptor.version'
            'Path' = 'path'
            'Comment' = 'comment'
            'VersionType' = 'versionDescriptor.versionType'
            'VersionOptions' = 'versionDescriptor.versionOptions'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Version','Path','Comment','VersionType','VersionOptions','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages' -Replace '{wikiIdentifier}',$WikiIdentifier -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($Id) { $__path += "/$Id" }

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWiki {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates the wiki resource.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWiki -Organization $organization -Project $project -ApiVersion $apiversion
 
    Creates the wiki resource.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWikiPage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Edits a wiki page.
 
.PARAMETER Version
    Version of the page on which the change is to be made. Mandatory for `Edit` scenario. To be populated in the If-Match header of the request.
 
.PARAMETER Comment
    Comment to be associated with the page operation.
 
.PARAMETER WikiIdentifier
    Wiki ID or wiki name.
 
.PARAMETER Id
    Wiki page ID.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWikiPage -Version $version
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Set-AdsWikiPage -WikiIdentifier $wikiidentifier -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Edits a wiki page.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Get Page By Id')]
        [string]
        $Version,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Comment,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WikiIdentifier,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Version' = 'Version'
            'Comment' = 'comment'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Comment','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @('Version') -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{id}' -Replace '{wikiIdentifier}',$WikiIdentifier -Replace '{id}',$Id -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWikiPagesbatch {
<#
.SYNOPSIS
    Returns pageable list of Wiki Pages
 
.DESCRIPTION
    Returns pageable list of Wiki Pages
 
.PARAMETER Version
    Version string identifier (name of tag/branch, SHA1 of commit)
 
.PARAMETER VersionType
    Version type (branch, tag, or commit). Determines how Id is interpreted
 
.PARAMETER WikiIdentifier
    Wiki ID or wiki name.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER VersionOptions
    Version options - Specify additional modifiers to version (e.g Previous)
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWikiPagesbatch -WikiIdentifier $wikiidentifier -Project $project -Organization $organization -ApiVersion $apiversion
 
    Returns pageable list of Wiki Pages
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Version,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WikiIdentifier,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $VersionOptions,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Version' = 'versionDescriptor.version'
            'VersionType' = 'versionDescriptor.versionType'
            'VersionOptions' = 'versionDescriptor.versionOptions'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Version','VersionType','VersionOptions','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pagesbatch' -Replace '{wikiIdentifier}',$WikiIdentifier -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBacklog {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    List all backlog levels
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Id
    The id of the backlog level
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkBacklog -Organization $organization -Team $team -Id $id -Project $project -ApiVersion $apiversion
 
    Get a backlog level
 
.EXAMPLE
    PS C:\> Get-AdsWorkBacklog -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    List all backlog levels
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Backlogs_Get Backlog')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Backlogs_Get Backlog')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Backlogs_Get Backlog')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Backlogs_Get Backlog')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Backlogs_Get Backlog')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/backlogs' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project
        if ($Id) { $__path += "/$Id" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBacklogconfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets backlog configuration for a team
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkBacklogconfiguration -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Gets backlog configuration for a team
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/backlogconfiguration' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBacklogWorkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of work items within a backlog level
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER BacklogId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkBacklogWorkitem -Organization $organization -Team $team -BacklogId $backlogid -Project $project -ApiVersion $apiversion
 
    Get a list of work items within a backlog level
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BacklogId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/backlogs/{backlogId}/workItems' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{backlogId}',$BacklogId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBoard {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get boards
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Id
    identifier for board, either board's backlog level name (Eg:"Stories") or Id
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkBoard -Organization $organization -Team $team -Id $id -Project $project -ApiVersion $apiversion
 
    Get board
 
.EXAMPLE
    PS C:\> Get-AdsWorkBoard -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Get boards
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Boards_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Boards_Get')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Boards_Get')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Boards_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Boards_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project
        if ($Id) { $__path += "/$Id" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBoardBoardparent {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns the list of parent field filter model for the given list of workitem ids
 
.PARAMETER ChildBacklogContextCategoryRefName
     
 
.PARAMETER WorkitemIds
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Get-AdsWorkBoardBoardparent -ChildBacklogContextCategoryRefName $childbacklogcontextcategoryrefname -WorkitemIds $workitemids -Project $project -Organization $organization -ApiVersion $apiversion -Team $team
 
    Returns the list of parent field filter model for the given list of workitem ids
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ChildBacklogContextCategoryRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WorkitemIds,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'ChildBacklogContextCategoryRefName' = 'childBacklogContextCategoryRefName'
            'WorkitemIds' = 'workitemIds'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ChildBacklogContextCategoryRefName','WorkitemIds','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/boardparents' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{team}',$Team

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBoardBoardusersetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get board user settings for a board id
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Board
    Board ID or Name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkBoardBoardusersetting -Organization $organization -Team $team -Board $board -Project $project -ApiVersion $apiversion
 
    Get board user settings for a board id
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/boardusersettings' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{board}',$Board -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBoardCardrulesetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get board card Rule settings for the board id or board by name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Board
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkBoardCardrulesetting -Organization $organization -Team $team -Board $board -Project $project -ApiVersion $apiversion
 
    Get board card Rule settings for the board id or board by name
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/cardrulesettings' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{board}',$Board -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBoardCardsetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get board card settings for the board id or board by name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Board
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkBoardCardsetting -Organization $organization -Team $team -Board $board -Project $project -ApiVersion $apiversion
 
    Get board card settings for the board id or board by name
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/cardsettings' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{board}',$Board -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBoardChart {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get board charts
 
.PARAMETER Name
    The chart name
 
.PARAMETER Board
    Identifier for board, either board's backlog level name (Eg:"Stories") or Id
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Get-AdsWorkBoardChart -Name $name -Board $board -Project $project -Organization $organization -ApiVersion $apiversion -Team $team
 
    Get a board chart
 
.EXAMPLE
    PS C:\> Get-AdsWorkBoardChart -Board $board -Project $project -Organization $organization -ApiVersion $apiversion -Team $team
 
    Get board charts
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Charts_Get')]
        [string]
        $Name,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Charts_Get')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Charts_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Charts_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Charts_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Charts_Get')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/charts' -Replace '{board}',$Board -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{team}',$Team
        if ($Name) { $__path += "/$Name" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBoardChartimage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a board chart image.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Height
    The height of the chart in pixels. Must be greater than 0.
 
.PARAMETER Width
    The width of the chart in pixels. Must be greater than 0.
 
.PARAMETER Name
    The chart name. e.g. CumulativeFlow.
 
.PARAMETER Board
    Identifier for board, either board's backlog level name (e.g. "Issues") or Id.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Title
    The title of the chart. Can only be dislayed if ShowLabels is true.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ShowDetails
    Whether or not the chart should include detailed information (e.g. axis labels, titles, trend lines, etc.).
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Get-AdsWorkBoardChartimage -ApiVersion $apiversion -Name $name -Board $board -Project $project -Organization $organization -Team $team
 
    Get a board chart image.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Height,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Width,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Title,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ShowDetails,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Height' = 'height'
            'Width' = 'width'
            'Title' = 'title'
            'ShowDetails' = 'showDetails'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Height','Width','Title','ShowDetails') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/chartimages/{name}' -Replace '{name}',$Name -Replace '{board}',$Board -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{team}',$Team

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBoardColumn {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get columns on a board
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Board
    Name or ID of the specific board
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkBoardColumn -Organization $organization -Team $team -Board $board -Project $project -ApiVersion $apiversion
 
    Get columns on a board
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/columns' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{board}',$Board -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkBoardRow {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get rows on a board
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Board
    Name or ID of the specific board
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkBoardRow -Organization $organization -Team $team -Board $board -Project $project -ApiVersion $apiversion
 
    Get rows on a board
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/rows' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{board}',$Board -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkIterationChartimage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get an iteration chart image.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Height
    The height of the chart in pixels. Must be greater than 0.
 
.PARAMETER Width
    The width of the chart in pixels. Must be greater than 0.
 
.PARAMETER Name
    The chart name. e.g. Burndown.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Title
    The title of the chart. Can only be dislayed if ShowLabels is true.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ShowDetails
    Whether or not the chart should include detailed information (e.g. axis labels, titles, trend lines, etc.)
 
.PARAMETER IterationId
    ID of the iteration.
 
.EXAMPLE
    PS C:\> Get-AdsWorkIterationChartimage -Team $team -ApiVersion $apiversion -Name $name -Project $project -Organization $organization -IterationId $iterationid
 
    Get an iteration chart image.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Height,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Width,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Title,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ShowDetails,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Height' = 'height'
            'Width' = 'width'
            'Title' = 'title'
            'ShowDetails' = 'showDetails'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Height','Width','Title','ShowDetails') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/iterations/{iterationId}/chartimages/{name}' -Replace '{team}',$Team -Replace '{name}',$Name -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkIterationIterationcapacitie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get an iteration's capacity for all teams in iteration
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IterationId
    ID of the iteration
 
.EXAMPLE
    PS C:\> Get-AdsWorkIterationIterationcapacitie -Organization $organization -ApiVersion $apiversion -Project $project -IterationId $iterationid
 
    Get an iteration's capacity for all teams in iteration
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/work/iterations/{iterationId}/iterationcapacities' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkPlan {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the information for all the plans configured for the given team
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    Identifier of the plan
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkPlan -Organization $organization -Id $id -Project $project -ApiVersion $apiversion
 
    Get the information for the specified plan
 
.EXAMPLE
    PS C:\> Get-AdsWorkPlan -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get the information for all the plans configured for the given team
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Plans_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Plans_Get')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Plans_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Plans_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/work/plans' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($Id) { $__path += "/$Id" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkPlanDeliverytimeline {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get Delivery View Data
 
.PARAMETER EndDate
    The end date of timeline
 
.PARAMETER Id
    Identifier for delivery view
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Revision
    Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision.
 
.PARAMETER StartDate
    The start date of timeline
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkPlanDeliverytimeline -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get Delivery View Data
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EndDate,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Revision,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StartDate,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'EndDate' = 'endDate'
            'Revision' = 'revision'
            'StartDate' = 'startDate'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('EndDate','Revision','StartDate','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/work/plans/{id}/deliverytimeline' -Replace '{id}',$Id -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcessconfiguration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get process configuration
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessconfiguration -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get process configuration
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/work/processconfiguration' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkTaskboardcolumn {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkTaskboardcolumn -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/taskboardcolumns' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkTaskboardworkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IterationId
     
 
.EXAMPLE
    PS C:\> Get-AdsWorkTaskboardworkitem -Organization $organization -Team $team -ApiVersion $apiversion -Project $project -IterationId $iterationid
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/taskboardworkitems/{iterationId}' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkTeamsetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a team's settings
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkTeamsetting -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Get a team's settings
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkTeamsettingIteration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a team's iterations using timeframe filter
 
.PARAMETER Timeframe
    A filter for which iterations are returned based on relative time. Only Current is supported currently.
 
.PARAMETER Id
    ID of the iteration
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Get-AdsWorkTeamsettingIteration -Id $id -Project $project -Organization $organization -ApiVersion $apiversion -Team $team
 
    Get team's iteration by iterationId
 
.EXAMPLE
    PS C:\> Get-AdsWorkTeamsettingIteration -Project $project -Organization $organization -ApiVersion $apiversion -Team $team
 
    Get a team's iterations using timeframe filter
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Timeframe,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Iterations_Get')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'Timeframe' = '$timeframe'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Timeframe','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{team}',$Team
        if ($Id) { $__path += "/$Id" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkTeamsettingIterationCapacitie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a team's capacity including total capacity and days off
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER TeamMemberId
    ID of the team member
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER IterationId
    ID of the iteration
 
.EXAMPLE
    PS C:\> Get-AdsWorkTeamsettingIterationCapacitie -Team $team -TeamMemberId $teammemberid -Project $project -Organization $organization -ApiVersion $apiversion -IterationId $iterationid
 
    Get a team member's capacity
 
.EXAMPLE
    PS C:\> Get-AdsWorkTeamsettingIterationCapacitie -Team $team -Project $project -Organization $organization -ApiVersion $apiversion -IterationId $iterationid
 
    Get a team's capacity including total capacity and days off
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Capacities_Get Capacity With Identity Ref')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Capacities_Get Capacity With Identity Ref')]
        [string]
        $TeamMemberId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Capacities_Get Capacity With Identity Ref')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Capacities_Get Capacity With Identity Ref')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Capacities_Get Capacity With Identity Ref')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Capacities_Get Capacity With Identity Ref')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities' -Replace '{team}',$Team -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{iterationId}',$IterationId
        if ($TeamMemberId) { $__path += "/$TeamMemberId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkTeamsettingIterationTeamdaysoff {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get team's days off for an iteration
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IterationId
    ID of the iteration
 
.EXAMPLE
    PS C:\> Get-AdsWorkTeamsettingIterationTeamdaysoff -Organization $organization -Team $team -ApiVersion $apiversion -Project $project -IterationId $iterationid
 
    Get team's days off for an iteration
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/teamdaysoff' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkTeamsettingIterationWorkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get work items for iteration
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IterationId
    ID of the iteration
 
.EXAMPLE
    PS C:\> Get-AdsWorkTeamsettingIterationWorkitem -Organization $organization -Team $team -ApiVersion $apiversion -Project $project -IterationId $iterationid
 
    Get work items for iteration
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/workitems' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkTeamsettingTeamfieldvalue {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a collection of team field values
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkTeamsettingTeamfieldvalue -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Get a collection of team field values
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/teamfieldvalues' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkBoard {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update board options
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    identifier for board, either category plural name (Eg:"Stories") or guid
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkBoard -Organization $organization -Id $id -Team $team -Project $project -ApiVersion $apiversion
 
    Update board options
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{id}' -Replace '{organization}',$Organization -Replace '{id}',$Id -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkBoardCardsetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update board card settings for the board id or board by name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Board
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkBoardCardsetting -Organization $organization -Team $team -Board $board -Project $project -ApiVersion $apiversion
 
    Update board card settings for the board id or board by name
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/cardsettings' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{board}',$Board -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkBoardColumn {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update columns on a board
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Board
    Name or ID of the specific board
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkBoardColumn -Organization $organization -Team $team -Board $board -Project $project -ApiVersion $apiversion
 
    Update columns on a board
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/columns' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{board}',$Board -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkBoardRow {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update rows on a board
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Board
    Name or ID of the specific board
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkBoardRow -Organization $organization -Team $team -Board $board -Project $project -ApiVersion $apiversion
 
    Update rows on a board
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/rows' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{board}',$Board -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkPlan {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update the information for the specified plan
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    Identifier of the plan
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkPlan -Organization $organization -Id $id -Project $project -ApiVersion $apiversion
 
    Update the information for the specified plan
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/work/plans/{id}' -Replace '{organization}',$Organization -Replace '{id}',$Id -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkTaskboardCardsetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update taskboard card settings
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkTaskboardCardsetting -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Update taskboard card settings
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/taskboard/cardsettings' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkTaskboardcolumn {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkTaskboardcolumn -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/taskboardcolumns' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkTeamsettingIterationCapacitie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Replace a team's capacity
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IterationId
    ID of the iteration
 
.EXAMPLE
    PS C:\> New-AdsWorkTeamsettingIterationCapacitie -Organization $organization -Team $team -ApiVersion $apiversion -Project $project -IterationId $iterationid
 
    Replace a team's capacity
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkPlan {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete the specified plan
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    Identifier of the plan
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkPlan -Organization $organization -Id $id -Project $project -ApiVersion $apiversion
 
    Delete the specified plan
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/work/plans/{id}' -Replace '{organization}',$Organization -Replace '{id}',$Id -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkTeamsettingIteration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a team's iteration by iterationId
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    ID of the iteration
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkTeamsettingIteration -Organization $organization -Id $id -Team $team -Project $project -ApiVersion $apiversion
 
    Delete a team's iteration by iterationId
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{id}' -Replace '{organization}',$Organization -Replace '{id}',$Id -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkBoardBoardusersetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update board user settings for the board id
 
We don't want stakeholders to update board settings (currently just autorefresh). The BacklogManagement feature check validates this.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Board
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkBoardBoardusersetting -Organization $organization -Team $team -Board $board -Project $project -ApiVersion $apiversion
 
    Update board user settings for the board id
 
We don't want stakeholders to update board settings (currently just autorefresh). The BacklogManagement feature check validates this.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/boardusersettings' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{board}',$Board -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkBoardCardrulesetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update board card Rule settings for the board id or board by name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Board
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkBoardCardrulesetting -Organization $organization -Team $team -Board $board -Project $project -ApiVersion $apiversion
 
    Update board card Rule settings for the board id or board by name
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/cardrulesettings' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{board}',$Board -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkBoardChart {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a board chart
 
.PARAMETER Name
    The chart name
 
.PARAMETER Board
    Identifier for board, either board's backlog level name (Eg:"Stories") or Id
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Set-AdsWorkBoardChart -Name $name -Board $board -Project $project -Organization $organization -ApiVersion $apiversion -Team $team
 
    Update a board chart
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Name,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Board,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/boards/{board}/charts/{name}' -Replace '{name}',$Name -Replace '{board}',$Board -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{team}',$Team

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkIterationWorkitemsorder {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Reorder Sprint Backlog/Taskboard Work Items
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IterationId
    The id of the iteration
 
.EXAMPLE
    PS C:\> Set-AdsWorkIterationWorkitemsorder -Organization $organization -Team $team -ApiVersion $apiversion -Project $project -IterationId $iterationid
 
    Reorder Sprint Backlog/Taskboard Work Items
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/iterations/{iterationId}/workitemsorder' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkPlan {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add a new plan for the team
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkPlan -Organization $organization -Project $project -ApiVersion $apiversion
 
    Add a new plan for the team
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/work/plans' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkTaskboardCardrulesetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update taskboard card Rule settings
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkTaskboardCardrulesetting -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Update taskboard card Rule settings
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/taskboard/cardrulesettings' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkTaskboardworkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER WorkItemId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER IterationId
     
 
.EXAMPLE
    PS C:\> Set-AdsWorkTaskboardworkitem -Team $team -WorkItemId $workitemid -Project $project -Organization $organization -ApiVersion $apiversion -IterationId $iterationid
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WorkItemId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/taskboardworkitems/{iterationId}/{workItemId}' -Replace '{team}',$Team -Replace '{workItemId}',$WorkItemId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkTeamsetting {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a team's settings
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkTeamsetting -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Update a team's settings
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkTeamsettingIteration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add an iteration to the team
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkTeamsettingIteration -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Add an iteration to the team
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkTeamsettingIterationCapacitie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a team member's capacity
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER TeamMemberId
    ID of the team member
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER IterationId
    ID of the iteration
 
.EXAMPLE
    PS C:\> Set-AdsWorkTeamsettingIterationCapacitie -Team $team -TeamMemberId $teammemberid -Project $project -Organization $organization -ApiVersion $apiversion -IterationId $iterationid
 
    Update a team member's capacity
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TeamMemberId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}' -Replace '{team}',$Team -Replace '{teamMemberId}',$TeamMemberId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkTeamsettingIterationTeamdaysoff {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Set a team's days off for an iteration
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IterationId
    ID of the iteration
 
.EXAMPLE
    PS C:\> Set-AdsWorkTeamsettingIterationTeamdaysoff -Organization $organization -Team $team -ApiVersion $apiversion -Project $project -IterationId $iterationid
 
    Set a team's days off for an iteration
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $IterationId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/teamdaysoff' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project -Replace '{iterationId}',$IterationId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkTeamsettingTeamfieldvalue {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update team field values
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkTeamsettingTeamfieldvalue -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Update team field values
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/teamfieldvalues' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkWorkitemsorder {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Reorder Product Backlog/Boards Work Items
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkWorkitemsorder -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Reorder Product Backlog/Boards Work Items
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/work/workitemsorder' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitArtifactlinktype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get the list of work item tracking outbound artifact link types.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Get-AdsWitArtifactlinktype -ApiVersion $apiversion -Organization $organization
 
    Get the list of work item tracking outbound artifact link types.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/wit/artifactlinktypes' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Downloads an attachment.
 
.PARAMETER FileName
    Name of the file
 
.PARAMETER Download
    If set to <c>true</c> always download attachment
 
.PARAMETER Id
    Attachment ID
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitAttachment -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Downloads an attachment.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FileName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Download,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'FileName' = 'fileName'
            'Download' = 'download'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('FileName','Download','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/attachments/{id}' -Replace '{id}',$Id -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitClassificationnode {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets root classification nodes under the project.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Depth
    Depth of children to fetch.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitClassificationnode -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets root classification nodes under the project.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Depth,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Depth' = '$depth'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Depth','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/classificationnodes' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitField {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns information for all fields. The project ID/name parameter is optional.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Expand
    Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included.
 
.PARAMETER FieldNameOrRefName
    Field simple name or reference name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitField -Organization $organization -FieldNameOrRefName $fieldnameorrefname -Project $project -ApiVersion $apiversion
 
    Gets information on a specific field.
 
.EXAMPLE
    PS C:\> Get-AdsWitField -Organization $organization -Project $project -ApiVersion $apiversion
 
    Returns information for all fields. The project ID/name parameter is optional.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Fields_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Fields_Get')]
        [string]
        $FieldNameOrRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Fields_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Fields_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/fields' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($FieldNameOrRefName) { $__path += "/$FieldNameOrRefName" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitQuerie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the root queries and their children
 
.PARAMETER Depth
    In the folder of queries, return child queries and folders to this depth.
 
.PARAMETER Expand
    Include the query string (wiql), clauses, query result columns, and sort options in the results.
 
.PARAMETER Query
    ID or path of the query.
 
.PARAMETER UseIsoDateFormat
    DateTime query clauses will be formatted using a ISO 8601 compliant format
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IncludeDeleted
    Include deleted queries and folders
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitQuerie -Query $query -Project $project -Organization $organization -ApiVersion $apiversion
 
    Retrieves an individual query and its children
 
.EXAMPLE
    PS C:\> Get-AdsWitQuerie -Project $project -Organization $organization -ApiVersion $apiversion
 
    Gets the root queries and their children
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queries_Get')]
        [int32]
        $Depth,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queries_Get')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queries_Get')]
        [string]
        $Query,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queries_Get')]
        [boolean]
        $UseIsoDateFormat,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queries_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queries_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queries_Get')]
        [boolean]
        $IncludeDeleted,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Queries_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Depth' = '$depth'
            'Expand' = '$expand'
            'UseIsoDateFormat' = '$useIsoDateFormat'
            'IncludeDeleted' = '$includeDeleted'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Depth','Expand','UseIsoDateFormat','IncludeDeleted','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/queries' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($Query) { $__path += "/$Query" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitRecyclebin {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    ID of the work item to be returned
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitRecyclebin -Organization $organization -Id $id -Project $project -ApiVersion $apiversion
 
    Gets a deleted work item from Recycle Bin.
 
.EXAMPLE
    PS C:\> Get-AdsWitRecyclebin -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recyclebin_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recyclebin_Get')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recyclebin_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recyclebin_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/recyclebin' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($Id) { $__path += "/$Id" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitReportingWorkitemlink {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a batch of work item links
 
.PARAMETER LinkTypes
    A list of types to filter the results to specific link types. Omit this parameter to get work item links of all link types.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Types
    A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ContinuationToken
    Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links.
 
.PARAMETER StartDateTime
    Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitReportingWorkitemlink -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get a batch of work item links
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $LinkTypes,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Types,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StartDateTime,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'LinkTypes' = 'linkTypes'
            'Types' = 'types'
            'ContinuationToken' = 'continuationToken'
            'StartDateTime' = 'startDateTime'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('LinkTypes','Types','ContinuationToken','StartDateTime','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/reporting/workitemlinks' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitReportingWorkitemrevision {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a batch of work item revisions with the option of including deleted items
 
.PARAMETER IncludeDeleted
    Specify if the deleted item should be returned.
 
.PARAMETER MaxPageSize
    The maximum number of results to return in this batch
 
.PARAMETER ContinuationToken
    Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.
 
.PARAMETER Expand
    Return all the fields in work item revisions, including long text fields which are not returned by default
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER IncludeIdentityRef
    Return an identity reference instead of a string value for identity fields.
 
.PARAMETER StartDateTime
    Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter.
 
.PARAMETER Fields
    A list of fields to return in work item revisions. Omit this parameter to get all reportable fields.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER IncludeTagRef
    Specify if the tag objects should be returned for System.Tags field.
 
.PARAMETER Types
    A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IncludeLatestOnly
    Return only the latest revisions of work items, skipping all historical revisions
 
.PARAMETER IncludeDiscussionChangesOnly
    Return only the those revisions of work items, where only history field was changed
 
.EXAMPLE
    PS C:\> Get-AdsWitReportingWorkitemrevision -ApiVersion $apiversion -Organization $organization -Project $project
 
    Get a batch of work item revisions with the option of including deleted items
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeDeleted,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $MaxPageSize,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeIdentityRef,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StartDateTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Fields,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeTagRef,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Types,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeLatestOnly,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IncludeDiscussionChangesOnly
    )
    process {
        $__mapping = @{
            'IncludeDeleted' = 'includeDeleted'
            'MaxPageSize' = '$maxPageSize'
            'ContinuationToken' = 'continuationToken'
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
            'IncludeIdentityRef' = 'includeIdentityRef'
            'StartDateTime' = 'startDateTime'
            'Fields' = 'fields'
            'IncludeTagRef' = 'includeTagRef'
            'Types' = 'types'
            'IncludeLatestOnly' = 'includeLatestOnly'
            'IncludeDiscussionChangesOnly' = 'includeDiscussionChangesOnly'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('IncludeDeleted','MaxPageSize','ContinuationToken','Expand','ApiVersion','IncludeIdentityRef','StartDateTime','Fields','IncludeTagRef','Types','IncludeLatestOnly','IncludeDiscussionChangesOnly') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/reporting/workitemrevisions' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitReportingWorkitemrevisionDiscussion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER MaxPageSize
     
 
.PARAMETER ContinuationToken
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitReportingWorkitemrevisionDiscussion -Organization $organization -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $MaxPageSize,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'MaxPageSize' = '$maxPageSize'
            'ContinuationToken' = 'continuationToken'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('MaxPageSize','ContinuationToken','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/reporting/workItemRevisions/discussions' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TagIdOrName
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitTag -Organization $organization -TagIdOrName $tagidorname -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Get-AdsWitTag -Organization $organization -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Tags_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Tags_Get')]
        [string]
        $TagIdOrName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Tags_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Tags_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/tags' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($TagIdOrName) { $__path += "/$TagIdOrName" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitTemplate {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets template
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TemplateId
    Template Id
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Workitemtypename
    Optional, When specified returns templates for given Work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Get-AdsWitTemplate -Organization $organization -TemplateId $templateid -Project $project -ApiVersion $apiversion -Team $team
 
    Gets the template with specified id
 
.EXAMPLE
    PS C:\> Get-AdsWitTemplate -Organization $organization -Project $project -ApiVersion $apiversion -Team $team
 
    Gets template
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Templates_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Templates_Get')]
        [string]
        $TemplateId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Templates_Get')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Workitemtypename,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Templates_Get')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Templates_Get')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'Workitemtypename' = 'workitemtypename'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Workitemtypename','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{team}',$Team
        if ($TemplateId) { $__path += "/$TemplateId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWiql {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the results of the query given the query ID.
 
.PARAMETER Id
    The query ID.
 
.PARAMETER Top
    The max number of results to return.
 
.PARAMETER TimePrecision
    Whether or not to use time precision.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Get-AdsWitWiql -Id $id -Project $project -Organization $organization -ApiVersion $apiversion -Team $team
 
    Gets the results of the query given the query ID.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $TimePrecision,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'Top' = '$top'
            'TimePrecision' = 'timePrecision'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Top','TimePrecision','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/wiql/{id}' -Replace '{id}',$Id -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{team}',$Team

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of work items (Maximum 200)
 
.PARAMETER ErrorPolicy
    The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}.
 
.PARAMETER Fields
    Comma-separated list of requested fields
 
.PARAMETER Expand
    The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
 
.PARAMETER Id
    The work item id
 
.PARAMETER AsOf
    AsOf UTC date time string
 
.PARAMETER Ids
    The comma-separated list of requested work item ids. (Maximum 200 ids allowed).
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitem -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Returns a single work item.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitem -Ids $ids -Project $project -Organization $organization -ApiVersion $apiversion
 
    Returns a list of work items (Maximum 200)
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ErrorPolicy,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Items_Get Work Item')]
        [string]
        $Fields,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Items_Get Work Item')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Items_Get Work Item')]
        [string]
        $Id,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Items_Get Work Item')]
        [string]
        $AsOf,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Ids,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Items_Get Work Item')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Items_Get Work Item')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Items_Get Work Item')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ErrorPolicy' = 'errorPolicy'
            'Fields' = 'fields'
            'Expand' = '$expand'
            'AsOf' = 'asOf'
            'Ids' = 'ids'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ErrorPolicy','Fields','Expand','AsOf','Ids','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workitems' -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($Id) { $__path += "/$Id" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemComment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of work item comments by ids.
 
.PARAMETER WorkItemId
    Id of a work item to get comments for.
 
.PARAMETER Expand
    Specifies the additional data retrieval options for work item comments.
 
.PARAMETER Ids
    Comma-separated list of comment ids to return.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER IncludeDeleted
    Specify if the deleted comments should be retrieved.
 
.PARAMETER CommentId
    Id of the comment to return.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemComment -WorkItemId $workitemid -Project $project -CommentId $commentid -ApiVersion $apiversion -Organization $organization
 
    Returns a work item comment.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemComment -WorkItemId $workitemid -Ids $ids -Project $project -ApiVersion $apiversion -Organization $organization
 
    Returns a list of work item comments by ids.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments_Get Comment')]
        [string]
        $WorkItemId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments_Get Comment')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Ids,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments_Get Comment')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments_Get Comment')]
        [boolean]
        $IncludeDeleted,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments_Get Comment')]
        [string]
        $CommentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments_Get Comment')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments_Get Comment')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'Ids' = 'ids'
            'IncludeDeleted' = 'includeDeleted'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','Ids','IncludeDeleted','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/comments' -Replace '{workItemId}',$WorkItemId -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($CommentId) { $__path += "/$CommentId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemCommentReaction {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets reactions of a comment.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WorkItemId
    WorkItem ID
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER CommentId
    Comment ID
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemCommentReaction -Organization $organization -WorkItemId $workitemid -ApiVersion $apiversion -Project $project -CommentId $commentid
 
    Gets reactions of a comment.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WorkItemId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommentId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/comments/{commentId}/reactions' -Replace '{organization}',$Organization -Replace '{workItemId}',$WorkItemId -Replace '{project}',$Project -Replace '{commentId}',$CommentId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemCommentReactionUser {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get users who reacted on the comment.
 
.PARAMETER WorkItemId
    WorkItem ID.
 
.PARAMETER Top
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Skip
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER CommentId
    Comment ID.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ReactionType
    Type of the reaction.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemCommentReactionUser -WorkItemId $workitemid -Project $project -Organization $organization -CommentId $commentid -ApiVersion $apiversion -ReactionType $reactiontype
 
    Get users who reacted on the comment.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WorkItemId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReactionType
    )
    process {
        $__mapping = @{
            'Top' = '$top'
            'Skip' = '$skip'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Top','Skip','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/comments/{commentId}/reactions/{reactionType}/users' -Replace '{workItemId}',$WorkItemId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{commentId}',$CommentId -Replace '{reactionType}',$ReactionType

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemCommentVersion {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Version
     
 
.PARAMETER WorkItemId
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER CommentId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemCommentVersion -Version $version -WorkItemId $workitemid -Project $project -Organization $organization -CommentId $commentid -ApiVersion $apiversion
 
    <insert description here>
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemCommentVersion -WorkItemId $workitemid -Project $project -Organization $organization -CommentId $commentid -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments Versions_Get')]
        [string]
        $Version,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments Versions_Get')]
        [string]
        $WorkItemId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments Versions_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments Versions_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments Versions_Get')]
        [string]
        $CommentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Comments Versions_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/comments/{commentId}/versions' -Replace '{workItemId}',$WorkItemId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{commentId}',$CommentId
        if ($Version) { $__path += "/$Version" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemicon {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of all work item icons.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Color
    The 6-digit hex color for the icon
 
.PARAMETER Icon
    The name of the icon
 
.PARAMETER V
    The version of the icon (used only for cache invalidation)
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemicon -Organization $organization -Icon $icon -ApiVersion $apiversion
 
    Get a work item icon given the friendly name and icon color.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemicon -Organization $organization -ApiVersion $apiversion
 
    Get a list of all work item icons.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Icons_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Icons_Get')]
        [string]
        $Color,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Icons_Get')]
        [string]
        $Icon,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Icons_Get')]
        [int32]
        $V,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Icons_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Color' = 'color'
            'V' = 'v'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Color','V','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/wit/workitemicons' -Replace '{organization}',$Organization
        if ($Icon) { $__path += "/$Icon" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemrelationtype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the work item relation types.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Relation
    The relation name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemrelationtype -Organization $organization -Relation $relation -ApiVersion $apiversion
 
    Gets the work item relation type definition.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemrelationtype -Organization $organization -ApiVersion $apiversion
 
    Gets the work item relation types.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Relation Types_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Relation Types_Get')]
        [string]
        $Relation,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Relation Types_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/wit/workitemrelationtypes' -Replace '{organization}',$Organization
        if ($Relation) { $__path += "/$Relation" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemRevision {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns the list of fully hydrated work item revisions, paged.
 
.PARAMETER RevisionNumber
     
 
.PARAMETER Skip
     
 
.PARAMETER Expand
     
 
.PARAMETER Id
     
 
.PARAMETER Top
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemRevision -RevisionNumber $revisionnumber -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Returns a fully hydrated work item for the requested revision
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemRevision -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Returns the list of fully hydrated work item revisions, paged.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Revisions_Get')]
        [string]
        $RevisionNumber,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Revisions_Get')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Revisions_Get')]
        [string]
        $Id,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Revisions_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Revisions_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Revisions_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Skip' = '$skip'
            'Expand' = '$expand'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','Expand','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{id}/revisions' -Replace '{id}',$Id -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($RevisionNumber) { $__path += "/$RevisionNumber" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemtransition {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns the next state on the given work item IDs.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Ids
    list of work item ids
 
.PARAMETER Action
    possible actions. Currently only supports checkin
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemtransition -Organization $organization -ApiVersion $apiversion -Ids $ids
 
    Returns the next state on the given work item IDs.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Ids,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Action
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'Ids' = 'ids'
            'Action' = 'action'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','Ids','Action') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/wit/workitemtransitions' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemtype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns the list of work item types
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Type
    Work item type name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemtype -Organization $organization -Type $type -Project $project -ApiVersion $apiversion
 
    Returns a work item type definition.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemtype -Organization $organization -Project $project -ApiVersion $apiversion
 
    Returns the list of work item types
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types_Get')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($Type) { $__path += "/$Type" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemtypecategorie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get all work item type categories.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Category
    The category name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemtypecategorie -Organization $organization -Category $category -Project $project -ApiVersion $apiversion
 
    Get specific work item type category by name.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemtypecategorie -Organization $organization -Project $project -ApiVersion $apiversion
 
    Get all work item type categories.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Type Categories_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Type Categories_Get')]
        [string]
        $Category,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Type Categories_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Type Categories_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypecategories' -Replace '{organization}',$Organization -Replace '{project}',$Project
        if ($Category) { $__path += "/$Category" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemtypeField {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a list of fields for a work item type with detailed references.
 
.PARAMETER Type
    Work item type.
 
.PARAMETER Expand
    Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.
 
.PARAMETER Field
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemtypeField -Type $type -Field $field -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a field for a work item type with detailed references.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemtypeField -Type $type -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a list of fields for a work item type with detailed references.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')]
        [string]
        $Type,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')]
        [string]
        $Field,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/fields' -Replace '{type}',$Type -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($Field) { $__path += "/$Field" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemtypeState {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns the state names and colors for a work item type.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Type
    The state name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemtypeState -Organization $organization -Type $type -Project $project -ApiVersion $apiversion
 
    Returns the state names and colors for a work item type.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Type,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/states' -Replace '{organization}',$Organization -Replace '{type}',$Type -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWitWorkitemUpdate {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a the deltas between work item revisions
 
.PARAMETER Skip
     
 
.PARAMETER Id
     
 
.PARAMETER UpdateNumber
     
 
.PARAMETER Top
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemUpdate -Id $id -UpdateNumber $updatenumber -Project $project -Organization $organization -ApiVersion $apiversion
 
    Returns a single update for a work item
 
.EXAMPLE
    PS C:\> Get-AdsWitWorkitemUpdate -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Returns a the deltas between work item revisions
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Skip,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Updates_Get')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Updates_Get')]
        [string]
        $UpdateNumber,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Updates_Get')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Updates_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Updates_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Skip' = '$skip'
            'Top' = '$top'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Skip','Top','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{id}/updates' -Replace '{id}',$Id -Replace '{project}',$Project -Replace '{organization}',$Organization
        if ($UpdateNumber) { $__path += "/$UpdateNumber" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkAccountmyworkrecentactivity {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets recent work item activities
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Get-AdsWorkAccountmyworkrecentactivity -ApiVersion $apiversion -Organization $organization
 
    Gets recent work item activities
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/accountmyworkrecentactivity' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcessdefinitionBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of all behaviors in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER BehaviorId
    The ID of the behavior
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionBehavior -Organization $organization -ProcessId $processid -BehaviorId $behaviorid -ApiVersion $apiversion
 
    Returns a single behavior in the process.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionBehavior -Organization $organization -ProcessId $processid -ApiVersion $apiversion
 
    Returns a list of all behaviors in the process.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $BehaviorId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/behaviors' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId
        if ($BehaviorId) { $__path += "/$BehaviorId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcessdefinitionList {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns meta data of the picklist.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ListId
    The ID of the list
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionList -Organization $organization -ListId $listid -ApiVersion $apiversion
 
    Returns a picklist.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionList -Organization $organization -ApiVersion $apiversion
 
    Returns meta data of the picklist.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $ListId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/lists' -Replace '{organization}',$Organization
        if ($ListId) { $__path += "/$ListId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcessdefinitionWorkitemtype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of all work item types in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER Expand
     
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionWorkitemtype -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Returns a work item type of the process.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionWorkitemtype -Organization $organization -ProcessId $processid -ApiVersion $apiversion
 
    Returns a list of all work item types in the process.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get Work Item Type')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get Work Item Type')]
        [string]
        $ProcessId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get Work Item Type')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get Work Item Type')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get Work Item Type')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workitemtypes' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId
        if ($WitRefName) { $__path += "/$WitRefName" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcessdefinitionWorkitemtypeBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of all behaviors for the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WitRefNameForBehaviors
    Work item type reference name for the behavior
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER BehaviorRefName
    The reference name of the behavior
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionWorkitemtypeBehavior -Organization $organization -WitRefNameForBehaviors $witrefnameforbehaviors -ProcessId $processid -BehaviorRefName $behaviorrefname -ApiVersion $apiversion
 
    Returns a behavior for the work item type of the process.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionWorkitemtypeBehavior -Organization $organization -WitRefNameForBehaviors $witrefnameforbehaviors -ProcessId $processid -ApiVersion $apiversion
 
    Returns a list of all behaviors for the work item type of the process.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get Behavior For Work Item Type')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get Behavior For Work Item Type')]
        [string]
        $WitRefNameForBehaviors,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get Behavior For Work Item Type')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get Behavior For Work Item Type')]
        [string]
        $BehaviorRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get Behavior For Work Item Type')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workitemtypes/{witRefNameForBehaviors}/behaviors' -Replace '{organization}',$Organization -Replace '{witRefNameForBehaviors}',$WitRefNameForBehaviors -Replace '{processId}',$ProcessId
        if ($BehaviorRefName) { $__path += "/$BehaviorRefName" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcessdefinitionWorkitemtypeField {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of all fields in the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WitRefNameForFields
    Work item type reference name for fields
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER FieldRefName
    The reference name of the field
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionWorkitemtypeField -Organization $organization -WitRefNameForFields $witrefnameforfields -ProcessId $processid -FieldRefName $fieldrefname -ApiVersion $apiversion
 
    Returns a single field in the work item type of the process.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionWorkitemtypeField -Organization $organization -WitRefNameForFields $witrefnameforfields -ProcessId $processid -ApiVersion $apiversion
 
    Returns a list of all fields in the work item type of the process.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $WitRefNameForFields,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $FieldRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields' -Replace '{organization}',$Organization -Replace '{witRefNameForFields}',$WitRefNameForFields -Replace '{processId}',$ProcessId
        if ($FieldRefName) { $__path += "/$FieldRefName" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcessdefinitionWorkitemtypeLayout {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the form layout
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionWorkitemtypeLayout -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Gets the form layout
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcessdefinitionWorkitemtypeState {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of all state definitions in the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER StateId
    The ID of the state
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionWorkitemtypeState -Organization $organization -StateId $stateid -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Returns a state definition in the work item type of the process.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessdefinitionWorkitemtypeState -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Returns a list of all state definitions in the work item type of the process.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $StateId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/states' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName
        if ($StateId) { $__path += "/$StateId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcesse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get list of all processes including system and inherited.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Expand
     
 
.PARAMETER ProcessTypeId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesse -Organization $organization -ProcessTypeId $processtypeid -ApiVersion $apiversion
 
    Get a single process of a specified ID.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesse -Organization $organization -ApiVersion $apiversion
 
    Get list of all processes including system and inherited.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Processes_Get')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Processes_Get')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Processes_Get')]
        [string]
        $ProcessTypeId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Processes_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes' -Replace '{organization}',$Organization
        if ($ProcessTypeId) { $__path += "/$ProcessTypeId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcesseBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of all behaviors in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER Expand
     
 
.PARAMETER BehaviorRefName
    The reference name of the behavior
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseBehavior -Organization $organization -ProcessId $processid -BehaviorRefName $behaviorrefname -ApiVersion $apiversion
 
    Returns a behavior of the process.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseBehavior -Organization $organization -ProcessId $processid -ApiVersion $apiversion
 
    Returns a list of all behaviors in the process.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Behaviors_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Behaviors_Get')]
        [string]
        $ProcessId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Behaviors_Get')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Behaviors_Get')]
        [string]
        $BehaviorRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Behaviors_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/behaviors' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId
        if ($BehaviorRefName) { $__path += "/$BehaviorRefName" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcesseList {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns meta data of the picklist.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ListId
    The ID of the list
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseList -Organization $organization -ListId $listid -ApiVersion $apiversion
 
    Returns a picklist.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseList -Organization $organization -ApiVersion $apiversion
 
    Returns meta data of the picklist.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Lists_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Lists_Get')]
        [string]
        $ListId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Lists_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/lists' -Replace '{organization}',$Organization
        if ($ListId) { $__path += "/$ListId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcesseWorkitemtype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of all work item types in a process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER Expand
    Flag to determine what properties of work item type to return
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtype -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Returns a single work item type in a process.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtype -Organization $organization -ProcessId $processid -ApiVersion $apiversion
 
    Returns a list of all work item types in a process.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types_Get')]
        [string]
        $ProcessId,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types_Get')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types_Get')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workitemtypes' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId
        if ($WitRefName) { $__path += "/$WitRefName" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcesseWorkitemtypeField {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of all fields in a work item type.
 
.PARAMETER FieldRefName
    The reference name of the field.
 
.PARAMETER Expand
     
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtypeField -FieldRefName $fieldrefname -ProcessId $processid -Organization $organization -WitRefName $witrefname -ApiVersion $apiversion
 
    Returns a field in a work item type.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtypeField -ProcessId $processid -Organization $organization -WitRefName $witrefname -ApiVersion $apiversion
 
    Returns a list of all fields in a work item type.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Fields_Get')]
        [string]
        $FieldRefName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Fields_Get')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Fields_Get')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Fields_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Fields_Get')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Fields_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields' -Replace '{processId}',$ProcessId -Replace '{organization}',$Organization -Replace '{witRefName}',$WitRefName
        if ($FieldRefName) { $__path += "/$FieldRefName" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcesseWorkitemtypeLayout {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the form layout.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtypeLayout -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Gets the form layout.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcesseWorkitemtypeLayoutSystemcontrol {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets edited system controls for a work item type in a process. To get all system controls (base + edited) use layout API(s)
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtypeLayoutSystemcontrol -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Gets edited system controls for a work item type in a process. To get all system controls (base + edited) use layout API(s)
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/systemcontrols' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcesseWorkitemtypeRule {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of all rules in the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER RuleId
    The ID of the rule
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtypeRule -Organization $organization -ProcessId $processid -RuleId $ruleid -WitRefName $witrefname -ApiVersion $apiversion
 
    Returns a single rule in the work item type of the process.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtypeRule -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Returns a list of all rules in the work item type of the process.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Rules_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Rules_Get')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Rules_Get')]
        [string]
        $RuleId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Rules_Get')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Rules_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName
        if ($RuleId) { $__path += "/$RuleId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcesseWorkitemtypesbehaviorBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of all behaviors for the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WitRefNameForBehaviors
    Work item type reference name for the behavior
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER BehaviorRefName
    The reference name of the behavior
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtypesbehaviorBehavior -Organization $organization -WitRefNameForBehaviors $witrefnameforbehaviors -ProcessId $processid -BehaviorRefName $behaviorrefname -ApiVersion $apiversion
 
    Returns a behavior for the work item type of the process.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtypesbehaviorBehavior -Organization $organization -WitRefNameForBehaviors $witrefnameforbehaviors -ProcessId $processid -ApiVersion $apiversion
 
    Returns a list of all behaviors for the work item type of the process.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Behaviors_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Behaviors_Get')]
        [string]
        $WitRefNameForBehaviors,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Behaviors_Get')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Behaviors_Get')]
        [string]
        $BehaviorRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Behaviors_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workitemtypesbehaviors/{witRefNameForBehaviors}/behaviors' -Replace '{organization}',$Organization -Replace '{witRefNameForBehaviors}',$WitRefNameForBehaviors -Replace '{processId}',$ProcessId
        if ($BehaviorRefName) { $__path += "/$BehaviorRefName" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcesseWorkitemtypeState {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of all state definitions in a work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER StateId
    The ID of the state
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtypeState -Organization $organization -StateId $stateid -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Returns a single state definition in a work item type of the process.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcesseWorkitemtypeState -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Returns a list of all state definitions in a work item type of the process.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'States_Get')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'States_Get')]
        [string]
        $StateId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'States_Get')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'States_Get')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'States_Get')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/states' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName
        if ($StateId) { $__path += "/$StateId" }

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Invoke-AdsWitWiql {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the results of the query given the query ID.
 
.PARAMETER Id
    The query ID.
 
.PARAMETER Top
    The max number of results to return.
 
.PARAMETER TimePrecision
    Whether or not to use time precision.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Invoke-AdsWitWiql -Id $id -Project $project -Organization $organization -ApiVersion $apiversion -Team $team
 
    Gets the results of the query given the query ID.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $TimePrecision,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'Top' = '$top'
            'TimePrecision' = 'timePrecision'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Top','TimePrecision','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/wiql/{id}' -Replace '{id}',$Id -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{team}',$Team

        Invoke-RestRequest -Path $__path -Method head -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWitAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Uploads an attachment chunk.
 
Before performing [**Upload a Chunk**](#upload_a_chunk), make sure to have an attachment id returned in **Start a Chunked Upload** example on **Create** section. Specify the byte range of the chunk using Content-Length. For example: "Content - Length": "bytes 0 - 39999 / 50000" for the first 40000 bytes of a 50000 byte file.
 
.PARAMETER FileName
     
 
.PARAMETER Id
    The id of the attachment
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ContentRangeHeader
    starting and ending byte positions for chunked file upload, format is "Content-Range": "bytes 0-10000/50000"
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWitAttachment -ContentRangeHeader $contentrangeheader
 
    <insert description here>
 
.EXAMPLE
    PS C:\> New-AdsWitAttachment -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Uploads an attachment chunk.
 
Before performing [**Upload a Chunk**](#upload_a_chunk), make sure to have an attachment id returned in **Start a Chunked Upload** example on **Create** section. Specify the byte range of the chunk using Content-Length. For example: "Content - Length": "bytes 0 - 39999 / 50000" for the first 40000 bytes of a 50000 byte file.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FileName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Recyclebin_Get')]
        [string]
        $ContentRangeHeader,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'FileName' = 'fileName'
            'ContentRangeHeader' = 'contentRangeHeader'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('FileName','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContentRangeHeader') -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/attachments/{id}' -Replace '{id}',$Id -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWitTemplate {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Replace template contents
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER TemplateId
    Template id
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWitTemplate -Organization $organization -Team $team -TemplateId $templateid -Project $project -ApiVersion $apiversion
 
    Replace template contents
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TemplateId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates/{templateId}' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{templateId}',$TemplateId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWitWorkitemCommentReaction {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds a new reaction to a comment.
 
.PARAMETER WorkItemId
    WorkItem ID
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER CommentId
    Comment ID
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ReactionType
    Type of the reaction
 
.EXAMPLE
    PS C:\> New-AdsWitWorkitemCommentReaction -WorkItemId $workitemid -Project $project -Organization $organization -CommentId $commentid -ApiVersion $apiversion -ReactionType $reactiontype
 
    Adds a new reaction to a comment.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WorkItemId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReactionType
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/comments/{commentId}/reactions/{reactionType}' -Replace '{workItemId}',$WorkItemId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{commentId}',$CommentId -Replace '{reactionType}',$ReactionType

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkProcessdefinitionBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Replaces a behavior in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER BehaviorId
    The ID of the behavior
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkProcessdefinitionBehavior -Organization $organization -ProcessId $processid -BehaviorId $behaviorid -ApiVersion $apiversion
 
    Replaces a behavior in the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BehaviorId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/behaviors/{behaviorId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{behaviorId}',$BehaviorId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkProcessdefinitionList {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates a list.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.PARAMETER ListId
    The ID of the list
 
.EXAMPLE
    PS C:\> New-AdsWorkProcessdefinitionList -Organization $organization -ApiVersion $apiversion -ListId $listid
 
    Updates a list.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ListId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/lists/{listId}' -Replace '{organization}',$Organization -Replace '{listId}',$ListId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkProcessdefinitionWorkitemtypeLayoutGroupControl {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Moves a control to a new group
 
.PARAMETER RemoveFromGroupId
    The group to remove the control from
 
.PARAMETER GroupId
    The ID of the group to move the control to
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ControlId
    The id of the control
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkProcessdefinitionWorkitemtypeLayoutGroupControl -GroupId $groupid -ProcessId $processid -Organization $organization -ControlId $controlid -WitRefName $witrefname -ApiVersion $apiversion
 
    Moves a control to a new group
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RemoveFromGroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ControlId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'RemoveFromGroupId' = 'removeFromGroupId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('RemoveFromGroupId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls/{controlId}' -Replace '{groupId}',$GroupId -Replace '{processId}',$ProcessId -Replace '{organization}',$Organization -Replace '{controlId}',$ControlId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkProcessdefinitionWorkitemtypeLayoutPageSectionGroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Moves a group to a different section
 
.PARAMETER GroupId
    The ID of the group
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER SectionId
    The ID of the section the group is in
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PageId
    The ID of the page the group is in
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER RemoveFromSectionId
    ID of the section to remove the group from
 
.EXAMPLE
    PS C:\> New-AdsWorkProcessdefinitionWorkitemtypeLayoutPageSectionGroup -GroupId $groupid -ProcessId $processid -SectionId $sectionid -ApiVersion $apiversion -Organization $organization -PageId $pageid -WitRefName $witrefname -RemoveFromSectionId $removefromsectionid
 
    Moves a group to a different section
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SectionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RemoveFromSectionId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'RemoveFromSectionId' = 'removeFromSectionId'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','RemoveFromSectionId') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/groups/{groupId}' -Replace '{groupId}',$GroupId -Replace '{processId}',$ProcessId -Replace '{sectionId}',$SectionId -Replace '{organization}',$Organization -Replace '{pageId}',$PageId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkProcessdefinitionWorkitemtypeState {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Hides a state definition in the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER StateId
    The ID of the state
 
.EXAMPLE
    PS C:\> New-AdsWorkProcessdefinitionWorkitemtypeState -Organization $organization -ApiVersion $apiversion -ProcessId $processid -WitRefName $witrefname -StateId $stateid
 
    Hides a state definition in the work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StateId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName -Replace '{stateId}',$StateId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkProcesseBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Replaces a behavior in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER BehaviorRefName
    The reference name of the behavior
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkProcesseBehavior -Organization $organization -ProcessId $processid -BehaviorRefName $behaviorrefname -ApiVersion $apiversion
 
    Replaces a behavior in the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BehaviorRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/behaviors/{behaviorRefName}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{behaviorRefName}',$BehaviorRefName

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkProcesseList {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates a list.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ListId
    The ID of the list
 
.EXAMPLE
    PS C:\> New-AdsWorkProcesseList -Organization $organization -ApiVersion $apiversion -ListId $listid
 
    Updates a list.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ListId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/lists/{listId}' -Replace '{organization}',$Organization -Replace '{listId}',$ListId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkProcesseWorkitemtypeLayoutGroupControl {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Moves a control to a specified group.
 
.PARAMETER RemoveFromGroupId
    The group ID to remove the control from.
 
.PARAMETER GroupId
    The ID of the group to move the control to.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ControlId
    The ID of the control.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkProcesseWorkitemtypeLayoutGroupControl -GroupId $groupid -ProcessId $processid -Organization $organization -ControlId $controlid -WitRefName $witrefname -ApiVersion $apiversion
 
    Moves a control to a specified group.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RemoveFromGroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ControlId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'RemoveFromGroupId' = 'removeFromGroupId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('RemoveFromGroupId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls/{controlId}' -Replace '{groupId}',$GroupId -Replace '{processId}',$ProcessId -Replace '{organization}',$Organization -Replace '{controlId}',$ControlId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkProcesseWorkitemtypeLayoutPageSectionGroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Moves a group to a different section.
 
.PARAMETER GroupId
    The ID of the group.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER SectionId
    The ID of the section the group is in.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PageId
    The ID of the page the group is in.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER RemoveFromSectionId
    ID of the section to remove the group from.
 
.EXAMPLE
    PS C:\> New-AdsWorkProcesseWorkitemtypeLayoutPageSectionGroup -GroupId $groupid -ProcessId $processid -SectionId $sectionid -ApiVersion $apiversion -Organization $organization -PageId $pageid -WitRefName $witrefname -RemoveFromSectionId $removefromsectionid
 
    Moves a group to a different section.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SectionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RemoveFromSectionId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'RemoveFromSectionId' = 'removeFromSectionId'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','RemoveFromSectionId') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/groups/{groupId}' -Replace '{groupId}',$GroupId -Replace '{processId}',$ProcessId -Replace '{sectionId}',$SectionId -Replace '{organization}',$Organization -Replace '{pageId}',$PageId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkProcesseWorkitemtypeRule {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates a rule in the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER RuleId
    The ID of the rule
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> New-AdsWorkProcesseWorkitemtypeRule -Organization $organization -ProcessId $processid -RuleId $ruleid -WitRefName $witrefname -ApiVersion $apiversion
 
    Updates a rule in the work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RuleId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{ruleId}',$RuleId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function New-AdsWorkProcesseWorkitemtypeState {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Hides a state definition in the work item type of the process.Only states with customizationType:System can be hidden.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER StateId
    The ID of the state
 
.EXAMPLE
    PS C:\> New-AdsWorkProcesseWorkitemtypeState -Organization $organization -ApiVersion $apiversion -ProcessId $processid -WitRefName $witrefname -StateId $stateid
 
    Hides a state definition in the work item type of the process.Only states with customizationType:System can be hidden.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StateId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName -Replace '{stateId}',$StateId

        Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWitClassificationnode {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete an existing classification node.
 
.PARAMETER Path
    Path of the classification node.
 
.PARAMETER StructureGroup
    Structure group of the classification node, area or iteration.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ReclassifyId
    Id of the target classification node for reclassification.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWitClassificationnode -Path $path -StructureGroup $structuregroup -Organization $organization -Project $project -ApiVersion $apiversion
 
    Delete an existing classification node.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StructureGroup,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $ReclassifyId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ReclassifyId' = '$reclassifyId'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ReclassifyId','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/classificationnodes/{structureGroup}/{path}' -Replace '{path}',$Path -Replace '{structureGroup}',$StructureGroup -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWitField {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes the field. To undelete a filed, see "Update Field" API.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FieldNameOrRefName
    Field simple name or reference name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWitField -Organization $organization -FieldNameOrRefName $fieldnameorrefname -Project $project -ApiVersion $apiversion
 
    Deletes the field. To undelete a filed, see "Update Field" API.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FieldNameOrRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/fields/{fieldNameOrRefName}' -Replace '{organization}',$Organization -Replace '{fieldNameOrRefName}',$FieldNameOrRefName -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWitQuerie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Query
    ID or path of the query or folder to delete.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWitQuerie -Organization $organization -Query $query -Project $project -ApiVersion $apiversion
 
    Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Query,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/queries/{query}' -Replace '{organization}',$Organization -Replace '{query}',$Query -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWitRecyclebin {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Destroys the specified work item permanently from the Recycle Bin. This action can not be undone.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    ID of the work item to be destroyed permanently
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWitRecyclebin -Organization $organization -Id $id -Project $project -ApiVersion $apiversion
 
    Destroys the specified work item permanently from the Recycle Bin. This action can not be undone.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/recyclebin/{id}' -Replace '{organization}',$Organization -Replace '{id}',$Id -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWitTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TagIdOrName
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWitTag -Organization $organization -TagIdOrName $tagidorname -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TagIdOrName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/tags/{tagIdOrName}' -Replace '{organization}',$Organization -Replace '{tagIdOrName}',$TagIdOrName -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWitTemplate {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes the template with given id
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER TemplateId
    Template id
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWitTemplate -Organization $organization -Team $team -TemplateId $templateid -Project $project -ApiVersion $apiversion
 
    Deletes the template with given id
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TemplateId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates/{templateId}' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{templateId}',$TemplateId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWitWorkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    ID of the work item to be deleted
 
.PARAMETER Destroy
    Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWitWorkitem -Organization $organization -Id $id -Project $project -ApiVersion $apiversion
 
    Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $Destroy,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Destroy' = 'destroy'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Destroy','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}' -Replace '{organization}',$Organization -Replace '{id}',$Id -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWitWorkitemComment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Delete a comment on a work item.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WorkItemId
    Id of a work item.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER CommentId
     
 
.EXAMPLE
    PS C:\> Remove-AdsWitWorkitemComment -Organization $organization -WorkItemId $workitemid -ApiVersion $apiversion -Project $project -CommentId $commentid
 
    Delete a comment on a work item.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WorkItemId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommentId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/comments/{commentId}' -Replace '{organization}',$Organization -Replace '{workItemId}',$WorkItemId -Replace '{project}',$Project -Replace '{commentId}',$CommentId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWitWorkitemCommentReaction {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes an existing reaction on a comment.
 
.PARAMETER WorkItemId
    WorkItem ID
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER CommentId
    Comment ID
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ReactionType
    Type of the reaction
 
.EXAMPLE
    PS C:\> Remove-AdsWitWorkitemCommentReaction -WorkItemId $workitemid -Project $project -Organization $organization -CommentId $commentid -ApiVersion $apiversion -ReactionType $reactiontype
 
    Deletes an existing reaction on a comment.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WorkItemId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $CommentId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ReactionType
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/comments/{commentId}/reactions/{reactionType}' -Replace '{workItemId}',$WorkItemId -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{commentId}',$CommentId -Replace '{reactionType}',$ReactionType

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcessdefinitionBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a behavior in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER BehaviorId
    The ID of the behavior
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcessdefinitionBehavior -Organization $organization -ProcessId $processid -BehaviorId $behaviorid -ApiVersion $apiversion
 
    Removes a behavior in the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BehaviorId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/behaviors/{behaviorId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{behaviorId}',$BehaviorId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcessdefinitionList {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a picklist.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.PARAMETER ListId
    The ID of the list
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcessdefinitionList -Organization $organization -ApiVersion $apiversion -ListId $listid
 
    Removes a picklist.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ListId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/lists/{listId}' -Replace '{organization}',$Organization -Replace '{listId}',$ListId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcessdefinitionWorkitemtype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a work itewm type in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcessdefinitionWorkitemtype -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Removes a work itewm type in the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workitemtypes/{witRefName}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcessdefinitionWorkitemtypeBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a behavior for the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WitRefNameForBehaviors
    Work item type reference name for the behavior
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER BehaviorRefName
    The reference name of the behavior
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcessdefinitionWorkitemtypeBehavior -Organization $organization -WitRefNameForBehaviors $witrefnameforbehaviors -ProcessId $processid -BehaviorRefName $behaviorrefname -ApiVersion $apiversion
 
    Removes a behavior for the work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefNameForBehaviors,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BehaviorRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workitemtypes/{witRefNameForBehaviors}/behaviors/{behaviorRefName}' -Replace '{organization}',$Organization -Replace '{witRefNameForBehaviors}',$WitRefNameForBehaviors -Replace '{processId}',$ProcessId -Replace '{behaviorRefName}',$BehaviorRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcessdefinitionWorkitemtypeField {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a field in the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WitRefNameForFields
    Work item type reference name for fields
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER FieldRefName
    The reference name of the field
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcessdefinitionWorkitemtypeField -Organization $organization -WitRefNameForFields $witrefnameforfields -ProcessId $processid -FieldRefName $fieldrefname -ApiVersion $apiversion
 
    Removes a field in the work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefNameForFields,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FieldRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields/{fieldRefName}' -Replace '{organization}',$Organization -Replace '{witRefNameForFields}',$WitRefNameForFields -Replace '{processId}',$ProcessId -Replace '{fieldRefName}',$FieldRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcessdefinitionWorkitemtypeLayoutGroupControl {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a control from the work item form
 
.PARAMETER GroupId
    The ID of the group
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ControlId
    The ID of the control to remove
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcessdefinitionWorkitemtypeLayoutGroupControl -GroupId $groupid -ProcessId $processid -Organization $organization -ControlId $controlid -WitRefName $witrefname -ApiVersion $apiversion
 
    Removes a control from the work item form
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ControlId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls/{controlId}' -Replace '{groupId}',$GroupId -Replace '{processId}',$ProcessId -Replace '{organization}',$Organization -Replace '{controlId}',$ControlId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcessdefinitionWorkitemtypeLayoutPage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a page from the work item form
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER PageId
    The ID of the page
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcessdefinitionWorkitemtypeLayoutPage -Organization $organization -ProcessId $processid -PageId $pageid -WitRefName $witrefname -ApiVersion $apiversion
 
    Removes a page from the work item form
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{pageId}',$PageId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcessdefinitionWorkitemtypeLayoutPageSectionGroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a group from the work item form
 
.PARAMETER GroupId
    The ID of the group
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER SectionId
    The ID of the section to the group is in
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PageId
    The ID of the page the group is in
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcessdefinitionWorkitemtypeLayoutPageSectionGroup -GroupId $groupid -ProcessId $processid -SectionId $sectionid -Organization $organization -PageId $pageid -WitRefName $witrefname -ApiVersion $apiversion
 
    Removes a group from the work item form
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SectionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/groups/{groupId}' -Replace '{groupId}',$GroupId -Replace '{processId}',$ProcessId -Replace '{sectionId}',$SectionId -Replace '{organization}',$Organization -Replace '{pageId}',$PageId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcessdefinitionWorkitemtypeState {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a state definition in the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.PARAMETER ProcessId
    ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER StateId
    ID of the state
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcessdefinitionWorkitemtypeState -Organization $organization -ApiVersion $apiversion -ProcessId $processid -WitRefName $witrefname -StateId $stateid
 
    Removes a state definition in the work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StateId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/states/{stateId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName -Replace '{stateId}',$StateId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a process of a specific ID.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessTypeId
     
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesse -Organization $organization -ProcessTypeId $processtypeid -ApiVersion $apiversion
 
    Removes a process of a specific ID.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessTypeId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processTypeId}' -Replace '{organization}',$Organization -Replace '{processTypeId}',$ProcessTypeId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesseBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a behavior in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER BehaviorRefName
    The reference name of the behavior
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesseBehavior -Organization $organization -ProcessId $processid -BehaviorRefName $behaviorrefname -ApiVersion $apiversion
 
    Removes a behavior in the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BehaviorRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/behaviors/{behaviorRefName}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{behaviorRefName}',$BehaviorRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesseList {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a picklist.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ListId
    The ID of the list
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesseList -Organization $organization -ApiVersion $apiversion -ListId $listid
 
    Removes a picklist.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ListId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/lists/{listId}' -Replace '{organization}',$Organization -Replace '{listId}',$ListId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesseWorkitemtype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a work itewm type in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesseWorkitemtype -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Removes a work itewm type in the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workitemtypes/{witRefName}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesseWorkitemtypeField {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a field from a work item type. Does not permanently delete the field.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER FieldRefName
    The reference name of the field.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesseWorkitemtypeField -Organization $organization -ProcessId $processid -FieldRefName $fieldrefname -WitRefName $witrefname -ApiVersion $apiversion
 
    Removes a field from a work item type. Does not permanently delete the field.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FieldRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields/{fieldRefName}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{fieldRefName}',$FieldRefName -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesseWorkitemtypeLayoutGroupControl {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a control from the work item form.
 
.PARAMETER GroupId
    The ID of the group.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ControlId
    The ID of the control to remove.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesseWorkitemtypeLayoutGroupControl -GroupId $groupid -ProcessId $processid -Organization $organization -ControlId $controlid -WitRefName $witrefname -ApiVersion $apiversion
 
    Removes a control from the work item form.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ControlId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls/{controlId}' -Replace '{groupId}',$GroupId -Replace '{processId}',$ProcessId -Replace '{organization}',$Organization -Replace '{controlId}',$ControlId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesseWorkitemtypeLayoutPage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a page from the work item form
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER PageId
    The ID of the page
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesseWorkitemtypeLayoutPage -Organization $organization -ProcessId $processid -PageId $pageid -WitRefName $witrefname -ApiVersion $apiversion
 
    Removes a page from the work item form
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{pageId}',$PageId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesseWorkitemtypeLayoutPageSectionGroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a group from the work item form.
 
.PARAMETER GroupId
    The ID of the group
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER SectionId
    The ID of the section to the group is in
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PageId
    The ID of the page the group is in
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesseWorkitemtypeLayoutPageSectionGroup -GroupId $groupid -ProcessId $processid -SectionId $sectionid -Organization $organization -PageId $pageid -WitRefName $witrefname -ApiVersion $apiversion
 
    Removes a group from the work item form.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SectionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/groups/{groupId}' -Replace '{groupId}',$GroupId -Replace '{processId}',$ProcessId -Replace '{sectionId}',$SectionId -Replace '{organization}',$Organization -Replace '{pageId}',$PageId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesseWorkitemtypeLayoutSystemcontrol {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Deletes a system control modification on the work item form.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ControlId
    The ID of the control.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesseWorkitemtypeLayoutSystemcontrol -Organization $organization -ApiVersion $apiversion -ProcessId $processid -WitRefName $witrefname -ControlId $controlid
 
    Deletes a system control modification on the work item form.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ControlId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/systemcontrols/{controlId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName -Replace '{controlId}',$ControlId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesseWorkitemtypeRule {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a rule from the work item type in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER RuleId
    The ID of the rule
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesseWorkitemtypeRule -Organization $organization -ProcessId $processid -RuleId $ruleid -WitRefName $witrefname -ApiVersion $apiversion
 
    Removes a rule from the work item type in the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $RuleId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules/{ruleId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{ruleId}',$RuleId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesseWorkitemtypesbehaviorBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a behavior for the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WitRefNameForBehaviors
    Work item type reference name for the behavior
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER BehaviorRefName
    The reference name of the behavior
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesseWorkitemtypesbehaviorBehavior -Organization $organization -WitRefNameForBehaviors $witrefnameforbehaviors -ProcessId $processid -BehaviorRefName $behaviorrefname -ApiVersion $apiversion
 
    Removes a behavior for the work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefNameForBehaviors,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $BehaviorRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workitemtypesbehaviors/{witRefNameForBehaviors}/behaviors/{behaviorRefName}' -Replace '{organization}',$Organization -Replace '{witRefNameForBehaviors}',$WitRefNameForBehaviors -Replace '{processId}',$ProcessId -Replace '{behaviorRefName}',$BehaviorRefName

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Remove-AdsWorkProcesseWorkitemtypeState {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Removes a state definition in the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ProcessId
    ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER StateId
    ID of the state
 
.EXAMPLE
    PS C:\> Remove-AdsWorkProcesseWorkitemtypeState -Organization $organization -ApiVersion $apiversion -ProcessId $processid -WitRefName $witrefname -StateId $stateid
 
    Removes a state definition in the work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StateId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName -Replace '{stateId}',$StateId

        Invoke-RestRequest -Path $__path -Method delete -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitArtifacturiquery {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Queries work items linked to a given list of artifact URI.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitArtifacturiquery -Organization $organization -Project $project -ApiVersion $apiversion
 
    Queries work items linked to a given list of artifact URI.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/artifacturiquery' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitAttachment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Uploads an attachment.
 
On accounts with higher attachment upload limits (>130MB), you will need to use chunked upload.
To upload an attachment in multiple chunks, you first need to [**Start a Chunked Upload**](#start_a_chunked_upload) and then follow the example from the **Upload Chunk** section.
 
.PARAMETER AreaPath
    Target project Area Path
 
.PARAMETER FileName
    The name of the file
 
.PARAMETER UploadType
    Attachment upload type: Simple or Chunked
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitAttachment -Project $project -Organization $organization -ApiVersion $apiversion
 
    Uploads an attachment.
 
On accounts with higher attachment upload limits (>130MB), you will need to use chunked upload.
To upload an attachment in multiple chunks, you first need to [**Start a Chunked Upload**](#start_a_chunked_upload) and then follow the example from the **Upload Chunk** section.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $AreaPath,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FileName,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $UploadType,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'AreaPath' = 'areaPath'
            'FileName' = 'fileName'
            'UploadType' = 'uploadType'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('AreaPath','FileName','UploadType','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/attachments' -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitClassificationnode {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update an existing classification node.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Path
    Path of the classification node.
 
.PARAMETER StructureGroup
    Structure group of the classification node, area or iteration.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitClassificationnode -Organization $organization -Path $path -StructureGroup $structuregroup -Project $project -ApiVersion $apiversion
 
    Update an existing classification node.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Path,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StructureGroup,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/classificationnodes/{structureGroup}/{path}' -Replace '{organization}',$Organization -Replace '{path}',$Path -Replace '{structureGroup}',$StructureGroup -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitField {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Update a field.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER FieldNameOrRefName
    Name/reference name of the field to be updated
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitField -Organization $organization -FieldNameOrRefName $fieldnameorrefname -Project $project -ApiVersion $apiversion
 
    Update a field.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $FieldNameOrRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/fields/{fieldNameOrRefName}' -Replace '{organization}',$Organization -Replace '{fieldNameOrRefName}',$FieldNameOrRefName -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitProjectprocessmigration {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Migrates a project to a different process within the same OOB type. For example, you can only migrate a project from agile/custom-agile to agile/custom-agile.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitProjectprocessmigration -Organization $organization -Project $project -ApiVersion $apiversion
 
    Migrates a project to a different process within the same OOB type. For example, you can only migrate a project from agile/custom-agile to agile/custom-agile.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/projectprocessmigration' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitQuerie {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a query, or moves a query.
 
Learn more about Work Item Query Language (WIQL) syntax [here](https://docs.microsoft.com/en-us/vsts/collaborate/wiql-syntax?toc=/vsts/work/track/toc.json&bc=/vsts/work/track/breadcrumb/toc.json&view=vsts).
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ValidateWiqlOnly
    If you only want to validate your WIQL query without actually creating one, set it to true. Default is false.
 
.PARAMETER Query
    The parent id or path under which the query is to be created.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitQuerie -Organization $organization -Query $query -Project $project -ApiVersion $apiversion
 
    Creates a query, or moves a query.
 
Learn more about Work Item Query Language (WIQL) syntax [here](https://docs.microsoft.com/en-us/vsts/collaborate/wiql-syntax?toc=/vsts/work/track/toc.json&bc=/vsts/work/track/breadcrumb/toc.json&view=vsts).
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ValidateWiqlOnly,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Query,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ValidateWiqlOnly' = 'validateWiqlOnly'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ValidateWiqlOnly','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/queries/{query}' -Replace '{organization}',$Organization -Replace '{query}',$Query -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitQueriesbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets a list of queries by ids (Maximum 1000)
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitQueriesbatch -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets a list of queries by ids (Maximum 1000)
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/queriesbatch' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitRecyclebin {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Restores the deleted work item from Recycle Bin.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    ID of the work item to be restored
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitRecyclebin -Organization $organization -Id $id -Project $project -ApiVersion $apiversion
 
    Restores the deleted work item from Recycle Bin.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/recyclebin/{id}' -Replace '{organization}',$Organization -Replace '{id}',$Id -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitReportingWorkitemrevision {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit.
 
.PARAMETER ContinuationToken
    Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.
 
.PARAMETER StartDateTime
    Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter.
 
.PARAMETER Expand
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitReportingWorkitemrevision -Project $project -Organization $organization -ApiVersion $apiversion
 
    Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StartDateTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Expand,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'StartDateTime' = 'startDateTime'
            'Expand' = '$expand'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','StartDateTime','Expand','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/reporting/workitemrevisions' -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitSendmail {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    RESTful method to send mail for selected/queried work items.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitSendmail -Organization $organization -Project $project -ApiVersion $apiversion
 
    RESTful method to send mail for selected/queried work items.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/sendmail' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitTag {
<#
.SYNOPSIS
     
 
.DESCRIPTION
     
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER TagIdOrName
     
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitTag -Organization $organization -TagIdOrName $tagidorname -Project $project -ApiVersion $apiversion
 
    <insert description here>
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $TagIdOrName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/tags/{tagIdOrName}' -Replace '{organization}',$Organization -Replace '{tagIdOrName}',$TagIdOrName -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitTemplate {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a template
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Team
    Team ID or team name
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitTemplate -Organization $organization -Team $team -Project $project -ApiVersion $apiversion
 
    Creates a template
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitWiql {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets the results of the query given its WIQL.
 
.PARAMETER Top
    The max number of results to return.
 
.PARAMETER TimePrecision
    Whether or not to use time precision.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Team
    Team ID or team name
 
.EXAMPLE
    PS C:\> Set-AdsWitWiql -Project $project -Organization $organization -ApiVersion $apiversion -Team $team
 
    Gets the results of the query given its WIQL.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $Top,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $TimePrecision,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Team
    )
    process {
        $__mapping = @{
            'Top' = '$top'
            'TimePrecision' = 'timePrecision'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Top','TimePrecision','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/wiql' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{team}',$Team

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitWorkitem {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates a single work item.
 
.PARAMETER Expand
    The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }.
 
.PARAMETER SuppressNotifications
    Do not fire any notifications for this change
 
.PARAMETER ValidateOnly
    Indicate if you only want to validate the changes without saving the work item
 
.PARAMETER Id
    The id of the work item to update
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER BypassRules
    Do not enforce the work item type rules on this update
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitWorkitem -Id $id -Project $project -Organization $organization -ApiVersion $apiversion
 
    Updates a single work item.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Expand,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $SuppressNotifications,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ValidateOnly,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $BypassRules,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'Expand' = '$expand'
            'SuppressNotifications' = 'suppressNotifications'
            'ValidateOnly' = 'validateOnly'
            'BypassRules' = 'bypassRules'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','SuppressNotifications','ValidateOnly','BypassRules','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}' -Replace '{id}',$Id -Replace '{project}',$Project -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitWorkitemComment {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Add a comment on a work item.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WorkItemId
    Id of a work item.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitWorkitemComment -Organization $organization -WorkItemId $workitemid -Project $project -ApiVersion $apiversion
 
    Add a comment on a work item.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WorkItemId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/comments' -Replace '{organization}',$Organization -Replace '{workItemId}',$WorkItemId -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWitWorkitemsbatch {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Gets work items for a list of work item ids (Maximum 200)
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Project
    Project ID or project name
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWitWorkitemsbatch -Organization $organization -Project $project -ApiVersion $apiversion
 
    Gets work items for a list of work item ids (Maximum 200)
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Project,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workitemsbatch' -Replace '{organization}',$Organization -Replace '{project}',$Project

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcessdefinitionBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a single behavior in the given process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcessdefinitionBehavior -Organization $organization -ProcessId $processid -ApiVersion $apiversion
 
    Creates a single behavior in the given process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/behaviors' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcessdefinitionField {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates a given field in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcessdefinitionField -Organization $organization -ProcessId $processid -ApiVersion $apiversion
 
    Updates a given field in the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/fields' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcessdefinitionList {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a picklist.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcessdefinitionList -ApiVersion $apiversion -Organization $organization
 
    Creates a picklist.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/lists' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcessdefinitionWorkitemtype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates a work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcessdefinitionWorkitemtype -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Updates a work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workitemtypes/{witRefName}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcessdefinitionWorkitemtypeBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates a behavior for the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WitRefNameForBehaviors
    Work item type reference name for the behavior
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcessdefinitionWorkitemtypeBehavior -Organization $organization -WitRefNameForBehaviors $witrefnameforbehaviors -ProcessId $processid -ApiVersion $apiversion
 
    Updates a behavior for the work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefNameForBehaviors,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workitemtypes/{witRefNameForBehaviors}/behaviors' -Replace '{organization}',$Organization -Replace '{witRefNameForBehaviors}',$WitRefNameForBehaviors -Replace '{processId}',$ProcessId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcessdefinitionWorkitemtypeField {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds a field to the work item type in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WitRefNameForFields
    Work item type reference name for the field
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcessdefinitionWorkitemtypeField -Organization $organization -WitRefNameForFields $witrefnameforfields -ProcessId $processid -ApiVersion $apiversion
 
    Adds a field to the work item type in the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefNameForFields,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefNameForFields}/fields' -Replace '{organization}',$Organization -Replace '{witRefNameForFields}',$WitRefNameForFields -Replace '{processId}',$ProcessId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcessdefinitionWorkitemtypeLayoutGroupControl {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates a control on the work item form
 
.PARAMETER GroupId
    The ID of the group
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ControlId
    The ID of the control
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcessdefinitionWorkitemtypeLayoutGroupControl -GroupId $groupid -ProcessId $processid -Organization $organization -ControlId $controlid -WitRefName $witrefname -ApiVersion $apiversion
 
    Updates a control on the work item form
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ControlId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls/{controlId}' -Replace '{groupId}',$GroupId -Replace '{processId}',$ProcessId -Replace '{organization}',$Organization -Replace '{controlId}',$ControlId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcessdefinitionWorkitemtypeLayoutPage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds a page to the work item form
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcessdefinitionWorkitemtypeLayoutPage -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Adds a page to the work item form
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/pages' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcessdefinitionWorkitemtypeLayoutPageSectionGroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds a group to the work item form
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER SectionId
    The ID of the section to add the group to
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PageId
    The ID of the page to add the group to
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcessdefinitionWorkitemtypeLayoutPageSectionGroup -ProcessId $processid -SectionId $sectionid -Organization $organization -PageId $pageid -WitRefName $witrefname -ApiVersion $apiversion
 
    Adds a group to the work item form
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SectionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/groups' -Replace '{processId}',$ProcessId -Replace '{sectionId}',$SectionId -Replace '{organization}',$Organization -Replace '{pageId}',$PageId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcessdefinitionWorkitemtypeState {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a state definition in the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '4.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcessdefinitionWorkitemtypeState -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Creates a state definition in the work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/states' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesse {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a process.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesse -ApiVersion $apiversion -Organization $organization
 
    Creates a process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesseBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a single behavior in the given process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesseBehavior -Organization $organization -ProcessId $processid -ApiVersion $apiversion
 
    Creates a single behavior in the given process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/behaviors' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesseList {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a picklist.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesseList -ApiVersion $apiversion -Organization $organization
 
    Creates a picklist.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/lists' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesseWorkitemtype {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Creates a work item type in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process on which to create work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesseWorkitemtype -Organization $organization -ProcessId $processid -ApiVersion $apiversion
 
    Creates a work item type in the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workitemtypes' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesseWorkitemtypeField {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds a field to a work item type.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesseWorkitemtypeField -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Adds a field to a work item type.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesseWorkitemtypeLayoutGroupControl {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates a control on the work item form.
 
.PARAMETER GroupId
    The ID of the group.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ControlId
    The ID of the control.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesseWorkitemtypeLayoutGroupControl -GroupId $groupid -ProcessId $processid -Organization $organization -ControlId $controlid -WitRefName $witrefname -ApiVersion $apiversion
 
    Updates a control on the work item form.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $GroupId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ControlId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls/{controlId}' -Replace '{groupId}',$GroupId -Replace '{processId}',$ProcessId -Replace '{organization}',$Organization -Replace '{controlId}',$ControlId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesseWorkitemtypeLayoutPage {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds a page to the work item form.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesseWorkitemtypeLayoutPage -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Adds a page to the work item form.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesseWorkitemtypeLayoutPageSectionGroup {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds a group to the work item form.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER SectionId
    The ID of the section to add the group to.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER PageId
    The ID of the page to add the group to.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesseWorkitemtypeLayoutPageSectionGroup -ProcessId $processid -SectionId $sectionid -Organization $organization -PageId $pageid -WitRefName $witrefname -ApiVersion $apiversion
 
    Adds a group to the work item form.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $SectionId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $PageId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/pages/{pageId}/sections/{sectionId}/groups' -Replace '{processId}',$ProcessId -Replace '{sectionId}',$SectionId -Replace '{organization}',$Organization -Replace '{pageId}',$PageId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesseWorkitemtypeLayoutSystemcontrol {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates/adds a system control on the work item form.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ProcessId
    The ID of the process.
 
.PARAMETER WitRefName
    The reference name of the work item type.
 
.PARAMETER ControlId
    The ID of the control.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesseWorkitemtypeLayoutSystemcontrol -Organization $organization -ApiVersion $apiversion -ProcessId $processid -WitRefName $witrefname -ControlId $controlid
 
    Updates/adds a system control on the work item form.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ControlId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/layout/systemcontrols/{controlId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName -Replace '{controlId}',$ControlId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesseWorkitemtypeRule {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Adds a rule to work item type in the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesseWorkitemtypeRule -Organization $organization -ProcessId $processid -WitRefName $witrefname -ApiVersion $apiversion
 
    Adds a rule to work item type in the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/rules' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesseWorkitemtypesbehaviorBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates a behavior for the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER WitRefNameForBehaviors
    Work item type reference name for the behavior
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesseWorkitemtypesbehaviorBehavior -Organization $organization -WitRefNameForBehaviors $witrefnameforbehaviors -ProcessId $processid -ApiVersion $apiversion
 
    Updates a behavior for the work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefNameForBehaviors,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workitemtypesbehaviors/{witRefNameForBehaviors}/behaviors' -Replace '{organization}',$Organization -Replace '{witRefNameForBehaviors}',$WitRefNameForBehaviors -Replace '{processId}',$ProcessId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcesseWorkitemtypeState {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Updates a given state definition in the work item type of the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER ProcessId
    ID of the process
 
.PARAMETER WitRefName
    The reference name of the work item type
 
.PARAMETER StateId
    ID of the state
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcesseWorkitemtypeState -Organization $organization -ApiVersion $apiversion -ProcessId $processid -WitRefName $witrefname -StateId $stateid
 
    Updates a given state definition in the work item type of the process.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $WitRefName,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StateId
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/states/{stateId}' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId -Replace '{witRefName}',$WitRefName -Replace '{stateId}',$StateId

        Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcessadminBehavior {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns a list of behaviors for the process.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ProcessId
    The ID of the process
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessadminBehavior -Organization $organization -ProcessId $processid -ApiVersion $apiversion
 
    Returns a list of behaviors for the process.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ProcessId,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processadmin/{processId}/behaviors' -Replace '{organization}',$Organization -Replace '{processId}',$ProcessId

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcessadminProcesseExport {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Returns requested process template.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    The ID of the process
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessadminProcesseExport -Organization $organization -Id $id -ApiVersion $apiversion
 
    Returns requested process template.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processadmin/processes/export/{id}' -Replace '{organization}',$Organization -Replace '{id}',$Id

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Get-AdsWorkProcessadminProcesseStatu {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Tells whether promote has completed for the specified promote job ID.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER Id
    The ID of the promote job operation
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.EXAMPLE
    PS C:\> Get-AdsWorkProcessadminProcesseStatu -Organization $organization -Id $id -ApiVersion $apiversion
 
    Tells whether promote has completed for the specified promote job ID.
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Id,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processadmin/processes/status/{id}' -Replace '{organization}',$Organization -Replace '{id}',$Id

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}

function Set-AdsWorkProcessadminProcesseImport {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Imports a process from zip file.
 
.PARAMETER Organization
    The name of the Azure DevOps organization.
 
.PARAMETER ApiVersion
    Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.
 
.PARAMETER IgnoreWarnings
    Ignores validation warnings. Default value is false.
 
.PARAMETER ReplaceExistingTemplate
    Replaces the existing template. Default value is true.
 
.EXAMPLE
    PS C:\> Set-AdsWorkProcessadminProcesseImport -Organization $organization -ApiVersion $apiversion
 
    Imports a process from zip file.
 
.LINK
    <unknown>
#>

    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $IgnoreWarnings,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $ReplaceExistingTemplate
    )
    process {
        $__mapping = @{
            'ApiVersion' = 'api-version'
            'IgnoreWarnings' = 'ignoreWarnings'
            'ReplaceExistingTemplate' = 'replaceExistingTemplate'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion','IgnoreWarnings','ReplaceExistingTemplate') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://dev.azure.com/{organization}/_apis/work/processadmin/processes/import' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header
    }
}

<#
This is an example configuration file
 
By default, it is enough to have a single one of them,
however if you have enough configuration settings to justify having multiple copies of it,
feel totally free to split them into multiple files.
#>


<#
# Example Configuration
Set-PSFConfig -Module 'AzureDevOps.Services.OpenApi' -Name 'Example.Setting' -Value 10 -Initialize -Validation 'integer' -Handler { } -Description "Example configuration setting. Your module can then use the setting using 'Get-PSFConfigValue'"
#>


Set-PSFConfig -Module 'AzureDevOps.Services.OpenApi' -Name 'Import.DoDotSource' -Value $false -Initialize -Validation 'bool' -Description "Whether the module files should be dotsourced on import. By default, the files of this module are read as string value and invoked, which is faster but worse on debugging."
Set-PSFConfig -Module 'AzureDevOps.Services.OpenApi' -Name 'Import.IndividualFiles' -Value $false -Initialize -Validation 'bool' -Description "Whether the module files should be imported individually. During the module build, all module code is compiled into few files, which are imported instead by default. Loading the compiled versions is faster, using the individual files is easier for debugging and testing out adjustments."

<#
Stored scriptblocks are available in [PsfValidateScript()] attributes.
This makes it easier to centrally provide the same scriptblock multiple times,
without having to maintain it in separate locations.
 
It also prevents lengthy validation scriptblocks from making your parameter block
hard to read.
 
Set-PSFScriptblock -Name 'AzureDevOps.Services.OpenApi.ScriptBlockName' -Scriptblock {
     
}
#>


<#
# Example:
Register-PSFTeppScriptblock -Name "AzureDevOps.Services.OpenApi.alcohol" -ScriptBlock { 'Beer','Mead','Whiskey','Wine','Vodka','Rum (3y)', 'Rum (5y)', 'Rum (7y)' }
#>


<#
# Example:
Register-PSFTeppArgumentCompleter -Command Get-Alcohol -Parameter Type -Name AzureDevOps.Services.OpenApi.alcohol
#>


New-PSFLicense -Product 'AzureDevOps.Services.OpenApi' -Manufacturer 'Friedrich Weinmann' -ProductVersion $script:ModuleVersion -ProductType Module -Name MIT -Version "1.0.0.0" -Date (Get-Date "2022-04-06") -Text @"
Copyright (c) 2022 Friedrich Weinmann
 
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
 
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"@


# Define the default service to use when executing requests
$PSDefaultParameterValues['Invoke-RestRequest:Service'] = 'AzureDevOps'

Set-RestServiceMetadata -Service 'AzureDevOps' -NotConnectedMessage 'Not connected yet! Use Connect-AdsService to establish a connection first.'
#endregion Load compiled code