Model/MappingJobProgressDetailModel.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 TotalCount
The addressed object count during migration job
.OUTPUTS
 
MappingJobProgressDetailModel<PSCustomObject>
#>


function Initialize-FlyMappingJobProgressDetailModel {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int64]]
        ${TotalCount}
    )

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


        $PSO = [PSCustomObject]@{
            "totalCount" = ${TotalCount}
        }

        return $PSO
    }
}

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

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in FlyMappingJobProgressDetailModel
        $AllProperties = ("totalCount")
        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 "totalCount"))) { #optional property not found
            $TotalCount = $null
        } else {
            $TotalCount = $JsonParameters.PSobject.Properties["totalCount"].value
        }

        $PSO = [PSCustomObject]@{
            "totalCount" = ${TotalCount}
        }

        return $PSO
    }

}