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
.PARAMETER RetryProvisionODCount
No description available.
.PARAMETER RetryProvisionODWaitTime
No description available.
.PARAMETER SpaceUnCompletedCount
No description available.
.OUTPUTS
 
MappingJobProgressDetailModel<PSCustomObject>
#>


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

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


        $PSO = [PSCustomObject]@{
            "totalCount" = ${TotalCount}
            "retryProvisionODCount" = ${RetryProvisionODCount}
            "retryProvisionODWaitTime" = ${RetryProvisionODWaitTime}
            "spaceUnCompletedCount" = ${SpaceUnCompletedCount}
        }

        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", "retryProvisionODCount", "retryProvisionODWaitTime", "spaceUnCompletedCount")
        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
        }

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

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

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

        $PSO = [PSCustomObject]@{
            "totalCount" = ${TotalCount}
            "retryProvisionODCount" = ${RetryProvisionODCount}
            "retryProvisionODWaitTime" = ${RetryProvisionODWaitTime}
            "spaceUnCompletedCount" = ${SpaceUnCompletedCount}
        }

        return $PSO
    }

}