public class Argument extends Object
Argument
class represents an argument to a modular input kind.
Argument
is meant to be used with Scheme
to generate an XML definition of the modular input
kind that Splunk understands.Modifier and Type | Class and Description |
---|---|
static class |
Argument.DataType |
Modifier and Type | Field and Description |
---|---|
protected Argument.DataType |
dataType |
protected String |
description |
protected String |
name |
protected boolean |
requiredOnCreate |
protected boolean |
requiredOnEdit |
protected String |
validation |
Modifier and Type | Method and Description |
---|---|
void |
addToDocument(Document doc,
Node parent)
Returns an
Element object representing this argument that can be added to another XML document for the Scheme . |
Argument.DataType |
getDataType()
Gets the data type of this argument.
|
String |
getDescription()
Gets the human readable description of this argument.
|
String |
getName()
Gets the name that Splunk uses to represent this argument.
|
String |
getValidation()
Gets the validation to be used on this argument, if using internal validation.
|
boolean |
isRequiredOnCreate()
Returns whether a value for this argument must be specified when creating a modular input of this kind.
|
boolean |
isRequiredOnEdit()
Returns whether a value for this argument must be specified when editing an existing modular input of this kind.
|
void |
setDataType(Argument.DataType dataType)
Sets the data type of this argument.
|
void |
setDescription(String description)
Sets the human readable description of this argument.
|
void |
setName(String name)
Sets the name that Splunk will use to represent this argument.
|
void |
setRequiredOnCreate(boolean requiredOnCreate)
Sets whether a value for this argument must be specified when creating a modular input of this kind.
|
void |
setRequiredOnEdit(boolean requiredOnEdit)
Sets whether a value for this argument must be specified when editing an existing modular input of this kind.
|
void |
setValidation(String validation)
Sets the validation string that internal validation should use on this argument.
|
protected String name
protected String description
protected String validation
protected Argument.DataType dataType
protected boolean requiredOnEdit
protected boolean requiredOnCreate
public Argument(String name)
public String getName()
public void setName(String name)
name
- The name that Splunk will use to represent this argument.public String getDescription()
public void setDescription(String description)
description
- The human readable description of this argument.public String getValidation()
public void setValidation(String validation)
validation
- The validation string that internal validation should use on this argument.public Argument.DataType getDataType()
public void setDataType(Argument.DataType dataType)
dataType
- The data type of this argument.public boolean isRequiredOnEdit()
true
if a value for this argument must be specified when editing an existing modular input of this kind,
false
if not.public void setRequiredOnEdit(boolean requiredOnEdit)
requiredOnEdit
- true
if a value for this argument must be specified when editing an existing modular input of this kind,
false
if not.public boolean isRequiredOnCreate()
true
if a value for this argument must be specified when creating a modular input of this kind,
false
if not.public void setRequiredOnCreate(boolean requiredOnCreate)
requiredOnCreate
- true
if a value for this argument must be specified when creating a modular input of this kind,
false
if not.Copyright © 2022 Splunk, Inc.. All rights reserved.