v2025/src/PSSailpoint.V2025/Model/ParameterStorageNewParameter.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 A parameter to add to parameter storage. The public and private fields must match the type specification. .PARAMETER OwnerId The UUID of the parameter owner. .PARAMETER Name The human-readable name for the parameter. .PARAMETER Type The type of the parameter. This cannot be changed after being set. Please see the types document for more information. .PARAMETER PublicFields The content must be a JSON object containing the public fields that can be stored with this parameter. .PARAMETER PrivateFields Must be a JWE AES256 encrypted blob. The content of the blob must be a JSON object containing the private fields that can be stored with this parameter. .PARAMETER Description Describe the parameter .OUTPUTS ParameterStorageNewParameter<PSCustomObject> #> function Initialize-V2025ParameterStorageNewParameter { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${OwnerId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${PublicFields}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${PrivateFields}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Description} ) Process { 'Creating PSCustomObject: PSSailpoint.V2025 => V2025ParameterStorageNewParameter' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$OwnerId) { throw "invalid value for 'OwnerId', 'OwnerId' cannot be null." } if (!$Name) { throw "invalid value for 'Name', 'Name' cannot be null." } if (!$Type) { throw "invalid value for 'Type', 'Type' cannot be null." } $PSO = [PSCustomObject]@{ "ownerId" = ${OwnerId} "name" = ${Name} "type" = ${Type} "publicFields" = ${PublicFields} "privateFields" = ${PrivateFields} "description" = ${Description} } return $PSO } } <# .SYNOPSIS Convert from JSON to ParameterStorageNewParameter<PSCustomObject> .DESCRIPTION Convert from JSON to ParameterStorageNewParameter<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ParameterStorageNewParameter<PSCustomObject> #> function ConvertFrom-V2025JsonToParameterStorageNewParameter { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025ParameterStorageNewParameter' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2025ParameterStorageNewParameter $AllProperties = ("ownerId", "name", "type", "publicFields", "privateFields", "description") 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 'ownerId' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ownerId"))) { throw "Error! JSON cannot be serialized due to the required property 'ownerId' missing." } else { $OwnerId = $JsonParameters.PSobject.Properties["ownerId"].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 "type"))) { throw "Error! JSON cannot be serialized due to the required property 'type' missing." } else { $Type = $JsonParameters.PSobject.Properties["type"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "publicFields"))) { #optional property not found $PublicFields = $null } else { $PublicFields = $JsonParameters.PSobject.Properties["publicFields"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "privateFields"))) { #optional property not found $PrivateFields = $null } else { $PrivateFields = $JsonParameters.PSobject.Properties["privateFields"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "description"))) { #optional property not found $Description = $null } else { $Description = $JsonParameters.PSobject.Properties["description"].value } $PSO = [PSCustomObject]@{ "ownerId" = ${OwnerId} "name" = ${Name} "type" = ${Type} "publicFields" = ${PublicFields} "privateFields" = ${PrivateFields} "description" = ${Description} } return $PSO } } |