Model/UrlResultModel.ps1

#
# Fly SDK API
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
# Version: 1.0
# Contact: support@avepoint.com
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS
 
No summary available.
 
.DESCRIPTION
 
No description available.
 
.PARAMETER ReportUrl
The temporary url of the report file which can be used to download the report file
.OUTPUTS
 
UrlResultModel<PSCustomObject>
#>


function Initialize-FlyUrlResultModel {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ReportUrl}
    )

    Process {
        'Creating PSCustomObject: Fly.Client => FlyUrlResultModel' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "reportUrl" = ${ReportUrl}
        }

        return $PSO
    }
}

<#
.SYNOPSIS
 
Convert from JSON to UrlResultModel<PSCustomObject>
 
.DESCRIPTION
 
Convert from JSON to UrlResultModel<PSCustomObject>
 
.PARAMETER Json
 
Json object
 
.OUTPUTS
 
UrlResultModel<PSCustomObject>
#>

function ConvertFrom-FlyJsonToUrlResultModel {
    Param(
        [AllowEmptyString()]
        [string]$Json
    )

    Process {
        'Converting JSON to PSCustomObject: Fly.Client => FlyUrlResultModel' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in FlyUrlResultModel
        $AllProperties = ("reportUrl")
        foreach ($name in $JsonParameters.PsObject.Properties.Name) {
            if (!($AllProperties.Contains($name))) {
                throw "Error! JSON key '$name' not found in the properties: $($AllProperties)"
            }
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "reportUrl"))) { #optional property not found
            $ReportUrl = $null
        } else {
            $ReportUrl = $JsonParameters.PSobject.Properties["reportUrl"].value
        }

        $PSO = [PSCustomObject]@{
            "reportUrl" = ${ReportUrl}
        }

        return $PSO
    }

}