Package org.apache.camel.model.rest
Class ResponseHeaderDefinition
- java.lang.Object
-
- org.apache.camel.model.rest.ResponseHeaderDefinition
-
@Metadata(label="rest") public class ResponseHeaderDefinition extends Object
To specify the rest operation response headers.
-
-
Constructor Summary
Constructors Constructor Description ResponseHeaderDefinition()ResponseHeaderDefinition(ResponseMessageDefinition response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseHeaderDefinitionallowableValues(String... allowableValues)Allowed values of the parameter when its an enum typeResponseHeaderDefinitionallowableValues(List<String> allowableValues)Allowed values of the header when its an enum typeResponseHeaderDefinitionarrayType(String arrayType)The data type of the array data typeResponseHeaderDefinitioncollectionFormat(CollectionFormat collectionFormat)Sets the collection format.ResponseHeaderDefinitiondataFormat(String type)The data format of the parameter such as binary, date, date-time, password.ResponseHeaderDefinitiondataType(String type)The data type of the header such as string, integer, booleanResponseHeaderDefinitiondescription(String name)Description of the parameter.ResponseMessageDefinitionendHeader()Ends the configuration of this headerResponseMessageDefinitionendResponseHeader()Ends the configuration of this response messageResponseHeaderDefinitionexample(String example)Sets an example of this header.List<String>getAllowableValues()StringgetArrayType()CollectionFormatgetCollectionFormat()StringgetDataFormat()StringgetDataType()StringgetDescription()StringgetExample()StringgetName()ResponseHeaderDefinitionname(String name)Name of the parameter.voidsetAllowableValues(List<String> allowableValues)Sets the parameter list of allowable values.voidsetArrayType(String arrayType)Sets the parameter array type.voidsetCollectionFormat(CollectionFormat collectionFormat)Sets the parameter collection format.voidsetDataFormat(String dataFormat)Sets the parameter data format.voidsetDataType(String dataType)Sets the header data type.voidsetDescription(String description)voidsetExample(String example)Sets the examplevoidsetName(String name)
-
-
-
Constructor Detail
-
ResponseHeaderDefinition
public ResponseHeaderDefinition(ResponseMessageDefinition response)
-
ResponseHeaderDefinition
public ResponseHeaderDefinition()
-
-
Method Detail
-
endResponseHeader
public ResponseMessageDefinition endResponseHeader()
Ends the configuration of this response message
-
getName
public String getName()
-
setName
public void setName(String name)
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
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 header data type.
-
getDataFormat
public String getDataFormat()
-
setDataFormat
public void setDataFormat(String dataFormat)
Sets the parameter data format.
-
getExample
public String getExample()
-
setExample
public void setExample(String example)
Sets the example
-
setAllowableValues
public void setAllowableValues(List<String> allowableValues)
Sets the parameter list of allowable values.
-
name
public ResponseHeaderDefinition name(String name)
Name of the parameter.This option is mandatory.
-
description
public ResponseHeaderDefinition description(String name)
Description of the parameter.
-
collectionFormat
public ResponseHeaderDefinition collectionFormat(CollectionFormat collectionFormat)
Sets the collection format.
-
arrayType
public ResponseHeaderDefinition arrayType(String arrayType)
The data type of the array data type
-
dataType
public ResponseHeaderDefinition dataType(String type)
The data type of the header such as string, integer, boolean
-
dataFormat
public ResponseHeaderDefinition 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 ResponseHeaderDefinition allowableValues(List<String> allowableValues)
Allowed values of the header when its an enum type
-
allowableValues
public ResponseHeaderDefinition allowableValues(String... allowableValues)
Allowed values of the parameter when its an enum type
-
example
public ResponseHeaderDefinition example(String example)
Sets an example of this header.
-
endHeader
public ResponseMessageDefinition endHeader()
Ends the configuration of this header
-
-