MetadataTemplateOperation
public enum MetadataTemplateOperation
Specifies opperations available on metadata template
-
Adds an enum option at the end of the enum option list for the specified field.
Declaration
Swift
case addEnumOption(fieldKey: String, data: [String : Any])Parameters
fieldKeyThe key of the field to add the enum option. Must refer to an enum field.
dataJSON object of the enum option to be added
-
Adds a field at the end of the field list for the template.
Declaration
Swift
case addField(data: [String : Any])Parameters
dataJSON object of the enum option to be added
-
Edits any number of the base properties of a template: displayName, hidden.
Declaration
Swift
case editTemplate(data: [String : Any])Parameters
dataJSON object of the properties to be changed and their new values.
-
Reorders the enum option list to match the requested enum option list.
Declaration
Swift
case reorderEnumOptions(fieldKey: String, enumOptionKeys: [String])Parameters
fieldKeyThe key of the field to reorder enum options. Must refer to an enum field.
enumOptionKeysThe new list of enum option keys in the requested order.
-
Reorders the field list to match the requested field list
Declaration
Swift
case reorderFields(fieldKeys: [String])Parameters
fieldKeyThe new list of field keys in the requested order.
-
Edits any number of the base properties of a field: displayName, hidden, description, key.
Declaration
Swift
case editField(fieldKey: String, data: [String : Any])Parameters
fieldKeyThe key of the field to be edited.
dataJSON object of the properties to be changed and their new values.
-
Edits the enumOption.
Declaration
Swift
case editEnumOption(fieldKey: String, data: [String : Any], enumOptionKey: String)Parameters
fieldKeyThe key of the field the specified enum option belongs to. Must refer to an enum field.
dataJSON object with the new key of the enumOption.
enumOptionKeyThe key of the enum option to be edited.
-
Removes the specified enum option from the specified enum field.
Declaration
Swift
case removeEnumOption(fieldKey: String, enumOptionKey: String)Parameters
fieldKeyThe key of the field from which the enum option should be removed. Must refer to an enum field.
enumOptionKeysThe key of the enum option to be removed.
-
Removes the specified field from the template
Declaration
Swift
case removeField(fieldKey: String)Parameters
fieldKeyThe key of the field to be removed.
-
Creates JSON dictionary representation of an option.
Declaration
Swift
public func json() -> [String : Any]Return Value
JSON dictionary representation of an option.
MetadataTemplateOperation Enumeration Reference