Api/TorizonPlatformAPIPackagesApi.ps1
# # Torizon OTA # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # Version: 2.0-Beta # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .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 No summary available. .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 No summary available. .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 No summary available. .DESCRIPTION No description available. .PARAMETER Role 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 JsonSignedPayload #> function Get-TorizonPlatformAPIUptaneMetadataDirectorRole { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Role}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIUptaneMetadataDirectorRole' | 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 = '/uptane_metadata/director/{role}' if (!$Role) { throw "Error! The required parameter `Role` missing when calling getUptaneMetadataDirectorRole." } $LocalVarUri = $LocalVarUri.replace('{role}', [System.Web.HTTPUtility]::UrlEncode($Role)) 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 "JsonSignedPayload" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Role 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 JsonSignedPayload #> function Get-TorizonPlatformAPIUptaneMetadataRepoRole { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Role}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPIUptaneMetadataRepoRole' | 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 = '/uptane_metadata/repo/{role}' if (!$Role) { throw "Error! The required parameter `Role` missing when calling getUptaneMetadataRepoRole." } $LocalVarUri = $LocalVarUri.replace('{role}', [System.Web.HTTPUtility]::UrlEncode($Role)) 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 "JsonSignedPayload" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS No summary available. .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." } $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 No summary available. .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." } $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"] } } } |