machine-identities/src/PSSailpoint.MachineIdentities/Model/MachineIdentityAgentCountsOwnership.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 Ownership coverage of AI agents. .PARAMETER OwnedAgents Number of AI agents that have at least one owner. .PARAMETER OwnedPercent Percentage of AI agents that have at least one owner. .OUTPUTS MachineIdentityAgentCountsOwnership<PSCustomObject> #> function Initialize-MachineIdentityAgentCountsOwnership { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${OwnedAgents}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${OwnedPercent} ) Process { 'Creating PSCustomObject: PSSailpoint.MachineIdentities => MachineIdentityAgentCountsOwnership' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "ownedAgents" = ${OwnedAgents} "ownedPercent" = ${OwnedPercent} } return $PSO } } <# .SYNOPSIS Convert from JSON to MachineIdentityAgentCountsOwnership<PSCustomObject> .DESCRIPTION Convert from JSON to MachineIdentityAgentCountsOwnership<PSCustomObject> .PARAMETER Json Json object .OUTPUTS MachineIdentityAgentCountsOwnership<PSCustomObject> #> function ConvertFrom-JsonToMachineIdentityAgentCountsOwnership { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.MachineIdentities => MachineIdentityAgentCountsOwnership' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in MachineIdentityAgentCountsOwnership $AllProperties = ("ownedAgents", "ownedPercent") 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 "ownedAgents"))) { #optional property not found $OwnedAgents = $null } else { $OwnedAgents = $JsonParameters.PSobject.Properties["ownedAgents"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ownedPercent"))) { #optional property not found $OwnedPercent = $null } else { $OwnedPercent = $JsonParameters.PSobject.Properties["ownedPercent"].value } $PSO = [PSCustomObject]@{ "ownedAgents" = ${OwnedAgents} "ownedPercent" = ${OwnedPercent} } return $PSO } } |