Model/ProjectSummaryModel.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 SourcePlatform The platform type of source connection of the project .PARAMETER DestinationPlatform The platform type of destination connection of the project .PARAMETER PolicyName The display name of policy which applied to the project .PARAMETER TagNames The tag names of the project, concatenate multiple values using semicolons .PARAMETER MappingTotalCount The total count of all mappings in the project .PARAMETER MappingNotMigratedCount The count of new mappings in the project .PARAMETER MappingInProgressCount The count of mappings which migration job is inprogress in the project .PARAMETER MappingStoppedCount The count of mappings which migration job is stopped in the project .PARAMETER MappingCompletedCount The count of mappings which migration job is finished in the project .PARAMETER MappingCompletedWithExceptionCount The count of mappings which migration job is exception in the project .PARAMETER MappingFailedCount The count of mappings which migration job is failed in the project .PARAMETER Name The name of the object .PARAMETER Description The description of the object .PARAMETER CreateTime The creation time of the object .PARAMETER CreateBy The user who create this object .PARAMETER LastModifyTime The last modified time of the object .PARAMETER LastModifyBy The user who last modified the object .PARAMETER Id The GUID of the object .OUTPUTS ProjectSummaryModel<PSCustomObject> #> function Initialize-FlyProjectSummaryModel { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${SourcePlatform}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${DestinationPlatform}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${PolicyName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${TagNames}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${MappingTotalCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${MappingNotMigratedCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${MappingInProgressCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${MappingStoppedCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${MappingCompletedCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${MappingCompletedWithExceptionCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${MappingFailedCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Description}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${CreateTime}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${CreateBy}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${LastModifyTime}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${LastModifyBy}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id} ) Process { 'Creating PSCustomObject: Fly.Client => FlyProjectSummaryModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "sourcePlatform" = ${SourcePlatform} "destinationPlatform" = ${DestinationPlatform} "policyName" = ${PolicyName} "tagNames" = ${TagNames} "mappingTotalCount" = ${MappingTotalCount} "mappingNotMigratedCount" = ${MappingNotMigratedCount} "mappingInProgressCount" = ${MappingInProgressCount} "mappingStoppedCount" = ${MappingStoppedCount} "mappingCompletedCount" = ${MappingCompletedCount} "mappingCompletedWithExceptionCount" = ${MappingCompletedWithExceptionCount} "mappingFailedCount" = ${MappingFailedCount} "name" = ${Name} "description" = ${Description} "createTime" = ${CreateTime} "createBy" = ${CreateBy} "lastModifyTime" = ${LastModifyTime} "lastModifyBy" = ${LastModifyBy} "id" = ${Id} } return $PSO } } <# .SYNOPSIS Convert from JSON to ProjectSummaryModel<PSCustomObject> .DESCRIPTION Convert from JSON to ProjectSummaryModel<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ProjectSummaryModel<PSCustomObject> #> function ConvertFrom-FlyJsonToProjectSummaryModel { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Fly.Client => FlyProjectSummaryModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in FlyProjectSummaryModel $AllProperties = ("sourcePlatform", "destinationPlatform", "policyName", "tagNames", "mappingTotalCount", "mappingNotMigratedCount", "mappingInProgressCount", "mappingStoppedCount", "mappingCompletedCount", "mappingCompletedWithExceptionCount", "mappingFailedCount", "name", "description", "createTime", "createBy", "lastModifyTime", "lastModifyBy", "id") 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 "sourcePlatform"))) { #optional property not found $SourcePlatform = $null } else { $SourcePlatform = $JsonParameters.PSobject.Properties["sourcePlatform"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "destinationPlatform"))) { #optional property not found $DestinationPlatform = $null } else { $DestinationPlatform = $JsonParameters.PSobject.Properties["destinationPlatform"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "policyName"))) { #optional property not found $PolicyName = $null } else { $PolicyName = $JsonParameters.PSobject.Properties["policyName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "tagNames"))) { #optional property not found $TagNames = $null } else { $TagNames = $JsonParameters.PSobject.Properties["tagNames"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "mappingTotalCount"))) { #optional property not found $MappingTotalCount = $null } else { $MappingTotalCount = $JsonParameters.PSobject.Properties["mappingTotalCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "mappingNotMigratedCount"))) { #optional property not found $MappingNotMigratedCount = $null } else { $MappingNotMigratedCount = $JsonParameters.PSobject.Properties["mappingNotMigratedCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "mappingInProgressCount"))) { #optional property not found $MappingInProgressCount = $null } else { $MappingInProgressCount = $JsonParameters.PSobject.Properties["mappingInProgressCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "mappingStoppedCount"))) { #optional property not found $MappingStoppedCount = $null } else { $MappingStoppedCount = $JsonParameters.PSobject.Properties["mappingStoppedCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "mappingCompletedCount"))) { #optional property not found $MappingCompletedCount = $null } else { $MappingCompletedCount = $JsonParameters.PSobject.Properties["mappingCompletedCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "mappingCompletedWithExceptionCount"))) { #optional property not found $MappingCompletedWithExceptionCount = $null } else { $MappingCompletedWithExceptionCount = $JsonParameters.PSobject.Properties["mappingCompletedWithExceptionCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "mappingFailedCount"))) { #optional property not found $MappingFailedCount = $null } else { $MappingFailedCount = $JsonParameters.PSobject.Properties["mappingFailedCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "description"))) { #optional property not found $Description = $null } else { $Description = $JsonParameters.PSobject.Properties["description"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "createTime"))) { #optional property not found $CreateTime = $null } else { $CreateTime = $JsonParameters.PSobject.Properties["createTime"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "createBy"))) { #optional property not found $CreateBy = $null } else { $CreateBy = $JsonParameters.PSobject.Properties["createBy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastModifyTime"))) { #optional property not found $LastModifyTime = $null } else { $LastModifyTime = $JsonParameters.PSobject.Properties["lastModifyTime"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastModifyBy"))) { #optional property not found $LastModifyBy = $null } else { $LastModifyBy = $JsonParameters.PSobject.Properties["lastModifyBy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { #optional property not found $Id = $null } else { $Id = $JsonParameters.PSobject.Properties["id"].value } $PSO = [PSCustomObject]@{ "sourcePlatform" = ${SourcePlatform} "destinationPlatform" = ${DestinationPlatform} "policyName" = ${PolicyName} "tagNames" = ${TagNames} "mappingTotalCount" = ${MappingTotalCount} "mappingNotMigratedCount" = ${MappingNotMigratedCount} "mappingInProgressCount" = ${MappingInProgressCount} "mappingStoppedCount" = ${MappingStoppedCount} "mappingCompletedCount" = ${MappingCompletedCount} "mappingCompletedWithExceptionCount" = ${MappingCompletedWithExceptionCount} "mappingFailedCount" = ${MappingFailedCount} "name" = ${Name} "description" = ${Description} "createTime" = ${CreateTime} "createBy" = ${CreateBy} "lastModifyTime" = ${LastModifyTime} "lastModifyBy" = ${LastModifyBy} "id" = ${Id} } return $PSO } } |