summaryrefslogtreecommitdiff
path: root/support/arara/source/src/main/kotlin/org/islandoftex/arara/ruleset/Argument.kt
blob: dfd2b99403b553a104b34bd4a5986becc2554a1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// SPDX-License-Identifier: BSD-3-Clause
package org.islandoftex.arara.ruleset

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import org.islandoftex.arara.utils.CommonUtils

/**
 * The rule argument model.
 *
 * @author Island of TeX
 * @version 5.0
 * @since 4.0
 */
@Serializable
class Argument {
    /**
     * The argument identifier
     */
    var identifier: String? = null
        get() = CommonUtils.removeKeyword(field)

    /**
     * Boolean indicating if the current argument is required
     */
    @SerialName("required")
    var isRequired: Boolean = false

    /**
     * Flag to hold the argument value manipulation
     */
    var flag: String? = null
        get() = CommonUtils.removeKeyword(field)

    /**
     * The argument fallback if it is not defined in the directive
     */
    var default: String? = null
        get() = CommonUtils.removeKeyword(field)
}