Class WhenModel
- java.lang.Object
-
- io.jenkins.plugins.pipeline.models.AbstractModel
-
- io.jenkins.plugins.pipeline.models.WhenModel
-
- All Implemented Interfaces:
ParsableModelInterface
public class WhenModel extends AbstractModel implements ParsableModelInterface
Model Class for Jenkins Declarative Pipeline When Section
-
-
Field Summary
Fields Modifier and Type Field Description static String
beforeAgentKey
static String
directive
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toGroovy()
Convert model to Jenkins Declarative Pipeline Syntax-
Methods inherited from class io.jenkins.plugins.pipeline.models.AbstractModel
optionalBooleanToGroovy, optionalStringToGroovy
-
-
-
-
Field Detail
-
directive
public static final String directive
- See Also:
- Constant Field Values
-
beforeAgentKey
public static final String beforeAgentKey
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WhenModel
public WhenModel(List<String> whenRuleList)
- Parameters:
whenRuleList
- List of when rules
-
WhenModel
public WhenModel(Optional<WhenConditionModel> whenConditionModel)
- Parameters:
whenConditionModel
-WhenConditionModel
-
-
Method Detail
-
toGroovy
public String toGroovy()
Description copied from interface:ParsableModelInterface
Convert model to Jenkins Declarative Pipeline Syntax- Specified by:
toGroovy
in interfaceParsableModelInterface
- Returns:
- Jenkins Declarative Pipeline Syntax
-
-