v2/src/PSSailpointV2/Model/ListWorkgroups200ResponseInner.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 ConnectionCount
No description available.
.PARAMETER Created
No description available.
.PARAMETER Description
No description available.
.PARAMETER Id
No description available.
.PARAMETER MemberCount
No description available.
.PARAMETER Modified
No description available.
.PARAMETER Name
No description available.
.PARAMETER Owner
No description available.
.OUTPUTS

ListWorkgroups200ResponseInner<PSCustomObject>
#>


function Initialize-V2ListWorkgroups200ResponseInner {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${ConnectionCount},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int64]]
        ${Created},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Description},
        [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Id},
        [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${MemberCount},
        [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int64]]
        ${Modified},
        [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Name},
        [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Owner}
    )

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


        $PSO = [PSCustomObject]@{
            "connectionCount" = ${ConnectionCount}
            "created" = ${Created}
            "description" = ${Description}
            "id" = ${Id}
            "memberCount" = ${MemberCount}
            "modified" = ${Modified}
            "name" = ${Name}
            "owner" = ${Owner}
        }


        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to ListWorkgroups200ResponseInner<PSCustomObject>

.DESCRIPTION

Convert from JSON to ListWorkgroups200ResponseInner<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

ListWorkgroups200ResponseInner<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2ListWorkgroups200ResponseInner
        $AllProperties = ("connectionCount", "created", "description", "id", "memberCount", "modified", "name", "owner")
        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 "connectionCount"))) { #optional property not found
            $ConnectionCount = $null
        } else {
            $ConnectionCount = $JsonParameters.PSobject.Properties["connectionCount"].value
        }

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

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

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

        $PSO = [PSCustomObject]@{
            "connectionCount" = ${ConnectionCount}
            "created" = ${Created}
            "description" = ${Description}
            "id" = ${Id}
            "memberCount" = ${MemberCount}
            "modified" = ${Modified}
            "name" = ${Name}
            "owner" = ${Owner}
        }

        return $PSO
    }

}