Model/Jitactivationactivateresponse.ps1
|
# # Identity Security Cloud API - JIT Activations # 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: v1 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Id Workflow or business identifier for this activation. .PARAMETER ActivationId Persistent activation record identifier for this JIT activation. .PARAMETER ConnectionId Entitlement connection identifier for the activation. .PARAMETER ActivationPeriodMins Activation duration in minutes for this workflow. .PARAMETER Status No description available. .PARAMETER StartTime Time when the activation workflow was started (ISO-8601). .OUTPUTS Jitactivationactivateresponse<PSCustomObject> #> function Initialize-Jitactivationactivateresponse { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ActivationId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ConnectionId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [Int32] ${ActivationPeriodMins}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("CREATING", "ACTIVATING", "INVALID", "ERROR", "PROVISIONED", "DEPROVISIONING", "COMPLETED", "REVOKED")] [PSCustomObject] ${Status}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.DateTime] ${StartTime} ) Process { 'Creating PSCustomObject: PSSailpoint.JitActivations => Jitactivationactivateresponse' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Id) { throw "invalid value for 'Id', 'Id' cannot be null." } if (!$ActivationId) { throw "invalid value for 'ActivationId', 'ActivationId' cannot be null." } if (!$ConnectionId) { throw "invalid value for 'ConnectionId', 'ConnectionId' cannot be null." } if (!$ActivationPeriodMins) { throw "invalid value for 'ActivationPeriodMins', 'ActivationPeriodMins' cannot be null." } if (!$Status) { throw "invalid value for 'Status', 'Status' cannot be null." } if (!$StartTime) { throw "invalid value for 'StartTime', 'StartTime' cannot be null." } $PSO = [PSCustomObject]@{ "id" = ${Id} "activationId" = ${ActivationId} "connectionId" = ${ConnectionId} "activationPeriodMins" = ${ActivationPeriodMins} "status" = ${Status} "startTime" = ${StartTime} } return $PSO } } <# .SYNOPSIS Convert from JSON to Jitactivationactivateresponse<PSCustomObject> .DESCRIPTION Convert from JSON to Jitactivationactivateresponse<PSCustomObject> .PARAMETER Json Json object .OUTPUTS Jitactivationactivateresponse<PSCustomObject> #> function ConvertFrom-JsonToJitactivationactivateresponse { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.JitActivations => Jitactivationactivateresponse' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in Jitactivationactivateresponse $AllProperties = ("id", "activationId", "connectionId", "activationPeriodMins", "status", "startTime") 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 'id' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { throw "Error! JSON cannot be serialized due to the required property 'id' missing." } else { $Id = $JsonParameters.PSobject.Properties["id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "activationId"))) { throw "Error! JSON cannot be serialized due to the required property 'activationId' missing." } else { $ActivationId = $JsonParameters.PSobject.Properties["activationId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "connectionId"))) { throw "Error! JSON cannot be serialized due to the required property 'connectionId' missing." } else { $ConnectionId = $JsonParameters.PSobject.Properties["connectionId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "activationPeriodMins"))) { throw "Error! JSON cannot be serialized due to the required property 'activationPeriodMins' missing." } else { $ActivationPeriodMins = $JsonParameters.PSobject.Properties["activationPeriodMins"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { throw "Error! JSON cannot be serialized due to the required property 'status' missing." } else { $Status = $JsonParameters.PSobject.Properties["status"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "startTime"))) { throw "Error! JSON cannot be serialized due to the required property 'startTime' missing." } else { $StartTime = $JsonParameters.PSobject.Properties["startTime"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "activationId" = ${ActivationId} "connectionId" = ${ConnectionId} "activationPeriodMins" = ${ActivationPeriodMins} "status" = ${Status} "startTime" = ${StartTime} } return $PSO } } |