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