Class ParamDefinition


  • @Metadata(label="rest")
    public class ParamDefinition
    extends Object
    To specify the rest operation parameters.
    • Constructor Detail

      • ParamDefinition

        public ParamDefinition()
    • Method Detail

      • 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.
      • 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.
      • getAllowableValues

        public List<String> getAllowableValues()
      • setAllowableValues

        public void setAllowableValues​(List<String> allowableValues)
        Sets the parameter list of allowable values (enum).
      • defaultValue

        public ParamDefinition defaultValue​(String name)
        The default value of the parameter.
      • arrayType

        public ParamDefinition arrayType​(String arrayType)
        The data type of the array data type
      • dataType

        public ParamDefinition dataType​(String type)
        The data type of the parameter such as string, integer, boolean
      • dataFormat

        public ParamDefinition 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 ParamDefinition allowableValues​(List<String> allowableValues)
        Allowed values of the parameter when its an enum type
      • allowableValues

        public ParamDefinition allowableValues​(String... allowableValues)
        Allowed values of the parameter when its an enum type
      • allowableValues

        public ParamDefinition allowableValues​(String allowableValues)
        Allowed values of the parameter when its an enum type
      • endParam

        public RestDefinition endParam()
        Ends the configuration of this parameter