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