Model/ApiModelObjectsModernApiImportUserItemResult.ps1
|
# # Confide 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 Email No description available. .PARAMETER Success No description available. .PARAMETER Status No description available. .PARAMETER ErrorMessage No description available. .OUTPUTS ApiModelObjectsModernApiImportUserItemResult<PSCustomObject> #> function Initialize-ConfideApiModelObjectsModernApiImportUserItemResult { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Email}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Success}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Status}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ErrorMessage} ) Process { 'Creating PSCustomObject: Confide.Client => ConfideApiModelObjectsModernApiImportUserItemResult' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "email" = ${Email} "success" = ${Success} "status" = ${Status} "errorMessage" = ${ErrorMessage} } return $PSO } } <# .SYNOPSIS Convert from JSON to ApiModelObjectsModernApiImportUserItemResult<PSCustomObject> .DESCRIPTION Convert from JSON to ApiModelObjectsModernApiImportUserItemResult<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ApiModelObjectsModernApiImportUserItemResult<PSCustomObject> #> function ConvertFrom-ConfideJsonToApiModelObjectsModernApiImportUserItemResult { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Confide.Client => ConfideApiModelObjectsModernApiImportUserItemResult' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in ConfideApiModelObjectsModernApiImportUserItemResult $AllProperties = ("email", "success", "status", "errorMessage") 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 "email"))) { #optional property not found $Email = $null } else { $Email = $JsonParameters.PSobject.Properties["email"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "success"))) { #optional property not found $Success = $null } else { $Success = $JsonParameters.PSobject.Properties["success"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found $Status = $null } else { $Status = $JsonParameters.PSobject.Properties["status"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "errorMessage"))) { #optional property not found $ErrorMessage = $null } else { $ErrorMessage = $JsonParameters.PSobject.Properties["errorMessage"].value } $PSO = [PSCustomObject]@{ "email" = ${Email} "success" = ${Success} "status" = ${Status} "errorMessage" = ${ErrorMessage} } return $PSO } } |