v2025/src/PSSailpoint.V2025/Model/RightSetDTO.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 RightSetDTO represents a collection of rights that assigned to capability or scope, enabling them to possess specific rights to access corresponding APIs.

.PARAMETER Id
The unique identifier of the RightSet.
.PARAMETER Name
The human-readable name of the RightSet.
.PARAMETER Description
A human-readable description of the RightSet.
.PARAMETER Category
The category of the RightSet.
.PARAMETER Rights
Right is the most granular unit that determines specific API permissions, this is a list of rights associated with the RightSet.
.PARAMETER RightSetIds
List of unique identifiers for related RightSets, current RightSet contains rights from these RightSets.
.PARAMETER UiAssignableChildRightSetIds
List of unique identifiers for UI-assignable child RightSets, used to build UI components.
.PARAMETER UiAssignable
Indicates whether the RightSet is UI-assignable.
.PARAMETER TranslatedName
The translated name of the RightSet.
.PARAMETER TranslatedDescription
The translated description of the RightSet.
.PARAMETER ParentId
The unique identifier of the parent RightSet for UI Assignable RightSet.
.OUTPUTS

RightSetDTO<PSCustomObject>
#>


function Initialize-V2025RightSetDTO {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Id},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Name},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Description},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Category},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String[]]
        ${Rights},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String[]]
        ${RightSetIds},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String[]]
        ${UiAssignableChildRightSetIds},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${UiAssignable} = $false,
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${TranslatedName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${TranslatedDescription},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ParentId}
    )

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


        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "name" = ${Name}
            "description" = ${Description}
            "category" = ${Category}
            "rights" = ${Rights}
            "rightSetIds" = ${RightSetIds}
            "uiAssignableChildRightSetIds" = ${UiAssignableChildRightSetIds}
            "uiAssignable" = ${UiAssignable}
            "translatedName" = ${TranslatedName}
            "translatedDescription" = ${TranslatedDescription}
            "parentId" = ${ParentId}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to RightSetDTO<PSCustomObject>

.DESCRIPTION

Convert from JSON to RightSetDTO<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

RightSetDTO<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2025RightSetDTO
        $AllProperties = ("id", "name", "description", "category", "rights", "rightSetIds", "uiAssignableChildRightSetIds", "uiAssignable", "translatedName", "translatedDescription", "parentId")
        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 "id"))) { #optional property not found
            $Id = $null
        } else {
            $Id = $JsonParameters.PSobject.Properties["id"].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 "description"))) { #optional property not found
            $Description = $null
        } else {
            $Description = $JsonParameters.PSobject.Properties["description"].value
        }

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

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

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

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

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

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

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

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

        $PSO = [PSCustomObject]@{
            "id" = ${Id}
            "name" = ${Name}
            "description" = ${Description}
            "category" = ${Category}
            "rights" = ${Rights}
            "rightSetIds" = ${RightSetIds}
            "uiAssignableChildRightSetIds" = ${UiAssignableChildRightSetIds}
            "uiAssignable" = ${UiAssignable}
            "translatedName" = ${TranslatedName}
            "translatedDescription" = ${TranslatedDescription}
            "parentId" = ${ParentId}
        }

        return $PSO
    }

}