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