Model/MachineIdentityDailyCountsDay.ps1
|
# # SailPoint Identity Security API - Machine Identities # Use these APIs to interact with the SailPoint Identity Security 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 Counts recorded for a single calendar day. .PARAMETER Day Calendar day (UTC) the counts were recorded for. .PARAMETER Metrics Counts for each entity type and subtype. The array is empty when no counts were recorded for the day. .OUTPUTS MachineIdentityDailyCountsDay<PSCustomObject> #> function Initialize-MachineIdentityDailyCountsDay { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Day}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Metrics} ) Process { 'Creating PSCustomObject: PSSailpoint.MachineIdentities => MachineIdentityDailyCountsDay' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "day" = ${Day} "metrics" = ${Metrics} } return $PSO } } <# .SYNOPSIS Convert from JSON to MachineIdentityDailyCountsDay<PSCustomObject> .DESCRIPTION Convert from JSON to MachineIdentityDailyCountsDay<PSCustomObject> .PARAMETER Json Json object .OUTPUTS MachineIdentityDailyCountsDay<PSCustomObject> #> function ConvertFrom-JsonToMachineIdentityDailyCountsDay { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.MachineIdentities => MachineIdentityDailyCountsDay' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in MachineIdentityDailyCountsDay $AllProperties = ("day", "metrics") 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 "day"))) { #optional property not found $Day = $null } else { $Day = $JsonParameters.PSobject.Properties["day"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "metrics"))) { #optional property not found $Metrics = $null } else { $Metrics = $JsonParameters.PSobject.Properties["metrics"].value } $PSO = [PSCustomObject]@{ "day" = ${Day} "metrics" = ${Metrics} } return $PSO } } |