Model/OneDrivePolicyModel.ps1
|
# # Fly SDK API # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # Version: 1.0 # Contact: support@avepoint.com # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER IsMigrateMeetingRecords No description available. .PARAMETER IsDirectPermission No description available. .PARAMETER IsSharedLink No description available. .PARAMETER IsConfigureFilterPolicy No description available. .PARAMETER EnableShared No description available. .PARAMETER FilterPolicyId No description available. .PARAMETER ScopeCondition * `OnlyLibrary` = 0 * `All` = 1 .PARAMETER ContainerConflictResolution * `Skip` = 0 * `Overwrite` = 1 * `Merge` = 2 * `OverwriteByLastModifiedTime` = 3 * `Append` = 4 .PARAMETER ContentConflictResolution * `Skip` = 0 * `Overwrite` = 1 * `Merge` = 2 * `OverwriteByLastModifiedTime` = 3 * `Append` = 4 .PARAMETER EnableSyncDeletion No description available. .PARAMETER ManageLabelCondition * `KeepExisting` = 0 * `DoNotCopy` = 1 * `ApplySame` = 2 * `ConfigureCustom` = 3 .PARAMETER IsRemoveSourceIRM No description available. .PARAMETER DefaultReplacementUser No description available. .PARAMETER LabelMappingProfileId No description available. .PARAMETER ContentTypeMappingProfileId No description available. .PARAMETER UserMappingProfileId No description available. .PARAMETER UserMappingRules No description available. .PARAMETER MigrationModuleType * `Exchange` = 0 * `Teams` = 1 * `SharePoint` = 2 * `OneDrive` = 3 * `M365Group` = 4 * `TeamChat` = 5 * `HostedExchange` = 6 * `PowerPlatform` = 7 * `Gmail` = 8 * `GoogleDrive` = 9 * `ActiveDirectory` = 10 * `Entra` = 11 * `DeviceToActiveDirectory` = 14 * `SPOToGDrive` = 21 * `ODriveToGDrive` = 22 * `GDriveToGDrive` = 23 * `ExchangeToGmail` = 24 * `TeamsToGoogleChat` = 25 * `TeamChatToGoogleDM` = 26 * `M365GroupToGoogleGroup` = 27 * `TeamChatToGoogleChat` = 28 .PARAMETER IsDefault No description available. .PARAMETER Notification No description available. .PARAMETER CustomizeFeatures No description available. .PARAMETER Name The name of the object .PARAMETER Description The description of the object .PARAMETER CreateTime The creation time of the object .PARAMETER CreateBy The user who create this object .PARAMETER LastModifyTime The last modified time of the object .PARAMETER LastModifyBy The user who last modified the object .PARAMETER Id The GUID of the object .OUTPUTS OneDrivePolicyModel<PSCustomObject> #> function Initialize-FlyOneDrivePolicyModel { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsMigrateMeetingRecords}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsDirectPermission}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsSharedLink}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsConfigureFilterPolicy}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${EnableShared}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${FilterPolicyId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ScopeCondition}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ContainerConflictResolution}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ContentConflictResolution}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${EnableSyncDeletion}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${ManageLabelCondition}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsRemoveSourceIRM}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${DefaultReplacementUser}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${LabelMappingProfileId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${ContentTypeMappingProfileId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${UserMappingProfileId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${UserMappingRules}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${MigrationModuleType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${IsDefault}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Notification}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${CustomizeFeatures}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Name}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Description}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${CreateTime}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${CreateBy}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int64]] ${LastModifyTime}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${LastModifyBy}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Id} ) Process { 'Creating PSCustomObject: Fly.Client => FlyOneDrivePolicyModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "isMigrateMeetingRecords" = ${IsMigrateMeetingRecords} "isDirectPermission" = ${IsDirectPermission} "isSharedLink" = ${IsSharedLink} "isConfigureFilterPolicy" = ${IsConfigureFilterPolicy} "enableShared" = ${EnableShared} "filterPolicyId" = ${FilterPolicyId} "scopeCondition" = ${ScopeCondition} "containerConflictResolution" = ${ContainerConflictResolution} "contentConflictResolution" = ${ContentConflictResolution} "enableSyncDeletion" = ${EnableSyncDeletion} "manageLabelCondition" = ${ManageLabelCondition} "isRemoveSourceIRM" = ${IsRemoveSourceIRM} "defaultReplacementUser" = ${DefaultReplacementUser} "labelMappingProfileId" = ${LabelMappingProfileId} "contentTypeMappingProfileId" = ${ContentTypeMappingProfileId} "userMappingProfileId" = ${UserMappingProfileId} "userMappingRules" = ${UserMappingRules} "migrationModuleType" = ${MigrationModuleType} "isDefault" = ${IsDefault} "notification" = ${Notification} "customizeFeatures" = ${CustomizeFeatures} "name" = ${Name} "description" = ${Description} "createTime" = ${CreateTime} "createBy" = ${CreateBy} "lastModifyTime" = ${LastModifyTime} "lastModifyBy" = ${LastModifyBy} "id" = ${Id} } return $PSO } } <# .SYNOPSIS Convert from JSON to OneDrivePolicyModel<PSCustomObject> .DESCRIPTION Convert from JSON to OneDrivePolicyModel<PSCustomObject> .PARAMETER Json Json object .OUTPUTS OneDrivePolicyModel<PSCustomObject> #> function ConvertFrom-FlyJsonToOneDrivePolicyModel { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Fly.Client => FlyOneDrivePolicyModel' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in FlyOneDrivePolicyModel $AllProperties = ("isMigrateMeetingRecords", "isDirectPermission", "isSharedLink", "isConfigureFilterPolicy", "enableShared", "filterPolicyId", "scopeCondition", "containerConflictResolution", "contentConflictResolution", "enableSyncDeletion", "manageLabelCondition", "isRemoveSourceIRM", "defaultReplacementUser", "labelMappingProfileId", "contentTypeMappingProfileId", "userMappingProfileId", "userMappingRules", "migrationModuleType", "isDefault", "notification", "customizeFeatures", "name", "description", "createTime", "createBy", "lastModifyTime", "lastModifyBy", "id") 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 "isMigrateMeetingRecords"))) { #optional property not found $IsMigrateMeetingRecords = $null } else { $IsMigrateMeetingRecords = $JsonParameters.PSobject.Properties["isMigrateMeetingRecords"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "isDirectPermission"))) { #optional property not found $IsDirectPermission = $null } else { $IsDirectPermission = $JsonParameters.PSobject.Properties["isDirectPermission"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "isSharedLink"))) { #optional property not found $IsSharedLink = $null } else { $IsSharedLink = $JsonParameters.PSobject.Properties["isSharedLink"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "isConfigureFilterPolicy"))) { #optional property not found $IsConfigureFilterPolicy = $null } else { $IsConfigureFilterPolicy = $JsonParameters.PSobject.Properties["isConfigureFilterPolicy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "enableShared"))) { #optional property not found $EnableShared = $null } else { $EnableShared = $JsonParameters.PSobject.Properties["enableShared"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "filterPolicyId"))) { #optional property not found $FilterPolicyId = $null } else { $FilterPolicyId = $JsonParameters.PSobject.Properties["filterPolicyId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "scopeCondition"))) { #optional property not found $ScopeCondition = $null } else { $ScopeCondition = $JsonParameters.PSobject.Properties["scopeCondition"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "containerConflictResolution"))) { #optional property not found $ContainerConflictResolution = $null } else { $ContainerConflictResolution = $JsonParameters.PSobject.Properties["containerConflictResolution"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "contentConflictResolution"))) { #optional property not found $ContentConflictResolution = $null } else { $ContentConflictResolution = $JsonParameters.PSobject.Properties["contentConflictResolution"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "enableSyncDeletion"))) { #optional property not found $EnableSyncDeletion = $null } else { $EnableSyncDeletion = $JsonParameters.PSobject.Properties["enableSyncDeletion"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "manageLabelCondition"))) { #optional property not found $ManageLabelCondition = $null } else { $ManageLabelCondition = $JsonParameters.PSobject.Properties["manageLabelCondition"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "isRemoveSourceIRM"))) { #optional property not found $IsRemoveSourceIRM = $null } else { $IsRemoveSourceIRM = $JsonParameters.PSobject.Properties["isRemoveSourceIRM"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "defaultReplacementUser"))) { #optional property not found $DefaultReplacementUser = $null } else { $DefaultReplacementUser = $JsonParameters.PSobject.Properties["defaultReplacementUser"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "labelMappingProfileId"))) { #optional property not found $LabelMappingProfileId = $null } else { $LabelMappingProfileId = $JsonParameters.PSobject.Properties["labelMappingProfileId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "contentTypeMappingProfileId"))) { #optional property not found $ContentTypeMappingProfileId = $null } else { $ContentTypeMappingProfileId = $JsonParameters.PSobject.Properties["contentTypeMappingProfileId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "userMappingProfileId"))) { #optional property not found $UserMappingProfileId = $null } else { $UserMappingProfileId = $JsonParameters.PSobject.Properties["userMappingProfileId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "userMappingRules"))) { #optional property not found $UserMappingRules = $null } else { $UserMappingRules = $JsonParameters.PSobject.Properties["userMappingRules"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "migrationModuleType"))) { #optional property not found $MigrationModuleType = $null } else { $MigrationModuleType = $JsonParameters.PSobject.Properties["migrationModuleType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "isDefault"))) { #optional property not found $IsDefault = $null } else { $IsDefault = $JsonParameters.PSobject.Properties["isDefault"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "notification"))) { #optional property not found $Notification = $null } else { $Notification = $JsonParameters.PSobject.Properties["notification"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "customizeFeatures"))) { #optional property not found $CustomizeFeatures = $null } else { $CustomizeFeatures = $JsonParameters.PSobject.Properties["customizeFeatures"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found $Name = $null } else { $Name = $JsonParameters.PSobject.Properties["name"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "description"))) { #optional property not found $Description = $null } else { $Description = $JsonParameters.PSobject.Properties["description"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "createTime"))) { #optional property not found $CreateTime = $null } else { $CreateTime = $JsonParameters.PSobject.Properties["createTime"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "createBy"))) { #optional property not found $CreateBy = $null } else { $CreateBy = $JsonParameters.PSobject.Properties["createBy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastModifyTime"))) { #optional property not found $LastModifyTime = $null } else { $LastModifyTime = $JsonParameters.PSobject.Properties["lastModifyTime"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastModifyBy"))) { #optional property not found $LastModifyBy = $null } else { $LastModifyBy = $JsonParameters.PSobject.Properties["lastModifyBy"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "id"))) { #optional property not found $Id = $null } else { $Id = $JsonParameters.PSobject.Properties["id"].value } $PSO = [PSCustomObject]@{ "isMigrateMeetingRecords" = ${IsMigrateMeetingRecords} "isDirectPermission" = ${IsDirectPermission} "isSharedLink" = ${IsSharedLink} "isConfigureFilterPolicy" = ${IsConfigureFilterPolicy} "enableShared" = ${EnableShared} "filterPolicyId" = ${FilterPolicyId} "scopeCondition" = ${ScopeCondition} "containerConflictResolution" = ${ContainerConflictResolution} "contentConflictResolution" = ${ContentConflictResolution} "enableSyncDeletion" = ${EnableSyncDeletion} "manageLabelCondition" = ${ManageLabelCondition} "isRemoveSourceIRM" = ${IsRemoveSourceIRM} "defaultReplacementUser" = ${DefaultReplacementUser} "labelMappingProfileId" = ${LabelMappingProfileId} "contentTypeMappingProfileId" = ${ContentTypeMappingProfileId} "userMappingProfileId" = ${UserMappingProfileId} "userMappingRules" = ${UserMappingRules} "migrationModuleType" = ${MigrationModuleType} "isDefault" = ${IsDefault} "notification" = ${Notification} "customizeFeatures" = ${CustomizeFeatures} "name" = ${Name} "description" = ${Description} "createTime" = ${CreateTime} "createBy" = ${CreateBy} "lastModifyTime" = ${LastModifyTime} "lastModifyBy" = ${LastModifyBy} "id" = ${Id} } return $PSO } } |