v2026/src/PSSailpoint.V2026/Model/MachineAccountSubTypeConfigDto.ps1

#
# Identity Security Cloud v2026 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: v2026
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

Contains comprehensive configuration details for machine account subtype approval, including creation and deletion approval requirements, approver lists, form and entitlement references, and approval status options.

.PARAMETER SubtypeId
Unique identifier representing the specific subtype of the machine account, used to distinguish between different machine account categories.
.PARAMETER MachineAccountCreate
No description available.
.PARAMETER MachineAccountDelete
No description available.
.OUTPUTS

MachineAccountSubTypeConfigDto<PSCustomObject>
#>


function Initialize-V2026MachineAccountSubTypeConfigDto {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${SubtypeId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${MachineAccountCreate},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${MachineAccountDelete}
    )

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


        $PSO = [PSCustomObject]@{
            "subtypeId" = ${SubtypeId}
            "machineAccountCreate" = ${MachineAccountCreate}
            "machineAccountDelete" = ${MachineAccountDelete}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to MachineAccountSubTypeConfigDto<PSCustomObject>

.DESCRIPTION

Convert from JSON to MachineAccountSubTypeConfigDto<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

MachineAccountSubTypeConfigDto<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in V2026MachineAccountSubTypeConfigDto
        $AllProperties = ("subtypeId", "machineAccountCreate", "machineAccountDelete")
        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 "subtypeId"))) { #optional property not found
            $SubtypeId = $null
        } else {
            $SubtypeId = $JsonParameters.PSobject.Properties["subtypeId"].value
        }

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

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

        $PSO = [PSCustomObject]@{
            "subtypeId" = ${SubtypeId}
            "machineAccountCreate" = ${MachineAccountCreate}
            "machineAccountDelete" = ${MachineAccountDelete}
        }

        return $PSO
    }

}