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

    fieldKey

    The key of the field to add the enum option. Must refer to an enum field.

    data

    JSON 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

    data

    JSON 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

    data

    JSON 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

    fieldKey

    The key of the field to reorder enum options. Must refer to an enum field.

    enumOptionKeys

    The 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

    fieldKey

    The 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

    fieldKey

    The key of the field to be edited.

    data

    JSON 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

    fieldKey

    The key of the field the specified enum option belongs to. Must refer to an enum field.

    data

    JSON object with the new key of the enumOption.

    enumOptionKey

    The 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

    fieldKey

    The key of the field from which the enum option should be removed. Must refer to an enum field.

    enumOptionKeys

    The key of the enum option to be removed.

  • Removes the specified field from the template

    Declaration

    Swift

    case removeField(fieldKey: String)

    Parameters

    fieldKey

    The 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.