nerm/src/PSSailpoint.NERM/Model/LdapActionWorkflowActionDirectoryGroupsAttributes.ps1

#
# NERM API
# The NERM API accesss and modifies resources in your environment.
# Version: 1.0.0
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

No description available.

.PARAMETER Id
the id.
.PARAMETER DirectoryId
the id of the directory.
.PARAMETER GroupLabel
the group label.
.PARAMETER GroupDn
the group dn.
.OUTPUTS

LdapActionWorkflowActionDirectoryGroupsAttributes<PSCustomObject>
#>


function Initialize-NERMLdapActionWorkflowActionDirectoryGroupsAttributes {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Id},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${DirectoryId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${GroupLabel},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${GroupDn}
    )

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


        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "directory_id" = ${DirectoryId}
            "group_label" = ${GroupLabel}
            "group_dn" = ${GroupDn}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to LdapActionWorkflowActionDirectoryGroupsAttributes<PSCustomObject>

.DESCRIPTION

Convert from JSON to LdapActionWorkflowActionDirectoryGroupsAttributes<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

LdapActionWorkflowActionDirectoryGroupsAttributes<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in NERMLdapActionWorkflowActionDirectoryGroupsAttributes
        $AllProperties = ("id", "directory_id", "group_label", "group_dn")
        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 "id"))) { #optional property not found
            $Id = $null
        } else {
            $Id = $JsonParameters.PSobject.Properties["id"].value
        }

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

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

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

        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "directory_id" = ${DirectoryId}
            "group_label" = ${GroupLabel}
            "group_dn" = ${GroupDn}
        }

        return $PSO
    }

}