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