beta/src/PSSailpointBeta/Model/AuditDetails.ps1

#
# IdentityNow Beta API
# Use these APIs to interact with the IdentityNow platform to achieve repeatable, automated processes with greater scalability. These APIs are in beta and are subject to change. 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: 3.1.0-beta
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

Audit details for the reassignment configuration of an identity

.PARAMETER Created
Initial date and time when the record was created
.PARAMETER CreatedBy
No description available.
.PARAMETER Modified
Last modified date and time for the record
.PARAMETER ModifiedBy
No description available.
.OUTPUTS

AuditDetails<PSCustomObject>
#>


function Initialize-BetaAuditDetails {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[System.DateTime]]
        ${Created},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${CreatedBy},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[System.DateTime]]
        ${Modified},
        [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ModifiedBy}
    )

    Process {
        'Creating PSCustomObject: PSSailpointBeta => BetaAuditDetails' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "created" = ${Created}
            "createdBy" = ${CreatedBy}
            "modified" = ${Modified}
            "modifiedBy" = ${ModifiedBy}
        }


        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to AuditDetails<PSCustomObject>

.DESCRIPTION

Convert from JSON to AuditDetails<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

AuditDetails<PSCustomObject>
#>

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

    Process {
        'Converting JSON to PSCustomObject: PSSailpointBeta => BetaAuditDetails' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in BetaAuditDetails
        $AllProperties = ("created", "createdBy", "modified", "modifiedBy")
        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 "created"))) { #optional property not found
            $Created = $null
        } else {
            $Created = $JsonParameters.PSobject.Properties["created"].value
        }

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

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

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

        $PSO = [PSCustomObject]@{
            "created" = ${Created}
            "createdBy" = ${CreatedBy}
            "modified" = ${Modified}
            "modifiedBy" = ${ModifiedBy}
        }

        return $PSO
    }

}