v2/src/PSSailpointV2/Model/ListWorkgroupConnections200ResponseInner.ps1

#
# SailPoint SaaS API
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
# Version: 2.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER ConnectionType
No description available.
.PARAMETER Description
No description available.
.PARAMETER Name
No description available.
.PARAMETER ObjectId
No description available.
.PARAMETER ObjectType
No description available.
.PARAMETER WorkgroupId
No description available.
.OUTPUTS

ListWorkgroupConnections200ResponseInner<PSCustomObject>
#>


function Initialize-V2ListWorkgroupConnections200ResponseInner {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ConnectionType},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Description},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Name},
        [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ObjectId},
        [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ObjectType},
        [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${WorkgroupId}
    )

    Process {
        'Creating PSCustomObject: PSSailpointV2 => V2ListWorkgroupConnections200ResponseInner' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "connectionType" = ${ConnectionType}
            "description" = ${Description}
            "name" = ${Name}
            "objectId" = ${ObjectId}
            "objectType" = ${ObjectType}
            "workgroupId" = ${WorkgroupId}
        }


        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to ListWorkgroupConnections200ResponseInner<PSCustomObject>

.DESCRIPTION

Convert from JSON to ListWorkgroupConnections200ResponseInner<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

ListWorkgroupConnections200ResponseInner<PSCustomObject>
#>

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

    Process {
        'Converting JSON to PSCustomObject: PSSailpointV2 => V2ListWorkgroupConnections200ResponseInner' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2ListWorkgroupConnections200ResponseInner
        $AllProperties = ("connectionType", "description", "name", "objectId", "objectType", "workgroupId")
        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 "connectionType"))) { #optional property not found
            $ConnectionType = $null
        } else {
            $ConnectionType = $JsonParameters.PSobject.Properties["connectionType"].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 "name"))) { #optional property not found
            $Name = $null
        } else {
            $Name = $JsonParameters.PSobject.Properties["name"].value
        }

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

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

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

        $PSO = [PSCustomObject]@{
            "connectionType" = ${ConnectionType}
            "description" = ${Description}
            "name" = ${Name}
            "objectId" = ${ObjectId}
            "objectType" = ${ObjectType}
            "workgroupId" = ${WorkgroupId}
        }

        return $PSO
    }

}