Model/ChangeM365GroupSettingsCheckResult.ps1
|
# # Cloud Governance Api # Contact: support@avepoint.com # <# ChangeM365GroupSettingsCheckResult<PSCustomObject> #> function New-ChangeM365GroupSettingsCheckResult { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsAppliedPolicy} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${OriginalPolicy}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${HasOngoingRenewTask} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${PictureUri}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${HasOngoingElectionTask} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${OriginalExternalSharingProfile}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${OriginalStorageManagementProfile}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${OriginalContactElectionProfile}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${OriginalRenewalProfile}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${TeamSiteUrl}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsSiteLocked} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${GroupPrivacy} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Metadatas}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${SendAsPermissions}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${SendOnBehalfPermissions}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsHiddenFromAddressListsEnabled} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsHideFromOutlookClientsEnabled} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsHaveExchangePermision} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsAssignableToRole} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${GroupName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${GroupDescription}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsAutoSubscribeMembersEnabled} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsAllowOutsideSenderEnabled} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsEnableHiddenMembership} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${PrimaryContact}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${SecondaryContact}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Owners}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Members}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${CoOwners}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SiteTitle}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SiteId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Classification}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsEnableSensitivityLabel} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SiteUrl}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${TenantId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Sensitivity}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Privacy} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${EnvironmentName}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${WorkspaceTypeWithValidated} = "Site", [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsHybrid} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsValid} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ErrorMessage}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${MessageCode} = "None" ) Process { 'Creating PSCustomObject: Cloud.Governance.Client => ChangeM365GroupSettingsCheckResult' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "IsAppliedPolicy" = ${IsAppliedPolicy} "OriginalPolicy" = ${OriginalPolicy} "HasOngoingRenewTask" = ${HasOngoingRenewTask} "PictureUri" = ${PictureUri} "HasOngoingElectionTask" = ${HasOngoingElectionTask} "OriginalExternalSharingProfile" = ${OriginalExternalSharingProfile} "OriginalStorageManagementProfile" = ${OriginalStorageManagementProfile} "OriginalContactElectionProfile" = ${OriginalContactElectionProfile} "OriginalRenewalProfile" = ${OriginalRenewalProfile} "TeamSiteUrl" = ${TeamSiteUrl} "IsSiteLocked" = ${IsSiteLocked} "GroupPrivacy" = ${GroupPrivacy} "Metadatas" = ${Metadatas} "SendAsPermissions" = ${SendAsPermissions} "SendOnBehalfPermissions" = ${SendOnBehalfPermissions} "IsHiddenFromAddressListsEnabled" = ${IsHiddenFromAddressListsEnabled} "IsHideFromOutlookClientsEnabled" = ${IsHideFromOutlookClientsEnabled} "IsHaveExchangePermision" = ${IsHaveExchangePermision} "IsAssignableToRole" = ${IsAssignableToRole} "GroupName" = ${GroupName} "GroupDescription" = ${GroupDescription} "IsAutoSubscribeMembersEnabled" = ${IsAutoSubscribeMembersEnabled} "IsAllowOutsideSenderEnabled" = ${IsAllowOutsideSenderEnabled} "IsEnableHiddenMembership" = ${IsEnableHiddenMembership} "PrimaryContact" = ${PrimaryContact} "SecondaryContact" = ${SecondaryContact} "Owners" = ${Owners} "Members" = ${Members} "CoOwners" = ${CoOwners} "SiteTitle" = ${SiteTitle} "SiteId" = ${SiteId} "Classification" = ${Classification} "IsEnableSensitivityLabel" = ${IsEnableSensitivityLabel} "SiteUrl" = ${SiteUrl} "TenantId" = ${TenantId} "Sensitivity" = ${Sensitivity} "Privacy" = ${Privacy} "EnvironmentName" = ${EnvironmentName} "WorkspaceTypeWithValidated" = ${WorkspaceTypeWithValidated} "IsHybrid" = ${IsHybrid} "IsValid" = ${IsValid} "ErrorMessage" = ${ErrorMessage} "MessageCode" = ${MessageCode} } return $PSO } } <# ChangeM365GroupSettingsCheckResult<PSCustomObject> #> function ConvertFrom-JsonToChangeM365GroupSettingsCheckResult { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Cloud.Governance.Client => ChangeM365GroupSettingsCheckResult' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in ChangeM365GroupSettingsCheckResult $AllProperties = $("IsAppliedPolicy", "OriginalPolicy", "HasOngoingRenewTask", "PictureUri", "HasOngoingElectionTask", "OriginalExternalSharingProfile", "OriginalStorageManagementProfile", "OriginalContactElectionProfile", "OriginalRenewalProfile", "TeamSiteUrl", "IsSiteLocked", "GroupPrivacy", "Metadatas", "SendAsPermissions", "SendOnBehalfPermissions", "IsHiddenFromAddressListsEnabled", "IsHideFromOutlookClientsEnabled", "IsHaveExchangePermision", "IsAssignableToRole", "GroupName", "GroupDescription", "IsAutoSubscribeMembersEnabled", "IsAllowOutsideSenderEnabled", "IsEnableHiddenMembership", "PrimaryContact", "SecondaryContact", "Owners", "Members", "CoOwners", "SiteTitle", "SiteId", "Classification", "IsEnableSensitivityLabel", "SiteUrl", "TenantId", "Sensitivity", "Privacy", "EnvironmentName", "WorkspaceTypeWithValidated", "IsHybrid", "IsValid", "ErrorMessage", "MessageCode") 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 "IsAppliedPolicy"))) { #optional property not found $IsAppliedPolicy = $null } else { $IsAppliedPolicy = $JsonParameters.PSobject.Properties["IsAppliedPolicy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "OriginalPolicy"))) { #optional property not found $OriginalPolicy = $null } else { $OriginalPolicy = $JsonParameters.PSobject.Properties["OriginalPolicy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "HasOngoingRenewTask"))) { #optional property not found $HasOngoingRenewTask = $null } else { $HasOngoingRenewTask = $JsonParameters.PSobject.Properties["HasOngoingRenewTask"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "PictureUri"))) { #optional property not found $PictureUri = $null } else { $PictureUri = $JsonParameters.PSobject.Properties["PictureUri"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "HasOngoingElectionTask"))) { #optional property not found $HasOngoingElectionTask = $null } else { $HasOngoingElectionTask = $JsonParameters.PSobject.Properties["HasOngoingElectionTask"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "OriginalExternalSharingProfile"))) { #optional property not found $OriginalExternalSharingProfile = $null } else { $OriginalExternalSharingProfile = $JsonParameters.PSobject.Properties["OriginalExternalSharingProfile"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "OriginalStorageManagementProfile"))) { #optional property not found $OriginalStorageManagementProfile = $null } else { $OriginalStorageManagementProfile = $JsonParameters.PSobject.Properties["OriginalStorageManagementProfile"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "OriginalContactElectionProfile"))) { #optional property not found $OriginalContactElectionProfile = $null } else { $OriginalContactElectionProfile = $JsonParameters.PSobject.Properties["OriginalContactElectionProfile"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "OriginalRenewalProfile"))) { #optional property not found $OriginalRenewalProfile = $null } else { $OriginalRenewalProfile = $JsonParameters.PSobject.Properties["OriginalRenewalProfile"].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 "IsSiteLocked"))) { #optional property not found $IsSiteLocked = $null } else { $IsSiteLocked = $JsonParameters.PSobject.Properties["IsSiteLocked"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "GroupPrivacy"))) { #optional property not found $GroupPrivacy = $null } else { $GroupPrivacy = $JsonParameters.PSobject.Properties["GroupPrivacy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "Metadatas"))) { #optional property not found $Metadatas = $null } else { $Metadatas = $JsonParameters.PSobject.Properties["Metadatas"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "SendAsPermissions"))) { #optional property not found $SendAsPermissions = $null } else { $SendAsPermissions = $JsonParameters.PSobject.Properties["SendAsPermissions"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "SendOnBehalfPermissions"))) { #optional property not found $SendOnBehalfPermissions = $null } else { $SendOnBehalfPermissions = $JsonParameters.PSobject.Properties["SendOnBehalfPermissions"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "IsHiddenFromAddressListsEnabled"))) { #optional property not found $IsHiddenFromAddressListsEnabled = $null } else { $IsHiddenFromAddressListsEnabled = $JsonParameters.PSobject.Properties["IsHiddenFromAddressListsEnabled"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "IsHideFromOutlookClientsEnabled"))) { #optional property not found $IsHideFromOutlookClientsEnabled = $null } else { $IsHideFromOutlookClientsEnabled = $JsonParameters.PSobject.Properties["IsHideFromOutlookClientsEnabled"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "IsHaveExchangePermision"))) { #optional property not found $IsHaveExchangePermision = $null } else { $IsHaveExchangePermision = $JsonParameters.PSobject.Properties["IsHaveExchangePermision"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "IsAssignableToRole"))) { #optional property not found $IsAssignableToRole = $null } else { $IsAssignableToRole = $JsonParameters.PSobject.Properties["IsAssignableToRole"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "GroupName"))) { #optional property not found $GroupName = $null } else { $GroupName = $JsonParameters.PSobject.Properties["GroupName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "GroupDescription"))) { #optional property not found $GroupDescription = $null } else { $GroupDescription = $JsonParameters.PSobject.Properties["GroupDescription"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "IsAutoSubscribeMembersEnabled"))) { #optional property not found $IsAutoSubscribeMembersEnabled = $null } else { $IsAutoSubscribeMembersEnabled = $JsonParameters.PSobject.Properties["IsAutoSubscribeMembersEnabled"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "IsAllowOutsideSenderEnabled"))) { #optional property not found $IsAllowOutsideSenderEnabled = $null } else { $IsAllowOutsideSenderEnabled = $JsonParameters.PSobject.Properties["IsAllowOutsideSenderEnabled"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "IsEnableHiddenMembership"))) { #optional property not found $IsEnableHiddenMembership = $null } else { $IsEnableHiddenMembership = $JsonParameters.PSobject.Properties["IsEnableHiddenMembership"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "PrimaryContact"))) { #optional property not found $PrimaryContact = $null } else { $PrimaryContact = $JsonParameters.PSobject.Properties["PrimaryContact"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "SecondaryContact"))) { #optional property not found $SecondaryContact = $null } else { $SecondaryContact = $JsonParameters.PSobject.Properties["SecondaryContact"].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 "CoOwners"))) { #optional property not found $CoOwners = $null } else { $CoOwners = $JsonParameters.PSobject.Properties["CoOwners"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "SiteTitle"))) { #optional property not found $SiteTitle = $null } else { $SiteTitle = $JsonParameters.PSobject.Properties["SiteTitle"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "SiteId"))) { #optional property not found $SiteId = $null } else { $SiteId = $JsonParameters.PSobject.Properties["SiteId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "Classification"))) { #optional property not found $Classification = $null } else { $Classification = $JsonParameters.PSobject.Properties["Classification"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "IsEnableSensitivityLabel"))) { #optional property not found $IsEnableSensitivityLabel = $null } else { $IsEnableSensitivityLabel = $JsonParameters.PSobject.Properties["IsEnableSensitivityLabel"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "SiteUrl"))) { #optional property not found $SiteUrl = $null } else { $SiteUrl = $JsonParameters.PSobject.Properties["SiteUrl"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "TenantId"))) { #optional property not found $TenantId = $null } else { $TenantId = $JsonParameters.PSobject.Properties["TenantId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "Sensitivity"))) { #optional property not found $Sensitivity = $null } else { $Sensitivity = $JsonParameters.PSobject.Properties["Sensitivity"].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 "EnvironmentName"))) { #optional property not found $EnvironmentName = $null } else { $EnvironmentName = $JsonParameters.PSobject.Properties["EnvironmentName"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "WorkspaceTypeWithValidated"))) { #optional property not found $WorkspaceTypeWithValidated = $null } else { $WorkspaceTypeWithValidated = $JsonParameters.PSobject.Properties["WorkspaceTypeWithValidated"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "IsHybrid"))) { #optional property not found $IsHybrid = $null } else { $IsHybrid = $JsonParameters.PSobject.Properties["IsHybrid"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "IsValid"))) { #optional property not found $IsValid = $null } else { $IsValid = $JsonParameters.PSobject.Properties["IsValid"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "ErrorMessage"))) { #optional property not found $ErrorMessage = $null } else { $ErrorMessage = $JsonParameters.PSobject.Properties["ErrorMessage"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "MessageCode"))) { #optional property not found $MessageCode = $null } else { $MessageCode = $JsonParameters.PSobject.Properties["MessageCode"].value } $PSO = [PSCustomObject]@{ "IsAppliedPolicy" = ${IsAppliedPolicy} "OriginalPolicy" = ${OriginalPolicy} "HasOngoingRenewTask" = ${HasOngoingRenewTask} "PictureUri" = ${PictureUri} "HasOngoingElectionTask" = ${HasOngoingElectionTask} "OriginalExternalSharingProfile" = ${OriginalExternalSharingProfile} "OriginalStorageManagementProfile" = ${OriginalStorageManagementProfile} "OriginalContactElectionProfile" = ${OriginalContactElectionProfile} "OriginalRenewalProfile" = ${OriginalRenewalProfile} "TeamSiteUrl" = ${TeamSiteUrl} "IsSiteLocked" = ${IsSiteLocked} "GroupPrivacy" = ${GroupPrivacy} "Metadatas" = ${Metadatas} "SendAsPermissions" = ${SendAsPermissions} "SendOnBehalfPermissions" = ${SendOnBehalfPermissions} "IsHiddenFromAddressListsEnabled" = ${IsHiddenFromAddressListsEnabled} "IsHideFromOutlookClientsEnabled" = ${IsHideFromOutlookClientsEnabled} "IsHaveExchangePermision" = ${IsHaveExchangePermision} "IsAssignableToRole" = ${IsAssignableToRole} "GroupName" = ${GroupName} "GroupDescription" = ${GroupDescription} "IsAutoSubscribeMembersEnabled" = ${IsAutoSubscribeMembersEnabled} "IsAllowOutsideSenderEnabled" = ${IsAllowOutsideSenderEnabled} "IsEnableHiddenMembership" = ${IsEnableHiddenMembership} "PrimaryContact" = ${PrimaryContact} "SecondaryContact" = ${SecondaryContact} "Owners" = ${Owners} "Members" = ${Members} "CoOwners" = ${CoOwners} "SiteTitle" = ${SiteTitle} "SiteId" = ${SiteId} "Classification" = ${Classification} "IsEnableSensitivityLabel" = ${IsEnableSensitivityLabel} "SiteUrl" = ${SiteUrl} "TenantId" = ${TenantId} "Sensitivity" = ${Sensitivity} "Privacy" = ${Privacy} "EnvironmentName" = ${EnvironmentName} "WorkspaceTypeWithValidated" = ${WorkspaceTypeWithValidated} "IsHybrid" = ${IsHybrid} "IsValid" = ${IsValid} "ErrorMessage" = ${ErrorMessage} "MessageCode" = ${MessageCode} } return $PSO } } |