Model/Entitlementconnectionbulkupdateresultitem.ps1

#
# Identity Security Cloud API - Entitlement Connections
# Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs.
# Version: v1
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER ConnectionId
Connection ID processed in this row.
.PARAMETER Type
Requested or resulting connection type for the row.
.PARAMETER Status
Item-level result status code.
.PARAMETER Description
Item-level result message.
.OUTPUTS

Entitlementconnectionbulkupdateresultitem<PSCustomObject>
#>


function Initialize-Entitlementconnectionbulkupdateresultitem {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ConnectionId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Type},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${Status},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Description}
    )

    Process {
        'Creating PSCustomObject: PSSailpoint.EntitlementConnections => Entitlementconnectionbulkupdateresultitem' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "connectionId" = ${ConnectionId}
            "type" = ${Type}
            "status" = ${Status}
            "description" = ${Description}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to Entitlementconnectionbulkupdateresultitem<PSCustomObject>

.DESCRIPTION

Convert from JSON to Entitlementconnectionbulkupdateresultitem<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

Entitlementconnectionbulkupdateresultitem<PSCustomObject>
#>

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

    Process {
        'Converting JSON to PSCustomObject: PSSailpoint.EntitlementConnections => Entitlementconnectionbulkupdateresultitem' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in Entitlementconnectionbulkupdateresultitem
        $AllProperties = ("connectionId", "type", "status", "description")
        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 "connectionId"))) { #optional property not found
            $ConnectionId = $null
        } else {
            $ConnectionId = $JsonParameters.PSobject.Properties["connectionId"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { #optional property not found
            $Type = $null
        } else {
            $Type = $JsonParameters.PSobject.Properties["type"].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 "description"))) { #optional property not found
            $Description = $null
        } else {
            $Description = $JsonParameters.PSobject.Properties["description"].value
        }

        $PSO = [PSCustomObject]@{
            "connectionId" = ${ConnectionId}
            "type" = ${Type}
            "status" = ${Status}
            "description" = ${Description}
        }

        return $PSO
    }

}