Model/ReportConfigDTO.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 No description available. .PARAMETER ColumnName Name of column in report .PARAMETER Required If true, column is required in all reports, and this entry is immutable. A 400 error will result from any attempt to modify the column's definition. .PARAMETER Included If true, column is included in the report. A 400 error will be thrown if an attempt is made to set included=false if required==true. .PARAMETER Order Relative sort order for the column. Columns will be displayed left-to-right in nondecreasing order. .OUTPUTS ReportConfigDTO<PSCustomObject> #> function Initialize-V2024ReportConfigDTO { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ColumnName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Required} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Included} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Order} ) Process { 'Creating PSCustomObject: PSSailpoint.V2024 => V2024ReportConfigDTO' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if ($Order -and $Order -gt 2147483647) { throw "invalid value for 'Order', must be smaller than or equal to 2147483647." } if ($Order -and $Order -lt 0) { throw "invalid value for 'Order', must be greater than or equal to 0." } $PSO = [PSCustomObject]@{ "columnName" = ${ColumnName} "required" = ${Required} "included" = ${Included} "order" = ${Order} } return $PSO } } <# .SYNOPSIS Convert from JSON to ReportConfigDTO<PSCustomObject> .DESCRIPTION Convert from JSON to ReportConfigDTO<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ReportConfigDTO<PSCustomObject> #> function ConvertFrom-V2024JsonToReportConfigDTO { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2024 => V2024ReportConfigDTO' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2024ReportConfigDTO $AllProperties = ("columnName", "required", "included", "order") 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 "columnName"))) { #optional property not found $ColumnName = $null } else { $ColumnName = $JsonParameters.PSobject.Properties["columnName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "required"))) { #optional property not found $Required = $null } else { $Required = $JsonParameters.PSobject.Properties["required"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "included"))) { #optional property not found $Included = $null } else { $Included = $JsonParameters.PSobject.Properties["included"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "order"))) { #optional property not found $Order = $null } else { $Order = $JsonParameters.PSobject.Properties["order"].value } $PSO = [PSCustomObject]@{ "columnName" = ${ColumnName} "required" = ${Required} "included" = ${Included} "order" = ${Order} } return $PSO } } |