From 11a90d4418ed835d5eb1616245c4c12eed7a2eef Mon Sep 17 00:00:00 2001 From: Freddy JUHEL Date: Wed, 14 Feb 2024 15:45:48 +0100 Subject: [PATCH 1/3] initial commit --- .../config/CredScanSuppressions.json | 9 - .../config/PoliCheckExclusions.xml | 12 - .azure-pipelines/darwin/entitlements.plist | 14 - .azure-pipelines/powershell/BuildTools.ps1 | 584 -------------- .azure-pipelines/powershell/HelpUpdate.ps1 | 51 -- .azure-pipelines/release-cli.yaml | 713 ------------------ .../templates/compliance-checks.yaml | 114 --- .../templates/nuget-packages.yaml | 64 -- .../prepare-unsigned-executable-darwin.yaml | 79 -- .../setup-powershell-environment.yml | 8 - .devcontainer/Dockerfile | 31 - .devcontainer/devcontainer.json | 68 -- .dockerignore | 11 - .editorconfig | 132 ---- .gitattributes | 20 - .github/CODEOWNERS | 1 - .github/dependabot.yml | 17 - .../msgraph-cli-branch-protection.yml | 47 -- .github/policies/resourceManagement.yml | 156 ---- .github/workflows/auto-merge-dependabot.yml | 32 - .github/workflows/codeql.yml | 82 -- .../workflows/create-v1.0-pull-request.yml | 49 -- .github/workflows/docker-publish.yml | 56 -- .github/workflows/projectbot.yml | 87 --- .github/workflows/release-please.yml | 21 - .gitignore | 588 --------------- .gitmodules | 0 .release-please-manifest.json | 3 - .vscode/launch.json | 97 --- .vscode/settings.json | 4 - .vscode/tasks.json | 42 -- ...incipalNameUserPrincipalNameGetResponse.cs | 47 -- ...ipalNameUserPrincipalNameRequestBuilder.cs | 147 ---- ...incipalNameUserPrincipalNameGetResponse.cs | 47 -- ...ipalNameUserPrincipalNameRequestBuilder.cs | 141 ---- ...compatibleAccessPackageIdRequestBuilder.cs | 220 ------ ...hIdentityGovernanceResumeRequestBuilder.cs | 112 --- ...ServiceProvisioningErrorsRequestBuilder.cs | 250 ------ ...rtDateTimeWithEndDateTimeRequestBuilder.cs | 107 --- ...rtDateTimeWithEndDateTimeRequestBuilder.cs | 101 --- ...hIdentityGovernanceResumeRequestBuilder.cs | 106 --- ...rtDateTimeWithEndDateTimeRequestBuilder.cs | 101 --- ...hIdentityGovernanceResumeRequestBuilder.cs | 106 --- ...rtDateTimeWithEndDateTimeRequestBuilder.cs | 101 --- ...hIdentityGovernanceResumeRequestBuilder.cs | 112 --- ...hIdentityGovernanceResumeRequestBuilder.cs | 112 --- ...rtDateTimeWithEndDateTimeRequestBuilder.cs | 107 --- ...rtDateTimeWithEndDateTimeRequestBuilder.cs | 101 --- ...rtDateTimeWithEndDateTimeRequestBuilder.cs | 101 --- ...rtDateTimeWithEndDateTimeRequestBuilder.cs | 101 --- ...ipalNameUserPrincipalNameRequestBuilder.cs | 147 ---- ...ipalNameUserPrincipalNameRequestBuilder.cs | 141 ---- ...incipalNameUserPrincipalNameGetResponse.cs | 47 -- ...ipalNameUserPrincipalNameRequestBuilder.cs | 147 ---- ...incipalNameUserPrincipalNameGetResponse.cs | 47 -- ...ipalNameUserPrincipalNameRequestBuilder.cs | 153 ---- ...incipalNameUserPrincipalNameGetResponse.cs | 47 -- ...ipalNameUserPrincipalNameRequestBuilder.cs | 147 ---- 58 files changed, 6288 deletions(-) delete mode 100644 .azure-pipelines/config/CredScanSuppressions.json delete mode 100644 .azure-pipelines/config/PoliCheckExclusions.xml delete mode 100644 .azure-pipelines/darwin/entitlements.plist delete mode 100644 .azure-pipelines/powershell/BuildTools.ps1 delete mode 100644 .azure-pipelines/powershell/HelpUpdate.ps1 delete mode 100644 .azure-pipelines/release-cli.yaml delete mode 100644 .azure-pipelines/templates/compliance-checks.yaml delete mode 100644 .azure-pipelines/templates/nuget-packages.yaml delete mode 100644 .azure-pipelines/templates/prepare-unsigned-executable-darwin.yaml delete mode 100644 .azure-pipelines/templates/setup-powershell-environment.yml delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/devcontainer.json delete mode 100644 .dockerignore delete mode 100644 .editorconfig delete mode 100644 .gitattributes delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/dependabot.yml delete mode 100644 .github/policies/msgraph-cli-branch-protection.yml delete mode 100644 .github/policies/resourceManagement.yml delete mode 100644 .github/workflows/auto-merge-dependabot.yml delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/create-v1.0-pull-request.yml delete mode 100644 .github/workflows/docker-publish.yml delete mode 100644 .github/workflows/projectbot.yml delete mode 100644 .github/workflows/release-please.yml delete mode 100644 .gitignore delete mode 100644 .gitmodules delete mode 100644 .release-please-manifest.json delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/settings.json delete mode 100644 .vscode/tasks.json delete mode 100644 src/generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs delete mode 100644 src/generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs delete mode 100644 src/generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs delete mode 100644 src/generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/EntitlementManagement/Assignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs delete mode 100644 src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs delete mode 100644 src/generated/Teams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs delete mode 100644 src/generated/Teams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs delete mode 100644 src/generated/Teamwork/DeletedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs delete mode 100644 src/generated/Teamwork/DeletedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs delete mode 100644 src/generated/Users/Item/JoinedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs delete mode 100644 src/generated/Users/Item/JoinedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs delete mode 100644 src/generated/Users/Item/JoinedTeams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs delete mode 100644 src/generated/Users/Item/JoinedTeams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs diff --git a/.azure-pipelines/config/CredScanSuppressions.json b/.azure-pipelines/config/CredScanSuppressions.json deleted file mode 100644 index b2add737d88..00000000000 --- a/.azure-pipelines/config/CredScanSuppressions.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "tool": "Credential Scanner", - "suppressions": [ - { - "file": "SynchronizationSecret.cs", - "_justification": "False positive." - } - ] -} diff --git a/.azure-pipelines/config/PoliCheckExclusions.xml b/.azure-pipelines/config/PoliCheckExclusions.xml deleted file mode 100644 index ba584fb6a51..00000000000 --- a/.azure-pipelines/config/PoliCheckExclusions.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - SRC\GENERATED - diff --git a/.azure-pipelines/darwin/entitlements.plist b/.azure-pipelines/darwin/entitlements.plist deleted file mode 100644 index 82032a55214..00000000000 --- a/.azure-pipelines/darwin/entitlements.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - com.apple.security.cs.allow-jit - - com.apple.security.cs.allow-unsigned-executable-memory - - com.apple.security.cs.allow-dyld-environment-variables - - com.apple.security.cs.disable-library-validation - - - \ No newline at end of file diff --git a/.azure-pipelines/powershell/BuildTools.ps1 b/.azure-pipelines/powershell/BuildTools.ps1 deleted file mode 100644 index fadc15c2558..00000000000 --- a/.azure-pipelines/powershell/BuildTools.ps1 +++ /dev/null @@ -1,584 +0,0 @@ -Class PackageTypes : System.Management.Automation.IValidateSetValuesGenerator { - [string[]] GetValidValues() { - $PackageTypes = ,"zip" - if ($global:IsMacOS -or $global:IsLinux) { - $PackageTypes += "tar" - } - return [string[]] $PackageTypes - } -} - -function Get-Version { - [OutputType([string])] - param( - [string] $BranchOrTagName = "latest" - ) - - Write-Verbose "Get-Version: Getting version." - - if ([string]::IsNullOrWhitespace($BranchOrTagName)) { - $BranchOrTagName = "unknown" - } - # Get the version - $version = "$BranchOrTagName" - $version = $version.TrimStart('refs/tags/v') - # Return the version - return $version -} - -function Get-FileName { - [OutputType([string])] - param( - [ValidateNotNullOrEmpty()] - [string] $FileNameTemplate = "msgraph-cli-{0}-{1}", - - [ValidateNotNullOrEmpty()] - [string] $BranchOrTagName = "latest", - - [string] $RuntimeIdentifier = "unknown" - ) - - Write-Verbose "Get-FileName: Getting file name." - - if ([string]::IsNullOrWhitespace($RuntimeIdentifier)) { - $RuntimeIdentifier = "unknown" - } - - $version = Get-Version $BranchOrTagName - return "$FileNameTemplate" -f "$RuntimeIdentifier","$version" -} - -function Get-TarFileExtension { - [OutputType([string])] - param( - [ValidateSet("none", "bzip", "gzip")] - [string] $TarCompression = "none" - ) - - Write-Verbose "Get-TarFileExtension: Computing file extension for compression program '$TarCompression'" - - if (-not $IsLinux -and -not $IsMacOS) { - Write-Warning "Tar archives are only supported on Linux or MacOS. This function has no effect." - return "" - } - - $ext = "" - if ($TarCompression -eq "bzip") { - $ext = "bz2" - } elseif ($TarCompression -eq "gzip") { - $ext = "gz" - } - - return $ext -} - -function Get-PackageName { - [OutputType([string])] - param( - [ValidateNotNullOrEmpty()] - [string] $FileName, - - [ValidateNotNullOrEmpty()] - [string] $FileNameTemplate, - - [ValidateNotNullOrEmpty()] - [string] $BranchOrTagName = "latest", - - [string] $RuntimeIdentifier = "unknown", - - [ValidateSet([PackageTypes])] - [string] $PackageType = "zip", - - [ValidateSet("none", "bzip", "gzip")] - [string] $TarCompression = "none" - ) - - Write-Verbose "Get-PackageName: Getting package name." - if ([string]::IsNullOrWhitespace($FileName) -and [string]::IsNullOrWhitespace($FileNameTemplate)) { - throw "Either FileName or FileNameTemplate must be specified." - } - - $ext = $PackageType - if ($ext -eq "tar") { - $ext = [string]::Join(".", $ext, $(Get-TarFileExtension -TarCompression $TarCompression)) - } - - if ([string]::IsNullOrWhitespace($FileName)) { - $FileName = Get-FileName -FileNameTemplate $FileNameTemplate -BranchOrTagName $BranchOrTagName -RuntimeIdentifier $RuntimeIdentifier - } - - return "$FileName.$ext" -} - -function Compress-Package { - [cmdletbinding()] - [OutputType([string])] - param( - [ValidateNotNullOrEmpty()] - [ValidateScript({Test-Path $_ -IsValid})] - [string] $OutputDir = ".", - - [Parameter(Mandatory)] - [ValidateScript({ - (Resolve-Path -Path $_).Count -gt 0 - }, ErrorMessage="The path '{0}' is invalid. Ensure it's a directory, a comma-separated list or a wildcard that resolves to a list of files.")] - [string[]] $Source, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [ValidateScript({Test-Path $_ -IsValid})] - [string] $FileName, - - [ValidateSet([PackageTypes])] - [string] $PackageType = "zip", - - [ValidateSet("none", "bzip", "gzip")] - [string] $TarCompression = "none" - ) - - Write-Verbose "Compress-Package: Compressing package '$FileName', '$PackageType', $TarCompression." - - if (($PackageType -eq "zip") -and ($TarCompression -ne "none")) { - Write-Warning "Compress-Package: Tar compression only has an effect on the tar package type. The option will be ignored." - } - - $OutputDir = Resolve-Path $OutputDir - Write-Verbose "Compress-Package: Using the dir '$OutputDir'." - - $ext = $PackageType - if ($ext -eq "tar") { - $ext = [string]::Join(".", $ext, $(Get-TarFileExtension -TarCompression $TarCompression)) - } - - $outputFileName = Get-PackageName -FileName $FileName -PackageType $PackageType -TarCompression $TarCompression - $outputFile = Join-Path $OutputDir $outputFileName - - if (Test-Path $outputFile) { - Write-Verbose "Compress-Package: Removing existing file $outputFile." - Remove-Item $outputFile - } - - Write-Verbose "$Source" - - if ($PackageType -eq "zip") { - Compress-Archive -Path $Source -DestinationPath $outputFile - } elseif ($PackageType -eq "tar") { - if (Get-Command -Name tar -CommandType Application -ErrorAction Ignore) { - $options = "-c" - if ($TarCompression -eq "bzip") { - $options += "j" - } elseif ($TarCompression -eq "gzip") { - $options += "z" - } - - if (($PSBoundParameters.ContainsKey('Verbose') -and $PSBoundParameters['Verbose'].IsPresent) -or ($PSCmdlet.GetVariableValue('VerbosePreference'))) { - # Use the verbose mode '-v' if '-Verbose' is specified - $options += "v" - } - $options += "f" - - # Match PowerShell Compress-Archive behavior - # Add the result of Get-Item -Name - $_args = $Source | ForEach-Object { - $items = Get-Item $_ - # Get the working dir - $dir = $items | Select-Object -First 1 | ForEach-Object {[System.IO.Path]::GetDirectoryName("$_")} - # Get the file list - $_files = $items | ForEach-Object -Begin $null -Process {[System.IO.Path]::GetFileName("$_")},{ Write-Verbose "$($_.FullName)"} -End $null - - Write-Verbose "Compress-Package: Adding files in dir '$dir':`n $([string]::Join("`n ", $_files))" - "-C $dir $([string]::Join(" ", $_files))" - } - - $joined = $([string]::Join(" ", $_args)) - $cmd = "tar $options $outputFile $joined" - Invoke-Expression $cmd | Write-Verbose - } else { - throw "Failed to create the package. Application 'tar' cannot be found." - } - } - - if (Test-Path -Path $outputFile) { - Write-Verbose "Archive created at $outputFile" - return "$outputFile" - } else { - throw "Failed to create archive $outputFile" - } -} - -function Expand-Package { - [cmdletbinding()] - [OutputType([string])] - param( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [ValidateScript({Test-Path $_ -IsValid})] - [string] $OutputDir, - - [ValidateScript({ - Test-Path -Path $_ -PathType Container - }, ErrorMessage="The work dir '{0}' is invalid. Check that it exists and is a directory.")] - [string] $SourceDir, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [ValidateScript({Test-Path $_ -IsValid})] - [string] $FileName, - - [ValidateSet([PackageTypes])] - [string] $PackageType = "zip", - - [ValidateSet("none", "bzip", "gzip")] - [string] $TarCompression = "none" - ) - - Write-Verbose "Expand-Package: Expanding package '$FileName', '$PackageType', $TarCompression." - - if (($PackageType -eq "zip") -and ($TarCompression -ne "none")) { - Write-Warning "Expand-Package: Tar compression only has an effect on the tar package type. The option will be ignored." - } - - if ([string]::IsNullOrWhitespace($SourceDir)) { - $SourceDir = Resolve-Path $SourceDir - Write-Warning "Expand-Package: The SourceDir parameter was not provided. Using the current directory '$SourceDir'." - } - - $ext = $PackageType - # Don't set extension name. Use TarCompression to determine compression program - if ($ext -eq "tar") { - $ext += "*" - } - - $pattern = "$FileName.$ext" - $candidates = Resolve-Path $(Join-Path $SourceDir $pattern) | Select-Object -ExpandProperty Path - - if ($candidates.Count -le 0) { - throw "There are no files in '$SourceDir' matching pattern '$pattern'." - } elseif ($candidates.Count -gt 1) { - $names = $candidates | ForEach-Object { [io.path]::GetFileName($_) } - $closestMatch = $names[0] - - if ($PackageType -eq "tar") { - # Try to find a matching tar file - $_exp = "" - if ($TarCompression -eq "bzip") { - $_exp = ".+\.[bt]b?z[2]?" - } elseif ($TarCompression -eq "gzip") { - $_exp = ".+\.(?:g|t[ga])z" - } - foreach ($_name in $names) { - if ($_name -match $_exp) { - $closestMatch = $_name - break - } - } - } - Write-Warning "Expand-Package: Multiple files found matching '$pattern'.`n $([string]::Join("`n ", $names))`nUsing the closest match '$closestMatch'." - $inputFile = $closestMatch - } else { - Write-Verbose "Expand-Package: Archive file $candidates found." - # Only 1 match - $inputFile = $candidates - } - - if ($PackageType -eq "zip") { - Write-Verbose "Expand-Package: Expanding zip archive '$inputFile'" - Expand-Archive -Path $inputFile -DestinationPath $OutputDir - } elseif ($PackageType -eq "tar") { - if (Get-Command -Name tar -CommandType Application -ErrorAction Ignore) { - if (-not (Test-Path -Path $OutputDir)) { - # Suppress command output to avoid poisoning this function's result - $item = New-Item $OutputDir -ItemType Directory - Write-Verbose "Expand-Package: Output directory '$item' did not exist. It has been created." - } - - Write-Verbose "Expand-Package: Expanding tar archive '$inputFile'" - $options = "-x" - if ($TarCompression -eq "bzip") { - $options += "j" - } elseif ($TarCompression -eq "gzip") { - $options += "z" - } - - if (($PSBoundParameters.ContainsKey('Verbose') -and $PSBoundParameters['Verbose'].IsPresent) -or ($PSCmdlet.GetVariableValue('VerbosePreference'))) { - # Use the verbose mode '-v' if '-Verbose' is specified - $options += "v" - } - $options += "f" - - try { - Push-Location -Path $OutputDir - $cmd = "tar $options $inputFile" - Invoke-Expression $cmd | Write-Verbose - } finally { - Pop-Location - } - } else { - throw "Failed to extract the package. Application 'tar' cannot be found." - } - } - - if ((Test-Path -Path $OutputDir -PathType Container) -and ((Get-ChildItem $OutputDir).Count -gt 0)) { - Write-Verbose "Expand-Package: Archive '$inputFile' extracted to $OutputDir" - return $OutputDir - } else { - throw "Failed to extract archive $inputFile" - } -} - -function Compress-BuildOutput { - [OutputType([string])] - param( - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [ValidateScript({Test-Path $_ -IsValid})] - [string] $OutputDir, - - [Parameter(Mandatory)] - [ValidateScript({ - (Resolve-Path -Path $_).Count -gt 0 - }, ErrorMessage="The path '{0}' is invalid.")] - [string[]] $Source, - - [string] $FileNameTemplate = "msgraph-cli-{0}-{1}", - - [string] $BranchOrTagName = "latest", - - [string] $RuntimeIdentifier = "unknown", - - [ValidateSet([PackageTypes])] - [string] $PackageType = "zip", - - [ValidateSet("none", "bzip", "gzip")] - [string] $TarCompression = "none", - - [switch] $Cleanup - ) - - Write-Verbose "Compress-BuildOutput: Compressing build output. '$FileName', '$PackageType', $TarCompression." - - if (-not (Test-Path -Path $OutputDir)) { - # Suppress command output to avoid poisoning this function's result - $item = New-Item $OutputDir -ItemType Directory - Write-Verbose "Compress-BuildOutput: Output directory '$item' did not exist. It has been created." - } - - $archiveName = Get-FileName -FileNameTemplate $FileNameTemplate -BranchOrTagName $BranchOrTagName -RuntimeIdentifier $RuntimeIdentifier - $archivePath = Join-Path -Path $OutputDir -ChildPath $archiveName - - $package = Compress-Package -OutputDir $OutputDir -Source $Source -FileName $archiveName -PackageType $PackageType -TarCompression $TarCompression - Write-Verbose "Compress-BuildOutput: Package $package created." - - if ($Cleanup) { - foreach ($path in $Source) { - Write-Verbose "Compress-BuildOutput: Cleaning up $path" - Remove-Item $path -Force -Recurse - } - } - - return "$package" -} - -function Expand-EsrpArtifacts { - param( - [Parameter(Mandatory)] - [ValidateScript({ - Test-Path $_ -PathType Container - }, ErrorMessage="Source dir '{0}' is not a valid directory")] - [string] $SourceDir, - - [string] $OutputDir, - - [string] $FileNameTemplate = "msgraph-cli-{0}-{1}", - - [string] $BranchOrTagName = "latest", - - [string] $RuntimeIdentifier = "unknown", - - [ValidateSet([PackageTypes])] - [string] $PackageType = "zip", - - [ValidateSet("none", "bzip", "gzip")] - [string] $TarCompression = "none", - - [switch] $Cleanup - ) - - Write-Verbose "Expand-EsrpArtifacts: Expanding build artifact for ESRP." - - $archiveName = Get-FileName -FileNameTemplate $FileNameTemplate -BranchOrTagName $BranchOrTagName -RuntimeIdentifier $RuntimeIdentifier - - Expand-Package -OutputDir $OutputDir -SourceDir $SourceDir -FileName $archiveName -PackageType $PackageType -TarCompression $TarCompression - - if ($Cleanup) { - # -Force so there's no confirmation - # -Recurse so the child items warning isn't shown - Write-Verbose "Expand-EsrpArtifacts: Cleaning up $SourceDir" - Remove-Item $SourceDir -Recurse -Force - } -} - -function Move-NonExecutableItems { - param( - [Parameter(Mandatory)] - [string] $SourcePath, - - [string[]] $ExecutableItemNames - ) - - $parentDir = Split-Path -Path $SourcePath -Parent -Resolve - $backupDir = Join-Path -Path $parentDir -ChildPath backup - - if (-not (Test-Path -Path $backupDir/*)) { - New-Item $backupDir -ItemType Directory > $null - } else { - throw "The directory $backupDir already exists and is not empty." - } - - Move-Item -Path $SourcePath/* -Exclude $ExecutableItemNames -Destination $backupDir -} - -function Compress-SignedFiles { - [OutputType([string])] - param( - [Parameter(Mandatory)] - [ValidateScript({ - ((Test-Path $_ -PathType Container) -and ((Get-ChildItem $_).Count -gt 0)) - }, ErrorMessage="Source dir '{0}' is invalid. Check that it is a non-empty directory.")] - [string] $SourceDir, - - [ValidateScript({Test-Path $_ -IsValid})] - [string] $ReportDir, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [ValidateScript({Test-Path $_ -IsValid})] - [string] $OutputDir, - - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [ValidateScript({Test-Path $_ -IsValid})] - [string] $OutputFileName, - - [ValidateSet([PackageTypes])] - [string] $PackageType = "zip", - - [ValidateSet("none", "bzip", "gzip")] - [string] $TarCompression = "none", - - [switch] $Cleanup - ) - - Write-Verbose "Compress-SignedFiles: '$OutputFileName', '$PackageType', $TarCompression." - - if ((Get-Item "$SourceDir/*.md").Count -gt 0) { - if (-not (Test-Path -Path $ReportDir)) { - $item = New-Item $ReportDir -ItemType Directory - Write-Verbose "Compress-SignedFiles: Output directory '$item' did not exist. It has been created." - } - - Write-Verbose "Compress-SignedFiles: Moving signing report to $ReportDir" - Move-Item -Path "$SourceDir/*.md" -Destination $ReportDir/ - } else { - Write-Verbose "Pattern '$SourceDir/*.md' didn't match any files." - } - - $parentDir = Split-Path -Path $SourceDir -Parent -Resolve - $backupDir = Join-Path -Path $parentDir -ChildPath backup - - if ((Test-Path $backupDir -PathType Container) -and ((Get-ChildItem $backupDir).Count -gt 0)) { - $files = [string]::Join("`n ", $(Get-Item "$backupDir/*" | Select-Object -ExpandProperty Name)) - Write-Verbose "Compress-SignedFiles: Moving the following files from $backupDir to archive staging location:`n $files" - Move-Item -Path "$backupDir/*" -Destination "$SourceDir" - } else { - Write-Verbose "The backup dir '$backupDir' has no files." - } - - Write-Verbose "Compress-SignedFiles: Compressing '$SourceDir/*'" - $package = Compress-Package -OutputDir $OutputDir -Source "$SourceDir/*" -FileName $OutputFileName -PackageType $PackageType -TarCompression $TarCompression - Write-Verbose "Compress-SignedFiles: Package $package created." - - if ($Cleanup) { - Write-Verbose "Compress-SignedFiles: Cleaning up $SourceDir and $backupDir" - Remove-Item "$SourceDir" -Recurse -Force - Remove-Item "$backupDir" -Recurse -Force - } - - return "$package" -} - -function Set-UnixPermissions { - [cmdletbinding()] - param( - [Parameter(Mandatory)] - [ValidatePattern("^(?:[ugoa]?(?:[-+=],?(?:[rwxXst]*|[ugo]),?)+(?\("--user-id", description: "(.+)"\)' -Replacement 'userIdOption = new Option("--user-id", description: "$1. Use ''me'' for the currently signed in user.")' -} - -function Update-UsersMeAlias { - param( - [string] $WorkspaceRootDir = "." - ) - $usersRb = Join-Path -Path $WorkspaceRootDir -ChildPath src\generated\GraphClient.cs - Replace-TextInFile -FilePath $usersRb -Pattern 'command = new Command\("users"\);(\r?\n\s*)' -Replacement 'command = new Command("users");$1command.AddAlias("me");$1' -} diff --git a/.azure-pipelines/release-cli.yaml b/.azure-pipelines/release-cli.yaml deleted file mode 100644 index 20a0b99827b..00000000000 --- a/.azure-pipelines/release-cli.yaml +++ /dev/null @@ -1,713 +0,0 @@ -name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) - -trigger: - batch: true - branches: - include: - - main - - refs/tags/v* - paths: - include: - - .azure-pipelines - - src - - msgraph-cli.sln - -pool: - name: Azure Pipelines - vmImage: ubuntu-latest - -variables: - - group: ESRP - - name: repositoryConnection - value: 'GitHub - calebkiage' - - name: fileNameTemplate - value: msgraph-cli-{0}-{1} - - name: buildConfiguration - value: 'Release' - - name: outputDir - value: $(Build.ArtifactStagingDirectory)/publish - - name: artifactsDownloadLocation - value: $(Pipeline.Workspace)/artifacts - - name: internalFeed - value: "Graph Developer Experiences/microsoft-graph-packages" # Format projectName/feedName - - name: powershellScriptsDir - value: $(System.DefaultWorkingDirectory)/.azure-pipelines/powershell - - name: branchOrTagName - ${{ if in(variables['Build.SourceBranch'], 'refs/heads/main', 'refs/heads/dev') }}: - value: 'latest' - ${{ else }}: # Version from the tag. Can be a branch name. Only mainline branches use latest - value: '$(Build.SourceBranchName)' - -parameters: - - name: forceSignOutput - displayName: Force Signing Build Output - type: boolean - default: false - - name: notarizeAfterSign - displayName: Notarize Build Output (MacOS only) - type: boolean - default: true - - name: simulate - displayName: Simulate operations (faster) - type: boolean - default: false - - name: forceNugetPublish - displayName: Force Publishing the Nuget output - type: boolean - default: false - -# test ----------> | build -> | | -# | | sign | -# checkFormat ----------------> |------------| -> upload -# | binaryScan | -# srcScan --------------------> | | -stages: - - stage: test - displayName: Run tests - dependsOn: [] - jobs: - - job: test - displayName: Run tests - condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true')) - steps: - - task: UseDotNet@2 - displayName: 'Use .NET 8' - inputs: - version: 8.x - - # Restore NuGet packages (enables cache by default) - - template: templates/nuget-packages.yaml - parameters: - vstsFeedName: ${{variables.internalFeed}} - - - task: DotNetCoreCLI@2 - displayName: Run tests - enabled: true - inputs: - command: test - workingDirectory: $(Build.SourcesDirectory) - arguments: --no-restore - - - stage: build - displayName: Build CLI - dependsOn: [test] - jobs: - - job: build - displayName: Build and publish - strategy: - matrix: - 'Windows-x64': - rid: win-x64 - packageType: "zip" - compressionProgram: "none" - 'Linux-x64': - rid: linux-x64 - packageType: "tar" - compressionProgram: "gzip" - 'MacOS-x64': - rid: osx-x64 - packageType: "tar" - compressionProgram: "gzip" - 'MacOS-ARM': - rid: osx-arm64 - packageType: "tar" - compressionProgram: "gzip" - # maxParallel: 2 - steps: - - task: UseDotNet@2 - displayName: 'Use .NET 8' - condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true')) - inputs: - version: 8.x - - - ${{ if ne(parameters.simulate, 'true') }}: - - template: templates/nuget-packages.yaml - parameters: - extraRestoreArgs: -p:PublishReadyToRun=true - vstsFeedName: ${{variables.internalFeed}} - - - pwsh: dotnet publish ./src/msgraph-cli.csproj -p:PublishSingleFile=true -p:PublishReadyToRun=true --no-restore --runtime $(rid) --self-contained true --configuration $(buildConfiguration) --output $(outputDir) - workingDirectory: $(Build.SourcesDirectory) - condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true')) - displayName: DotNet publish - - - template: templates/setup-powershell-environment.yml - - - task: PowerShell@2 - inputs: - targetType: inline - script: | - New-Item $(outputDir) -ItemType Directory -Force - echo "Test file" > $(outputDir)/mgc - echo "Test file2" > $(outputDir)/mgc.txt - verbosePreference: '$(OUTPUT_PREFERENCE)' - debugPreference: '$(OUTPUT_PREFERENCE)' - informationPreference: '$(OUTPUT_PREFERENCE)' - condition: and(succeeded(), eq('${{ parameters.simulate }}', 'true')) - displayName: Simulate publish - - - task: PowerShell@2 - inputs: - pwsh: true - targetType: inline - script: | - . $(powershellScriptsDir)/BuildTools.ps1 - $archive = Compress-BuildOutput -OutputDir '$(outputDir)-$(rid)' -Source '$(outputDir)/*' -FileNameTemplate '$(fileNameTemplate)' -BranchOrTagName '$(branchOrTagName)' -RuntimeIdentifier '$(rid)' -PackageType '$(packageType)' -TarCompression $(compressionProgram) -Cleanup - $hasArchive = Test-Path $archive -PathType Leaf - Write-Host "##vso[task.setvariable variable=HAS_ARTIFACTS]$hasArchive" - verbosePreference: '$(OUTPUT_PREFERENCE)' - debugPreference: '$(OUTPUT_PREFERENCE)' - informationPreference: '$(OUTPUT_PREFERENCE)' - # Only create artifacts if we're building a tag, building main, or building a PR targeting main - condition: and(succeeded(), or(eq('${{ parameters.forceSignOutput }}', 'true'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], 'refs/heads/main'), eq(variables['System.PullRequest.TargetBranch'], 'main'))) - displayName: Compress published output - - - task: PublishPipelineArtifact@1 - # Only publish artifacts if they exist - condition: and(succeeded(), eq(variables['HAS_ARTIFACTS'], 'True')) - inputs: - artifact: build-output-$(rid) - path: $(outputDir)-$(rid) - - # Format takes a long time. keep it in its own stage - - stage: checkFormat - displayName: Check formatting - condition: false - dependsOn: [] - jobs: - - job: checkFormat - displayName: Check formatting - condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true')) - steps: - - task: UseDotNet@2 - displayName: 'Use .NET 8' - inputs: - version: 8.x - - # Restore NuGet packages (enables cache by default) - - template: templates/nuget-packages.yaml - parameters: - vstsFeedName: ${{variables.internalFeed}} - - - pwsh: dotnet format --no-restore --include ./src/ --exclude ./src/generated/ --verify-no-changes - displayName: Validate formatting - enabled: true - - - stage: srcScan - displayName: Scan source code - pool: - vmImage: windows-latest - dependsOn: [] - jobs: - - job: scan - displayName: Scanning source - condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true')) - steps: - - template: templates/compliance-checks.yaml - parameters: - scanSource: true - - - stage: sign - displayName: ESRP signing - pool: - vmImage: windows-latest - dependsOn: [build] - # Only sign binaries if we're building a tag. - condition: and(succeeded(), or(eq('${{ parameters.forceSignOutput }}', 'true'), eq('${{ parameters.forceNugetPublish }}', 'true'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))) - jobs: - - job: esrpSign - dependsOn: [] - variables: - macSignOp: | - [ - { - "keyCode": "CP-401337-Apple", - "OperationCode": "MacAppDeveloperSign", - "Parameters": { - "Hardening": "--options=runtime" - }, - "ToolName": "sign", - "ToolVersion": "1.0" - } - ] - macNotarizeOp: | - [ - { - "keyCode": "CP-401337-Apple", - "OperationCode": "MacAppNotarize", - "Parameters": { - "BundleId": "com.microsoft.microsoftgraphcli" - }, - "ToolName": "sign", - "ToolVersion": "1.0" - } - ] - strategy: - matrix: - 'Windows-x64': - rid: win-x64 - vmImage: windows-latest - packageType: "zip" - compressionProgram: "none" - sign: true - pattern: | - **\*.exe - **\*.dll - inlineSignOperation: | - [ - { - "KeyCode": "CP-230012", - "OperationCode": "SigntoolSign", - "Parameters": { - "OpusName" : "Microsoft", - "OpusInfo" : "http://www.microsoft.com", - "FileDigest" : "/fd \"SHA256\"", - "PageHash" : "/NPH", - "TimeStamp" : "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" - }, - "ToolName": "sign", - "ToolVersion": "1.0" - }, - { - "KeyCode": "CP-230012", - "OperationCode": "SigntoolVerify", - "Parameters": {}, - "ToolName": "sign", - "ToolVersion": "1.0" - } - ] - inlineNotarizeOperation: "" - nuget: - rid: nuget - vmImage: windows-latest - packageType: "zip" - compressionProgram: "none" - sign: true - forceNugetPublish: ${{ parameters.forceNugetPublish }} - pattern: | - mgc.dll - inlineSignOperation: | - [ - { - "keyCode": "CP-230012", - "operationSetCode": "SigntoolSign", - "parameters": [ - { - "parameterName": "OpusName", - "parameterValue": "Microsoft" - }, - { - "parameterName": "OpusInfo", - "parameterValue": "http://www.microsoft.com" - }, - { - "parameterName": "FileDigest", - "parameterValue": "/fd \"SHA256\"" - }, - { - "parameterName": "PageHash", - "parameterValue": "/NPH" - }, - { - "parameterName": "TimeStamp", - "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" - } - ], - "toolName": "sign", - "toolVersion": "1.0" - }, - { - "keyCode": "CP-230012", - "operationSetCode": "SigntoolVerify", - "parameters": [ ], - "toolName": "sign", - "toolVersion": "1.0" - } - ] - inlineNugetSignOperation: | - [ - { - "keyCode": "CP-401405", - "operationSetCode": "NuGetSign", - "parameters": [ ], - "toolName": "sign", - "toolVersion": "1.0" - }, - { - "keyCode": "CP-401405", - "operationSetCode": "NuGetVerify", - "parameters": [ ], - "toolName": "sign", - "toolVersion": "1.0" - } - ] - - 'MacOS-x64': - rid: osx-x64 - vmImage: macOS-11 - packageType: "tar" - compressionProgram: "gzip" - sign: true - notarize: ${{ parameters.notarizeAfterSign }} - inlineSignOperation: ${{ variables.macSignOp }} - inlineNotarizeOperation: ${{ variables.macNotarizeOp }} - 'MacOS-ARM': - rid: osx-arm64 - vmImage: macOS-12 - packageType: "tar" - compressionProgram: "gzip" - sign: true - notarize: ${{ parameters.notarizeAfterSign }} - inlineSignOperation: ${{ variables.macSignOp }} - inlineNotarizeOperation: ${{ variables.macNotarizeOp }} - displayName: ESRP Signing - pool: - vmImage: $(vmImage) - steps: - - template: templates/setup-powershell-environment.yml - - - task: PowerShell@2 - inputs: - pwsh: true - targetType: inline - script: | - Write-Verbose 'pattern = ''$(pattern)''' - Write-Verbose 'fileNameTemplate = ''$(fileNameTemplate)''' - Write-Verbose 'artifactsDownloadLocation = ''$(artifactsDownloadLocation)''' - Write-Verbose 'sign = ''$(sign)''' - Write-Verbose 'forceNugetPublish = ''$(forceNugetPublish)''' - Write-Verbose 'notarize = ''$(notarize)''' - Write-Verbose 'inlineSignOperation = ''$(inlineSignOperation)''' - Write-Verbose 'inlineNotarizeOperation = ''$(inlineNotarizeOperation)''' - Write-Verbose 'inlineNugetSignOperation = ''$(inlineNugetSignOperation)''' - $rid = '$(rid)' - $shouldSign = '$(sign)' - if ((-not [bool]::Parse($shouldSign)) -and '$(rid)' -eq 'nuget') { - $shouldSign = '$(forceNugetPublish)' - } - $shouldNotarize = '$(notarize)' - $notarizeOp = '$(inlineNotarizeOperation)' - $isNuget = $rid -eq 'nuget' - $isDarwin = $rid.StartsWith('osx') - $workDir = Join-Path -Path '$(artifactsDownloadLocation)' -ChildPath '$(rid)' - $downloadDir = Join-Path -Path $workDir -ChildPath 'build-output-$(rid)' - Write-Host "##vso[task.setvariable variable=RUNTIME_ID]$rid" - Write-Host "##vso[task.setvariable variable=IS_NUGET]$isNuget" - Write-Host "##vso[task.setvariable variable=IS_MACOS]$isDarwin" - Write-Host "##vso[task.setvariable variable=SHOULD_SIGN]$shouldSign" - Write-Host "##vso[task.setvariable variable=SHOULD_NOTARIZE]$shouldNotarize" - Write-Host "##vso[task.setvariable variable=NOTARIZE_OPERATION]$notarizeOp" - Write-Host "##vso[task.setvariable variable=WORKING_DIR]$workDir" - Write-Host "##vso[task.setvariable variable=ARTIFACTS_PATH]$downloadDir" - verbosePreference: '$(OUTPUT_PREFERENCE)' - debugPreference: '$(OUTPUT_PREFERENCE)' - informationPreference: '$(OUTPUT_PREFERENCE)' - displayName: Setup variables - - - pwsh: git config --global core.longpaths true - displayName: Enable git's long file paths on Windows - - - checkout: self - - # Nuget tool doesn't work with multi-stage builds - - task: UseDotNet@2 - displayName: 'Use .NET 8' - condition: and(false, succeeded(), ne('${{ parameters.simulate }}', 'true'), eq(variables['IS_NUGET'], 'true')) - inputs: - version: 8.x - - - ${{ if ne(parameters.simulate, 'true') }}: - - template: templates/nuget-packages.yaml - parameters: - vstsFeedName: ${{variables.internalFeed}} - enabled: $(IS_NUGET) - - - task: DotNetCoreCLI@2 - displayName: "build nuget tool" - inputs: - projects: './src/msgraph-cli.csproj' - arguments: " --no-restore --configuration $(buildConfiguration) --no-incremental" - condition: and(false, succeeded(), ne('${{ parameters.simulate }}', 'true'), eq(variables['IS_NUGET'], 'true')) - - - pwsh: | - New-Item '$(ARTIFACTS_PATH)' -ItemType Directory -Force - echo "Test file" > '$(ARTIFACTS_PATH)/mgc.dll' - echo "Test file2" > '$(ARTIFACTS_PATH)/mgc.txt' - condition: and(false, succeeded(), eq('${{ parameters.simulate }}', 'true'), eq(variables['IS_NUGET'], 'true')) - displayName: Simulate nuget build - - - task: DownloadPipelineArtifact@2 - inputs: - patterns: build-output-$(rid)/**/* - path: $(WORKING_DIR) - condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'True'), ne(variables['IS_NUGET'], 'true')) - - - task: PowerShell@2 - inputs: - pwsh: true - targetType: inline - script: | - $path = '$(ARTIFACTS_PATH)' - if ('$(IS_NUGET)'.ToLower() -eq 'true' -and ('${{ parameters.simulate }}'.ToLower() -ne 'true')) { - $path = './src/obj/$(buildConfiguration)/net8.0' - } - Write-Verbose "Checking if $path has files" - $hasArtifacts = Test-Path $path/* -PathType Leaf - Write-Verbose "Result $hasArtifacts" - - $shouldSign = '$(SHOULD_SIGN)'.ToLower() -eq 'true' - if ($shouldSign) { - $shouldSign = $shouldSign -and $hasArtifacts - } - Write-Host "##vso[task.setvariable variable=SIGN_PATH]$path" - Write-Host "##vso[task.setvariable variable=SHOULD_SIGN]$shouldSign" - verbosePreference: '$(OUTPUT_PREFERENCE)' - debugPreference: '$(OUTPUT_PREFERENCE)' - informationPreference: '$(OUTPUT_PREFERENCE)' - displayName: Check for artifacts - - - task: PowerShell@2 - inputs: - pwsh: true - targetType: inline - script: | - . $(powershellScriptsDir)/BuildTools.ps1 - $zipName = Get-PackageName -FileNameTemplate '$(fileNameTemplate)' -BranchOrTagName '$(branchOrTagName)' -RuntimeIdentifier '$(rid)' -PackageType "zip" - Write-Host "##vso[task.setvariable variable=ZIP_NAME]$zipName" - verbosePreference: '$(OUTPUT_PREFERENCE)' - debugPreference: '$(OUTPUT_PREFERENCE)' - informationPreference: '$(OUTPUT_PREFERENCE)' - displayName: Compute zip name - condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'True'), ne(variables['IS_NUGET'], 'true')) - - - task: PowerShell@2 - inputs: - pwsh: true - targetType: inline - script: | - . $(powershellScriptsDir)/BuildTools.ps1 - - $destDir = '$(ARTIFACTS_PATH)-src' - $sourceDir = '$(ARTIFACTS_PATH)' - Expand-EsrpArtifacts -SourceDir $sourceDir -OutputDir $destDir -FileNameTemplate '$(fileNameTemplate)' -BranchOrTagName '$(branchOrTagName)' -RuntimeIdentifier '$(rid)' -PackageType $(packageType) -TarCompression $(compressionProgram) -Cleanup - Move-Item -Path $destDir -Destination $sourceDir - - Move-NonExecutableItems -SourcePath $sourceDir -ExecutableItemNames mgc,mgc.exe - verbosePreference: '$(OUTPUT_PREFERENCE)' - debugPreference: '$(OUTPUT_PREFERENCE)' - informationPreference: '$(OUTPUT_PREFERENCE)' - displayName: Extract archive - condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'True'), ne(variables['IS_NUGET'], 'True')) - - - template: templates/prepare-unsigned-executable-darwin.yaml - parameters: - executablePath: $(SIGN_PATH) - executableName: mgc - zipName: $(ZIP_NAME) - targetRuntime: $(rid) - enabled: $(IS_MACOS) - certificateName: $(CERTIFICATE_ID) - - - pwsh: | - Write-Host "##vso[task.setvariable variable=ESRP_FILE_PATTERN]$(ZIP_NAME)" - displayName: Compute ESRP filter pattern osx - condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'True'), eq(variables['IS_MACOS'], 'true')) - - - pwsh: | - Write-Host "##vso[task.setvariable variable=ESRP_FILE_PATTERN]$(pattern)" - displayName: Compute ESRP filter pattern Windows/Nuget - condition: and(false, succeeded(), eq(variables['SHOULD_SIGN'], 'True'), or(startsWith(variables['RUNTIME_ID'], 'win'), eq(variables['IS_NUGET'], 'true'))) - - # ESRP needs .NET 6 - - task: UseDotNet@2 - displayName: 'Change to .NET 6' - condition: and(false, succeeded(), ne('${{ parameters.simulate }}', 'true'), eq(variables['IS_NUGET'], 'true')) - inputs: - version: 6.x - - - task: EsrpCodeSigning@2 - displayName: 'ESRP CodeSigning (Sign Build output)' - inputs: - # Pipeline validation can't expand service name from matrix variables - ConnectedServiceName: "microsoftgraph ESRP CodeSign DLL and NuGet (AKV)" - FolderPath: $(SIGN_PATH) - signConfigType: inlineSignParams - UseMinimatch: true - Pattern: $(ESRP_FILE_PATTERN) - inlineOperation: $(inlineSignOperation) - SessionTimeout: 20 - condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true'), eq(variables['SHOULD_SIGN'], 'True')) - - - task: EsrpCodeSigning@2 - displayName: 'ESRP CodeSigning (Notarize)' - inputs: - # Pipeline validation can't expand service name from matrix variables - ConnectedServiceName: "microsoftgraph ESRP CodeSign DLL and NuGet (AKV)" - FolderPath: $(SIGN_PATH) - signConfigType: inlineSignParams - UseMinimatch: true - Pattern: $(ESRP_FILE_PATTERN) - inlineOperation: $(inlineNotarizeOperation) - SessionTimeout: 20 - condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true'), gt(length(variables['NOTARIZE_OPERATION']), 0), ne(variables['NOTARIZE_OPERATION'], '$(inlineNotarizeOperation)'), and(eq(variables['SHOULD_SIGN'], 'True'), eq(variables['SHOULD_NOTARIZE'], 'True'))) - - - pwsh: | - dotnet pack ./src/msgraph-cli.csproj --configuration $(buildConfiguration) --output $(SIGN_PATH) --no-build --include-symbols --include-source /p:SymbolPackageFormat=snupkg -v d - workingDirectory: $(Build.SourcesDirectory) - displayName: DotNet pack (nuget) - condition: and(false, succeeded(), eq(variables['SHOULD_SIGN'], 'True'), ne('${{ parameters.simulate }}', 'true'), eq(variables['IS_NUGET'], 'true')) - - - task: EsrpCodeSigning@2 - displayName: 'ESRP CodeSigning (Sign Nuget)' - inputs: - # Pipeline validation can't expand service name from matrix variables - ConnectedServiceName: "microsoftgraph ESRP CodeSign DLL and NuGet (AKV)" - FolderPath: $(SIGN_PATH) - signConfigType: inlineSignParams - UseMinimatch: true - Pattern: "*.nupkg" - inlineOperation: $(inlineNugetSignOperation) - SessionTimeout: 20 - condition: and(false, succeeded(), ne('${{ parameters.simulate }}', 'true'), eq(variables['SHOULD_SIGN'], 'True'), eq(variables['IS_NUGET'], 'true')) - - - pwsh: | - $artifactsPath = '$(SIGN_PATH)' - Write-Host "##vso[task.setvariable variable=WORKING_DIR]$artifactsPath" - condition: and(false, succeeded(), eq(variables['SHOULD_SIGN'], 'True'), eq(variables['IS_NUGET'], 'true')) - - - task: PowerShell@2 - displayName: Simulate ESRP - inputs: - pwsh: true - targetType: inline - script: | - Write-Verbose "Signing..." - . $(powershellScriptsDir)/BuildTools.ps1 - - if ($IsMacOS) { - $zipPath = Join-Path -Path '$(SIGN_PATH)' -ChildPath '$(ZIP_NAME)' - Write-Verbose "Expanding $zipPath" - $output = Split-Path -Path $zipPath -Parent - $output = Join-Path $output "out" - $output = New-Item $output -ItemType Directory -Force - Expand-Archive -Path "$zipPath" -DestinationPath "$output" - Remove-Item $zipPath - } - echo "Success" > $(SIGN_PATH)/Sign-Summary.md - if ($IsMacOS) { - Write-Verbose "Compressing updated source" - Compress-Archive -Path "$output/*" -DestinationPath $zipPath -Force - Remove-Item $output -Recurse -Force - } - - verbosePreference: '$(OUTPUT_PREFERENCE)' - debugPreference: '$(OUTPUT_PREFERENCE)' - informationPreference: '$(OUTPUT_PREFERENCE)' - condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'True'), eq('${{ parameters.simulate }}', 'true')) - - - task: PowerShell@2 - inputs: - pwsh: true - targetType: inline - script: | - . $(powershellScriptsDir)/BuildTools.ps1 - $fileName = Get-FileName -FileNameTemplate '$(fileNameTemplate)' -BranchOrTagName '$(branchOrTagName)' -RuntimeIdentifier '$(rid)' - Compress-SignedFiles -SourceDir '$(SIGN_PATH)' -ReportDir '$(WORKING_DIR)' -OutputDir '$(WORKING_DIR)' -OutputFileName $fileName -PackageType zip -Cleanup - verbosePreference: '$(OUTPUT_PREFERENCE)' - debugPreference: '$(OUTPUT_PREFERENCE)' - informationPreference: '$(OUTPUT_PREFERENCE)' - displayName: Compress signed files (Windows) - condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'True'), startsWith(variables['RUNTIME_ID'], 'win')) - - - task: PowerShell@2 - inputs: - pwsh: true - targetType: inline - script: | - . $(powershellScriptsDir)/BuildTools.ps1 - $zipPath = Join-Path -Path '$(SIGN_PATH)' -ChildPath '$(ZIP_NAME)' - $fileName = Get-FileName -FileNameTemplate '$(fileNameTemplate)' -BranchOrTagName '$(branchOrTagName)' -RuntimeIdentifier '$(rid)' - Update-SignedArchive -InputFile $zipPath -ReportDir '$(WORKING_DIR)' -OutputDir '$(WORKING_DIR)' -OutputFileName "$fileName" -ExeNames mgc -Cleanup - verbosePreference: '$(OUTPUT_PREFERENCE)' - debugPreference: '$(OUTPUT_PREFERENCE)' - informationPreference: '$(OUTPUT_PREFERENCE)' - displayName: Update signed files (MacOS) - condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'True'), startsWith(variables['RUNTIME_ID'], 'osx')) - - - task: PublishPipelineArtifact@1 - inputs: - artifact: sign-output-$(rid) - path: $(WORKING_DIR) - condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'True')) - - - stage: binaryScan - displayName: Scan binaries (Anti malware, BinSkim) - dependsOn: [build, srcScan] # Check format would be a dependency if enabled. - pool: - vmImage: windows-latest - # Only scan binaries if we're building a tag, building main, or building a PR targeting main - condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], 'refs/heads/main'), eq(variables['System.PullRequest.TargetBranch'], 'main'), eq('${{ parameters.forceNugetPublish }}', 'true'))) - jobs: - - job: scan - displayName: Scanning binaries - condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true')) - steps: - - template: templates/compliance-checks.yaml - parameters: - artifactsDownloadLocation: $(artifactsDownloadLocation) - scanBinary: true - - - stage: upload - dependsOn: [binaryScan, sign] - condition: and(succeeded(), ne('${{ parameters.simulate }}', 'true')) - jobs: - - job: uploadGitHub - displayName: Upload binaries (GitHub) - # Only upload release if we're building a tag. - condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) - steps: - - checkout: none - - task: DownloadPipelineArtifact@2 - inputs: - path: $(artifactsDownloadLocation) - - task: GithubRelease@1 - displayName: 'Upload Artifacts to GitHub Release' - inputs: - gitHubConnection: $(repositoryConnection) - repositoryName: '$(Build.Repository.Name)' - action: edit - tag: $(branchOrTagName) - addChangeLog: false - assetUploadMode: replace - assets: | - $(artifactsDownloadLocation)/build-output-linux-*/*.tar* - $(artifactsDownloadLocation)/sign-output-*/*.tar* - $(artifactsDownloadLocation)/sign-output-*/*.zip - - - deployment: deployNuget - displayName: Deploy Nuget - dependsOn: [] - environment: microsoftgraph-nuget-org - # Disable nuget deployment until performance is improved. - condition: false - # condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq('${{ parameters.forceNugetPublish }}', 'true'))) - strategy: - runOnce: - deploy: - pool: - vmImage: ubuntu-latest - steps: - - task: DownloadPipelineArtifact@2 - displayName: Download nupkg from artifacts - inputs: - artifact: sign-output-nuget - source: current - path: $(artifactsDownloadLocation)/nuget - - task: NuGetCommand@2 - displayName: "NuGet push" - inputs: - command: push - packagesToPush: "$(artifactsDownloadLocation)/nuget/Microsoft.Graph.Cli.*.nupkg;!$(artifactsDownloadLocation)/nuget/Microsoft.Graph.Cli.*.symbols.nupkg;" - nuGetFeedType: external - publishFeedCredentials: "microsoftgraph NuGet connection" - diff --git a/.azure-pipelines/templates/compliance-checks.yaml b/.azure-pipelines/templates/compliance-checks.yaml deleted file mode 100644 index f00e44b7eff..00000000000 --- a/.azure-pipelines/templates/compliance-checks.yaml +++ /dev/null @@ -1,114 +0,0 @@ -parameters: - - name: 'scanSource' - type: boolean - default: false - - name: 'scanBinary' - type: boolean - default: false - - name: 'artifactsDownloadLocation' - default: '' - -steps: - - pwsh: | - Write-Verbose -Verbose "scanSource = '${{parameters.scanSource}}'" - Write-Verbose -Verbose "scanBinary = '${{parameters.scanBinary}}'" - Write-Verbose -Verbose 'Agent OS = $(Agent.OS)' - - - ${{ if ne(parameters.scanSource, true) }}: - - checkout: none - - ${{ else }}: - - pwsh: git config --global core.longpaths true - displayName: Enable git's long file paths on Windows - - - checkout: self - - - ${{ if eq(parameters.scanSource, true) }}: - - task: PoliCheck@2 - displayName: 'Run PoliCheck - Source code scan' - enabled: true - inputs: - termTypeT: 0001aCustom - termTypeTCustom: 9 - targetArgument: $(Build.SourcesDirectory)/src - optionsUEPATH: $(System.DefaultWorkingDirectory)/.azure-pipelines/config/PoliCheckExclusions.xml - optionsSEV: "1|2" - optionsPE: 2 - - - task: CredScan@3 - displayName: 'Run CredScan - Source code scan' - enabled: true - inputs: - scanFolder: '$(Build.SourcesDirectory)\src' - debugMode: false - suppressionsFile: $(System.DefaultWorkingDirectory)/.azure-pipelines/config/CredScanSuppressions.json - verboseOutput: true - - - ${{ if eq(parameters.scanBinary, true) }}: - - task: DownloadPipelineArtifact@2 - inputs: - ${{ if gt(length(parameters.artifactsDownloadLocation), 0) }}: - path: $(artifactsDownloadLocation) - displayName: Download binaries - - - pwsh: | - Write-Verbose 'Checking if there are files matching $(artifactsDownloadLocation)/build-output-*/*.zip' - $hasArtifacts = Test-Path $(artifactsDownloadLocation)/build-output-*/*.zip -PathType Leaf - Write-Verbose "Result $hasArtifacts" - Write-Host "##vso[task.setvariable variable=HAS_ARTIFACTS]$hasArtifacts" - displayName: Checking for binaries - - - ${{ if gt(length(parameters.artifactsDownloadLocation), 0) }}: - - pwsh: | - Get-ChildItem $(artifactsDownloadLocation)/build-output-*/*.zip | ForEach-Object -Begin $null -End $null -Process { Write-Host "Extracting $($_.FullName)" }, { Expand-Archive -LiteralPath "$($_.FullName)" -PassThru }, { Remove-Item "$($_.FullName)" } - Get-ChildItem $(artifactsDownloadLocation)/build-output-* -Recurse - workingDirectory: $(artifactsDownloadLocation) - displayName: Extracting binaries - condition: and(succeeded(), eq(variables['HAS_ARTIFACTS'], 'true')) - - ${{ else }}: - - pwsh: | - Get-ChildItem $(Pipeline.Workspace)/build-output-*/*.zip | ForEach-Object -Begin $null -End $null -Process { Write-Host "Extracting $($_.FullName)" }, { Expand-Archive -LiteralPath "$($_.FullName)" -PassThru }, { Remove-Item "$($_.FullName)" } - Get-ChildItem $(Pipeline.Workspace)/build-output-* -Recurse - workingDirectory: $(artifactsDownloadLocation) - displayName: Extracting binaries - condition: and(succeeded(), eq(variables['HAS_ARTIFACTS'], 'true')) - - - task: AntiMalware@4 - displayName: 'Run MpCmdRun.exe - Product Binaries' - enabled: true - inputs: - ${{ if gt(length(parameters.artifactsDownloadLocation), 0) }}: - FileDirPath: $(artifactsDownloadLocation) - ${{ else }}: - FileDirPath: $(Pipeline.Workspace) - condition: and(succeeded(), eq(variables['HAS_ARTIFACTS'], 'true')) - - - task: BinSkim@4 - displayName: 'Run BinSkim - Product Binaries' - enabled: true - inputs: - InputType: Basic - ${{ if gt(length(parameters.artifactsDownloadLocation), 0) }}: - AnalyzeTargetGlob: '$(artifactsDownloadLocation)\**.dll;$(artifactsDownloadLocation)\**.exe;' - ${{ else }}: - AnalyzeTargetGlob: '$(Pipeline.Workspace)\**.dll;$(Pipeline.Workspace)\**.exe;' - AnalyzeIgnorePdbLoadError: false - AnalyzeVerbose: true - AnalyzeHashes: true - AnalyzeRecurse: true - AnalyzeStatistics: true - condition: and(succeeded(), eq(variables['HAS_ARTIFACTS'], 'true')) - - - task: PublishSecurityAnalysisLogs@3 - displayName: 'Publish Security Analysis Logs' - enabled: true - inputs: - ArtifactName: CodeAnalysisLogs - AllTools: true - condition: and(succeeded(), eq(variables['HAS_ARTIFACTS'], 'true')) - - - task: PostAnalysis@2 - displayName: 'Post Analysis' - enabled: true - inputs: - GdnBreakAllTools: true - condition: and(succeeded(), eq(variables['HAS_ARTIFACTS'], 'true')) diff --git a/.azure-pipelines/templates/nuget-packages.yaml b/.azure-pipelines/templates/nuget-packages.yaml deleted file mode 100644 index 572d56415d7..00000000000 --- a/.azure-pipelines/templates/nuget-packages.yaml +++ /dev/null @@ -1,64 +0,0 @@ -parameters: - - name: 'useCache' - type: boolean - default: true - - name: restorePath - type: "string" - default: $(Pipeline.Workspace)/.nuget/packages - - name: vstsFeedName - type: "string" - default: "" # Format projectName/feedName for project scoped feeds, feedName for organization scoped feed - - name: extraRestoreArgs - type: "string" - default: - - name: enabled - type: string - default: 'true' - -steps: - - pwsh: | - Write-Verbose -Verbose "useCache = '${{parameters.useCache}}'" - Write-Verbose -Verbose "restorePath = '${{parameters.restorePath}}'" - Write-Verbose -Verbose "extraRestoreArgs = '${{parameters.extraRestoreArgs}}'" - Write-Verbose -Verbose "enabled = '${{parameters.enabled}}'" - displayName: Testing parameters - - - pwsh: | - Write-Host "##vso[task.setvariable variable=IS_ENABLED]${{ parameters.enabled }}" - displayName: Initialize parameters - - - ${{ if eq(parameters.useCache, true) }}: - - task: Cache@2 - displayName: 'Load NuGet Cache' - inputs: - key: 'nuget | "$(Agent.OS)" | **/packages.lock.json,!**/bin/**,!**/obj/**' - restoreKeys: | - nuget | "$(Agent.OS)" - nuget - path: '${{parameters.restorePath}}' - condition: and(succeeded(), eq(variables['IS_ENABLED'], 'true')) - - task: DotNetCoreCLI@2 - displayName: Restore packages (Cache enabled) - inputs: - command: restore - ${{ if gt(length(parameters.vstsFeedName), 0) }}: - feedsToUse: select - feedRestore: ${{parameters.vstsFeedName}} - includeNuGetOrg: true - workingDirectory: $(Build.SourcesDirectory) - restoreArguments: --use-lock-file --locked-mode ${{parameters.extraRestoreArgs}} - restoreDirectory: ${{parameters.restorePath}} - condition: and(succeeded(), eq(variables['IS_ENABLED'], 'true')) - - ${{ else }}: - - task: DotNetCoreCLI@2 - displayName: Restore packages (No cache) - inputs: - command: restore - ${{ if gt(length(parameters.vstsFeedName), 0) }}: - feedsToUse: select - feedRestore: ${{parameters.vstsFeedName}} - includeNuGetOrg: true - workingDirectory: $(Build.SourcesDirectory) - noCache: true - restoreArguments: --use-lock-file --locked-mode ${{parameters.extraRestoreArgs}} - condition: and(succeeded(), eq(variables['IS_ENABLED'], 'true')) diff --git a/.azure-pipelines/templates/prepare-unsigned-executable-darwin.yaml b/.azure-pipelines/templates/prepare-unsigned-executable-darwin.yaml deleted file mode 100644 index 53185578037..00000000000 --- a/.azure-pipelines/templates/prepare-unsigned-executable-darwin.yaml +++ /dev/null @@ -1,79 +0,0 @@ -parameters: - - name: executablePath - type: "string" - default: '' - - name: executableName - type: "string" - default: mgc - - name: certificateName - type: "string" - default: '' - - name: zipName - type: "string" - default: unsigned.zip - - name: targetRuntime - type: "string" - default: '' - - name: enabled - type: string - default: 'false' - -# Assumptions: -# The built zip has been downloaded already -steps: - - pwsh: | - Write-Host "##vso[task.setvariable variable=IS_ENABLED]${{ parameters.enabled }}" - displayName: Check enabled - condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'True')) - - - pwsh: | - Write-Host "##vso[task.setvariable variable=TARGET_RUNTIME]${{ parameters.targetRuntime }}" - Write-Host "##vso[task.setvariable variable=CERTIFICATE_NAME]${{ parameters.certificateName }}" - Write-Host "##vso[task.setvariable variable=EXECUTABLE_PATH]${{ parameters.executablePath }}" - Write-Host "##vso[task.setvariable variable=EXECUTABLE_NAME]${{ parameters.executableName }}" - Write-Host "##vso[task.setvariable variable=ZIP_NAME]${{ parameters.zipName }}" - displayName: Resolve parameters - condition: and(succeeded(), eq(variables['IS_ENABLED'], 'true'), eq(variables['SHOULD_SIGN'], 'True')) - - - task: PowerShell@2 - inputs: - pwsh: true - targetType: inline - script: | - Get-ChildItem -Path '$(EXECUTABLE_PATH)' -Recurse -Force -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName | Write-Verbose - if (-not (Test-Path -Path '$(EXECUTABLE_PATH)/$(EXECUTABLE_NAME)')) { - throw "The executable file '$(EXECUTABLE_PATH)/$(EXECUTABLE_NAME)' does not exist." - echo "##vso[task.complete result=Failed;]" - } - verbosePreference: '$(OUTPUT_PREFERENCE)' - debugPreference: '$(OUTPUT_PREFERENCE)' - informationPreference: '$(OUTPUT_PREFERENCE)' - displayName: Validate executable path location - condition: and(succeeded(), eq(variables['IS_ENABLED'], 'true'), eq(variables['SHOULD_SIGN'], 'True'), startsWith(variables['TARGET_RUNTIME'], 'osx')) - - - task: AzureKeyVault@2 - displayName: "Azure Key Vault: Get Secrets" - inputs: - azureSubscription: "MicrosofGraphKeyVault connection" - KeyVaultName: MicrosofGraphKeyVault - SecretsFilter: "graph-cli-apple-developer-certificate,graph-cli-apple-developer-certificate-password" - condition: and(succeeded(), eq(variables['IS_ENABLED'], 'true'), eq(variables['SHOULD_SIGN'], 'True'), startsWith(variables['TARGET_RUNTIME'], 'osx')) - - # Setting hardened entitlements is a requirement for Apple notarization - - script: | - set -e - security create-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain - security default-keychain -s $(agent.tempdirectory)/buildagent.keychain - security unlock-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain - echo "$(graph-cli-apple-developer-certificate)" | base64 -D > $(agent.tempdirectory)/cert.p12 - security import $(agent.tempdirectory)/cert.p12 -k $(agent.tempdirectory)/buildagent.keychain -P "$(graph-cli-apple-developer-certificate-password)" -T /usr/bin/codesign - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd $(agent.tempdirectory)/buildagent.keychain - codesign -s $(CERTIFICATE_NAME) --deep --force --options runtime --entitlements .azure-pipelines/darwin/entitlements.plist $(EXECUTABLE_PATH)/$(EXECUTABLE_NAME) - displayName: Set Hardened Entitlements - condition: and(succeeded(), eq(variables['IS_ENABLED'], 'true'), eq(variables['SHOULD_SIGN'], 'True'), startsWith(variables['TARGET_RUNTIME'], 'osx')) - - - script: | - set -e - pushd $(EXECUTABLE_PATH) && zip -r -X $(EXECUTABLE_PATH)/$(ZIP_NAME) * && rm $(EXECUTABLE_NAME) && popd - displayName: Archive build for submission - condition: and(succeeded(), eq(variables['IS_ENABLED'], 'true'), eq(variables['SHOULD_SIGN'], 'True'), startsWith(variables['TARGET_RUNTIME'], 'osx')) diff --git a/.azure-pipelines/templates/setup-powershell-environment.yml b/.azure-pipelines/templates/setup-powershell-environment.yml deleted file mode 100644 index 0d5a3ae9dcd..00000000000 --- a/.azure-pipelines/templates/setup-powershell-environment.yml +++ /dev/null @@ -1,8 +0,0 @@ -steps: - - pwsh: | - $preference = 'default' - if ('$(System.Debug)' -eq 'True') { - $preference = 'continue' - } - Write-Host "##vso[task.setvariable variable=OUTPUT_PREFERENCE]$preference" - displayName: Set preference diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 61ddde70782..00000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/dotnet/.devcontainer/base.Dockerfile - -# [Choice] .NET version: 6.0, 3.1, 6.0-bullseye, 3.1-bullseye, 6.0-focal, 3.1-focal -ARG VARIANT="6.0-bullseye-slim" -FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT} - -# [Choice] Node.js version: none, lts/*, 18, 16, 14 -ARG NODE_VERSION="none" -RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - -# [Optional] Uncomment this line to install global node packages. -# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 - -ARG USERNAME="vscode" - -RUN mkdir -p /home/${USERNAME}/.nuget/packages \ - && chown -R ${USERNAME} /home/${USERNAME}/.nuget \ - # Persist command history - && SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \ - && mkdir /commandhistory \ - && touch /commandhistory/.bash_history \ - && chown -R ${USERNAME} /commandhistory \ - && echo "$SNIPPET" >> "/home/${USERNAME}/.bashrc" - -USER ${USERNAME} -# Disable github status checks before each command (slows down terminal for large repositories) -RUN git config --global codespaces-theme.hide-status 1 \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 69ad107febc..00000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,68 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/dotnet -{ - "name": "C# (.NET)", - "build": { - "dockerfile": "Dockerfile", - "args": { - // Update 'VARIANT' to pick a .NET Core version: 3.1, 6.0 - // Append -bullseye or -focal to pin to an OS version. - "VARIANT": "6.0-bullseye", - // Options - "NODE_VERSION": "none" - } - }, - - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "ms-dotnettools.csharp", - "EditorConfig.EditorConfig", - "ms-azuretools.vscode-docker" - ] - } - }, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [5000, 5001], - - // [Optional] To reuse of your local HTTPS dev cert: - // - // 1. Export it locally using this command: - // * Windows PowerShell: - // dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" - // * macOS/Linux terminal: - // dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" - // - // 2. Uncomment these 'remoteEnv' lines: - // "remoteEnv": { - // "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere", - // "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx", - // }, - // - // 3. Do one of the following depending on your scenario: - // * When using GitHub Codespaces and/or Remote - Containers: - // 1. Start the container - // 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer - // 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https" - // - // * If only using Remote - Containers with a local container, uncomment this line instead: - // "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "dotnet restore", - - // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "vscode", - "features": { - "git": "os-provided" - }, - "mounts": [ - // Add a volume for nuget packages. Speeds up subsequent builds - "source=msgraph-cli-nuget,target=/home/vscode/.nuget/packages,type=volume", - "source=msgraph-cli-bashhistory,target=/commandhistory,type=volume" - ] -} diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index a678fe56593..00000000000 --- a/.dockerignore +++ /dev/null @@ -1,11 +0,0 @@ -**/.git/ -**/.github/ -**/.vs/ -**/.vscode/ -**/[Bb]in/ -**/[Oo]bj/ -**/*.sample.* -tmp/ -**/.env -**/*.md -docker-compose.yml \ No newline at end of file diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 5ea5ac09101..00000000000 --- a/.editorconfig +++ /dev/null @@ -1,132 +0,0 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# top-most EditorConfig file -root = true - -[*] -indent_style = space -indent_size = 4 -end_of_line = crlf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.{y[a]ml,json}] -indent_size = 2 - -[*.csproj] -indent_size = 2 - -# VSCode generates files with 4 spaces -[.vscode/*.json] -indent_size = 4 - -# Code files -[*.{cs,csx,vb,vbx}] -indent_size = 4 -charset = utf-8-bom -############################### -# .NET Coding Conventions # -############################### -[*.{cs,vb}] -# Organize usings -dotnet_sort_system_directives_first = true -# this. preferences -dotnet_style_qualification_for_field = false:silent -dotnet_style_qualification_for_property = false:silent -dotnet_style_qualification_for_method = false:silent -dotnet_style_qualification_for_event = false:silent -# Language keywords vs BCL types preferences -dotnet_style_predefined_type_for_locals_parameters_members = true:silent -dotnet_style_predefined_type_for_member_access = true:silent -# Parentheses preferences -dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent -# Modifier preferences -dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent -dotnet_style_readonly_field = true:suggestion -# Expression-level preferences -dotnet_style_object_initializer = true:suggestion -dotnet_style_collection_initializer = true:suggestion -dotnet_style_explicit_tuple_names = true:suggestion -dotnet_style_null_propagation = true:suggestion -dotnet_style_coalesce_expression = true:suggestion -dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent -dotnet_style_prefer_inferred_tuple_names = true:suggestion -dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion -dotnet_style_prefer_auto_properties = true:silent -dotnet_style_prefer_conditional_expression_over_assignment = true:silent -dotnet_style_prefer_conditional_expression_over_return = true:silent -############################### -# Naming Conventions # -############################### -# Style Definitions -dotnet_naming_style.pascal_case_style.capitalization = pascal_case -# Use PascalCase for constant fields -dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields -dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style -dotnet_naming_symbols.constant_fields.applicable_kinds = field -dotnet_naming_symbols.constant_fields.applicable_accessibilities = * -dotnet_naming_symbols.constant_fields.required_modifiers = const -############################### -# C# Coding Conventions # -############################### -[*.cs] -# var preferences -csharp_style_var_for_built_in_types = true:silent -csharp_style_var_when_type_is_apparent = true:silent -csharp_style_var_elsewhere = true:silent -# Expression-bodied members -csharp_style_expression_bodied_methods = false:silent -csharp_style_expression_bodied_constructors = false:silent -csharp_style_expression_bodied_operators = false:silent -csharp_style_expression_bodied_properties = true:silent -csharp_style_expression_bodied_indexers = true:silent -csharp_style_expression_bodied_accessors = true:silent -# Pattern matching preferences -csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion -csharp_style_pattern_matching_over_as_with_null_check = true:suggestion -# Null-checking preferences -csharp_style_throw_expression = true:suggestion -csharp_style_conditional_delegate_call = true:suggestion -# Modifier preferences -csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion -# Expression-level preferences -csharp_prefer_braces = true:silent -csharp_style_deconstructed_variable_declaration = true:suggestion -csharp_prefer_simple_default_expression = true:suggestion -csharp_style_pattern_local_over_anonymous_function = true:suggestion -csharp_style_inlined_variable_declaration = true:suggestion -############################### -# C# Formatting Rules # -############################### -# New line preferences -csharp_new_line_before_open_brace = all -csharp_new_line_before_else = true -csharp_new_line_before_catch = true -csharp_new_line_before_finally = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_members_in_anonymous_types = true -csharp_new_line_between_query_expression_clauses = true -# Indentation preferences -csharp_indent_case_contents = true -csharp_indent_switch_labels = true -csharp_indent_labels = flush_left -# Space preferences -csharp_space_after_cast = false -csharp_space_after_keywords_in_control_flow_statements = true -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_parentheses = false -csharp_space_before_colon_in_inheritance_clause = true -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_around_binary_operators = before_and_after -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_between_method_call_empty_parameter_list_parentheses = false -# Wrapping preferences -csharp_preserve_single_line_statements = true -csharp_preserve_single_line_blocks = false diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 41fa432da69..00000000000 --- a/.gitattributes +++ /dev/null @@ -1,20 +0,0 @@ -# Set the default behavior, in case people don't have core.autocrlf set. -* text=auto - -# Explicitly declare text files you want to always be normalized and converted -# to native line endings on checkout. -*.json text -*.ps[m]1 text - -# Declare files that will always have CRLF line endings on checkout. -*.sh text eol=lf -*.plist text eol=lf - -# Declare files that will always have CRLF line endings on checkout. -*.sln text eol=crlf -*.cs text eol=crlf -*.csproj text eol=crlf - -# Denote all files that are truly binary and should not be modified. -*.png binary -*.jpg binary diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 97d144de0e6..00000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @microsoftgraph/msgraph-devx-cli-write diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 063b6cb6811..00000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,17 +0,0 @@ -version: 2 -updates: -- package-ecosystem: nuget - directory: "/src/" - schedule: - interval: daily - open-pull-requests-limit: 10 -- package-ecosystem: github-actions - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 -- package-ecosystem: gitsubmodule - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 1 \ No newline at end of file diff --git a/.github/policies/msgraph-cli-branch-protection.yml b/.github/policies/msgraph-cli-branch-protection.yml deleted file mode 100644 index 6ab6766e9e7..00000000000 --- a/.github/policies/msgraph-cli-branch-protection.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. - -# File initially created using https://github.com/MIchaelMainer/policyservicetoolkit/blob/main/branch_protection_export.ps1. - -name: msgraph-cli-branch-protection -description: Branch protection policy for the msgraph-cli repository -resource: repository -configuration: - branchProtectionRules: - - - branchNamePattern: main - # This branch pattern applies to the following branches as of 06/09/2023 14:08:47: - # main - - # Specifies whether this branch can be deleted. boolean - allowsDeletions: false - # Specifies whether forced pushes are allowed on this branch. boolean - allowsForcePushes: false - # Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean - dismissStaleReviews: true - # Specifies whether admins can overwrite branch protection. boolean - isAdminEnforced: false - # Indicates whether "Require a pull request before merging" is enabled. boolean - requiresPullRequestBeforeMerging: true - # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required - requiredApprovingReviewsCount: 1 - # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean - requireCodeOwnersReview: true - # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines. - requiresCommitSignatures: false - # Are conversations required to be resolved before merging? boolean - requiresConversationResolution: true - # Are merge commits prohibited from being pushed to this branch. boolean - requiresLinearHistory: false - # Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status - requiredStatusChecks: - - license/cla - - Microsoft Graph CLI - Release - - CodeQL - # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean - requiresStrictStatusChecks: true - # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. - restrictsPushes: false - # Restrict who can dismiss pull request reviews. boolean - restrictsReviewDismissals: false - diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml deleted file mode 100644 index ee9483325c9..00000000000 --- a/.github/policies/resourceManagement.yml +++ /dev/null @@ -1,156 +0,0 @@ -id: -name: GitOps.PullRequestIssueManagement -description: GitOps.PullRequestIssueManagement primitive -owner: -resource: repository -disabled: false -where: -configuration: - resourceManagementConfiguration: - scheduledSearches: - - description: - frequencies: - - hourly: - hour: 1 - filters: - - isIssue - - isOpen - - hasLabel: - label: 'Needs: Author Feedback' - - hasLabel: - label: 'Status: No Recent Activity' - - noActivitySince: - days: 3 - - isNotLabeledWith: - label: Service Bug - actions: - - closeIssue - - description: - frequencies: - - hourly: - hour: 1 - filters: - - isIssue - - isOpen - - hasLabel: - label: 'Needs: Author Feedback' - - noActivitySince: - days: 4 - - isNotLabeledWith: - label: 'Status: No Recent Activity' - - isNotLabeledWith: - label: Service Bug - actions: - - addLabel: - label: 'Status: No Recent Activity' - - addReply: - reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. - - description: - frequencies: - - hourly: - hour: 1 - filters: - - isIssue - - isOpen - - hasLabel: - label: duplicate - - noActivitySince: - days: 1 - actions: - - addReply: - reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes. - - closeIssue - - description: - frequencies: - - hourly: - hour: 1 - filters: - - isOpen - - hasLabel: - label: 'API: Graph' - - noActivitySince: - days: 14 - actions: - - addLabel: - label: Service issue - - addReply: - reply: >- - Hello @${issueAuthor} - - - Thank you for reporting your concern. If you report this issue in the Microsoft Q&A forum, it will get routed to the appropriate team for them to triage. - - - https://aka.ms/askgraph - eventResponderTasks: - - if: - - payloadType: Issues - - and: - - isOpen - - not: - and: - - isAssignedToSomeone - - isLabeled - then: - - addLabel: - label: 'ToTriage' - - if: - - payloadType: Issue_Comment - - isAction: - action: Created - - isActivitySender: - issueAuthor: True - - hasLabel: - label: 'Needs: Author Feedback' - then: - - addLabel: - label: "Needs: Attention \U0001F44B" - - removeLabel: - label: 'Needs: Author Feedback' - description: - - if: - - payloadType: Issues - - not: - isAction: - action: Closed - - hasLabel: - label: 'Status: No Recent Activity' - then: - - removeLabel: - label: 'Status: No Recent Activity' - description: - - if: - - payloadType: Issue_Comment - - activitySenderHasAssociation: - association: Contributor - - bodyContains: - pattern: '?' - isRegex: False - - bodyContains: - pattern: '@' - isRegex: False - then: - - addLabel: - label: 'Needs: Author Feedback' - description: - - if: - - payloadType: Issue_Comment - - hasLabel: - label: 'API: Graph' - then: - - addReply: - reply: >- - Hello @${issueAuthor} - - - Thank you for reporting your concern. If you report this issue in the Microsoft Q&A forum, it will get routed to the appropriate team for them to triage. - - https://aka.ms/askgraph - - This issue will now be closed. If you encounter any issues in the future, please feel free to open an issue. - - addLabel: - label: Service issue - - closeIssue - description: -onFailure: -onSuccess: diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml deleted file mode 100644 index 6e5953f569e..00000000000 --- a/.github/workflows/auto-merge-dependabot.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Auto-merge dependabot updates - -on: - pull_request: - branches: [ main ] - -permissions: - pull-requests: write - contents: write - -jobs: - - dependabot-merge: - - runs-on: ubuntu-latest - - if: ${{ github.actor == 'dependabot[bot]' }} - - steps: - - name: Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@v1.6.0 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - - name: Enable auto-merge for Dependabot PRs - # Only if version bump is not a major version change - if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}} - run: gh pr merge --auto --merge "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 8dba4a64d81..00000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,82 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ "main" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "main" ] - schedule: - - cron: 1 * * * 1 # At minute 0 on Monday - -jobs: - analyze: - name: Analyze - # Runner size impacts CodeQL analysis time. To learn more, please see: - # - https://gh.io/recommended-hardware-resources-for-running-codeql - # - https://gh.io/supported-runners-and-hardware-resources - # - https://gh.io/using-larger-runners - # Consider using larger runners for possible analysis time improvements. - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'csharp' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] - # Use only 'java' to analyze code written in Java, Kotlin or both - # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" diff --git a/.github/workflows/create-v1.0-pull-request.yml b/.github/workflows/create-v1.0-pull-request.yml deleted file mode 100644 index fa376f5b288..00000000000 --- a/.github/workflows/create-v1.0-pull-request.yml +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -# This action will automatically create a pull request against main if the pushed branch -# has a branch path spec likev 1.0/pipelinebuild/*. Configure this action by updating the -# environment variable values[0]. - -name: "create pull request" - -# Controls when the action will run. Triggers the workflow on push -# events but only for branches with the following branch spec: "v1.0/pipelinebuild/*" -on: - push: - branches: - - "v1.0/pipelinebuild/*" - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "create-pull-request" - create-pull-request: - # GitHub Actions don't support skip ci yet like Azure Pipelines so this check will do the same. - if: github.event_name == 'push' && contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false - # The type of runner that the job will run on - runs-on: ubuntu-latest - # https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v4 - - # Create a pull request [1] - - name: Create PR using the GitHub REST API via hub - shell: bash - env: - GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }} - MESSAGE_TITLE: Generated v1.0 models and request builders using Kiota - MESSAGE_BODY: "This pull request was automatically created by the GitHub Action, **${{github.workflow}}**. \n\n The commit hash is _${{github.sha}}_. \n\n **Important** Check for unexpected deletions or changes in this PR." - ASSIGNEDTO: calebkiage - LABELS: generated - BASE: main - run: | - curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 - bin/hub pull-request -b "$BASE" -h "$GITHUB_REF" -m "$MESSAGE_TITLE" -m "$MESSAGE_BODY" -a "$ASSIGNEDTO" -l "$LABELS" - -# References -# [0] https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables -# [1] https://hub.github.com/hub-pull-request.1.html -# https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token \ No newline at end of file diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml deleted file mode 100644 index 3e2baae7f26..00000000000 --- a/.github/workflows/docker-publish.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Publish Docker image -on: - workflow_dispatch: - inputs: - tag: - description: 'The tag to build' - required: false - type: string - default: 'main' - push: - branches: [main] - tags: ['v*'] - paths: ['src/**', '.github/workflows/**', 'docker/**', 'Dockerfile'] -env: - IMAGE_NAME: ${{ github.repository }} - REGISTRY: ghcr.io -jobs: - push_to_registry: - name: Push Docker image to GitHub Packages - runs-on: ubuntu-latest - env: - PACKAGE_VERSION: ${{github.event.inputs.tag || github.ref_name || 'v0.1.0'}} - steps: - - id: get-version - run: | - PACKAGE_VERSION=$(echo $PACKAGE_VERSION | sed s/^v//) - echo "::set-output name=version::$PACKAGE_VERSION" - - name: Check out the repo - uses: actions/checkout@v4 - with: - submodules: true - ref: ${{github.event.inputs.tag || ''}} - - name: Login to docker registry - uses: docker/login-action@v3.0.0 - with: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: ${{ env.REGISTRY }} - - name: Push to GitHub Packages - Nightly - if: github.ref == 'refs/heads/main' || github.event.inputs.tag == 'main' - uses: docker/build-push-action@v5.1.0 - with: - push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly - secrets: | - "user=${{ secrets.NUGET_USER }}" - "token=${{ secrets.NUGET_PASSWORD }}" - - name: Push to GitHub Packages - Release - if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.event.inputs.tag, 'v') - uses: docker/build-push-action@v5.1.0 - with: - push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.get-version.outputs.version }} - secrets: | - "user=${{ secrets.NUGET_USER }}" - "token=${{ secrets.NUGET_PASSWORD }}" diff --git a/.github/workflows/projectbot.yml b/.github/workflows/projectbot.yml deleted file mode 100644 index 4960be6811f..00000000000 --- a/.github/workflows/projectbot.yml +++ /dev/null @@ -1,87 +0,0 @@ -# This workflow is used to add new issues to GitHub Projects (Beta) - -name: Add PR to project -on: - issues: - types: - - opened -jobs: - track_issue: - runs-on: ubuntu-latest - steps: - - name: Generate token - id: generate_token - uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a - with: - app_id: ${{ secrets.GRAPHBOT_APP_ID }} - private_key: ${{ secrets.GRAPHBOT_APP_PEM }} - - - name: Get project data - env: - GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} - ORGANIZATION: microsoftgraph - PROJECT_NUMBER: 24 - run: | - gh api graphql -f query=' - query($org: String!, $number: Int!) { - organization(login: $org){ - projectV2(number: $number) { - id - fields(first:20) { - nodes { - ... on ProjectV2SingleSelectField { - id - name - options { - id - name - } - } - } - } - } - } - }' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json - - echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV - echo 'TRIAGE_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Needs Triage 🔍") |.id' project_data.json) >> $GITHUB_ENV - - - name: Add Issue to project - env: - GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} - ISSUE_ID: ${{ github.event.issue.node_id }} - run: | - item_id="$( gh api graphql -f query=' - mutation($project:ID!, $issue:ID!) { - addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) { - item { - id - } - } - }' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectV2ItemById.item.id')" - - echo 'ITEM_ID='$item_id >> $GITHUB_ENV - - - name: Set Triage - env: - GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} - run: | - gh api graphql -f query=' - mutation ( - $project: ID! - $item: ID! - $status_field: ID! - $status_value: String! - ) { - set_status: updateProjectV2ItemFieldValue(input: { - projectId: $project - itemId: $item - fieldId: $status_field - value: {singleSelectOptionId: $status_value} - }) { - projectV2Item { - id - } - } - }' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.TRIAGE_OPTION_ID }} --silent diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml deleted file mode 100644 index b8cce112c09..00000000000 --- a/.github/workflows/release-please.yml +++ /dev/null @@ -1,21 +0,0 @@ -on: - push: - branches: - - main - -permissions: - contents: write - pull-requests: write - -name: release-please - -jobs: - release-please: - runs-on: ubuntu-latest - steps: - - uses: google-github-actions/release-please-action@v4 - with: - token: ${{ secrets.RELEASE_PLEASE_TOKEN }} - config-file: release-please-config.json - manifest-file: .release-please-manifest.json - target-branch: main diff --git a/.gitignore b/.gitignore deleted file mode 100644 index fc808bf56a6..00000000000 --- a/.gitignore +++ /dev/null @@ -1,588 +0,0 @@ -# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,visualstudio,intellij+all,dotnetcore,windows,macos,linux -# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,visualstudio,intellij+all,dotnetcore,windows,macos,linux - -### DotnetCore ### -# .NET Core build folders -bin/ -obj/ - -# Common node modules locations -/node_modules -/wwwroot/node_modules - -### Intellij+all ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# AWS User-specific -.idea/**/aws.xml - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/artifacts -# .idea/compiler.xml -# .idea/jarRepositories.xml -# .idea/modules.xml -# .idea/*.iml -# .idea/modules -# *.iml -# *.ipr - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser - -### Intellij+all Patch ### -# Ignores the whole .idea folder and all .iml files -# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 - -.idea/ - -# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 - -*.iml -modules.xml -.idea/misc.xml -*.ipr - -# Sonarlint plugin -.idea/sonarlint - -### Linux ### -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* - -### macOS ### -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -### VisualStudioCode ### -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -### VisualStudioCode Patch ### -# Ignore all local history of files -.history -.ionide - -# Support for Project snippet scope -!.vscode/*.code-snippets - -### Windows ### -# Windows thumbnail cache files -Thumbs.db -Thumbs.db:encryptable -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -### VisualStudio ### -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -bin/**/publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Nuget personal access tokens and Credentials -nuget.config - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools - -# Local History for Visual Studio Code - -# Windows Installer files from build outputs - -# JetBrains Rider -*.sln.iml - -### VisualStudio Patch ### -# Additional files built by Visual Studio - -# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,visualstudio,intellij+all,dotnetcore,windows,macos,linux - -app-settings.*.json -!app-settings.sample.json - -# docker compose mounts -tmp/ - -# Exclude any matches under src/generated -!src/generated/** - -# Exclude azure pipelines nuget config -!.azure-pipelines/nuget.config - -# Exclude kiota logs -.kiota.log diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/.release-please-manifest.json b/.release-please-manifest.json deleted file mode 100644 index 73d3293b98f..00000000000 --- a/.release-please-manifest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - ".": "1.4.0" -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 563029e0ce8..00000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "help", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll", - "args": ["-h"], - "cwd": "${workspaceFolder}/src", - "envFile": "${workspaceFolder}/src/.env", - "console": "internalConsole", - "stopAtEntry": false - }, - { - "name": "login", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll", - "args": ["login"], - "cwd": "${workspaceFolder}/src", - "envFile": "${workspaceFolder}/src/.env", - "console": "internalConsole", - "stopAtEntry": false - }, - { - "name": "me get", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll", - "args": ["me", "get", "--output", "TABLE"], - "cwd": "${workspaceFolder}/src", - "envFile": "${workspaceFolder}/src/.env", - "console": "internalConsole", - "stopAtEntry": false - }, - { - "name": "user patch", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll", - "args": ["users", "item", "patch", "--user-id", "admin@M365x258755.OnMicrosoft.com", "--body", "{\"officeLocation\": \"NewLocation\"}", "--debug"], - "cwd": "${workspaceFolder}/src", - "envFile": "${workspaceFolder}/src/.env", - "console": "internalConsole", - "stopAtEntry": false - }, - { - "name": "sites get", - "type": "coreclr", - "request": "launch", - // "preLaunchTask": "build", - "justMyCode": false, - "symbolOptions": { - "searchPaths": [], - "searchMicrosoftSymbolServer": false, - "searchNuGetOrgSymbolServer": true - }, - "program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll", - "args": ["sites", "list", "--debug"], - "cwd": "${workspaceFolder}/src", - "envFile": "${workspaceFolder}/src/.env", - "console": "internalConsole", - "stopAtEntry": false - }, - { - "name": "identity get", - "type": "coreclr", - "request": "launch", - // "preLaunchTask": "build", - "justMyCode": false, - // "symbolOptions": { - // "searchPaths": [], - // "searchMicrosoftSymbolServer": false, - // "searchNuGetOrgSymbolServer": true - // }, - "program": "${workspaceFolder}/src/bin/Debug/net8.0/mgc.dll", - "args": ["identity", "get", "--debug"], - "cwd": "${workspaceFolder}/src", - "envFile": "${workspaceFolder}/src/.env", - "console": "internalConsole", - "stopAtEntry": false - }, - { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach" - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 39ff9770a0d..00000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "omnisharp.organizeImportsOnFormat": true, - "dotnet.defaultSolution": "msgraph-cli.sln" -} diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 1300a428f34..00000000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "command": "dotnet", - "type": "process", - "args": [ - "build", - "${workspaceFolder}/src/msgraph-cli.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "publish", - "command": "dotnet", - "type": "process", - "args": [ - "publish", - "${workspaceFolder}/src/msgraph-cli.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "watch", - "command": "dotnet", - "type": "process", - "args": [ - "watch", - "run", - "${workspaceFolder}/src/msgraph-cli.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" - ], - "problemMatcher": "$msCompile" - } - ] -} \ No newline at end of file diff --git a/src/generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs b/src/generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs deleted file mode 100644 index 23b1839d6c0..00000000000 --- a/src/generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -using Microsoft.Kiota.Abstractions.Serialization; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System; -namespace ApiSdk.Groups.Item.Team.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse : IAdditionalDataHolder, IParsable { - /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - public IDictionary AdditionalData { get; set; } - /// The value property - public bool? Value { get; set; } - /// - /// Instantiates a new and sets the default values. - /// - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() { - AdditionalData = new Dictionary(); - } - /// - /// Creates a new instance of the appropriate class based on discriminator value - /// - /// A - /// The parse node to use to read the discriminator value and create the object - public static DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(); - } - /// - /// The deserialization information for the current model - /// - /// A >"> - public virtual IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"value", n => { Value = n.GetBoolValue(); } }, - }; - } - /// - /// Serializes information the current object - /// - /// Serialization writer to use to serialize this model - public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteBoolValue("value", Value); - writer.WriteAdditionalData(AdditionalData); - } - } -} diff --git a/src/generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs b/src/generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs deleted file mode 100644 index fb72f6c92cd..00000000000 --- a/src/generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs +++ /dev/null @@ -1,147 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.Groups.Item.Team.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - /// - /// Provides operations to call the doesUserHaveAccess method. - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function doesUserHaveAccess - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function doesUserHaveAccess"; - var groupIdOption = new Option("--group-id", description: "The unique identifier of group") { - }; - groupIdOption.IsRequired = true; - command.AddOption(groupIdOption); - var channelIdOption = new Option("--channel-id", description: "The unique identifier of channel") { - }; - channelIdOption.IsRequired = true; - command.AddOption(channelIdOption); - var userIdOption = new Option("--user-id", description: "Usage: userId='@userId'") { - }; - userIdOption.IsRequired = false; - command.AddOption(userIdOption); - var tenantIdOption = new Option("--tenant-id", description: "Usage: tenantId='@tenantId'") { - }; - tenantIdOption.IsRequired = false; - command.AddOption(tenantIdOption); - var userPrincipalNameOption = new Option("--user-principal-name", description: "Usage: userPrincipalName='@userPrincipalName'") { - }; - userPrincipalNameOption.IsRequired = false; - command.AddOption(userPrincipalNameOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var groupId = invocationContext.ParseResult.GetValueForOption(groupIdOption); - var channelId = invocationContext.ParseResult.GetValueForOption(channelIdOption); - var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); - var tenantId = invocationContext.ParseResult.GetValueForOption(tenantIdOption); - var userPrincipalName = invocationContext.ParseResult.GetValueForOption(userPrincipalNameOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - if (!string.IsNullOrEmpty(userId)) q.QueryParameters.UserId = userId; - if (!string.IsNullOrEmpty(tenantId)) q.QueryParameters.TenantId = tenantId; - if (!string.IsNullOrEmpty(userPrincipalName)) q.QueryParameters.UserPrincipalName = userPrincipalName; - }); - if (groupId is not null) requestInfo.PathParameters.Add("group%2Did", groupId); - if (channelId is not null) requestInfo.PathParameters.Add("channel%2Did", channelId); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(string rawUrl) : base("{+baseurl}/groups/{group%2Did}/team/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", rawUrl) { - } - /// - /// Invoke function doesUserHaveAccess - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - /// - /// Invoke function doesUserHaveAccess - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParameters { - /// Usage: tenantId='@tenantId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("tenantId")] - public string? TenantId { get; set; } -#nullable restore -#else - [QueryParameter("tenantId")] - public string TenantId { get; set; } -#endif - /// Usage: userId='@userId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userId")] - public string? UserId { get; set; } -#nullable restore -#else - [QueryParameter("userId")] - public string UserId { get; set; } -#endif - /// Usage: userPrincipalName='@userPrincipalName' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userPrincipalName")] - public string? UserPrincipalName { get; set; } -#nullable restore -#else - [QueryParameter("userPrincipalName")] - public string UserPrincipalName { get; set; } -#endif - } - } -} diff --git a/src/generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs b/src/generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs deleted file mode 100644 index 9e5d440d23e..00000000000 --- a/src/generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -using Microsoft.Kiota.Abstractions.Serialization; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System; -namespace ApiSdk.Groups.Item.Team.PrimaryChannel.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse : IAdditionalDataHolder, IParsable { - /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - public IDictionary AdditionalData { get; set; } - /// The value property - public bool? Value { get; set; } - /// - /// Instantiates a new and sets the default values. - /// - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() { - AdditionalData = new Dictionary(); - } - /// - /// Creates a new instance of the appropriate class based on discriminator value - /// - /// A - /// The parse node to use to read the discriminator value and create the object - public static DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(); - } - /// - /// The deserialization information for the current model - /// - /// A >"> - public virtual IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"value", n => { Value = n.GetBoolValue(); } }, - }; - } - /// - /// Serializes information the current object - /// - /// Serialization writer to use to serialize this model - public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteBoolValue("value", Value); - writer.WriteAdditionalData(AdditionalData); - } - } -} diff --git a/src/generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs b/src/generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs deleted file mode 100644 index 811beb75958..00000000000 --- a/src/generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs +++ /dev/null @@ -1,141 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.Groups.Item.Team.PrimaryChannel.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - /// - /// Provides operations to call the doesUserHaveAccess method. - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function doesUserHaveAccess - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function doesUserHaveAccess"; - var groupIdOption = new Option("--group-id", description: "The unique identifier of group") { - }; - groupIdOption.IsRequired = true; - command.AddOption(groupIdOption); - var userIdOption = new Option("--user-id", description: "Usage: userId='@userId'") { - }; - userIdOption.IsRequired = false; - command.AddOption(userIdOption); - var tenantIdOption = new Option("--tenant-id", description: "Usage: tenantId='@tenantId'") { - }; - tenantIdOption.IsRequired = false; - command.AddOption(tenantIdOption); - var userPrincipalNameOption = new Option("--user-principal-name", description: "Usage: userPrincipalName='@userPrincipalName'") { - }; - userPrincipalNameOption.IsRequired = false; - command.AddOption(userPrincipalNameOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var groupId = invocationContext.ParseResult.GetValueForOption(groupIdOption); - var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); - var tenantId = invocationContext.ParseResult.GetValueForOption(tenantIdOption); - var userPrincipalName = invocationContext.ParseResult.GetValueForOption(userPrincipalNameOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - if (!string.IsNullOrEmpty(userId)) q.QueryParameters.UserId = userId; - if (!string.IsNullOrEmpty(tenantId)) q.QueryParameters.TenantId = tenantId; - if (!string.IsNullOrEmpty(userPrincipalName)) q.QueryParameters.UserPrincipalName = userPrincipalName; - }); - if (groupId is not null) requestInfo.PathParameters.Add("group%2Did", groupId); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/groups/{group%2Did}/team/primaryChannel/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(string rawUrl) : base("{+baseurl}/groups/{group%2Did}/team/primaryChannel/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", rawUrl) { - } - /// - /// Invoke function doesUserHaveAccess - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - /// - /// Invoke function doesUserHaveAccess - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParameters { - /// Usage: tenantId='@tenantId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("tenantId")] - public string? TenantId { get; set; } -#nullable restore -#else - [QueryParameter("tenantId")] - public string TenantId { get; set; } -#endif - /// Usage: userId='@userId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userId")] - public string? UserId { get; set; } -#nullable restore -#else - [QueryParameter("userId")] - public string UserId { get; set; } -#endif - /// Usage: userPrincipalName='@userPrincipalName' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userPrincipalName")] - public string? UserPrincipalName { get; set; } -#nullable restore -#else - [QueryParameter("userPrincipalName")] - public string UserPrincipalName { get; set; } -#endif - } - } -} diff --git a/src/generated/IdentityGovernance/EntitlementManagement/Assignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilder.cs b/src/generated/IdentityGovernance/EntitlementManagement/Assignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilder.cs deleted file mode 100644 index 25bf88b5d0b..00000000000 --- a/src/generated/IdentityGovernance/EntitlementManagement/Assignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilder.cs +++ /dev/null @@ -1,220 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.EntitlementManagement.Assignments.AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId { - /// - /// Provides operations to call the additionalAccess method. - /// - public class AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function additionalAccess - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function additionalAccess"; - var accessPackageIdOption = new Option("--access-package-id", description: "Usage: accessPackageId='{accessPackageId}'") { - }; - accessPackageIdOption.IsRequired = true; - command.AddOption(accessPackageIdOption); - var incompatibleAccessPackageIdOption = new Option("--incompatible-access-package-id", description: "Usage: incompatibleAccessPackageId='{incompatibleAccessPackageId}'") { - }; - incompatibleAccessPackageIdOption.IsRequired = true; - command.AddOption(incompatibleAccessPackageIdOption); - var topOption = new Option("--top", description: "Show only the first n items") { - }; - topOption.IsRequired = false; - command.AddOption(topOption); - var skipOption = new Option("--skip", description: "Skip the first n items") { - }; - skipOption.IsRequired = false; - command.AddOption(skipOption); - var searchOption = new Option("--search", description: "Search items by search phrases") { - }; - searchOption.IsRequired = false; - command.AddOption(searchOption); - var filterOption = new Option("--filter", description: "Filter items by property values") { - }; - filterOption.IsRequired = false; - command.AddOption(filterOption); - var countOption = new Option("--count", description: "Include count of items") { - }; - countOption.IsRequired = false; - command.AddOption(countOption); - var selectOption = new Option("--select", description: "Select properties to be returned") { - Arity = ArgumentArity.ZeroOrMore - }; - selectOption.IsRequired = false; - command.AddOption(selectOption); - var orderbyOption = new Option("--orderby", description: "Order items by property values") { - Arity = ArgumentArity.ZeroOrMore - }; - orderbyOption.IsRequired = false; - command.AddOption(orderbyOption); - var expandOption = new Option("--expand", description: "Expand related entities") { - Arity = ArgumentArity.ZeroOrMore - }; - expandOption.IsRequired = false; - command.AddOption(expandOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - var allOption = new Option("--all"); - command.AddOption(allOption); - command.SetHandler(async (invocationContext) => { - var accessPackageId = invocationContext.ParseResult.GetValueForOption(accessPackageIdOption); - var incompatibleAccessPackageId = invocationContext.ParseResult.GetValueForOption(incompatibleAccessPackageIdOption); - var top = invocationContext.ParseResult.GetValueForOption(topOption); - var skip = invocationContext.ParseResult.GetValueForOption(skipOption); - var search = invocationContext.ParseResult.GetValueForOption(searchOption); - var filter = invocationContext.ParseResult.GetValueForOption(filterOption); - var count = invocationContext.ParseResult.GetValueForOption(countOption); - var select = invocationContext.ParseResult.GetValueForOption(selectOption); - var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); - var expand = invocationContext.ParseResult.GetValueForOption(expandOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - var all = invocationContext.ParseResult.GetValueForOption(allOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - IPagingService pagingService = invocationContext.BindingContext.GetService(typeof(IPagingService)) as IPagingService ?? throw new ArgumentNullException("pagingService"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - q.QueryParameters.Top = top; - q.QueryParameters.Skip = skip; - if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; - if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; - q.QueryParameters.Count = count; - q.QueryParameters.Select = select; - q.QueryParameters.Orderby = orderby; - q.QueryParameters.Expand = expand; - }); - if (accessPackageId is not null) requestInfo.PathParameters.Add("accessPackageId", accessPackageId); - if (incompatibleAccessPackageId is not null) requestInfo.PathParameters.Add("incompatibleAccessPackageId", incompatibleAccessPackageId); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); - var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); - var response = pageResponse?.Response; - IOutputFormatter? formatter = null; - if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { - formatter = outputFormatterFactory.GetFormatter(output); - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - } else { - formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); - } - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/entitlementManagement/assignments/additionalAccess(accessPackageId='{accessPackageId}',incompatibleAccessPackageId='{incompatibleAccessPackageId}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/entitlementManagement/assignments/additionalAccess(accessPackageId='{accessPackageId}',incompatibleAccessPackageId='{incompatibleAccessPackageId}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) { - } - /// - /// Invoke function additionalAccess - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - /// - /// Invoke function additionalAccess - /// - public class AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdRequestBuilderGetQueryParameters { - /// Include count of items - [QueryParameter("%24count")] - public bool? Count { get; set; } - /// Expand related entities -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("%24expand")] - public string[]? Expand { get; set; } -#nullable restore -#else - [QueryParameter("%24expand")] - public string[] Expand { get; set; } -#endif - /// Filter items by property values -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("%24filter")] - public string? Filter { get; set; } -#nullable restore -#else - [QueryParameter("%24filter")] - public string Filter { get; set; } -#endif - /// Order items by property values -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("%24orderby")] - public string[]? Orderby { get; set; } -#nullable restore -#else - [QueryParameter("%24orderby")] - public string[] Orderby { get; set; } -#endif - /// Search items by search phrases -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("%24search")] - public string? Search { get; set; } -#nullable restore -#else - [QueryParameter("%24search")] - public string Search { get; set; } -#endif - /// Select properties to be returned -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("%24select")] - public string[]? Select { get; set; } -#nullable restore -#else - [QueryParameter("%24select")] - public string[] Select { get; set; } -#endif - /// Skip the first n items - [QueryParameter("%24skip")] - public int? Skip { get; set; } - /// Show only the first n items - [QueryParameter("%24top")] - public int? Top { get; set; } - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs deleted file mode 100644 index c3d7ed1c693..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ /dev/null @@ -1,112 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume { - /// - /// Provides operations to call the resume method. - /// - public class MicrosoftGraphIdentityGovernanceResumeRequestBuilder : BaseCliRequestBuilder { - /// - /// Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. - /// Find more info here - /// - /// A - public Command BuildPostCommand() { - var command = new Command("post"); - command.Description = "Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/identitygovernance-taskprocessingresult-resume?view=graph-rest-1.0"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var runIdOption = new Option("--run-id", description: "The unique identifier of run") { - }; - runIdOption.IsRequired = true; - command.AddOption(runIdOption); - var userProcessingResultIdOption = new Option("--user-processing-result-id", description: "The unique identifier of userProcessingResult") { - }; - userProcessingResultIdOption.IsRequired = true; - command.AddOption(userProcessingResultIdOption); - var taskProcessingResultIdOption = new Option("--task-processing-result-id", description: "The unique identifier of taskProcessingResult") { - }; - taskProcessingResultIdOption.IsRequired = true; - command.AddOption(taskProcessingResultIdOption); - var bodyOption = new Option("--body", description: "The request body") { - }; - bodyOption.IsRequired = true; - command.AddOption(bodyOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var runId = invocationContext.ParseResult.GetValueForOption(runIdOption); - var userProcessingResultId = invocationContext.ParseResult.GetValueForOption(userProcessingResultIdOption); - var taskProcessingResultId = invocationContext.ParseResult.GetValueForOption(taskProcessingResultIdOption); - var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ResumePostRequestBody.CreateFromDiscriminatorValue); - if (model is null) { - Console.Error.WriteLine("No model data to send."); - return; - } - var requestInfo = ToPostRequestInformation(model, q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (runId is not null) requestInfo.PathParameters.Add("run%2Did", runId); - if (userProcessingResultId is not null) requestInfo.PathParameters.Add("userProcessingResult%2Did", userProcessingResultId); - if (taskProcessingResultId is not null) requestInfo.PathParameters.Add("taskProcessingResult%2Did", taskProcessingResultId); - requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - await reqAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken); - Console.WriteLine("Success"); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceResumeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/microsoft.graph.identityGovernance.resume", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceResumeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/microsoft.graph.identityGovernance.resume", rawUrl) { - } - /// - /// Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. - /// - /// A - /// The request body - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action> requestConfiguration = default) { -#endif - _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs deleted file mode 100644 index 32f2e0dc94f..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/ServiceProvisioningErrors/ServiceProvisioningErrorsRequestBuilder.cs +++ /dev/null @@ -1,250 +0,0 @@ -// -using ApiSdk.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors.Count; -using ApiSdk.Models.ODataErrors; -using ApiSdk.Models; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.Subject.ServiceProvisioningErrors { - /// - /// Builds and executes requests for operations under \identityGovernance\lifecycleWorkflows\deletedItems\workflows\{workflow-id}\runs\{run-id}\userProcessingResults\{userProcessingResult-id}\taskProcessingResults\{taskProcessingResult-id}\subject\serviceProvisioningErrors - /// - public class ServiceProvisioningErrorsRequestBuilder : BaseCliRequestBuilder { - /// - /// Provides operations to count the resources in the collection. - /// - /// A - public Command BuildCountNavCommand() { - var command = new Command("count"); - command.Description = "Provides operations to count the resources in the collection."; - var builder = new CountRequestBuilder(PathParameters); - var execCommands = new List(); - execCommands.Add(builder.BuildGetCommand()); - foreach (var cmd in execCommands) - { - command.AddCommand(cmd); - } - return command; - } - /// - /// Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance)."; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var runIdOption = new Option("--run-id", description: "The unique identifier of run") { - }; - runIdOption.IsRequired = true; - command.AddOption(runIdOption); - var userProcessingResultIdOption = new Option("--user-processing-result-id", description: "The unique identifier of userProcessingResult") { - }; - userProcessingResultIdOption.IsRequired = true; - command.AddOption(userProcessingResultIdOption); - var taskProcessingResultIdOption = new Option("--task-processing-result-id", description: "The unique identifier of taskProcessingResult") { - }; - taskProcessingResultIdOption.IsRequired = true; - command.AddOption(taskProcessingResultIdOption); - var topOption = new Option("--top", description: "Show only the first n items") { - }; - topOption.IsRequired = false; - command.AddOption(topOption); - var skipOption = new Option("--skip", description: "Skip the first n items") { - }; - skipOption.IsRequired = false; - command.AddOption(skipOption); - var searchOption = new Option("--search", description: "Search items by search phrases") { - }; - searchOption.IsRequired = false; - command.AddOption(searchOption); - var filterOption = new Option("--filter", description: "Filter items by property values") { - }; - filterOption.IsRequired = false; - command.AddOption(filterOption); - var countOption = new Option("--count", description: "Include count of items") { - }; - countOption.IsRequired = false; - command.AddOption(countOption); - var orderbyOption = new Option("--orderby", description: "Order items by property values") { - Arity = ArgumentArity.ZeroOrMore - }; - orderbyOption.IsRequired = false; - command.AddOption(orderbyOption); - var selectOption = new Option("--select", description: "Select properties to be returned") { - Arity = ArgumentArity.ZeroOrMore - }; - selectOption.IsRequired = false; - command.AddOption(selectOption); - var expandOption = new Option("--expand", description: "Expand related entities") { - Arity = ArgumentArity.ZeroOrMore - }; - expandOption.IsRequired = false; - command.AddOption(expandOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - var allOption = new Option("--all"); - command.AddOption(allOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var runId = invocationContext.ParseResult.GetValueForOption(runIdOption); - var userProcessingResultId = invocationContext.ParseResult.GetValueForOption(userProcessingResultIdOption); - var taskProcessingResultId = invocationContext.ParseResult.GetValueForOption(taskProcessingResultIdOption); - var top = invocationContext.ParseResult.GetValueForOption(topOption); - var skip = invocationContext.ParseResult.GetValueForOption(skipOption); - var search = invocationContext.ParseResult.GetValueForOption(searchOption); - var filter = invocationContext.ParseResult.GetValueForOption(filterOption); - var count = invocationContext.ParseResult.GetValueForOption(countOption); - var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); - var select = invocationContext.ParseResult.GetValueForOption(selectOption); - var expand = invocationContext.ParseResult.GetValueForOption(expandOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - var all = invocationContext.ParseResult.GetValueForOption(allOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - IPagingService pagingService = invocationContext.BindingContext.GetService(typeof(IPagingService)) as IPagingService ?? throw new ArgumentNullException("pagingService"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - q.QueryParameters.Top = top; - q.QueryParameters.Skip = skip; - if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; - if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; - q.QueryParameters.Count = count; - q.QueryParameters.Orderby = orderby; - q.QueryParameters.Select = select; - q.QueryParameters.Expand = expand; - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (runId is not null) requestInfo.PathParameters.Add("run%2Did", runId); - if (userProcessingResultId is not null) requestInfo.PathParameters.Add("userProcessingResult%2Did", userProcessingResultId); - if (taskProcessingResultId is not null) requestInfo.PathParameters.Add("taskProcessingResult%2Did", taskProcessingResultId); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); - var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); - var response = pageResponse?.Response; - IOutputFormatter? formatter = null; - if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { - formatter = outputFormatterFactory.GetFormatter(output); - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - } else { - formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); - } - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public ServiceProvisioningErrorsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public ServiceProvisioningErrorsRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/subject/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) { - } - /// - /// Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - /// - /// Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). - /// - public class ServiceProvisioningErrorsRequestBuilderGetQueryParameters { - /// Include count of items - [QueryParameter("%24count")] - public bool? Count { get; set; } - /// Expand related entities -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("%24expand")] - public string[]? Expand { get; set; } -#nullable restore -#else - [QueryParameter("%24expand")] - public string[] Expand { get; set; } -#endif - /// Filter items by property values -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("%24filter")] - public string? Filter { get; set; } -#nullable restore -#else - [QueryParameter("%24filter")] - public string Filter { get; set; } -#endif - /// Order items by property values -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("%24orderby")] - public string[]? Orderby { get; set; } -#nullable restore -#else - [QueryParameter("%24orderby")] - public string[] Orderby { get; set; } -#endif - /// Search items by search phrases -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("%24search")] - public string? Search { get; set; } -#nullable restore -#else - [QueryParameter("%24search")] - public string Search { get; set; } -#endif - /// Select properties to be returned -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("%24select")] - public string[]? Select { get; set; } -#nullable restore -#else - [QueryParameter("%24select")] - public string[] Select { get; set; } -#endif - /// Skip the first n items - [QueryParameter("%24skip")] - public int? Skip { get; set; } - /// Show only the first n items - [QueryParameter("%24top")] - public int? Top { get; set; } - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs deleted file mode 100644 index 1dc9eafe775..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs +++ /dev/null @@ -1,107 +0,0 @@ -// -using ApiSdk.Models.IdentityGovernance; -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime { - /// - /// Provides operations to call the summary method. - /// - public class MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function summary - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function summary"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var runIdOption = new Option("--run-id", description: "The unique identifier of run") { - }; - runIdOption.IsRequired = true; - command.AddOption(runIdOption); - var startDateTimeOption = new Option("--start-date-time", description: "Usage: startDateTime={startDateTime}") { - }; - startDateTimeOption.IsRequired = true; - command.AddOption(startDateTimeOption); - var endDateTimeOption = new Option("--end-date-time", description: "Usage: endDateTime={endDateTime}") { - }; - endDateTimeOption.IsRequired = true; - command.AddOption(endDateTimeOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var runId = invocationContext.ParseResult.GetValueForOption(runIdOption); - var startDateTime = invocationContext.ParseResult.GetValueForOption(startDateTimeOption); - var endDateTime = invocationContext.ParseResult.GetValueForOption(endDateTimeOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (runId is not null) requestInfo.PathParameters.Add("run%2Did", runId); - if (startDateTime is not null) requestInfo.PathParameters.Add("startDateTime", startDateTime); - if (endDateTime is not null) requestInfo.PathParameters.Add("endDateTime", endDateTime); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", rawUrl) { - } - /// - /// Invoke function summary - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs deleted file mode 100644 index 3bc7c152670..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -using ApiSdk.Models.IdentityGovernance; -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime { - /// - /// Provides operations to call the summary method. - /// - public class MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function summary - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function summary"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var startDateTimeOption = new Option("--start-date-time", description: "Usage: startDateTime={startDateTime}") { - }; - startDateTimeOption.IsRequired = true; - command.AddOption(startDateTimeOption); - var endDateTimeOption = new Option("--end-date-time", description: "Usage: endDateTime={endDateTime}") { - }; - endDateTimeOption.IsRequired = true; - command.AddOption(endDateTimeOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var startDateTime = invocationContext.ParseResult.GetValueForOption(startDateTimeOption); - var endDateTime = invocationContext.ParseResult.GetValueForOption(endDateTimeOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (startDateTime is not null) requestInfo.PathParameters.Add("startDateTime", startDateTime); - if (endDateTime is not null) requestInfo.PathParameters.Add("endDateTime", endDateTime); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/runs/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", rawUrl) { - } - /// - /// Invoke function summary - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs deleted file mode 100644 index a25b47d8a53..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ /dev/null @@ -1,106 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume { - /// - /// Provides operations to call the resume method. - /// - public class MicrosoftGraphIdentityGovernanceResumeRequestBuilder : BaseCliRequestBuilder { - /// - /// Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. - /// Find more info here - /// - /// A - public Command BuildPostCommand() { - var command = new Command("post"); - command.Description = "Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/identitygovernance-taskprocessingresult-resume?view=graph-rest-1.0"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var taskReportIdOption = new Option("--task-report-id", description: "The unique identifier of taskReport") { - }; - taskReportIdOption.IsRequired = true; - command.AddOption(taskReportIdOption); - var taskProcessingResultIdOption = new Option("--task-processing-result-id", description: "The unique identifier of taskProcessingResult") { - }; - taskProcessingResultIdOption.IsRequired = true; - command.AddOption(taskProcessingResultIdOption); - var bodyOption = new Option("--body", description: "The request body") { - }; - bodyOption.IsRequired = true; - command.AddOption(bodyOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var taskReportId = invocationContext.ParseResult.GetValueForOption(taskReportIdOption); - var taskProcessingResultId = invocationContext.ParseResult.GetValueForOption(taskProcessingResultIdOption); - var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ResumePostRequestBody.CreateFromDiscriminatorValue); - if (model is null) { - Console.Error.WriteLine("No model data to send."); - return; - } - var requestInfo = ToPostRequestInformation(model, q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (taskReportId is not null) requestInfo.PathParameters.Add("taskReport%2Did", taskReportId); - if (taskProcessingResultId is not null) requestInfo.PathParameters.Add("taskProcessingResult%2Did", taskProcessingResultId); - requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - await reqAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken); - Console.WriteLine("Success"); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceResumeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/microsoft.graph.identityGovernance.resume", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceResumeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/{taskReport%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/microsoft.graph.identityGovernance.resume", rawUrl) { - } - /// - /// Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. - /// - /// A - /// The request body - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action> requestConfiguration = default) { -#endif - _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs deleted file mode 100644 index c98704430a4..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -using ApiSdk.Models.IdentityGovernance; -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime { - /// - /// Provides operations to call the summary method. - /// - public class MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function summary - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function summary"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var startDateTimeOption = new Option("--start-date-time", description: "Usage: startDateTime={startDateTime}") { - }; - startDateTimeOption.IsRequired = true; - command.AddOption(startDateTimeOption); - var endDateTimeOption = new Option("--end-date-time", description: "Usage: endDateTime={endDateTime}") { - }; - endDateTimeOption.IsRequired = true; - command.AddOption(endDateTimeOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var startDateTime = invocationContext.ParseResult.GetValueForOption(startDateTimeOption); - var endDateTime = invocationContext.ParseResult.GetValueForOption(endDateTimeOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (startDateTime is not null) requestInfo.PathParameters.Add("startDateTime", startDateTime); - if (endDateTime is not null) requestInfo.PathParameters.Add("endDateTime", endDateTime); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/taskReports/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", rawUrl) { - } - /// - /// Invoke function summary - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs deleted file mode 100644 index 3ef2a52c5d1..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ /dev/null @@ -1,106 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume { - /// - /// Provides operations to call the resume method. - /// - public class MicrosoftGraphIdentityGovernanceResumeRequestBuilder : BaseCliRequestBuilder { - /// - /// Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. - /// Find more info here - /// - /// A - public Command BuildPostCommand() { - var command = new Command("post"); - command.Description = "Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/identitygovernance-taskprocessingresult-resume?view=graph-rest-1.0"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var userProcessingResultIdOption = new Option("--user-processing-result-id", description: "The unique identifier of userProcessingResult") { - }; - userProcessingResultIdOption.IsRequired = true; - command.AddOption(userProcessingResultIdOption); - var taskProcessingResultIdOption = new Option("--task-processing-result-id", description: "The unique identifier of taskProcessingResult") { - }; - taskProcessingResultIdOption.IsRequired = true; - command.AddOption(taskProcessingResultIdOption); - var bodyOption = new Option("--body", description: "The request body") { - }; - bodyOption.IsRequired = true; - command.AddOption(bodyOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var userProcessingResultId = invocationContext.ParseResult.GetValueForOption(userProcessingResultIdOption); - var taskProcessingResultId = invocationContext.ParseResult.GetValueForOption(taskProcessingResultIdOption); - var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ResumePostRequestBody.CreateFromDiscriminatorValue); - if (model is null) { - Console.Error.WriteLine("No model data to send."); - return; - } - var requestInfo = ToPostRequestInformation(model, q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (userProcessingResultId is not null) requestInfo.PathParameters.Add("userProcessingResult%2Did", userProcessingResultId); - if (taskProcessingResultId is not null) requestInfo.PathParameters.Add("taskProcessingResult%2Did", taskProcessingResultId); - requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - await reqAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken); - Console.WriteLine("Success"); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceResumeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/microsoft.graph.identityGovernance.resume", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceResumeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/microsoft.graph.identityGovernance.resume", rawUrl) { - } - /// - /// Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. - /// - /// A - /// The request body - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action> requestConfiguration = default) { -#endif - _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs deleted file mode 100644 index 0fe97492449..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -using ApiSdk.Models.IdentityGovernance; -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime { - /// - /// Provides operations to call the summary method. - /// - public class MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function summary - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function summary"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var startDateTimeOption = new Option("--start-date-time", description: "Usage: startDateTime={startDateTime}") { - }; - startDateTimeOption.IsRequired = true; - command.AddOption(startDateTimeOption); - var endDateTimeOption = new Option("--end-date-time", description: "Usage: endDateTime={endDateTime}") { - }; - endDateTimeOption.IsRequired = true; - command.AddOption(endDateTimeOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var startDateTime = invocationContext.ParseResult.GetValueForOption(startDateTimeOption); - var endDateTime = invocationContext.ParseResult.GetValueForOption(endDateTimeOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (startDateTime is not null) requestInfo.PathParameters.Add("startDateTime", startDateTime); - if (endDateTime is not null) requestInfo.PathParameters.Add("endDateTime", endDateTime); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", rawUrl) { - } - /// - /// Invoke function summary - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs deleted file mode 100644 index b621b7fc598..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ /dev/null @@ -1,112 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume { - /// - /// Provides operations to call the resume method. - /// - public class MicrosoftGraphIdentityGovernanceResumeRequestBuilder : BaseCliRequestBuilder { - /// - /// Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. - /// Find more info here - /// - /// A - public Command BuildPostCommand() { - var command = new Command("post"); - command.Description = "Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/identitygovernance-taskprocessingresult-resume?view=graph-rest-1.0"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var workflowVersionVersionNumberOption = new Option("--workflow-version-version-number", description: "The unique identifier of workflowVersion") { - }; - workflowVersionVersionNumberOption.IsRequired = true; - command.AddOption(workflowVersionVersionNumberOption); - var taskIdOption = new Option("--task-id", description: "The unique identifier of task") { - }; - taskIdOption.IsRequired = true; - command.AddOption(taskIdOption); - var taskProcessingResultIdOption = new Option("--task-processing-result-id", description: "The unique identifier of taskProcessingResult") { - }; - taskProcessingResultIdOption.IsRequired = true; - command.AddOption(taskProcessingResultIdOption); - var bodyOption = new Option("--body", description: "The request body") { - }; - bodyOption.IsRequired = true; - command.AddOption(bodyOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var workflowVersionVersionNumber = invocationContext.ParseResult.GetValueForOption(workflowVersionVersionNumberOption); - var taskId = invocationContext.ParseResult.GetValueForOption(taskIdOption); - var taskProcessingResultId = invocationContext.ParseResult.GetValueForOption(taskProcessingResultIdOption); - var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ResumePostRequestBody.CreateFromDiscriminatorValue); - if (model is null) { - Console.Error.WriteLine("No model data to send."); - return; - } - var requestInfo = ToPostRequestInformation(model, q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (workflowVersionVersionNumber is not null) requestInfo.PathParameters.Add("workflowVersion%2DversionNumber", workflowVersionVersionNumber); - if (taskId is not null) requestInfo.PathParameters.Add("task%2Did", taskId); - if (taskProcessingResultId is not null) requestInfo.PathParameters.Add("taskProcessingResult%2Did", taskProcessingResultId); - requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - await reqAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken); - Console.WriteLine("Success"); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceResumeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/microsoft.graph.identityGovernance.resume", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceResumeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/deletedItems/workflows/{workflow%2Did}/versions/{workflowVersion%2DversionNumber}/tasks/{task%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/microsoft.graph.identityGovernance.resume", rawUrl) { - } - /// - /// Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. - /// - /// A - /// The request body - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action> requestConfiguration = default) { -#endif - _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs deleted file mode 100644 index 653d5457159..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ /dev/null @@ -1,112 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume { - /// - /// Provides operations to call the resume method. - /// - public class MicrosoftGraphIdentityGovernanceResumeRequestBuilder : BaseCliRequestBuilder { - /// - /// Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. - /// Find more info here - /// - /// A - public Command BuildPostCommand() { - var command = new Command("post"); - command.Description = "Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/identitygovernance-taskprocessingresult-resume?view=graph-rest-1.0"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var runIdOption = new Option("--run-id", description: "The unique identifier of run") { - }; - runIdOption.IsRequired = true; - command.AddOption(runIdOption); - var userProcessingResultIdOption = new Option("--user-processing-result-id", description: "The unique identifier of userProcessingResult") { - }; - userProcessingResultIdOption.IsRequired = true; - command.AddOption(userProcessingResultIdOption); - var taskProcessingResultIdOption = new Option("--task-processing-result-id", description: "The unique identifier of taskProcessingResult") { - }; - taskProcessingResultIdOption.IsRequired = true; - command.AddOption(taskProcessingResultIdOption); - var bodyOption = new Option("--body", description: "The request body") { - }; - bodyOption.IsRequired = true; - command.AddOption(bodyOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var runId = invocationContext.ParseResult.GetValueForOption(runIdOption); - var userProcessingResultId = invocationContext.ParseResult.GetValueForOption(userProcessingResultIdOption); - var taskProcessingResultId = invocationContext.ParseResult.GetValueForOption(taskProcessingResultIdOption); - var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ResumePostRequestBody.CreateFromDiscriminatorValue); - if (model is null) { - Console.Error.WriteLine("No model data to send."); - return; - } - var requestInfo = ToPostRequestInformation(model, q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (runId is not null) requestInfo.PathParameters.Add("run%2Did", runId); - if (userProcessingResultId is not null) requestInfo.PathParameters.Add("userProcessingResult%2Did", userProcessingResultId); - if (taskProcessingResultId is not null) requestInfo.PathParameters.Add("taskProcessingResult%2Did", taskProcessingResultId); - requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - await reqAdapter.SendNoContentAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken); - Console.WriteLine("Success"); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceResumeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/microsoft.graph.identityGovernance.resume", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceResumeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/{userProcessingResult%2Did}/taskProcessingResults/{taskProcessingResult%2Did}/microsoft.graph.identityGovernance.resume", rawUrl) { - } - /// - /// Resume a task processing result that's inProgress. In the default case an Azure Logic Apps system-assigned managed identity calls this API. For more information, see: Lifecycle Workflows extensibility approach. - /// - /// A - /// The request body - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action> requestConfiguration = default) { -#endif - _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs deleted file mode 100644 index 9c0f728f6e7..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs +++ /dev/null @@ -1,107 +0,0 @@ -// -using ApiSdk.Models.IdentityGovernance; -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime { - /// - /// Provides operations to call the summary method. - /// - public class MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function summary - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function summary"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var runIdOption = new Option("--run-id", description: "The unique identifier of run") { - }; - runIdOption.IsRequired = true; - command.AddOption(runIdOption); - var startDateTimeOption = new Option("--start-date-time", description: "Usage: startDateTime={startDateTime}") { - }; - startDateTimeOption.IsRequired = true; - command.AddOption(startDateTimeOption); - var endDateTimeOption = new Option("--end-date-time", description: "Usage: endDateTime={endDateTime}") { - }; - endDateTimeOption.IsRequired = true; - command.AddOption(endDateTimeOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var runId = invocationContext.ParseResult.GetValueForOption(runIdOption); - var startDateTime = invocationContext.ParseResult.GetValueForOption(startDateTimeOption); - var endDateTime = invocationContext.ParseResult.GetValueForOption(endDateTimeOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (runId is not null) requestInfo.PathParameters.Add("run%2Did", runId); - if (startDateTime is not null) requestInfo.PathParameters.Add("startDateTime", startDateTime); - if (endDateTime is not null) requestInfo.PathParameters.Add("endDateTime", endDateTime); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/{run%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", rawUrl) { - } - /// - /// Invoke function summary - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs deleted file mode 100644 index f9700e19df5..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -using ApiSdk.Models.IdentityGovernance; -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime { - /// - /// Provides operations to call the summary method. - /// - public class MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function summary - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function summary"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var startDateTimeOption = new Option("--start-date-time", description: "Usage: startDateTime={startDateTime}") { - }; - startDateTimeOption.IsRequired = true; - command.AddOption(startDateTimeOption); - var endDateTimeOption = new Option("--end-date-time", description: "Usage: endDateTime={endDateTime}") { - }; - endDateTimeOption.IsRequired = true; - command.AddOption(endDateTimeOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var startDateTime = invocationContext.ParseResult.GetValueForOption(startDateTimeOption); - var endDateTime = invocationContext.ParseResult.GetValueForOption(endDateTimeOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (startDateTime is not null) requestInfo.PathParameters.Add("startDateTime", startDateTime); - if (endDateTime is not null) requestInfo.PathParameters.Add("endDateTime", endDateTime); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/runs/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", rawUrl) { - } - /// - /// Invoke function summary - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs deleted file mode 100644 index 8064104c725..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -using ApiSdk.Models.IdentityGovernance; -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime { - /// - /// Provides operations to call the summary method. - /// - public class MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function summary - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function summary"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var startDateTimeOption = new Option("--start-date-time", description: "Usage: startDateTime={startDateTime}") { - }; - startDateTimeOption.IsRequired = true; - command.AddOption(startDateTimeOption); - var endDateTimeOption = new Option("--end-date-time", description: "Usage: endDateTime={endDateTime}") { - }; - endDateTimeOption.IsRequired = true; - command.AddOption(endDateTimeOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var startDateTime = invocationContext.ParseResult.GetValueForOption(startDateTimeOption); - var endDateTime = invocationContext.ParseResult.GetValueForOption(endDateTimeOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (startDateTime is not null) requestInfo.PathParameters.Add("startDateTime", startDateTime); - if (endDateTime is not null) requestInfo.PathParameters.Add("endDateTime", endDateTime); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/taskReports/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/taskReports/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", rawUrl) { - } - /// - /// Invoke function summary - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs b/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs deleted file mode 100644 index 6d90368c958..00000000000 --- a/src/generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime/MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -using ApiSdk.Models.IdentityGovernance; -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime { - /// - /// Provides operations to call the summary method. - /// - public class MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function summary - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function summary"; - var workflowIdOption = new Option("--workflow-id", description: "The unique identifier of workflow") { - }; - workflowIdOption.IsRequired = true; - command.AddOption(workflowIdOption); - var startDateTimeOption = new Option("--start-date-time", description: "Usage: startDateTime={startDateTime}") { - }; - startDateTimeOption.IsRequired = true; - command.AddOption(startDateTimeOption); - var endDateTimeOption = new Option("--end-date-time", description: "Usage: endDateTime={endDateTime}") { - }; - endDateTimeOption.IsRequired = true; - command.AddOption(endDateTimeOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var workflowId = invocationContext.ParseResult.GetValueForOption(workflowIdOption); - var startDateTime = invocationContext.ParseResult.GetValueForOption(startDateTimeOption); - var endDateTime = invocationContext.ParseResult.GetValueForOption(endDateTimeOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - }); - if (workflowId is not null) requestInfo.PathParameters.Add("workflow%2Did", workflowId); - if (startDateTime is not null) requestInfo.PathParameters.Add("startDateTime", startDateTime); - if (endDateTime is not null) requestInfo.PathParameters.Add("endDateTime", endDateTime); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(string rawUrl) : base("{+baseurl}/identityGovernance/lifecycleWorkflows/workflows/{workflow%2Did}/userProcessingResults/microsoft.graph.identityGovernance.summary(startDateTime={startDateTime},endDateTime={endDateTime})", rawUrl) { - } - /// - /// Invoke function summary - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - } -} diff --git a/src/generated/Teams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs b/src/generated/Teams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs deleted file mode 100644 index 1300033f95b..00000000000 --- a/src/generated/Teams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs +++ /dev/null @@ -1,147 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.Teams.Item.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - /// - /// Provides operations to call the doesUserHaveAccess method. - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function doesUserHaveAccess - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function doesUserHaveAccess"; - var teamIdOption = new Option("--team-id", description: "The unique identifier of team") { - }; - teamIdOption.IsRequired = true; - command.AddOption(teamIdOption); - var channelIdOption = new Option("--channel-id", description: "The unique identifier of channel") { - }; - channelIdOption.IsRequired = true; - command.AddOption(channelIdOption); - var userIdOption = new Option("--user-id", description: "Usage: userId='@userId'") { - }; - userIdOption.IsRequired = false; - command.AddOption(userIdOption); - var tenantIdOption = new Option("--tenant-id", description: "Usage: tenantId='@tenantId'") { - }; - tenantIdOption.IsRequired = false; - command.AddOption(tenantIdOption); - var userPrincipalNameOption = new Option("--user-principal-name", description: "Usage: userPrincipalName='@userPrincipalName'") { - }; - userPrincipalNameOption.IsRequired = false; - command.AddOption(userPrincipalNameOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var teamId = invocationContext.ParseResult.GetValueForOption(teamIdOption); - var channelId = invocationContext.ParseResult.GetValueForOption(channelIdOption); - var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); - var tenantId = invocationContext.ParseResult.GetValueForOption(tenantIdOption); - var userPrincipalName = invocationContext.ParseResult.GetValueForOption(userPrincipalNameOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - if (!string.IsNullOrEmpty(userId)) q.QueryParameters.UserId = userId; - if (!string.IsNullOrEmpty(tenantId)) q.QueryParameters.TenantId = tenantId; - if (!string.IsNullOrEmpty(userPrincipalName)) q.QueryParameters.UserPrincipalName = userPrincipalName; - }); - if (teamId is not null) requestInfo.PathParameters.Add("team%2Did", teamId); - if (channelId is not null) requestInfo.PathParameters.Add("channel%2Did", channelId); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(string rawUrl) : base("{+baseurl}/teams/{team%2Did}/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", rawUrl) { - } - /// - /// Invoke function doesUserHaveAccess - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - /// - /// Invoke function doesUserHaveAccess - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParameters { - /// Usage: tenantId='@tenantId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("tenantId")] - public string? TenantId { get; set; } -#nullable restore -#else - [QueryParameter("tenantId")] - public string TenantId { get; set; } -#endif - /// Usage: userId='@userId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userId")] - public string? UserId { get; set; } -#nullable restore -#else - [QueryParameter("userId")] - public string UserId { get; set; } -#endif - /// Usage: userPrincipalName='@userPrincipalName' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userPrincipalName")] - public string? UserPrincipalName { get; set; } -#nullable restore -#else - [QueryParameter("userPrincipalName")] - public string UserPrincipalName { get; set; } -#endif - } - } -} diff --git a/src/generated/Teams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs b/src/generated/Teams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs deleted file mode 100644 index fe998c21ee8..00000000000 --- a/src/generated/Teams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs +++ /dev/null @@ -1,141 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.Teams.Item.PrimaryChannel.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - /// - /// Provides operations to call the doesUserHaveAccess method. - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function doesUserHaveAccess - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function doesUserHaveAccess"; - var teamIdOption = new Option("--team-id", description: "The unique identifier of team") { - }; - teamIdOption.IsRequired = true; - command.AddOption(teamIdOption); - var userIdOption = new Option("--user-id", description: "Usage: userId='@userId'") { - }; - userIdOption.IsRequired = false; - command.AddOption(userIdOption); - var tenantIdOption = new Option("--tenant-id", description: "Usage: tenantId='@tenantId'") { - }; - tenantIdOption.IsRequired = false; - command.AddOption(tenantIdOption); - var userPrincipalNameOption = new Option("--user-principal-name", description: "Usage: userPrincipalName='@userPrincipalName'") { - }; - userPrincipalNameOption.IsRequired = false; - command.AddOption(userPrincipalNameOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var teamId = invocationContext.ParseResult.GetValueForOption(teamIdOption); - var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); - var tenantId = invocationContext.ParseResult.GetValueForOption(tenantIdOption); - var userPrincipalName = invocationContext.ParseResult.GetValueForOption(userPrincipalNameOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - if (!string.IsNullOrEmpty(userId)) q.QueryParameters.UserId = userId; - if (!string.IsNullOrEmpty(tenantId)) q.QueryParameters.TenantId = tenantId; - if (!string.IsNullOrEmpty(userPrincipalName)) q.QueryParameters.UserPrincipalName = userPrincipalName; - }); - if (teamId is not null) requestInfo.PathParameters.Add("team%2Did", teamId); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/teams/{team%2Did}/primaryChannel/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(string rawUrl) : base("{+baseurl}/teams/{team%2Did}/primaryChannel/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", rawUrl) { - } - /// - /// Invoke function doesUserHaveAccess - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - /// - /// Invoke function doesUserHaveAccess - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParameters { - /// Usage: tenantId='@tenantId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("tenantId")] - public string? TenantId { get; set; } -#nullable restore -#else - [QueryParameter("tenantId")] - public string TenantId { get; set; } -#endif - /// Usage: userId='@userId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userId")] - public string? UserId { get; set; } -#nullable restore -#else - [QueryParameter("userId")] - public string UserId { get; set; } -#endif - /// Usage: userPrincipalName='@userPrincipalName' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userPrincipalName")] - public string? UserPrincipalName { get; set; } -#nullable restore -#else - [QueryParameter("userPrincipalName")] - public string UserPrincipalName { get; set; } -#endif - } - } -} diff --git a/src/generated/Teamwork/DeletedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs b/src/generated/Teamwork/DeletedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs deleted file mode 100644 index 27066a13458..00000000000 --- a/src/generated/Teamwork/DeletedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -using Microsoft.Kiota.Abstractions.Serialization; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System; -namespace ApiSdk.Teamwork.DeletedTeams.Item.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse : IAdditionalDataHolder, IParsable { - /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - public IDictionary AdditionalData { get; set; } - /// The value property - public bool? Value { get; set; } - /// - /// Instantiates a new and sets the default values. - /// - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() { - AdditionalData = new Dictionary(); - } - /// - /// Creates a new instance of the appropriate class based on discriminator value - /// - /// A - /// The parse node to use to read the discriminator value and create the object - public static DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(); - } - /// - /// The deserialization information for the current model - /// - /// A >"> - public virtual IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"value", n => { Value = n.GetBoolValue(); } }, - }; - } - /// - /// Serializes information the current object - /// - /// Serialization writer to use to serialize this model - public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteBoolValue("value", Value); - writer.WriteAdditionalData(AdditionalData); - } - } -} diff --git a/src/generated/Teamwork/DeletedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs b/src/generated/Teamwork/DeletedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs deleted file mode 100644 index 594a4a08f58..00000000000 --- a/src/generated/Teamwork/DeletedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs +++ /dev/null @@ -1,147 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.Teamwork.DeletedTeams.Item.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - /// - /// Provides operations to call the doesUserHaveAccess method. - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function doesUserHaveAccess - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function doesUserHaveAccess"; - var deletedTeamIdOption = new Option("--deleted-team-id", description: "The unique identifier of deletedTeam") { - }; - deletedTeamIdOption.IsRequired = true; - command.AddOption(deletedTeamIdOption); - var channelIdOption = new Option("--channel-id", description: "The unique identifier of channel") { - }; - channelIdOption.IsRequired = true; - command.AddOption(channelIdOption); - var userIdOption = new Option("--user-id", description: "Usage: userId='@userId'") { - }; - userIdOption.IsRequired = false; - command.AddOption(userIdOption); - var tenantIdOption = new Option("--tenant-id", description: "Usage: tenantId='@tenantId'") { - }; - tenantIdOption.IsRequired = false; - command.AddOption(tenantIdOption); - var userPrincipalNameOption = new Option("--user-principal-name", description: "Usage: userPrincipalName='@userPrincipalName'") { - }; - userPrincipalNameOption.IsRequired = false; - command.AddOption(userPrincipalNameOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var deletedTeamId = invocationContext.ParseResult.GetValueForOption(deletedTeamIdOption); - var channelId = invocationContext.ParseResult.GetValueForOption(channelIdOption); - var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); - var tenantId = invocationContext.ParseResult.GetValueForOption(tenantIdOption); - var userPrincipalName = invocationContext.ParseResult.GetValueForOption(userPrincipalNameOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - if (!string.IsNullOrEmpty(userId)) q.QueryParameters.UserId = userId; - if (!string.IsNullOrEmpty(tenantId)) q.QueryParameters.TenantId = tenantId; - if (!string.IsNullOrEmpty(userPrincipalName)) q.QueryParameters.UserPrincipalName = userPrincipalName; - }); - if (deletedTeamId is not null) requestInfo.PathParameters.Add("deletedTeam%2Did", deletedTeamId); - if (channelId is not null) requestInfo.PathParameters.Add("channel%2Did", channelId); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(string rawUrl) : base("{+baseurl}/teamwork/deletedTeams/{deletedTeam%2Did}/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", rawUrl) { - } - /// - /// Invoke function doesUserHaveAccess - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - /// - /// Invoke function doesUserHaveAccess - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParameters { - /// Usage: tenantId='@tenantId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("tenantId")] - public string? TenantId { get; set; } -#nullable restore -#else - [QueryParameter("tenantId")] - public string TenantId { get; set; } -#endif - /// Usage: userId='@userId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userId")] - public string? UserId { get; set; } -#nullable restore -#else - [QueryParameter("userId")] - public string UserId { get; set; } -#endif - /// Usage: userPrincipalName='@userPrincipalName' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userPrincipalName")] - public string? UserPrincipalName { get; set; } -#nullable restore -#else - [QueryParameter("userPrincipalName")] - public string UserPrincipalName { get; set; } -#endif - } - } -} diff --git a/src/generated/Users/Item/JoinedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs b/src/generated/Users/Item/JoinedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs deleted file mode 100644 index 74b51be249f..00000000000 --- a/src/generated/Users/Item/JoinedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -using Microsoft.Kiota.Abstractions.Serialization; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System; -namespace ApiSdk.Users.Item.JoinedTeams.Item.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse : IAdditionalDataHolder, IParsable { - /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - public IDictionary AdditionalData { get; set; } - /// The value property - public bool? Value { get; set; } - /// - /// Instantiates a new and sets the default values. - /// - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() { - AdditionalData = new Dictionary(); - } - /// - /// Creates a new instance of the appropriate class based on discriminator value - /// - /// A - /// The parse node to use to read the discriminator value and create the object - public static DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(); - } - /// - /// The deserialization information for the current model - /// - /// A >"> - public virtual IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"value", n => { Value = n.GetBoolValue(); } }, - }; - } - /// - /// Serializes information the current object - /// - /// Serialization writer to use to serialize this model - public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteBoolValue("value", Value); - writer.WriteAdditionalData(AdditionalData); - } - } -} diff --git a/src/generated/Users/Item/JoinedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs b/src/generated/Users/Item/JoinedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs deleted file mode 100644 index 1b187cfcb0d..00000000000 --- a/src/generated/Users/Item/JoinedTeams/Item/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs +++ /dev/null @@ -1,153 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.Users.Item.JoinedTeams.Item.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - /// - /// Provides operations to call the doesUserHaveAccess method. - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function doesUserHaveAccess - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function doesUserHaveAccess"; - var userIdOption = new Option("--user-id", description: "The unique identifier of user. Use 'me' for the currently signed in user.") { - }; - userIdOption.IsRequired = true; - command.AddOption(userIdOption); - var teamIdOption = new Option("--team-id", description: "The unique identifier of team") { - }; - teamIdOption.IsRequired = true; - command.AddOption(teamIdOption); - var channelIdOption = new Option("--channel-id", description: "The unique identifier of channel") { - }; - channelIdOption.IsRequired = true; - command.AddOption(channelIdOption); - var userIdQueryOption = new Option("--user-id-query", description: "Usage: userId='@userId'") { - }; - userIdQueryOption.IsRequired = false; - command.AddOption(userIdQueryOption); - var tenantIdOption = new Option("--tenant-id", description: "Usage: tenantId='@tenantId'") { - }; - tenantIdOption.IsRequired = false; - command.AddOption(tenantIdOption); - var userPrincipalNameOption = new Option("--user-principal-name", description: "Usage: userPrincipalName='@userPrincipalName'") { - }; - userPrincipalNameOption.IsRequired = false; - command.AddOption(userPrincipalNameOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); - var teamId = invocationContext.ParseResult.GetValueForOption(teamIdOption); - var channelId = invocationContext.ParseResult.GetValueForOption(channelIdOption); - var userIdQuery = invocationContext.ParseResult.GetValueForOption(userIdQueryOption); - var tenantId = invocationContext.ParseResult.GetValueForOption(tenantIdOption); - var userPrincipalName = invocationContext.ParseResult.GetValueForOption(userPrincipalNameOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - if (!string.IsNullOrEmpty(userIdQuery)) q.QueryParameters.UserId = userIdQuery; - if (!string.IsNullOrEmpty(tenantId)) q.QueryParameters.TenantId = tenantId; - if (!string.IsNullOrEmpty(userPrincipalName)) q.QueryParameters.UserPrincipalName = userPrincipalName; - }); - if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); - if (teamId is not null) requestInfo.PathParameters.Add("team%2Did", teamId); - if (channelId is not null) requestInfo.PathParameters.Add("channel%2Did", channelId); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", rawUrl) { - } - /// - /// Invoke function doesUserHaveAccess - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - /// - /// Invoke function doesUserHaveAccess - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParameters { - /// Usage: tenantId='@tenantId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("tenantId")] - public string? TenantId { get; set; } -#nullable restore -#else - [QueryParameter("tenantId")] - public string TenantId { get; set; } -#endif - /// Usage: userId='@userId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userId")] - public string? UserId { get; set; } -#nullable restore -#else - [QueryParameter("userId")] - public string UserId { get; set; } -#endif - /// Usage: userPrincipalName='@userPrincipalName' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userPrincipalName")] - public string? UserPrincipalName { get; set; } -#nullable restore -#else - [QueryParameter("userPrincipalName")] - public string UserPrincipalName { get; set; } -#endif - } - } -} diff --git a/src/generated/Users/Item/JoinedTeams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs b/src/generated/Users/Item/JoinedTeams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs deleted file mode 100644 index 6b01529dcc1..00000000000 --- a/src/generated/Users/Item/JoinedTeams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -using Microsoft.Kiota.Abstractions.Serialization; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System; -namespace ApiSdk.Users.Item.JoinedTeams.Item.PrimaryChannel.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse : IAdditionalDataHolder, IParsable { - /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - public IDictionary AdditionalData { get; set; } - /// The value property - public bool? Value { get; set; } - /// - /// Instantiates a new and sets the default values. - /// - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse() { - AdditionalData = new Dictionary(); - } - /// - /// Creates a new instance of the appropriate class based on discriminator value - /// - /// A - /// The parse node to use to read the discriminator value and create the object - public static DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(); - } - /// - /// The deserialization information for the current model - /// - /// A >"> - public virtual IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"value", n => { Value = n.GetBoolValue(); } }, - }; - } - /// - /// Serializes information the current object - /// - /// Serialization writer to use to serialize this model - public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteBoolValue("value", Value); - writer.WriteAdditionalData(AdditionalData); - } - } -} diff --git a/src/generated/Users/Item/JoinedTeams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs b/src/generated/Users/Item/JoinedTeams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs deleted file mode 100644 index 1121e2362e8..00000000000 --- a/src/generated/Users/Item/JoinedTeams/Item/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.cs +++ /dev/null @@ -1,147 +0,0 @@ -// -using ApiSdk.Models.ODataErrors; -using Microsoft.Kiota.Abstractions.Serialization; -using Microsoft.Kiota.Abstractions; -using Microsoft.Kiota.Cli.Commons.Extensions; -using Microsoft.Kiota.Cli.Commons.IO; -using Microsoft.Kiota.Cli.Commons; -using System.Collections.Generic; -using System.CommandLine; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using System; -namespace ApiSdk.Users.Item.JoinedTeams.Item.PrimaryChannel.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName { - /// - /// Provides operations to call the doesUserHaveAccess method. - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder : BaseCliRequestBuilder { - /// - /// Invoke function doesUserHaveAccess - /// - /// A - public Command BuildGetCommand() { - var command = new Command("get"); - command.Description = "Invoke function doesUserHaveAccess"; - var userIdOption = new Option("--user-id", description: "The unique identifier of user. Use 'me' for the currently signed in user.") { - }; - userIdOption.IsRequired = true; - command.AddOption(userIdOption); - var teamIdOption = new Option("--team-id", description: "The unique identifier of team") { - }; - teamIdOption.IsRequired = true; - command.AddOption(teamIdOption); - var userIdQueryOption = new Option("--user-id-query", description: "Usage: userId='@userId'") { - }; - userIdQueryOption.IsRequired = false; - command.AddOption(userIdQueryOption); - var tenantIdOption = new Option("--tenant-id", description: "Usage: tenantId='@tenantId'") { - }; - tenantIdOption.IsRequired = false; - command.AddOption(tenantIdOption); - var userPrincipalNameOption = new Option("--user-principal-name", description: "Usage: userPrincipalName='@userPrincipalName'") { - }; - userPrincipalNameOption.IsRequired = false; - command.AddOption(userPrincipalNameOption); - var outputOption = new Option("--output", () => FormatterType.JSON); - command.AddOption(outputOption); - var queryOption = new Option("--query"); - command.AddOption(queryOption); - command.SetHandler(async (invocationContext) => { - var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); - var teamId = invocationContext.ParseResult.GetValueForOption(teamIdOption); - var userIdQuery = invocationContext.ParseResult.GetValueForOption(userIdQueryOption); - var tenantId = invocationContext.ParseResult.GetValueForOption(tenantIdOption); - var userPrincipalName = invocationContext.ParseResult.GetValueForOption(userPrincipalNameOption); - var output = invocationContext.ParseResult.GetValueForOption(outputOption); - var query = invocationContext.ParseResult.GetValueForOption(queryOption); - IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); - IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToGetRequestInformation(q => { - if (!string.IsNullOrEmpty(userIdQuery)) q.QueryParameters.UserId = userIdQuery; - if (!string.IsNullOrEmpty(tenantId)) q.QueryParameters.TenantId = tenantId; - if (!string.IsNullOrEmpty(userPrincipalName)) q.QueryParameters.UserPrincipalName = userPrincipalName; - }); - if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); - if (teamId is not null) requestInfo.PathParameters.Add("team%2Did", teamId); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; - var formatter = outputFormatterFactory.GetFormatter(output); - await formatter.WriteOutputAsync(response, cancellationToken); - }); - return command; - } - /// - /// Instantiates a new and sets the default values. - /// - /// Path parameters for the request - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/primaryChannel/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", pathParameters) { - } - /// - /// Instantiates a new and sets the default values. - /// - /// The raw URL to use for the request builder. - public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/joinedTeams/{team%2Did}/primaryChannel/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?tenantId*,userId*,userPrincipalName*}", rawUrl) { - } - /// - /// Invoke function doesUserHaveAccess - /// - /// A - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); - requestInfo.Configure(requestConfiguration); - requestInfo.Headers.TryAdd("Accept", "application/json"); - return requestInfo; - } - /// - /// Invoke function doesUserHaveAccess - /// - public class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParameters { - /// Usage: tenantId='@tenantId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("tenantId")] - public string? TenantId { get; set; } -#nullable restore -#else - [QueryParameter("tenantId")] - public string TenantId { get; set; } -#endif - /// Usage: userId='@userId' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userId")] - public string? UserId { get; set; } -#nullable restore -#else - [QueryParameter("userId")] - public string UserId { get; set; } -#endif - /// Usage: userPrincipalName='@userPrincipalName' -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - [QueryParameter("userPrincipalName")] - public string? UserPrincipalName { get; set; } -#nullable restore -#else - [QueryParameter("userPrincipalName")] - public string UserPrincipalName { get; set; } -#endif - } - } -} From 8e6bea5202dbf031354142328d656910cfa979ea Mon Sep 17 00:00:00 2001 From: Freddy JUHEL Date: Wed, 14 Feb 2024 15:52:02 +0100 Subject: [PATCH 2/3] add directories into git ignore file --- .gitignore | 592 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 592 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..eff7f561529 --- /dev/null +++ b/.gitignore @@ -0,0 +1,592 @@ +# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,visualstudio,intellij+all,dotnetcore,windows,macos,linux +# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,visualstudio,intellij+all,dotnetcore,windows,macos,linux + +### DotnetCore ### +# .NET Core build folders +bin/ +obj/ + +# Common node modules locations +/node_modules +/wwwroot/node_modules + +### Intellij+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij+all Patch ### +# Ignores the whole .idea folder and all .iml files +# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 + +.idea/ + +# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 + +*.iml +modules.xml +.idea/misc.xml +*.ipr + +# Sonarlint plugin +.idea/sonarlint + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +# Support for Project snippet scope +!.vscode/*.code-snippets + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +bin/**/publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Nuget personal access tokens and Credentials +nuget.config + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools + +# Local History for Visual Studio Code + +# Windows Installer files from build outputs + +# JetBrains Rider +*.sln.iml + +### VisualStudio Patch ### +# Additional files built by Visual Studio + +# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,visualstudio,intellij+all,dotnetcore,windows,macos,linux + +app-settings.*.json +!app-settings.sample.json + +# docker compose mounts +tmp/ + +# Exclude any matches under src/generated +!src/generated/** + +# Exclude azure pipelines nuget config +!.azure-pipelines/nuget.config + +# Exclude kiota logs +.kiota.log +/.azure-pipelines +/.devcontainer +/.github +/.vscode From 23b6b05f2bb2c0e998e9bcd35d51a3aaf846532b Mon Sep 17 00:00:00 2001 From: Freddy JUHEL Date: Wed, 14 Feb 2024 15:52:16 +0100 Subject: [PATCH 3/3] add directories into git ignore file --- .dockerignore | 11 ++ .editorconfig | 132 ++++++++++++++++++ .gitattributes | 20 +++ .gitmodules | 0 .release-please-manifest.json | 3 + .../Item/ChannelItemRequestBuilder.cs | 2 +- 6 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitmodules create mode 100644 .release-please-manifest.json diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000000..a678fe56593 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +**/.git/ +**/.github/ +**/.vs/ +**/.vscode/ +**/[Bb]in/ +**/[Oo]bj/ +**/*.sample.* +tmp/ +**/.env +**/*.md +docker-compose.yml \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..5ea5ac09101 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,132 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{y[a]ml,json}] +indent_size = 2 + +[*.csproj] +indent_size = 2 + +# VSCode generates files with 4 spaces +[.vscode/*.json] +indent_size = 4 + +# Code files +[*.{cs,csx,vb,vbx}] +indent_size = 4 +charset = utf-8-bom +############################### +# .NET Coding Conventions # +############################### +[*.{cs,vb}] +# Organize usings +dotnet_sort_system_directives_first = true +# this. preferences +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_property = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_event = false:silent +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent +dotnet_style_readonly_field = true:suggestion +# Expression-level preferences +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +############################### +# Naming Conventions # +############################### +# Style Definitions +dotnet_naming_style.pascal_case_style.capitalization = pascal_case +# Use PascalCase for constant fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.applicable_accessibilities = * +dotnet_naming_symbols.constant_fields.required_modifiers = const +############################### +# C# Coding Conventions # +############################### +[*.cs] +# var preferences +csharp_style_var_for_built_in_types = true:silent +csharp_style_var_when_type_is_apparent = true:silent +csharp_style_var_elsewhere = true:silent +# Expression-bodied members +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +# Pattern matching preferences +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +# Null-checking preferences +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion +# Modifier preferences +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion +# Expression-level preferences +csharp_prefer_braces = true:silent +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_pattern_local_over_anonymous_function = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +############################### +# C# Formatting Rules # +############################### +# New line preferences +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true +# Indentation preferences +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left +# Space preferences +csharp_space_after_cast = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +# Wrapping preferences +csharp_preserve_single_line_statements = true +csharp_preserve_single_line_blocks = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..41fa432da69 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,20 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text=auto + +# Explicitly declare text files you want to always be normalized and converted +# to native line endings on checkout. +*.json text +*.ps[m]1 text + +# Declare files that will always have CRLF line endings on checkout. +*.sh text eol=lf +*.plist text eol=lf + +# Declare files that will always have CRLF line endings on checkout. +*.sln text eol=crlf +*.cs text eol=crlf +*.csproj text eol=crlf + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.jpg binary diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..e69de29bb2d diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000000..73d3293b98f --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.4.0" +} diff --git a/src/generated/Groups/Item/Team/Channels/Item/ChannelItemRequestBuilder.cs b/src/generated/Groups/Item/Team/Channels/Item/ChannelItemRequestBuilder.cs index 74c1cee87c5..a205d780422 100644 --- a/src/generated/Groups/Item/Team/Channels/Item/ChannelItemRequestBuilder.cs +++ b/src/generated/Groups/Item/Team/Channels/Item/ChannelItemRequestBuilder.cs @@ -1,4 +1,4 @@ -// +// using ApiSdk.Groups.Item.Team.Channels.Item.CompleteMigration; using ApiSdk.Groups.Item.Team.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName; using ApiSdk.Groups.Item.Team.Channels.Item.FilesFolder;