functions/generated/Test/Get-AdsTestPlanSuiteTestcase.ps1

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
    }
}