machine-accounts/src/PSSailpoint.MachineAccounts/Model/MachineAccountBulkResult.ps1
|
# # SailPoint Identity Security API - Machine Accounts # 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 The outcome of a bulk operation for one machine account. .PARAMETER Id ID of the machine account this result applies to. .PARAMETER Status HTTP-style status code for this machine account. `200` means the operation succeeded or was queued. Other values, such as `400`, `404` or `500`, describe why it failed. .PARAMETER Message A message that describes the outcome for this machine account. .OUTPUTS MachineAccountBulkResult<PSCustomObject> #> function Initialize-MachineAccountBulkResult { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Status}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Message} ) Process { 'Creating PSCustomObject: PSSailpoint.MachineAccounts => MachineAccountBulkResult' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Id -and $Id.length -gt 128) { throw "invalid value for 'Id', the character length must be smaller than or equal to 128." } $PSO = [PSCustomObject]@{ "id" = ${Id} "status" = ${Status} "message" = ${Message} } return $PSO } } <# .SYNOPSIS Convert from JSON to MachineAccountBulkResult<PSCustomObject> .DESCRIPTION Convert from JSON to MachineAccountBulkResult<PSCustomObject> .PARAMETER Json Json object .OUTPUTS MachineAccountBulkResult<PSCustomObject> #> function ConvertFrom-JsonToMachineAccountBulkResult { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.MachineAccounts => MachineAccountBulkResult' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in MachineAccountBulkResult $AllProperties = ("id", "status", "message") 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 "id"))) { #optional property not found $Id = $null } else { $Id = $JsonParameters.PSobject.Properties["id"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found $Status = $null } else { $Status = $JsonParameters.PSobject.Properties["status"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "message"))) { #optional property not found $Message = $null } else { $Message = $JsonParameters.PSobject.Properties["message"].value } $PSO = [PSCustomObject]@{ "id" = ${Id} "status" = ${Status} "message" = ${Message} } return $PSO } } |