Model/ScheduleInfo.ps1
|
# # Identity Security Cloud V2025 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: v2025 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER ScheduleTaskId The unique identifier for the scheduled task. .PARAMETER ScheduleTaskName The display name of the scheduled task. .PARAMETER TaskTypeName The type or category of the scheduled task. .PARAMETER Interval The interval depends on the chosen schedule cycle (scheduleType), i.e. if the schedule is daily, the interval will represent the days between executions. .PARAMETER ScheduleType The scheduling type, such as ""Daily"", ""Weekly"", or ""Manual"" etc. .PARAMETER Active Indicates whether the scheduled task is currently active. .PARAMETER StartTime The start time for the scheduled task, represented as epoch seconds. .PARAMETER EndTime The end time for the scheduled task, represented as epoch seconds. .PARAMETER DaysOfWeek A list of days of the week when the task should run (e.g., ""Monday"", ""Wednesday""). .PARAMETER RunAfterScheduleTaskId The ID of another scheduled task that triggers this scheduled task upon its completion. .PARAMETER RunAfterScheduleTaskName The name of the scheduled task that must complete before this task runs. .PARAMETER ApplicationId The unique identifier of the application associated with the scheduled task. .PARAMETER CreatedByDisplayName The display name of the user who created the scheduled task. .PARAMETER NextRun The next scheduled run time for the task, represented as epoch seconds. .PARAMETER LastRun The last run time of the task, represented as epoch seconds. .OUTPUTS ScheduleInfo<PSCustomObject> #> function Initialize-V2025ScheduleInfo { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${ScheduleTaskId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ScheduleTaskName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${TaskTypeName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Interval}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ScheduleType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Active} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${StartTime}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${EndTime}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${DaysOfWeek}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${RunAfterScheduleTaskId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${RunAfterScheduleTaskName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${ApplicationId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${CreatedByDisplayName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${NextRun}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${LastRun} ) Process { 'Creating PSCustomObject: PSSailpoint.V2025 => V2025ScheduleInfo' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "scheduleTaskId" = ${ScheduleTaskId} "scheduleTaskName" = ${ScheduleTaskName} "taskTypeName" = ${TaskTypeName} "interval" = ${Interval} "scheduleType" = ${ScheduleType} "active" = ${Active} "startTime" = ${StartTime} "endTime" = ${EndTime} "daysOfWeek" = ${DaysOfWeek} "runAfterScheduleTaskId" = ${RunAfterScheduleTaskId} "runAfterScheduleTaskName" = ${RunAfterScheduleTaskName} "applicationId" = ${ApplicationId} "createdByDisplayName" = ${CreatedByDisplayName} "nextRun" = ${NextRun} "lastRun" = ${LastRun} } return $PSO } } <# .SYNOPSIS Convert from JSON to ScheduleInfo<PSCustomObject> .DESCRIPTION Convert from JSON to ScheduleInfo<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ScheduleInfo<PSCustomObject> #> function ConvertFrom-V2025JsonToScheduleInfo { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025ScheduleInfo' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2025ScheduleInfo $AllProperties = ("scheduleTaskId", "scheduleTaskName", "taskTypeName", "interval", "scheduleType", "active", "startTime", "endTime", "daysOfWeek", "runAfterScheduleTaskId", "runAfterScheduleTaskName", "applicationId", "createdByDisplayName", "nextRun", "lastRun") 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 "scheduleTaskId"))) { #optional property not found $ScheduleTaskId = $null } else { $ScheduleTaskId = $JsonParameters.PSobject.Properties["scheduleTaskId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "scheduleTaskName"))) { #optional property not found $ScheduleTaskName = $null } else { $ScheduleTaskName = $JsonParameters.PSobject.Properties["scheduleTaskName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "taskTypeName"))) { #optional property not found $TaskTypeName = $null } else { $TaskTypeName = $JsonParameters.PSobject.Properties["taskTypeName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "interval"))) { #optional property not found $Interval = $null } else { $Interval = $JsonParameters.PSobject.Properties["interval"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "scheduleType"))) { #optional property not found $ScheduleType = $null } else { $ScheduleType = $JsonParameters.PSobject.Properties["scheduleType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "active"))) { #optional property not found $Active = $null } else { $Active = $JsonParameters.PSobject.Properties["active"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "startTime"))) { #optional property not found $StartTime = $null } else { $StartTime = $JsonParameters.PSobject.Properties["startTime"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "endTime"))) { #optional property not found $EndTime = $null } else { $EndTime = $JsonParameters.PSobject.Properties["endTime"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "daysOfWeek"))) { #optional property not found $DaysOfWeek = $null } else { $DaysOfWeek = $JsonParameters.PSobject.Properties["daysOfWeek"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "runAfterScheduleTaskId"))) { #optional property not found $RunAfterScheduleTaskId = $null } else { $RunAfterScheduleTaskId = $JsonParameters.PSobject.Properties["runAfterScheduleTaskId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "runAfterScheduleTaskName"))) { #optional property not found $RunAfterScheduleTaskName = $null } else { $RunAfterScheduleTaskName = $JsonParameters.PSobject.Properties["runAfterScheduleTaskName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "applicationId"))) { #optional property not found $ApplicationId = $null } else { $ApplicationId = $JsonParameters.PSobject.Properties["applicationId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "createdByDisplayName"))) { #optional property not found $CreatedByDisplayName = $null } else { $CreatedByDisplayName = $JsonParameters.PSobject.Properties["createdByDisplayName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "nextRun"))) { #optional property not found $NextRun = $null } else { $NextRun = $JsonParameters.PSobject.Properties["nextRun"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastRun"))) { #optional property not found $LastRun = $null } else { $LastRun = $JsonParameters.PSobject.Properties["lastRun"].value } $PSO = [PSCustomObject]@{ "scheduleTaskId" = ${ScheduleTaskId} "scheduleTaskName" = ${ScheduleTaskName} "taskTypeName" = ${TaskTypeName} "interval" = ${Interval} "scheduleType" = ${ScheduleType} "active" = ${Active} "startTime" = ${StartTime} "endTime" = ${EndTime} "daysOfWeek" = ${DaysOfWeek} "runAfterScheduleTaskId" = ${RunAfterScheduleTaskId} "runAfterScheduleTaskName" = ${RunAfterScheduleTaskName} "applicationId" = ${ApplicationId} "createdByDisplayName" = ${CreatedByDisplayName} "nextRun" = ${NextRun} "lastRun" = ${LastRun} } return $PSO } } |