MetadataTemplate

public class MetadataTemplate : BoxModel

Metadata that belongs to a file or folder is grouped by templates. Templates allow the metadata service to provide a multitude of services, such as pre-defining sets of key:value pairs or schema enforcement on specific fields.

Properties

  • Declaration

    Swift

    public private(set) var rawData: [String : Any] { get }
  • id

    Identifier

    Declaration

    Swift

    public let id: String?
  • A unique identifier for the template. The identifier must be unique across the scope of the enterprise to which the metadata template is being applied.

    Declaration

    Swift

    public let templateKey: String?
  • The scope of the object. Global and enterprise scopes are supported. The Global scope contains the properties template, while the enterprise scope pertains to custom template within the enterprise.

    Declaration

    Swift

    public let scope: String?
  • The display name of the template.

    Declaration

    Swift

    public let displayName: String?
  • Whether this template is hidden in the UI.

    Declaration

    Swift

    public let hidden: Bool?
  • Whether or not to copy any metadata attached to a file or folder when it is copied. By default, metadata is not copied along with a file or folder when it is copied.

    Declaration

    Swift

    public let copyInstanceOnItemCopy: Bool?
  • The ordered set of key:value pairs for the template.

    Declaration

    Swift

    public let fields: [MetadataField]?
  • Initializer.

    Throws

    Decoding error.

    Declaration

    Swift

    public required init(json: [String : Any]) throws

    Parameters

    json

    JSON dictionary.