v2024/src/PSSailpoint.V2024/Model/ClientLogConfigurationExpiration.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 Client Runtime Logging Configuration .PARAMETER ClientId Log configuration's client ID .PARAMETER Expiration Expiration date-time of the log configuration request. Can be no greater than 24 hours from current date-time. .PARAMETER RootLevel No description available. .PARAMETER LogLevels Mapping of identifiers to Standard Log Level values .OUTPUTS ClientLogConfigurationExpiration<PSCustomObject> #> function Initialize-V2024ClientLogConfigurationExpiration { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ClientId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Expiration}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("false", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE")] [PSCustomObject] ${RootLevel}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${LogLevels} ) Process { 'Creating PSCustomObject: PSSailpoint.V2024 => V2024ClientLogConfigurationExpiration' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$RootLevel) { throw "invalid value for 'RootLevel', 'RootLevel' cannot be null." } $PSO = [PSCustomObject]@{ "clientId" = ${ClientId} "expiration" = ${Expiration} "rootLevel" = ${RootLevel} "logLevels" = ${LogLevels} } return $PSO } } <# .SYNOPSIS Convert from JSON to ClientLogConfigurationExpiration<PSCustomObject> .DESCRIPTION Convert from JSON to ClientLogConfigurationExpiration<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ClientLogConfigurationExpiration<PSCustomObject> #> function ConvertFrom-V2024JsonToClientLogConfigurationExpiration { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2024 => V2024ClientLogConfigurationExpiration' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2024ClientLogConfigurationExpiration $AllProperties = ("clientId", "expiration", "rootLevel", "logLevels") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json throw "Error! Empty JSON cannot be serialized due to the required property 'rootLevel' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "rootLevel"))) { throw "Error! JSON cannot be serialized due to the required property 'rootLevel' missing." } else { $RootLevel = $JsonParameters.PSobject.Properties["rootLevel"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "clientId"))) { #optional property not found $ClientId = $null } else { $ClientId = $JsonParameters.PSobject.Properties["clientId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "expiration"))) { #optional property not found $Expiration = $null } else { $Expiration = $JsonParameters.PSobject.Properties["expiration"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "logLevels"))) { #optional property not found $LogLevels = $null } else { $LogLevels = $JsonParameters.PSobject.Properties["logLevels"].value } $PSO = [PSCustomObject]@{ "clientId" = ${ClientId} "expiration" = ${Expiration} "rootLevel" = ${RootLevel} "logLevels" = ${LogLevels} } return $PSO } } |