v2025/src/PSSailpoint.V2025/Model/ParameterStorageReference.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 Reference information returned in response to a request. .PARAMETER Id The ID of the reference .PARAMETER ConsumerId The ID of the consumer holding the reference .PARAMETER ParameterId The ID of the parameter that the reference is pointing to. .PARAMETER Name The human-readable name of the reference .PARAMETER UsageHint The hint string used to validate the reference .OUTPUTS ParameterStorageReference<PSCustomObject> #> function Initialize-V2025ParameterStorageReference { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ConsumerId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ParameterId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${UsageHint} ) Process { 'Creating PSCustomObject: PSSailpoint.V2025 => V2025ParameterStorageReference' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Id) { throw "invalid value for 'Id', 'Id' cannot be null." } if (!$ConsumerId) { throw "invalid value for 'ConsumerId', 'ConsumerId' cannot be null." } if (!$ParameterId) { throw "invalid value for 'ParameterId', 'ParameterId' cannot be null." } if (!$Name) { throw "invalid value for 'Name', 'Name' cannot be null." } $PSO = [PSCustomObject]@{ "id" = ${Id} "consumerId" = ${ConsumerId} "parameterId" = ${ParameterId} "name" = ${Name} "usageHint" = ${UsageHint} } return $PSO } } <# .SYNOPSIS Convert from JSON to ParameterStorageReference<PSCustomObject> .DESCRIPTION Convert from JSON to ParameterStorageReference<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ParameterStorageReference<PSCustomObject> #> function ConvertFrom-V2025JsonToParameterStorageReference { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025ParameterStorageReference' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2025ParameterStorageReference $AllProperties = ("id", "consumerId", "parameterId", "name", "usageHint") 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 "consumerId"))) { throw "Error! JSON cannot be serialized due to the required property 'consumerId' missing." } else { $ConsumerId = $JsonParameters.PSobject.Properties["consumerId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "parameterId"))) { throw "Error! JSON cannot be serialized due to the required property 'parameterId' missing." } else { $ParameterId = $JsonParameters.PSobject.Properties["parameterId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { throw "Error! JSON cannot be serialized due to the required property 'name' missing." } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "usageHint"))) { #optional property not found $UsageHint = $null } else { $UsageHint = $JsonParameters.PSobject.Properties["usageHint"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "consumerId" = ${ConsumerId} "parameterId" = ${ParameterId} "name" = ${Name} "usageHint" = ${UsageHint} } return $PSO } } |