Api/TorizonPlatformAPIPackagesApi.ps1
# # Torizon OTA # This API is rate limited and will return the following headers for each API call. - X-RateLimit-Limit - The total number of requests allowed within a time period - X-RateLimit-Remaining - The total number of requests still allowed until the end of the rate limiting period - X-RateLimit-Reset - The number of seconds until the limit is fully reset In addition, if an API client is rate limited, it will receive a HTTP 420 response with the following header: - Retry-After - The number of seconds to wait until this request is allowed # Version: 2.0-Beta # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS Delete a package .DESCRIPTION No description available. .PARAMETER PackageId No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS None #> function Invoke-TorizonPlatformAPIDeletePackagesPackageid { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${PackageId}, [Switch] $WithHttpInfo ) Process { 'Calling method: Invoke-TorizonPlatformAPIDeletePackagesPackageid' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/packages/{packageId}' if (!$PackageId) { throw "Error! The required parameter `PackageId` missing when calling deletePackagesPackageid." } $LocalVarUri = $LocalVarUri.replace('{packageId}', [System.Web.HTTPUtility]::UrlEncode($PackageId)) if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'DELETE' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Retrieve metadata about packages in your repository .DESCRIPTION No description available. .PARAMETER Offset No description available. .PARAMETER Limit No description available. .PARAMETER IdContains No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS PaginationResultPackage #> function Get-TorizonPlatformAPIPackages { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int64]] ${Offset}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int64]] ${Limit}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${IdContains}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIPackages' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/packages' if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($Limit) { $LocalVarQueryParameters['limit'] = $Limit } if ($IdContains) { $LocalVarQueryParameters['idContains'] = $IdContains } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "PaginationResultPackage" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Retrieve metadata about packages in your repository from other sources .DESCRIPTION No description available. .PARAMETER Offset No description available. .PARAMETER Limit No description available. .PARAMETER IdContains No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS PaginationResultExternalPackage #> function Get-TorizonPlatformAPIPackagesExternal { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int64]] ${Offset}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int64]] ${Limit}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${IdContains}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIPackagesExternal' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/packages_external' if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($Limit) { $LocalVarQueryParameters['limit'] = $Limit } if ($IdContains) { $LocalVarQueryParameters['idContains'] = $IdContains } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "PaginationResultExternalPackage" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Fetch information about external package sources .DESCRIPTION No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS System.Collections.Hashtable #> function Get-TorizonPlatformAPIPackagesExternalInfo { [CmdletBinding()] Param ( [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIPackagesExternalInfo' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/packages_external/info' if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "System.Collections.Hashtable" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Refresh metadata from an external package source .DESCRIPTION No description available. .PARAMETER SourceFileName No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS None #> function Get-TorizonPlatformAPIPackagesExternalRefreshSourceFileName { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${SourceFileName}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIPackagesExternalRefreshSourceFileName' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/packages_external/refresh/{source_file_name}' if (!$SourceFileName) { throw "Error! The required parameter `SourceFileName` missing when calling getPackagesExternalRefreshSourceFileName." } $LocalVarUri = $LocalVarUri.replace('{source_file_name}', [System.Web.HTTPUtility]::UrlEncode($SourceFileName)) if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Edit metadata about a package .DESCRIPTION No description available. .PARAMETER PackageId No description available. .PARAMETER EditPackage No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS Package #> function Invoke-TorizonPlatformAPIPatchPackagesPackageid { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${PackageId}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${EditPackage}, [Switch] $WithHttpInfo ) Process { 'Calling method: Invoke-TorizonPlatformAPIPatchPackagesPackageid' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/packages/{packageId}' if (!$PackageId) { throw "Error! The required parameter `PackageId` missing when calling patchPackagesPackageid." } $LocalVarUri = $LocalVarUri.replace('{packageId}', [System.Web.HTTPUtility]::UrlEncode($PackageId)) if (!$EditPackage) { throw "Error! The required parameter `EditPackage` missing when calling patchPackagesPackageid." } if ($LocalVarContentTypes[0] -eq 'application/octet-stream') { $LocalVarBodyParameter = [System.IO.File]::ReadAllBytes($EditPackage.FullName) } else { $LocalVarBodyParameter = $EditPackage | ConvertTo-Json -Depth 100 } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'PATCH' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "Package" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Upload a new package .DESCRIPTION No description available. .PARAMETER Name No description available. .PARAMETER Version No description available. .PARAMETER TargetFormat No description available. .PARAMETER ContentLength No description available. .PARAMETER Body No description available. .PARAMETER HardwareId No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS Package #> function Submit-TorizonPlatformAPIPackages { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Name}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Version}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${TargetFormat}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Int32] ${ContentLength}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.IO.FileInfo] ${Body}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String[]] ${HardwareId}, [Switch] $WithHttpInfo ) Process { 'Calling method: Submit-TorizonPlatformAPIPackages' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/octet-stream') $LocalVarUri = '/packages' if (!$ContentLength) { throw "Error! The required parameter `ContentLength` missing when calling postPackages." } $LocalVarHeaderParameters['Content-Length'] = $ContentLength if (!$Name) { throw "Error! The required parameter `Name` missing when calling postPackages." } $LocalVarQueryParameters['name'] = $Name if (!$Version) { throw "Error! The required parameter `Version` missing when calling postPackages." } $LocalVarQueryParameters['version'] = $Version if ($HardwareId) { $LocalVarQueryParameters['hardwareId'] = $HardwareId } if (!$TargetFormat) { throw "Error! The required parameter `TargetFormat` missing when calling postPackages." } $LocalVarQueryParameters['targetFormat'] = $TargetFormat if (!$Body) { throw "Error! The required parameter `Body` missing when calling postPackages." } if ($LocalVarContentTypes[0] -eq 'application/octet-stream') { $LocalVarBodyParameter = [System.IO.File]::ReadAllBytes($Body.FullName) } else { $LocalVarBodyParameter = $Body | ConvertTo-Json -Depth 100 } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "Package" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } |