dimensions/src/PSSailpoint.Dimensions/Model/AttributeValueDTO.ps1
|
# # Identity Security Cloud API - Dimensions # 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 Value Technical name of the Attribute value. This is unique and cannot be changed after creation. Allowed characters are letters, numbers, dashes (-), and underscores (_); the value cannot start or end with a dash or underscore. .PARAMETER Name The display name of the Attribute value. Allowed characters are letters, numbers, whitespace, and the following special characters: . / | , ( ) & _ - .PARAMETER Status The status of the Attribute value. .PARAMETER Type Indicates how this Attribute value was created. static values are pre-defined and created directly through this API. adhoc values are created dynamically through an internal service-to-service flow when the parent Attribute has isAdhoc set to true, and cannot be created directly through the public create-value API. .OUTPUTS AttributeValueDTO<PSCustomObject> #> function Initialize-AttributeValueDTO { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidatePattern("^[a-zA-Z0-9]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$")] [String] ${Value}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Status}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("static", "adhoc")] [String] ${Type} ) Process { 'Creating PSCustomObject: PSSailpoint.Dimensions => AttributeValueDTO' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Value -and $Value.length -gt 255) { throw "invalid value for 'Value', the character length must be smaller than or equal to 255." } if (!$Name -and $Name.length -gt 100) { throw "invalid value for 'Name', the character length must be smaller than or equal to 100." } $PSO = [PSCustomObject]@{ "value" = ${Value} "name" = ${Name} "status" = ${Status} "type" = ${Type} } return $PSO } } <# .SYNOPSIS Convert from JSON to AttributeValueDTO<PSCustomObject> .DESCRIPTION Convert from JSON to AttributeValueDTO<PSCustomObject> .PARAMETER Json Json object .OUTPUTS AttributeValueDTO<PSCustomObject> #> function ConvertFrom-JsonToAttributeValueDTO { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.Dimensions => AttributeValueDTO' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in AttributeValueDTO $AllProperties = ("value", "name", "status", "type") 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 "value"))) { #optional property not found $Value = $null } else { $Value = $JsonParameters.PSobject.Properties["value"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found $Status = $null } else { $Status = $JsonParameters.PSobject.Properties["status"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { #optional property not found $Type = $null } else { $Type = $JsonParameters.PSobject.Properties["type"].value } $PSO = [PSCustomObject]@{ "value" = ${Value} "name" = ${Name} "status" = ${Status} "type" = ${Type} } return $PSO } } |