Model/AutoTaskExtendRequestComments.ps1
# # Cloud Governance Api # Contact: support@avepoint.com # <# AutoTaskExtendRequestComments<PSCustomObject> #> function New-AutoTaskExtendRequestComments { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Comments} ) Process { 'Creating PSCustomObject: Cloud.Governance.Client => AutoTaskExtendRequestComments' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "Comments" = ${Comments} } return $PSO } } <# AutoTaskExtendRequestComments<PSCustomObject> #> function ConvertFrom-JsonToAutoTaskExtendRequestComments { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Cloud.Governance.Client => AutoTaskExtendRequestComments' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in AutoTaskExtendRequestComments $AllProperties = $("Comments") 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 "Comments"))) { #optional property not found $Comments = $null } else { $Comments = $JsonParameters.PSobject.Properties["Comments"].value } $PSO = [PSCustomObject]@{ "Comments" = ${Comments} } return $PSO } } |