Model/ChangeSiteSettingGalleryRequestModel.ps1
# # Cloud Governance Api # Contact: support@avepoint.com # <# ChangeSiteSettingGalleryRequestModel<PSCustomObject> #> function New-ChangeSiteSettingGalleryRequestModel { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${SiteInfo}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ChangedSiteTitle}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ChangedSiteAddress}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ChangedSiteDescription}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ChangedSiteSensitivityLabel}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ChangedSiteClassification}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ChangedSiteStorage}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ChangedSiteTimeZone}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ChangedSiteLocale}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ChangedSiteDesign}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ChangedSiteHubSite}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ChangedSiteSharing}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${GalleryType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${GalleryInternalName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${GalleryMetadata} ) Process { 'Creating PSCustomObject: Cloud.Governance.Client => ChangeSiteSettingGalleryRequestModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "SiteInfo" = ${SiteInfo} "ChangedSiteTitle" = ${ChangedSiteTitle} "ChangedSiteAddress" = ${ChangedSiteAddress} "ChangedSiteDescription" = ${ChangedSiteDescription} "ChangedSiteSensitivityLabel" = ${ChangedSiteSensitivityLabel} "ChangedSiteClassification" = ${ChangedSiteClassification} "ChangedSiteStorage" = ${ChangedSiteStorage} "ChangedSiteTimeZone" = ${ChangedSiteTimeZone} "ChangedSiteLocale" = ${ChangedSiteLocale} "ChangedSiteDesign" = ${ChangedSiteDesign} "ChangedSiteHubSite" = ${ChangedSiteHubSite} "ChangedSiteSharing" = ${ChangedSiteSharing} "GalleryType" = ${GalleryType} "GalleryInternalName" = ${GalleryInternalName} "GalleryMetadata" = ${GalleryMetadata} } return $PSO } } <# ChangeSiteSettingGalleryRequestModel<PSCustomObject> #> function ConvertFrom-JsonToChangeSiteSettingGalleryRequestModel { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Cloud.Governance.Client => ChangeSiteSettingGalleryRequestModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in ChangeSiteSettingGalleryRequestModel $AllProperties = $("SiteInfo", "ChangedSiteTitle", "ChangedSiteAddress", "ChangedSiteDescription", "ChangedSiteSensitivityLabel", "ChangedSiteClassification", "ChangedSiteStorage", "ChangedSiteTimeZone", "ChangedSiteLocale", "ChangedSiteDesign", "ChangedSiteHubSite", "ChangedSiteSharing", "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 "SiteInfo"))) { #optional property not found $SiteInfo = $null } else { $SiteInfo = $JsonParameters.PSobject.Properties["SiteInfo"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ChangedSiteTitle"))) { #optional property not found $ChangedSiteTitle = $null } else { $ChangedSiteTitle = $JsonParameters.PSobject.Properties["ChangedSiteTitle"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ChangedSiteAddress"))) { #optional property not found $ChangedSiteAddress = $null } else { $ChangedSiteAddress = $JsonParameters.PSobject.Properties["ChangedSiteAddress"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ChangedSiteDescription"))) { #optional property not found $ChangedSiteDescription = $null } else { $ChangedSiteDescription = $JsonParameters.PSobject.Properties["ChangedSiteDescription"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ChangedSiteSensitivityLabel"))) { #optional property not found $ChangedSiteSensitivityLabel = $null } else { $ChangedSiteSensitivityLabel = $JsonParameters.PSobject.Properties["ChangedSiteSensitivityLabel"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ChangedSiteClassification"))) { #optional property not found $ChangedSiteClassification = $null } else { $ChangedSiteClassification = $JsonParameters.PSobject.Properties["ChangedSiteClassification"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ChangedSiteStorage"))) { #optional property not found $ChangedSiteStorage = $null } else { $ChangedSiteStorage = $JsonParameters.PSobject.Properties["ChangedSiteStorage"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ChangedSiteTimeZone"))) { #optional property not found $ChangedSiteTimeZone = $null } else { $ChangedSiteTimeZone = $JsonParameters.PSobject.Properties["ChangedSiteTimeZone"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ChangedSiteLocale"))) { #optional property not found $ChangedSiteLocale = $null } else { $ChangedSiteLocale = $JsonParameters.PSobject.Properties["ChangedSiteLocale"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ChangedSiteDesign"))) { #optional property not found $ChangedSiteDesign = $null } else { $ChangedSiteDesign = $JsonParameters.PSobject.Properties["ChangedSiteDesign"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ChangedSiteHubSite"))) { #optional property not found $ChangedSiteHubSite = $null } else { $ChangedSiteHubSite = $JsonParameters.PSobject.Properties["ChangedSiteHubSite"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ChangedSiteSharing"))) { #optional property not found $ChangedSiteSharing = $null } else { $ChangedSiteSharing = $JsonParameters.PSobject.Properties["ChangedSiteSharing"].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]@{ "SiteInfo" = ${SiteInfo} "ChangedSiteTitle" = ${ChangedSiteTitle} "ChangedSiteAddress" = ${ChangedSiteAddress} "ChangedSiteDescription" = ${ChangedSiteDescription} "ChangedSiteSensitivityLabel" = ${ChangedSiteSensitivityLabel} "ChangedSiteClassification" = ${ChangedSiteClassification} "ChangedSiteStorage" = ${ChangedSiteStorage} "ChangedSiteTimeZone" = ${ChangedSiteTimeZone} "ChangedSiteLocale" = ${ChangedSiteLocale} "ChangedSiteDesign" = ${ChangedSiteDesign} "ChangedSiteHubSite" = ${ChangedSiteHubSite} "ChangedSiteSharing" = ${ChangedSiteSharing} "GalleryType" = ${GalleryType} "GalleryInternalName" = ${GalleryInternalName} "GalleryMetadata" = ${GalleryMetadata} } return $PSO } } |