v2025/src/PSSailpoint.V2025/Model/StreamConfigResponse.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

Full stream configuration returned by create/get/update/replace.

.PARAMETER StreamId
Unique stream identifier.
.PARAMETER Iss
Issuer (transmitter) URL.
.PARAMETER Aud
Audience for the stream.
.PARAMETER Delivery
No description available.
.PARAMETER EventsSupported
Event types supported by the transmitter. Use CAEP event-type URIs in the form: `https://schemas.openid.net/secevent/caep/event-type/{event-type}` (e.g. session-revoked).
.PARAMETER EventsRequested
Event types requested by the receiver. Use CAEP event-type URIs in the form: `https://schemas.openid.net/secevent/caep/event-type/{event-type}` (e.g. session revoke).
.PARAMETER EventsDelivered
Event types currently being delivered (intersection of supported and requested).
.PARAMETER Description
Optional stream description.
.PARAMETER InactivityTimeout
Inactivity timeout in seconds (optional).
.PARAMETER MinVerificationInterval
Minimum verification interval in seconds (optional).
.OUTPUTS

StreamConfigResponse<PSCustomObject>
#>


function Initialize-V2025StreamConfigResponse {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${StreamId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Iss},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Aud},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Delivery},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String[]]
        ${EventsSupported},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String[]]
        ${EventsRequested},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String[]]
        ${EventsDelivered},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Description},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${InactivityTimeout},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${MinVerificationInterval}
    )

    Process {
        'Creating PSCustomObject: PSSailpoint.V2025 => V2025StreamConfigResponse' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "stream_id" = ${StreamId}
            "iss" = ${Iss}
            "aud" = ${Aud}
            "delivery" = ${Delivery}
            "events_supported" = ${EventsSupported}
            "events_requested" = ${EventsRequested}
            "events_delivered" = ${EventsDelivered}
            "description" = ${Description}
            "inactivity_timeout" = ${InactivityTimeout}
            "min_verification_interval" = ${MinVerificationInterval}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to StreamConfigResponse<PSCustomObject>

.DESCRIPTION

Convert from JSON to StreamConfigResponse<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

StreamConfigResponse<PSCustomObject>
#>

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

    Process {
        'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025StreamConfigResponse' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2025StreamConfigResponse
        $AllProperties = ("stream_id", "iss", "aud", "delivery", "events_supported", "events_requested", "events_delivered", "description", "inactivity_timeout", "min_verification_interval")
        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 "stream_id"))) { #optional property not found
            $StreamId = $null
        } else {
            $StreamId = $JsonParameters.PSobject.Properties["stream_id"].value
        }

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

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

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

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

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

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

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

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

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

        $PSO = [PSCustomObject]@{
            "stream_id" = ${StreamId}
            "iss" = ${Iss}
            "aud" = ${Aud}
            "delivery" = ${Delivery}
            "events_supported" = ${EventsSupported}
            "events_requested" = ${EventsRequested}
            "events_delivered" = ${EventsDelivered}
            "description" = ${Description}
            "inactivity_timeout" = ${InactivityTimeout}
            "min_verification_interval" = ${MinVerificationInterval}
        }

        return $PSO
    }

}