Model/CreateTeamGallery.ps1
# # Cloud Governance Api # Contact: support@avepoint.com # <# CreateTeamGallery<PSCustomObject> #> function New-CreateTeamGallery { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ObjectId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ContentTypes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${TeamNameAndDescription}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${TeamId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${TeamContact}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${TeamTemplate}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${CloneTeam}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${MemberPermissionSetting}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${GuestPermissionSetting}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${FunSetting}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${MentionSetting}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${TeamMessagingSettings}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${TeamHubSite}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${TeamSiteUrl}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${OfficeTenantId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Owners}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Members}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Privacy}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${OutlookExperience}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${GlobalAddressList}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ClassificationAndSensitivityLabel}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${GovernancePanel}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ElectionProfile}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ExternalSharingSettingProfile}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${QuotaSettingProfile}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${RenewalProfile}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Locale}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${TimeZone}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ShowLinksInRequestDetailsPage}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${SiteDesign}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${WelcomeEmail}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${DynamicMembershipRules}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Tenant}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${GalleryType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${GalleryInternalName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${GalleryMetadata} ) Process { 'Creating PSCustomObject: Cloud.Governance.Client => CreateTeamGallery' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "ObjectId" = ${ObjectId} "ContentTypes" = ${ContentTypes} "TeamNameAndDescription" = ${TeamNameAndDescription} "TeamId" = ${TeamId} "TeamContact" = ${TeamContact} "TeamTemplate" = ${TeamTemplate} "CloneTeam" = ${CloneTeam} "MemberPermissionSetting" = ${MemberPermissionSetting} "GuestPermissionSetting" = ${GuestPermissionSetting} "FunSetting" = ${FunSetting} "MentionSetting" = ${MentionSetting} "TeamMessagingSettings" = ${TeamMessagingSettings} "TeamHubSite" = ${TeamHubSite} "TeamSiteUrl" = ${TeamSiteUrl} "OfficeTenantId" = ${OfficeTenantId} "Owners" = ${Owners} "Members" = ${Members} "Privacy" = ${Privacy} "OutlookExperience" = ${OutlookExperience} "GlobalAddressList" = ${GlobalAddressList} "ClassificationAndSensitivityLabel" = ${ClassificationAndSensitivityLabel} "GovernancePanel" = ${GovernancePanel} "ElectionProfile" = ${ElectionProfile} "ExternalSharingSettingProfile" = ${ExternalSharingSettingProfile} "QuotaSettingProfile" = ${QuotaSettingProfile} "RenewalProfile" = ${RenewalProfile} "Locale" = ${Locale} "TimeZone" = ${TimeZone} "ShowLinksInRequestDetailsPage" = ${ShowLinksInRequestDetailsPage} "SiteDesign" = ${SiteDesign} "WelcomeEmail" = ${WelcomeEmail} "DynamicMembershipRules" = ${DynamicMembershipRules} "Tenant" = ${Tenant} "GalleryType" = ${GalleryType} "GalleryInternalName" = ${GalleryInternalName} "GalleryMetadata" = ${GalleryMetadata} } return $PSO } } <# CreateTeamGallery<PSCustomObject> #> function ConvertFrom-JsonToCreateTeamGallery { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Cloud.Governance.Client => CreateTeamGallery' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in CreateTeamGallery $AllProperties = $("ObjectId", "ContentTypes", "TeamNameAndDescription", "TeamId", "TeamContact", "TeamTemplate", "CloneTeam", "MemberPermissionSetting", "GuestPermissionSetting", "FunSetting", "MentionSetting", "TeamMessagingSettings", "TeamHubSite", "TeamSiteUrl", "OfficeTenantId", "Owners", "Members", "Privacy", "OutlookExperience", "GlobalAddressList", "ClassificationAndSensitivityLabel", "GovernancePanel", "ElectionProfile", "ExternalSharingSettingProfile", "QuotaSettingProfile", "RenewalProfile", "Locale", "TimeZone", "ShowLinksInRequestDetailsPage", "SiteDesign", "WelcomeEmail", "DynamicMembershipRules", "Tenant", "TeamEmail", "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 "ObjectId"))) { #optional property not found $ObjectId = $null } else { $ObjectId = $JsonParameters.PSobject.Properties["ObjectId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ContentTypes"))) { #optional property not found $ContentTypes = $null } else { $ContentTypes = $JsonParameters.PSobject.Properties["ContentTypes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "TeamNameAndDescription"))) { #optional property not found $TeamNameAndDescription = $null } else { $TeamNameAndDescription = $JsonParameters.PSobject.Properties["TeamNameAndDescription"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "TeamId"))) { #optional property not found $TeamId = $null } else { $TeamId = $JsonParameters.PSobject.Properties["TeamId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "TeamContact"))) { #optional property not found $TeamContact = $null } else { $TeamContact = $JsonParameters.PSobject.Properties["TeamContact"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "TeamTemplate"))) { #optional property not found $TeamTemplate = $null } else { $TeamTemplate = $JsonParameters.PSobject.Properties["TeamTemplate"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "CloneTeam"))) { #optional property not found $CloneTeam = $null } else { $CloneTeam = $JsonParameters.PSobject.Properties["CloneTeam"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "MemberPermissionSetting"))) { #optional property not found $MemberPermissionSetting = $null } else { $MemberPermissionSetting = $JsonParameters.PSobject.Properties["MemberPermissionSetting"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "GuestPermissionSetting"))) { #optional property not found $GuestPermissionSetting = $null } else { $GuestPermissionSetting = $JsonParameters.PSobject.Properties["GuestPermissionSetting"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "FunSetting"))) { #optional property not found $FunSetting = $null } else { $FunSetting = $JsonParameters.PSobject.Properties["FunSetting"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "MentionSetting"))) { #optional property not found $MentionSetting = $null } else { $MentionSetting = $JsonParameters.PSobject.Properties["MentionSetting"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "TeamMessagingSettings"))) { #optional property not found $TeamMessagingSettings = $null } else { $TeamMessagingSettings = $JsonParameters.PSobject.Properties["TeamMessagingSettings"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "TeamHubSite"))) { #optional property not found $TeamHubSite = $null } else { $TeamHubSite = $JsonParameters.PSobject.Properties["TeamHubSite"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "TeamSiteUrl"))) { #optional property not found $TeamSiteUrl = $null } else { $TeamSiteUrl = $JsonParameters.PSobject.Properties["TeamSiteUrl"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "OfficeTenantId"))) { #optional property not found $OfficeTenantId = $null } else { $OfficeTenantId = $JsonParameters.PSobject.Properties["OfficeTenantId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "Owners"))) { #optional property not found $Owners = $null } else { $Owners = $JsonParameters.PSobject.Properties["Owners"].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 "Privacy"))) { #optional property not found $Privacy = $null } else { $Privacy = $JsonParameters.PSobject.Properties["Privacy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "OutlookExperience"))) { #optional property not found $OutlookExperience = $null } else { $OutlookExperience = $JsonParameters.PSobject.Properties["OutlookExperience"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "GlobalAddressList"))) { #optional property not found $GlobalAddressList = $null } else { $GlobalAddressList = $JsonParameters.PSobject.Properties["GlobalAddressList"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ClassificationAndSensitivityLabel"))) { #optional property not found $ClassificationAndSensitivityLabel = $null } else { $ClassificationAndSensitivityLabel = $JsonParameters.PSobject.Properties["ClassificationAndSensitivityLabel"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "GovernancePanel"))) { #optional property not found $GovernancePanel = $null } else { $GovernancePanel = $JsonParameters.PSobject.Properties["GovernancePanel"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ElectionProfile"))) { #optional property not found $ElectionProfile = $null } else { $ElectionProfile = $JsonParameters.PSobject.Properties["ElectionProfile"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ExternalSharingSettingProfile"))) { #optional property not found $ExternalSharingSettingProfile = $null } else { $ExternalSharingSettingProfile = $JsonParameters.PSobject.Properties["ExternalSharingSettingProfile"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "QuotaSettingProfile"))) { #optional property not found $QuotaSettingProfile = $null } else { $QuotaSettingProfile = $JsonParameters.PSobject.Properties["QuotaSettingProfile"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "RenewalProfile"))) { #optional property not found $RenewalProfile = $null } else { $RenewalProfile = $JsonParameters.PSobject.Properties["RenewalProfile"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "Locale"))) { #optional property not found $Locale = $null } else { $Locale = $JsonParameters.PSobject.Properties["Locale"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "TimeZone"))) { #optional property not found $TimeZone = $null } else { $TimeZone = $JsonParameters.PSobject.Properties["TimeZone"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ShowLinksInRequestDetailsPage"))) { #optional property not found $ShowLinksInRequestDetailsPage = $null } else { $ShowLinksInRequestDetailsPage = $JsonParameters.PSobject.Properties["ShowLinksInRequestDetailsPage"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "SiteDesign"))) { #optional property not found $SiteDesign = $null } else { $SiteDesign = $JsonParameters.PSobject.Properties["SiteDesign"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "WelcomeEmail"))) { #optional property not found $WelcomeEmail = $null } else { $WelcomeEmail = $JsonParameters.PSobject.Properties["WelcomeEmail"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "DynamicMembershipRules"))) { #optional property not found $DynamicMembershipRules = $null } else { $DynamicMembershipRules = $JsonParameters.PSobject.Properties["DynamicMembershipRules"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "Tenant"))) { #optional property not found $Tenant = $null } else { $Tenant = $JsonParameters.PSobject.Properties["Tenant"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "TeamEmail"))) { #optional property not found $TeamEmail = $null } else { $TeamEmail = $JsonParameters.PSobject.Properties["TeamEmail"].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]@{ "ObjectId" = ${ObjectId} "ContentTypes" = ${ContentTypes} "TeamNameAndDescription" = ${TeamNameAndDescription} "TeamId" = ${TeamId} "TeamContact" = ${TeamContact} "TeamTemplate" = ${TeamTemplate} "CloneTeam" = ${CloneTeam} "MemberPermissionSetting" = ${MemberPermissionSetting} "GuestPermissionSetting" = ${GuestPermissionSetting} "FunSetting" = ${FunSetting} "MentionSetting" = ${MentionSetting} "TeamMessagingSettings" = ${TeamMessagingSettings} "TeamHubSite" = ${TeamHubSite} "TeamSiteUrl" = ${TeamSiteUrl} "OfficeTenantId" = ${OfficeTenantId} "Owners" = ${Owners} "Members" = ${Members} "Privacy" = ${Privacy} "OutlookExperience" = ${OutlookExperience} "GlobalAddressList" = ${GlobalAddressList} "ClassificationAndSensitivityLabel" = ${ClassificationAndSensitivityLabel} "GovernancePanel" = ${GovernancePanel} "ElectionProfile" = ${ElectionProfile} "ExternalSharingSettingProfile" = ${ExternalSharingSettingProfile} "QuotaSettingProfile" = ${QuotaSettingProfile} "RenewalProfile" = ${RenewalProfile} "Locale" = ${Locale} "TimeZone" = ${TimeZone} "ShowLinksInRequestDetailsPage" = ${ShowLinksInRequestDetailsPage} "SiteDesign" = ${SiteDesign} "WelcomeEmail" = ${WelcomeEmail} "DynamicMembershipRules" = ${DynamicMembershipRules} "Tenant" = ${Tenant} "TeamEmail" = ${TeamEmail} "GalleryType" = ${GalleryType} "GalleryInternalName" = ${GalleryInternalName} "GalleryMetadata" = ${GalleryMetadata} } return $PSO } } |