v2025/src/PSSailpoint.V2025/Model/CreateStreamDeliveryRequest.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 delivery configuration. method and endpoint_url are required. .PARAMETER Method Delivery method (only push is supported). .PARAMETER EndpointUrl Receiver endpoint URL for push delivery. .PARAMETER AuthorizationHeader Authorization header value for delivery requests. .OUTPUTS CreateStreamDeliveryRequest<PSCustomObject> #> function Initialize-V2025CreateStreamDeliveryRequest { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Method}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${EndpointUrl}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${AuthorizationHeader} ) Process { 'Creating PSCustomObject: PSSailpoint.V2025 => V2025CreateStreamDeliveryRequest' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Method) { throw "invalid value for 'Method', 'Method' cannot be null." } if (!$EndpointUrl) { throw "invalid value for 'EndpointUrl', 'EndpointUrl' cannot be null." } $PSO = [PSCustomObject]@{ "method" = ${Method} "endpoint_url" = ${EndpointUrl} "authorization_header" = ${AuthorizationHeader} } return $PSO } } <# .SYNOPSIS Convert from JSON to CreateStreamDeliveryRequest<PSCustomObject> .DESCRIPTION Convert from JSON to CreateStreamDeliveryRequest<PSCustomObject> .PARAMETER Json Json object .OUTPUTS CreateStreamDeliveryRequest<PSCustomObject> #> function ConvertFrom-V2025JsonToCreateStreamDeliveryRequest { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025CreateStreamDeliveryRequest' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2025CreateStreamDeliveryRequest $AllProperties = ("method", "endpoint_url", "authorization_header") 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 'method' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "method"))) { throw "Error! JSON cannot be serialized due to the required property 'method' missing." } else { $Method = $JsonParameters.PSobject.Properties["method"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "endpoint_url"))) { throw "Error! JSON cannot be serialized due to the required property 'endpoint_url' missing." } else { $EndpointUrl = $JsonParameters.PSobject.Properties["endpoint_url"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "authorization_header"))) { #optional property not found $AuthorizationHeader = $null } else { $AuthorizationHeader = $JsonParameters.PSobject.Properties["authorization_header"].value } $PSO = [PSCustomObject]@{ "method" = ${Method} "endpoint_url" = ${EndpointUrl} "authorization_header" = ${AuthorizationHeader} } return $PSO } } |