Model/ChangeTeamSettingGalleryRequestModel.ps1

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

<#
ChangeTeamSettingGalleryRequestModel<PSCustomObject>
#>


function New-ChangeTeamSettingGalleryRequestModel {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${TeamSettingInfo},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ChangeTeamDisplayName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ChangeTeamDescription},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ChangeTeamPrivacySetting},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ChangeTeamClassificationAndSensitivityLabel},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ChangeTeamOutlookExperience},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ChangeGlobalAddressList},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${FunStuffSettings},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Mentions},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${ChangeTeamMemberPermission},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${GuestPermissions},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${GalleryType},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${GalleryInternalName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${GalleryMetadata}
    )

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

        
        $PSO = [PSCustomObject]@{
            "TeamSettingInfo" = ${TeamSettingInfo}
            "ChangeTeamDisplayName" = ${ChangeTeamDisplayName}
            "ChangeTeamDescription" = ${ChangeTeamDescription}
            "ChangeTeamPrivacySetting" = ${ChangeTeamPrivacySetting}
            "ChangeTeamClassificationAndSensitivityLabel" = ${ChangeTeamClassificationAndSensitivityLabel}
            "ChangeTeamOutlookExperience" = ${ChangeTeamOutlookExperience}
            "ChangeGlobalAddressList" = ${ChangeGlobalAddressList}
            "FunStuffSettings" = ${FunStuffSettings}
            "Mentions" = ${Mentions}
            "ChangeTeamMemberPermission" = ${ChangeTeamMemberPermission}
            "GuestPermissions" = ${GuestPermissions}
            "GalleryType" = ${GalleryType}
            "GalleryInternalName" = ${GalleryInternalName}
            "GalleryMetadata" = ${GalleryMetadata}
        }

        return $PSO
    }
}

<#
ChangeTeamSettingGalleryRequestModel<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in ChangeTeamSettingGalleryRequestModel
        $AllProperties = $("TeamSettingInfo", "ChangeTeamDisplayName", "ChangeTeamDescription", "ChangeTeamPrivacySetting", "ChangeTeamClassificationAndSensitivityLabel", "ChangeTeamOutlookExperience", "ChangeGlobalAddressList", "FunStuffSettings", "Mentions", "ChangeTeamMemberPermission", "GuestPermissions", "GalleryType", "GalleryInternalName", "GalleryMetadata")
        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 "TeamSettingInfo"))) { #optional property not found
            $TeamSettingInfo = $null
        } else {
            $TeamSettingInfo = $JsonParameters.PSobject.Properties["TeamSettingInfo"].value
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

        $PSO = [PSCustomObject]@{
            "TeamSettingInfo" = ${TeamSettingInfo}
            "ChangeTeamDisplayName" = ${ChangeTeamDisplayName}
            "ChangeTeamDescription" = ${ChangeTeamDescription}
            "ChangeTeamPrivacySetting" = ${ChangeTeamPrivacySetting}
            "ChangeTeamClassificationAndSensitivityLabel" = ${ChangeTeamClassificationAndSensitivityLabel}
            "ChangeTeamOutlookExperience" = ${ChangeTeamOutlookExperience}
            "ChangeGlobalAddressList" = ${ChangeGlobalAddressList}
            "FunStuffSettings" = ${FunStuffSettings}
            "Mentions" = ${Mentions}
            "ChangeTeamMemberPermission" = ${ChangeTeamMemberPermission}
            "GuestPermissions" = ${GuestPermissions}
            "GalleryType" = ${GalleryType}
            "GalleryInternalName" = ${GalleryInternalName}
            "GalleryMetadata" = ${GalleryMetadata}
        }

        return $PSO
    }

}