Model/CreateGroupGallery.ps1
# # Cloud Governance Api # Contact: support@avepoint.com # <# CreateGroupGallery<PSCustomObject> #> function New-CreateGroupGallery { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${AdministrativeUnit}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ObjectId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ContentTypes}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${NameAndDescription}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Contact}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${GroupId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${HubSite}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${MultiGeoLocationSetting}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${SubscribeMembers}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${OutsideSenders}, [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 => CreateGroupGallery' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "AdministrativeUnit" = ${AdministrativeUnit} "ObjectId" = ${ObjectId} "ContentTypes" = ${ContentTypes} "NameAndDescription" = ${NameAndDescription} "Contact" = ${Contact} "GroupId" = ${GroupId} "HubSite" = ${HubSite} "MultiGeoLocationSetting" = ${MultiGeoLocationSetting} "SubscribeMembers" = ${SubscribeMembers} "OutsideSenders" = ${OutsideSenders} "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 } } <# CreateGroupGallery<PSCustomObject> #> function ConvertFrom-JsonToCreateGroupGallery { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Cloud.Governance.Client => CreateGroupGallery' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in CreateGroupGallery $AllProperties = $("AdministrativeUnit", "ObjectId", "ContentTypes", "NameAndDescription", "Contact", "GroupId", "HubSite", "MultiGeoLocationSetting", "SubscribeMembers", "OutsideSenders", "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 "AdministrativeUnit"))) { #optional property not found $AdministrativeUnit = $null } else { $AdministrativeUnit = $JsonParameters.PSobject.Properties["AdministrativeUnit"].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 "ContentTypes"))) { #optional property not found $ContentTypes = $null } else { $ContentTypes = $JsonParameters.PSobject.Properties["ContentTypes"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "NameAndDescription"))) { #optional property not found $NameAndDescription = $null } else { $NameAndDescription = $JsonParameters.PSobject.Properties["NameAndDescription"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "Contact"))) { #optional property not found $Contact = $null } else { $Contact = $JsonParameters.PSobject.Properties["Contact"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "GroupId"))) { #optional property not found $GroupId = $null } else { $GroupId = $JsonParameters.PSobject.Properties["GroupId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "HubSite"))) { #optional property not found $HubSite = $null } else { $HubSite = $JsonParameters.PSobject.Properties["HubSite"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "MultiGeoLocationSetting"))) { #optional property not found $MultiGeoLocationSetting = $null } else { $MultiGeoLocationSetting = $JsonParameters.PSobject.Properties["MultiGeoLocationSetting"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "SubscribeMembers"))) { #optional property not found $SubscribeMembers = $null } else { $SubscribeMembers = $JsonParameters.PSobject.Properties["SubscribeMembers"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "OutsideSenders"))) { #optional property not found $OutsideSenders = $null } else { $OutsideSenders = $JsonParameters.PSobject.Properties["OutsideSenders"].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]@{ "AdministrativeUnit" = ${AdministrativeUnit} "ObjectId" = ${ObjectId} "ContentTypes" = ${ContentTypes} "NameAndDescription" = ${NameAndDescription} "Contact" = ${Contact} "GroupId" = ${GroupId} "HubSite" = ${HubSite} "MultiGeoLocationSetting" = ${MultiGeoLocationSetting} "SubscribeMembers" = ${SubscribeMembers} "OutsideSenders" = ${OutsideSenders} "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 } } |