Model/CreateRoomMailboxAdditionalInformationRequestModel.ps1

#
# Cloud Governance Api
# Contact: support@avepoint.com
#

<#
CreateRoomMailboxAdditionalInformationRequestModel<PSCustomObject>
#>


function New-CreateRoomMailboxAdditionalInformationRequestModel {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${IsEnableWheel} = $false,
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Tags},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AudioDeviceName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${DisplayDeviceName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${VideoDeviceName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ActivityId}
    )

    Process {
        'Creating PSCustomObject: Cloud.Governance.Client => CreateRoomMailboxAdditionalInformationRequestModel' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        
        $PSO = [PSCustomObject]@{
            "IsEnableWheel" = ${IsEnableWheel}
            "Tags" = ${Tags}
            "AudioDeviceName" = ${AudioDeviceName}
            "DisplayDeviceName" = ${DisplayDeviceName}
            "VideoDeviceName" = ${VideoDeviceName}
            "ActivityId" = ${ActivityId}
        }

        return $PSO
    }
}

<#
CreateRoomMailboxAdditionalInformationRequestModel<PSCustomObject>
#>

function ConvertFrom-JsonToCreateRoomMailboxAdditionalInformationRequestModel {
    Param(
        [AllowEmptyString()]
        [string]$Json
    )

    Process {
        'Converting JSON to PSCustomObject: Cloud.Governance.Client => CreateRoomMailboxAdditionalInformationRequestModel' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in CreateRoomMailboxAdditionalInformationRequestModel
        $AllProperties = $("IsEnableWheel", "Tags", "AudioDeviceName", "DisplayDeviceName", "VideoDeviceName", "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 "IsEnableWheel"))) { #optional property not found
            $IsEnableWheel = $null
        } else {
            $IsEnableWheel = $JsonParameters.PSobject.Properties["IsEnableWheel"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "Tags"))) { #optional property not found
            $Tags = $null
        } else {
            $Tags = $JsonParameters.PSobject.Properties["Tags"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "AudioDeviceName"))) { #optional property not found
            $AudioDeviceName = $null
        } else {
            $AudioDeviceName = $JsonParameters.PSobject.Properties["AudioDeviceName"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "DisplayDeviceName"))) { #optional property not found
            $DisplayDeviceName = $null
        } else {
            $DisplayDeviceName = $JsonParameters.PSobject.Properties["DisplayDeviceName"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "VideoDeviceName"))) { #optional property not found
            $VideoDeviceName = $null
        } else {
            $VideoDeviceName = $JsonParameters.PSobject.Properties["VideoDeviceName"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "ActivityId"))) { #optional property not found
            $ActivityId = $null
        } else {
            $ActivityId = $JsonParameters.PSobject.Properties["ActivityId"].value
        }

        $PSO = [PSCustomObject]@{
            "IsEnableWheel" = ${IsEnableWheel}
            "Tags" = ${Tags}
            "AudioDeviceName" = ${AudioDeviceName}
            "DisplayDeviceName" = ${DisplayDeviceName}
            "VideoDeviceName" = ${VideoDeviceName}
            "ActivityId" = ${ActivityId}
        }

        return $PSO
    }

}