MetadataCascadePolicyModule
public class MetadataCascadePolicyModule
Defines methods for metadata management
-
Get information about a specific metadata cascade policy.
Declaration
Swift
public func get( id: String, fields: [String]? = nil, completion: @escaping Callback<MetadataCascadePolicy> )Parameters
idThe ID of the cascade policy.
fieldsComma-separated list of fields to include in the response.
completionThe metadata cascade policy object is returned or an error
-
Create a metadata cascade policy that applies to a given folder and a metadata instance attached to the given folder. In order for the policy to work, a metadata instance must be applied to the folder.
Declaration
Swift
public func create( folderId: String, scope: MetadataScope, templateKey: String, fields: [String]? = nil, completion: @escaping Callback<MetadataCascadePolicy> )Parameters
folderIdThe ID of the folder.
scopeThe scope of the metadata object (global or enterprise_{enterprise_id})
templateKeyThe key of the template. For example, the global scope has the properties template.
fieldsComma-separated list of fields to include in the response.
completionThe metadata cascade policy object is returned or an error
-
Delete a metadata cascade policy that applies to a given folder and a folder-attached instance of given template.
Declaration
Swift
public func delete( id: String, completion: @escaping Callback<Void> )Parameters
idThe ID of the cascade policy.
completionAn empty response will be returned upon successful deletion or an error
-
If a policy already exists on a folder, this will apply that policy to all existing files and sub-folders within the target folder.
Declaration
Swift
public func forceApply( id: String, conflictResolution: ConflictResolution, completion: @escaping Callback<Void> )Parameters
idThe ID of the cascade policy.
conflictResolutionThe desired behavior for conflict-resolution if a template already exists on a given file or folder. Currently supported values are none, which will preserve the existing value on the file, and overwrite, which will force-apply the cascade policy’s value over any existing value.
completionAn empty response will be returned upon successful deletion or an error
MetadataCascadePolicyModule Class Reference