v2024/src/Tm.V2024/Model/OrgConfig.ps1

#
# Identity Security Cloud V2024 API
# 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: v2024
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

DTO class for OrgConfig data accessible by customer external org admin (""ORG_ADMIN"") users

.PARAMETER OrgName
The name of the org.
.PARAMETER TimeZone
The selected time zone which is to be used for the org. This directly affects when scheduled tasks are executed. Valid options can be found at /beta/org-config/valid-time-zones
.PARAMETER LcsChangeHonorsSourceEnableFeature
Flag to determine whether the LCS_CHANGE_HONORS_SOURCE_ENABLE_FEATURE flag is enabled for the current org.
.PARAMETER ArmCustomerId
ARM Customer ID
.PARAMETER ArmSapSystemIdMappings
A list of IDN::sourceId to ARM::systemId mappings.
.PARAMETER ArmAuth
ARM authentication string
.PARAMETER ArmDb
ARM database name
.PARAMETER ArmSsoUrl
ARM SSO URL
.PARAMETER IaiEnableCertificationRecommendations
Flag to determine whether IAI Certification Recommendations are enabled for the current org
.PARAMETER SodReportConfigs
No description available.
.OUTPUTS

OrgConfig<PSCustomObject>
#>


function Initialize-V2024OrgConfig {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${OrgName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${TimeZone},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${LcsChangeHonorsSourceEnableFeature},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ArmCustomerId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ArmSapSystemIdMappings},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ArmAuth},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ArmDb},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ArmSsoUrl},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${IaiEnableCertificationRecommendations},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${SodReportConfigs}
    )

    Process {
        'Creating PSCustomObject: Tm.V2024 => V2024OrgConfig' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "orgName" = ${OrgName}
            "timeZone" = ${TimeZone}
            "lcsChangeHonorsSourceEnableFeature" = ${LcsChangeHonorsSourceEnableFeature}
            "armCustomerId" = ${ArmCustomerId}
            "armSapSystemIdMappings" = ${ArmSapSystemIdMappings}
            "armAuth" = ${ArmAuth}
            "armDb" = ${ArmDb}
            "armSsoUrl" = ${ArmSsoUrl}
            "iaiEnableCertificationRecommendations" = ${IaiEnableCertificationRecommendations}
            "sodReportConfigs" = ${SodReportConfigs}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to OrgConfig<PSCustomObject>

.DESCRIPTION

Convert from JSON to OrgConfig<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

OrgConfig<PSCustomObject>
#>

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

    Process {
        'Converting JSON to PSCustomObject: Tm.V2024 => V2024OrgConfig' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2024OrgConfig
        $AllProperties = ("orgName", "timeZone", "lcsChangeHonorsSourceEnableFeature", "armCustomerId", "armSapSystemIdMappings", "armAuth", "armDb", "armSsoUrl", "iaiEnableCertificationRecommendations", "sodReportConfigs")
        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 "orgName"))) { #optional property not found
            $OrgName = $null
        } else {
            $OrgName = $JsonParameters.PSobject.Properties["orgName"].value
        }

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

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

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

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

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

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

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

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

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

        $PSO = [PSCustomObject]@{
            "orgName" = ${OrgName}
            "timeZone" = ${TimeZone}
            "lcsChangeHonorsSourceEnableFeature" = ${LcsChangeHonorsSourceEnableFeature}
            "armCustomerId" = ${ArmCustomerId}
            "armSapSystemIdMappings" = ${ArmSapSystemIdMappings}
            "armAuth" = ${ArmAuth}
            "armDb" = ${ArmDb}
            "armSsoUrl" = ${ArmSsoUrl}
            "iaiEnableCertificationRecommendations" = ${IaiEnableCertificationRecommendations}
            "sodReportConfigs" = ${SodReportConfigs}
        }

        return $PSO
    }

}