Model/ChangeSiteProfileOngoingActionModel.ps1
# # Cloud Governance Api # Contact: support@avepoint.com # <# ChangeSiteProfileOngoingActionModel<PSCustomObject> #> function New-ChangeSiteProfileOngoingActionModel { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${HandleOngoingType} = "None", [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsSendCancelEmail} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${CancelEmailTemplateId} ) Process { 'Creating PSCustomObject: Cloud.Governance.Client => ChangeSiteProfileOngoingActionModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "HandleOngoingType" = ${HandleOngoingType} "IsSendCancelEmail" = ${IsSendCancelEmail} "CancelEmailTemplateId" = ${CancelEmailTemplateId} } return $PSO } } <# ChangeSiteProfileOngoingActionModel<PSCustomObject> #> function ConvertFrom-JsonToChangeSiteProfileOngoingActionModel { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Cloud.Governance.Client => ChangeSiteProfileOngoingActionModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in ChangeSiteProfileOngoingActionModel $AllProperties = $("HandleOngoingType", "IsSendCancelEmail", "CancelEmailTemplateId") 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 "HandleOngoingType"))) { #optional property not found $HandleOngoingType = $null } else { $HandleOngoingType = $JsonParameters.PSobject.Properties["HandleOngoingType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "IsSendCancelEmail"))) { #optional property not found $IsSendCancelEmail = $null } else { $IsSendCancelEmail = $JsonParameters.PSobject.Properties["IsSendCancelEmail"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "CancelEmailTemplateId"))) { #optional property not found $CancelEmailTemplateId = $null } else { $CancelEmailTemplateId = $JsonParameters.PSobject.Properties["CancelEmailTemplateId"].value } $PSO = [PSCustomObject]@{ "HandleOngoingType" = ${HandleOngoingType} "IsSendCancelEmail" = ${IsSendCancelEmail} "CancelEmailTemplateId" = ${CancelEmailTemplateId} } return $PSO } } |