Package org.apache.camel.model.rest
Class RestOperationParamDefinition
- java.lang.Object
-
- org.apache.camel.model.rest.RestOperationParamDefinition
-
@Metadata(label="rest") public class RestOperationParamDefinition extends Object
To specify the rest operation parameters.
-
-
Constructor Summary
Constructors Constructor Description RestOperationParamDefinition()
RestOperationParamDefinition(VerbDefinition verb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RestOperationParamDefinition
allowableValues(String allowableValues)
Allowed values of the parameter when its an enum typeRestOperationParamDefinition
allowableValues(String... allowableValues)
Allowed values of the parameter when its an enum typeRestOperationParamDefinition
allowableValues(List<String> allowableValues)
Allowed values of the parameter when its an enum typeRestOperationParamDefinition
arrayType(String arrayType)
The data type of the array data typeRestOperationParamDefinition
collectionFormat(CollectionFormat collectionFormat)
Sets the collection format.RestOperationParamDefinition
dataFormat(String type)
The data format of the parameter such as binary, date, date-time, password.RestOperationParamDefinition
dataType(String type)
The data type of the parameter such as string, integer, booleanRestOperationParamDefinition
defaultValue(String name)
The default value of the parameter.RestOperationParamDefinition
description(String name)
Description of the parameter.RestDefinition
endParam()
Ends the configuration of this parameterRestOperationParamDefinition
example(String example)
Adds a single exampleRestOperationParamDefinition
example(String contentType, String example)
Adds a body example with the given content-typeList<String>
getAllowableValues()
String
getArrayType()
CollectionFormat
getCollectionFormat()
String
getDataFormat()
String
getDataType()
String
getDefaultValue()
Sets the parameter default value.String
getDescription()
List<RestPropertyDefinition>
getExamples()
String
getName()
Boolean
getRequired()
RestParamType
getType()
RestOperationParamDefinition
name(String name)
Name of the parameter.RestOperationParamDefinition
required(Boolean required)
Whether the parameter is requiredvoid
setAllowableValues(List<String> allowableValues)
Sets the parameter list of allowable values (enum).void
setArrayType(String arrayType)
Sets the parameter array type.void
setCollectionFormat(CollectionFormat collectionFormat)
Sets the parameter collection format.void
setDataFormat(String dataFormat)
Sets the parameter data format.void
setDataType(String dataType)
Sets the parameter data type.void
setDefaultValue(String defaultValue)
void
setDescription(String description)
Sets the parameter description.void
setExamples(List<RestPropertyDefinition> examples)
Sets the parameter examples.void
setName(String name)
Sets the parameter name.void
setRequired(Boolean required)
Sets the parameter required flag.void
setType(RestParamType type)
Sets the parameter type.RestOperationParamDefinition
type(RestParamType type)
The parameter type such as body, form, header, path, query
-
-
-
Constructor Detail
-
RestOperationParamDefinition
public RestOperationParamDefinition()
-
RestOperationParamDefinition
public RestOperationParamDefinition(VerbDefinition verb)
-
-
Method Detail
-
getType
public RestParamType getType()
-
setType
public void setType(RestParamType type)
Sets the parameter type.
-
getName
public String getName()
-
setName
public void setName(String name)
Sets the parameter name.
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
Sets the parameter description.
-
getDefaultValue
public String getDefaultValue()
Sets the parameter default value.
-
setDefaultValue
public void setDefaultValue(String defaultValue)
-
getRequired
public Boolean getRequired()
-
setRequired
public void setRequired(Boolean required)
Sets the parameter required flag.
-
getCollectionFormat
public CollectionFormat getCollectionFormat()
-
setCollectionFormat
public void setCollectionFormat(CollectionFormat collectionFormat)
Sets the parameter collection format.
-
getArrayType
public String getArrayType()
-
setArrayType
public void setArrayType(String arrayType)
Sets the parameter array type. Required if data type is "array". Describes the type of items in the array.
-
getDataType
public String getDataType()
-
setDataType
public void setDataType(String dataType)
Sets the parameter data type.
-
getDataFormat
public String getDataFormat()
-
setDataFormat
public void setDataFormat(String dataFormat)
Sets the parameter data format.
-
setAllowableValues
public void setAllowableValues(List<String> allowableValues)
Sets the parameter list of allowable values (enum).
-
getExamples
public List<RestPropertyDefinition> getExamples()
-
setExamples
public void setExamples(List<RestPropertyDefinition> examples)
Sets the parameter examples.
-
name
public RestOperationParamDefinition name(String name)
Name of the parameter. This option is mandatory.
-
description
public RestOperationParamDefinition description(String name)
Description of the parameter.
-
defaultValue
public RestOperationParamDefinition defaultValue(String name)
The default value of the parameter.
-
required
public RestOperationParamDefinition required(Boolean required)
Whether the parameter is required
-
collectionFormat
public RestOperationParamDefinition collectionFormat(CollectionFormat collectionFormat)
Sets the collection format.
-
arrayType
public RestOperationParamDefinition arrayType(String arrayType)
The data type of the array data type
-
dataType
public RestOperationParamDefinition dataType(String type)
The data type of the parameter such as string, integer, boolean
-
dataFormat
public RestOperationParamDefinition dataFormat(String type)
The data format of the parameter such as binary, date, date-time, password. The format is usually derived from the dataType alone. However you can set this option for more fine grained control of the format in use.
-
allowableValues
public RestOperationParamDefinition allowableValues(List<String> allowableValues)
Allowed values of the parameter when its an enum type
-
allowableValues
public RestOperationParamDefinition allowableValues(String... allowableValues)
Allowed values of the parameter when its an enum type
-
allowableValues
public RestOperationParamDefinition allowableValues(String allowableValues)
Allowed values of the parameter when its an enum type
-
type
public RestOperationParamDefinition type(RestParamType type)
The parameter type such as body, form, header, path, query
-
example
public RestOperationParamDefinition example(String contentType, String example)
Adds a body example with the given content-type
-
example
public RestOperationParamDefinition example(String example)
Adds a single example
-
endParam
public RestDefinition endParam()
Ends the configuration of this parameter
-
-