v3/src/PSSailpoint.V3/Model/EntitlementDocument.ps1
# # Identity Security Cloud V3 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: 3.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION Entitlement .PARAMETER Id ID of the referenced object. .PARAMETER Name The human readable name of the referenced object. .PARAMETER Modified ISO-8601 date-time referring to the time when the object was last modified. .PARAMETER Synced ISO-8601 date-time referring to the date-time when object was queued to be synced into search database for use in the search API. This date-time changes anytime there is an update to the object, which triggers a synchronization event being sent to the search database. There may be some delay between the `synced` time and the time when the updated data is actually available in the search API. .PARAMETER DisplayName Entitlement's display name. .PARAMETER Source No description available. .PARAMETER Segments Segments with the entitlement. .PARAMETER SegmentCount Number of segments with the role. .PARAMETER Requestable Indicates whether the entitlement is requestable. .PARAMETER CloudGoverned Indicates whether the entitlement is cloud governed. .PARAMETER Created ISO-8601 date-time referring to the time when the object was created. .PARAMETER Privileged Indicates whether the entitlement is privileged. .PARAMETER Tags Tags that have been applied to the object. .PARAMETER Attribute Attribute information for the entitlement. .PARAMETER Value Value of the entitlement. .PARAMETER SourceSchemaObjectType Source schema object type of the entitlement. .PARAMETER Schema Schema type of the entitlement. .PARAMETER Hash Read-only calculated hash value of an entitlement. .PARAMETER Attributes Attributes of the entitlement. .PARAMETER TruncatedAttributes Truncated attributes of the entitlement. .PARAMETER ContainsDataAccess Indicates whether the entitlement contains data access. .PARAMETER ManuallyUpdatedFields No description available. .PARAMETER Permissions No description available. .OUTPUTS EntitlementDocument<PSCustomObject> #> function Initialize-EntitlementDocument { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Modified}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Synced}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${DisplayName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Source}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Segments}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${SegmentCount}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Requestable} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${CloudGoverned} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Created}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Privileged} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${Tags}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Attribute}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Value}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SourceSchemaObjectType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Schema}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Hash}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${Attributes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${TruncatedAttributes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${ContainsDataAccess} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ManuallyUpdatedFields}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Permissions} ) Process { 'Creating PSCustomObject: PSSailpoint.V3 => EntitlementDocument' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Id) { throw "invalid value for 'Id', 'Id' cannot be null." } if (!$Name) { throw "invalid value for 'Name', 'Name' cannot be null." } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "modified" = ${Modified} "synced" = ${Synced} "displayName" = ${DisplayName} "source" = ${Source} "segments" = ${Segments} "segmentCount" = ${SegmentCount} "requestable" = ${Requestable} "cloudGoverned" = ${CloudGoverned} "created" = ${Created} "privileged" = ${Privileged} "tags" = ${Tags} "attribute" = ${Attribute} "value" = ${Value} "sourceSchemaObjectType" = ${SourceSchemaObjectType} "schema" = ${Schema} "hash" = ${Hash} "attributes" = ${Attributes} "truncatedAttributes" = ${TruncatedAttributes} "containsDataAccess" = ${ContainsDataAccess} "manuallyUpdatedFields" = ${ManuallyUpdatedFields} "permissions" = ${Permissions} } return $PSO } } <# .SYNOPSIS Convert from JSON to EntitlementDocument<PSCustomObject> .DESCRIPTION Convert from JSON to EntitlementDocument<PSCustomObject> .PARAMETER Json Json object .OUTPUTS EntitlementDocument<PSCustomObject> #> function ConvertFrom-JsonToEntitlementDocument { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V3 => EntitlementDocument' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in EntitlementDocument $AllProperties = ("id", "name", "modified", "synced", "displayName", "source", "segments", "segmentCount", "requestable", "cloudGoverned", "created", "privileged", "tags", "attribute", "value", "sourceSchemaObjectType", "schema", "hash", "attributes", "truncatedAttributes", "containsDataAccess", "manuallyUpdatedFields", "permissions") 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 'id' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { throw "Error! JSON cannot be serialized due to the required property 'id' missing." } else { $Id = $JsonParameters.PSobject.Properties["id"].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 "modified"))) { #optional property not found $Modified = $null } else { $Modified = $JsonParameters.PSobject.Properties["modified"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "synced"))) { #optional property not found $Synced = $null } else { $Synced = $JsonParameters.PSobject.Properties["synced"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "displayName"))) { #optional property not found $DisplayName = $null } else { $DisplayName = $JsonParameters.PSobject.Properties["displayName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "source"))) { #optional property not found $Source = $null } else { $Source = $JsonParameters.PSobject.Properties["source"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "segments"))) { #optional property not found $Segments = $null } else { $Segments = $JsonParameters.PSobject.Properties["segments"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "segmentCount"))) { #optional property not found $SegmentCount = $null } else { $SegmentCount = $JsonParameters.PSobject.Properties["segmentCount"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "requestable"))) { #optional property not found $Requestable = $null } else { $Requestable = $JsonParameters.PSobject.Properties["requestable"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "cloudGoverned"))) { #optional property not found $CloudGoverned = $null } else { $CloudGoverned = $JsonParameters.PSobject.Properties["cloudGoverned"].value } 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 "privileged"))) { #optional property not found $Privileged = $null } else { $Privileged = $JsonParameters.PSobject.Properties["privileged"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "tags"))) { #optional property not found $Tags = $null } else { $Tags = $JsonParameters.PSobject.Properties["tags"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "attribute"))) { #optional property not found $Attribute = $null } else { $Attribute = $JsonParameters.PSobject.Properties["attribute"].value } 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 "sourceSchemaObjectType"))) { #optional property not found $SourceSchemaObjectType = $null } else { $SourceSchemaObjectType = $JsonParameters.PSobject.Properties["sourceSchemaObjectType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "schema"))) { #optional property not found $Schema = $null } else { $Schema = $JsonParameters.PSobject.Properties["schema"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "hash"))) { #optional property not found $Hash = $null } else { $Hash = $JsonParameters.PSobject.Properties["hash"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "attributes"))) { #optional property not found $Attributes = $null } else { $Attributes = $JsonParameters.PSobject.Properties["attributes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "truncatedAttributes"))) { #optional property not found $TruncatedAttributes = $null } else { $TruncatedAttributes = $JsonParameters.PSobject.Properties["truncatedAttributes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "containsDataAccess"))) { #optional property not found $ContainsDataAccess = $null } else { $ContainsDataAccess = $JsonParameters.PSobject.Properties["containsDataAccess"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "manuallyUpdatedFields"))) { #optional property not found $ManuallyUpdatedFields = $null } else { $ManuallyUpdatedFields = $JsonParameters.PSobject.Properties["manuallyUpdatedFields"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "permissions"))) { #optional property not found $Permissions = $null } else { $Permissions = $JsonParameters.PSobject.Properties["permissions"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "name" = ${Name} "modified" = ${Modified} "synced" = ${Synced} "displayName" = ${DisplayName} "source" = ${Source} "segments" = ${Segments} "segmentCount" = ${SegmentCount} "requestable" = ${Requestable} "cloudGoverned" = ${CloudGoverned} "created" = ${Created} "privileged" = ${Privileged} "tags" = ${Tags} "attribute" = ${Attribute} "value" = ${Value} "sourceSchemaObjectType" = ${SourceSchemaObjectType} "schema" = ${Schema} "hash" = ${Hash} "attributes" = ${Attributes} "truncatedAttributes" = ${TruncatedAttributes} "containsDataAccess" = ${ContainsDataAccess} "manuallyUpdatedFields" = ${ManuallyUpdatedFields} "permissions" = ${Permissions} } return $PSO } } |