* A unique parameter is defined by a combination of a name and location.
*
*
_enum;
private Number multipleOf;
@Override /* SwaggerElement */
protected ParameterInfo strict() {
super.strict();
return this;
}
/**
* Bean property getter: name .
*
*
* Required. The name of the parameter.
*
*
* Parameter names are case sensitive.
* If in
is "path" , the name
field MUST correspond to the associated path segment
* from the path
field in the Paths Object .
* See Path Templating for further
* information.
* For all other cases, the name corresponds to the parameter name used based on the in
property.
*
* @return The value of the name property on this bean, or null if it is not set.
*/
public String getName() {
return name;
}
/**
* Bean property setter: name .
*
*
* Required. The name of the parameter.
*
*
* Parameter names are case sensitive.
* If in
is "path" , the name
field MUST correspond to the associated path segment
* from the path
field in the Paths Object .
* See Path Templating for further
* information.
* For all other cases, the name corresponds to the parameter name used based on the in
property.
*
* @param name The new value for the name property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setName(String name) {
if (! "body".equals(in))
this.name = name;
return this;
}
/**
* Synonym for {@link #setName(String)}.
*
* @param name The new value for the name property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo name(String name) {
return setName(name);
}
/**
* Bean property getter: in .
*
*
* Required. The location of the parameter.
*
*
* Possible values are "query" , "header" , "path" , "formData" or "body" .
*
* @return The value of the in property on this bean, or null if it is not set.
*/
public String getIn() {
return in;
}
/**
* Bean property setter: in .
*
*
* Required. The location of the parameter.
*
*
* Possible values are "query" , "header" , "path" , "formData" or "body" .
*
* @param in The new value for the in property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setIn(String in) {
if (isStrict() && ! contains(in, VALID_IN))
throw new FormattedRuntimeException(
"Invalid value passed in to setIn(String). Value=''{0}'', valid values={1}",
in, VALID_IN
);
this.in = in;
if ("path".equals(in))
required = true;
return this;
}
/**
* Synonym for {@link #setIn(String)}.
*
* @param in The new value for the in property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo in(String in) {
return setIn(in);
}
/**
* Bean property getter: description .
*
*
* A brief description of the parameter.
*
*
* This could contain examples of use.
* GFM syntax can be used
* for rich text representation.
*
* @return
* The value of the description property on this bean, or null if it is not set.
*/
public String getDescription() {
return description;
}
/**
* Bean property setter: description .
*
*
* A brief description of the parameter.
*
*
* This could contain examples of use.
* GFM syntax can be used
* for rich text representation.
*
* @param description The new value for the description property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setDescription(String description) {
this.description = description;
return this;
}
/**
* Synonym for {@link #setDescription(String)}.
*
* @param description The new value for the description property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo description(String description) {
return setDescription(description);
}
/**
* Bean property getter: required .
*
*
* Determines whether this parameter is mandatory.
*
*
* If the parameter is in
"path" , this property is required and its value MUST be
* true .
* Otherwise, the property MAY be included and its default value is false .
*
* @return The value of the required property on this bean, or null if it is not set.
*/
public Boolean getRequired() {
return required;
}
/**
* Bean property setter: required .
*
*
* Determines whether this parameter is mandatory.
*
*
* If the parameter is in
"path" , this property is required and its value MUST be
* true .
* Otherwise, the property MAY be included and its default value is false .
*
* @param required The new value for the required property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setRequired(Boolean required) {
this.required = required;
return this;
}
/**
* Synonym for {@link #setRequired(Boolean)}.
*
* @param required The new value for the required property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo required(Boolean required) {
return setRequired(required);
}
/**
* Bean property getter: schema .
*
*
* Required. The schema defining the type used for the body parameter.
*
* @return The value of the schema property on this bean, or null if it is not set.
*/
public SchemaInfo getSchema() {
return schema;
}
/**
* Bean property setter: schema .
*
*
* Required. The schema defining the type used for the body parameter.
*
* @param schema The new value for the schema property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setSchema(SchemaInfo schema) {
this.schema = schema;
return this;
}
/**
* Synonym for {@link #setSchema(SchemaInfo)}.
*
* @param schema The new value for the schema property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo schema(SchemaInfo schema) {
return setSchema(schema);
}
/**
* Bean property getter: type .
*
*
* Required. The type of the parameter.
*
*
* Since the parameter is not located at the request body, it is limited to simple types (that is, not an object).
* The value MUST be one of "string" , "number" , "integer" , "boolean" ,
* "array" or "file" .
* If type is "file" , the consumes
MUST be either "multipart/form-data" ,
* "application/x-www-form-urlencoded" or both and the parameter MUST be in
* "formData" .
*
* @return The value of the type property on this bean, or null if it is not set.
*/
public String getType() {
return type;
}
/**
* Bean property setter: type .
*
*
* Required. The type of the parameter.
*
*
* Since the parameter is not located at the request body, it is limited to simple types (that is, not an object).
* The value MUST be one of "string" , "number" , "integer" , "boolean" ,
* "array" or "file" .
* If type is "file" , the consumes
MUST be either "multipart/form-data" ,
* "application/x-www-form-urlencoded" or both and the parameter MUST be in
* "formData" .
*
* @param type The new value for the type property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setType(String type) {
if (isStrict() && ! contains(type, VALID_TYPES))
throw new FormattedRuntimeException(
"Invalid value passed in to setType(String). Value=''{0}'', valid values={1}",
type, VALID_TYPES
);
this.type = type;
return this;
}
/**
* Synonym for {@link #setType(String)}.
*
* @param type The new value for the type property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo type(String type) {
return setType(type);
}
/**
* Bean property getter: format .
*
*
* The extending format for the previously mentioned type.
*
*
* See Data Type Formats for further
* details.
*
* @return The value of the format property on this bean, or null if it is not set.
*/
public String getFormat() {
return format;
}
/**
* Bean property setter: format .
*
*
* The extending format for the previously mentioned type.
*
*
* See Data Type Formats for further
* details.
*
* @param format The new value for the format property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setFormat(String format) {
this.format = format;
return this;
}
/**
* Synonym for {@link #setFormat(String)}.
*
* @param format The new value for the format property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo format(String format) {
return setFormat(format);
}
/**
* Bean property getter: allowEmptyValue .
*
*
* Sets the ability to pass empty-valued parameters.
*
*
* This is valid only for either query
or formData
parameters and allows you to send a
* parameter with a name only or an empty value.
* Default value is false .
*
* @return The value of the allowEmptyValue property on this bean, or null if it is
* not set.
*/
public Boolean getAllowEmptyValue() {
return allowEmptyValue;
}
/**
* Bean property setter: allowEmptyValue .
*
*
* Sets the ability to pass empty-valued parameters.
*
*
* This is valid only for either query
or formData
parameters and allows you to send a
* parameter with a name only or an empty value.
* Default value is false .
*
* @param allowEmptyValue The new value for the allowEmptyValue property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setAllowEmptyValue(Boolean allowEmptyValue) {
this.allowEmptyValue = allowEmptyValue;
return this;
}
/**
* Synonym for {@link #setAllowEmptyValue(Boolean)}.
*
* @param allowEmptyValue The new value for the allowEmptyValue property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo allowEmptyValue(Boolean allowEmptyValue) {
return setAllowEmptyValue(allowEmptyValue);
}
/**
* Bean property getter: items .
*
*
* Required if type
is "array" .
*
*
* Describes the type of items in the array.
*
* @return The value of the items property on this bean, or null if it is not set.
*/
public Items getItems() {
return items;
}
/**
* Bean property setter: items .
*
*
* Required if type
is "array" .
*
*
* Describes the type of items in the array.
*
* @param items The new value for the items property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setItems(Items items) {
this.items = items;
return this;
}
/**
* Synonym for {@link #setItems(Items)}.
*
* @param items The new value for the items property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo items(Items items) {
return setItems(items);
}
/**
* Bean property getter: collectionFormat .
*
*
* Determines the format of the array if type array is used.
*
*
* Possible values are:
*
* csv
- comma separated values foo,bar
.
* ssv
- space separated values foo bar
.
* tsv
- tab separated values foo\tbar
.
* pipes
- pipe separated values foo|bar
.
* multi
- corresponds to multiple parameter instances instead of multiple values for a single
* instance foo=bar&foo=baz
.
* This is valid only for parameters in
"query" or "formData" .
*
*
*
* Default value is csv
.
*
* @return
* The value of the collectionFormat property on this bean, or null if it is
* not set.
*/
public String getCollectionFormat() {
return collectionFormat;
}
/**
* Bean property setter: collectionFormat .
*
*
* Determines the format of the array if type array is used.
*
*
* Possible values are:
*
* csv
- comma separated values foo,bar
.
* ssv
- space separated values foo bar
.
* tsv
- tab separated values foo\tbar
.
* pipes
- pipe separated values foo|bar
.
* multi
- corresponds to multiple parameter instances instead of multiple values for a single
* instance foo=bar&foo=baz
.
* This is valid only for parameters in
"query" or "formData" .
*
*
*
* Default value is csv
.
*
* @param collectionFormat The new value for the collectionFormat property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setCollectionFormat(String collectionFormat) {
if (isStrict() && ! contains(collectionFormat, VALID_COLLECTION_FORMATS))
throw new FormattedRuntimeException(
"Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}",
collectionFormat, VALID_COLLECTION_FORMATS
);
this.collectionFormat = collectionFormat;
return this;
}
/**
* Synonym for {@link #setCollectionFormat(String)}.
*
* @param collectionFormat The new value for the collectionFormat property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo collectionFormat(String collectionFormat) {
return setCollectionFormat(collectionFormat);
}
/**
* Bean property getter: default .
*
*
* Declares the value of the parameter that the server will use if none is provided, for example a "count"
* to control the number of results per page might default to 100 if not supplied by the client in the request.
* (Note: "default" has no meaning for required parameters.)
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor101 .
* Unlike JSON Schema this value MUST conform to the defined type
for this parameter.
*
* @return The value of the default property on this bean, or null if it is not set.
*/
public Object getDefault() {
return _default;
}
/**
* Bean property setter: default .
*
*
* Declares the value of the parameter that the server will use if none is provided, for example a "count"
* to control the number of results per page might default to 100 if not supplied by the client in the request.
* (Note: "default" has no meaning for required parameters.)
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor101 .
* Unlike JSON Schema this value MUST conform to the defined type
for this parameter.
*
* @param _default The new value for the default property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setDefault(Object _default) {
this._default = _default;
return this;
}
/**
* Synonym for {@link #setDefault(Object)}.
*
* @param _default The new value for the default property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo _default(Object _default) {
return setDefault(_default);
}
/**
* Bean property getter: maximum .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor17 .
*
* @return The value of the maximum property on this bean, or null if it is not set.
*/
public Number getMaximum() {
return maximum;
}
/**
* Bean property setter: maximum .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor17 .
*
* @param maximum The new value for the maximum property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setMaximum(Number maximum) {
this.maximum = maximum;
return this;
}
/**
* Synonym for {@link #setMaximum(Number)}.
*
* @param maximum The new value for the maximum property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo maximum(Number maximum) {
return setMaximum(maximum);
}
/**
* Bean property getter: exclusiveMaximum .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor17 .
*
* @return The value of the exclusiveMaximum property on this bean, or null
* if it is not set.
*/
public Boolean getExclusiveMaximum() {
return exclusiveMaximum;
}
/**
* Bean property setter: exclusiveMaximum .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor17 .
*
* @param exclusiveMaximum The new value for the exclusiveMaximum property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setExclusiveMaximum(Boolean exclusiveMaximum) {
this.exclusiveMaximum = exclusiveMaximum;
return this;
}
/**
* Synonym for {@link #setExclusiveMaximum(Boolean)}.
*
* @param exclusiveMaximum The new value for the exclusiveMaximum property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo exclusiveMaximum(Boolean exclusiveMaximum) {
return setExclusiveMaximum(exclusiveMaximum);
}
/**
* Bean property getter: minimum .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor21 .
*
* @return The value of the minimum property on this bean, or null if it is not set.
*/
public Number getMinimum() {
return minimum;
}
/**
* Bean property setter: minimum .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor21 .
*
* @param minimum The new value for the minimum property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setMinimum(Number minimum) {
this.minimum = minimum;
return this;
}
/**
* Synonym for {@link #setMinimum(Number)}.
*
* @param minimum The new value for the minimum property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo minimum(Number minimum) {
return setMinimum(minimum);
}
/**
* Bean property getter: exclusiveMinimum .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor21 .
*
* @return The value of the exclusiveMinimum property on this bean, or null if it is
* not set.
*/
public Boolean getExclusiveMinimum() {
return exclusiveMinimum;
}
/**
* Bean property setter: exclusiveMinimum .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor21 .
*
* @param exclusiveMinimum The new value for the exclusiveMinimum property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setExclusiveMinimum(Boolean exclusiveMinimum) {
this.exclusiveMinimum = exclusiveMinimum;
return this;
}
/**
* Synonym for {@link #setExclusiveMinimum(Boolean)}.
*
* @param exclusiveMinimum The new value for the exclusiveMinimum property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo exclusiveMinimum(Boolean exclusiveMinimum) {
return setExclusiveMinimum(exclusiveMinimum);
}
/**
* Bean property getter: maxLength .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor26 .
*
* @return The value of the maxLength property on this bean, or null if it is not set.
*/
public Integer getMaxLength() {
return maxLength;
}
/**
* Bean property setter: maxLength .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor26 .
*
* @param maxLength The new value for the maxLength property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setMaxLength(Integer maxLength) {
this.maxLength = maxLength;
return this;
}
/**
* Synonym for {@link #setMaxLength(Integer)}.
*
* @param maxLength The new value for the maxLength property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo maxLength(Integer maxLength) {
return setMaxLength(maxLength);
}
/**
* Bean property getter: minLength .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor29 .
*
* @return The value of the minLength property on this bean, or null if it is not set.
*/
public Integer getMinLength() {
return minLength;
}
/**
* Bean property setter: minLength .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor29 .
*
* @param minLength The new value for the minLength property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setMinLength(Integer minLength) {
this.minLength = minLength;
return this;
}
/**
* Synonym for {@link #setMinLength(Integer)}.
*
* @param minLength The new value for the minLength property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo minLength(Integer minLength) {
return setMinLength(minLength);
}
/**
* Bean property getter: pattern .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor33 .
*
* @return The value of the pattern property on this bean, or null if it is not set.
*/
public String getPattern() {
return pattern;
}
/**
* Bean property setter: pattern .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor33 .
*
* @param pattern The new value for the pattern property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setPattern(String pattern) {
this.pattern = pattern;
return this;
}
/**
* Synonym for {@link #setPattern(String)}.
*
* @param pattern The new value for the pattern property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo pattern(String pattern) {
return setPattern(pattern);
}
/**
* Bean property getter: maxItems .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor42 .
*
* @return The value of the maxItems property on this bean, or null if it is not set.
*/
public Integer getMaxItems() {
return maxItems;
}
/**
* Bean property setter: maxItems .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor42 .
*
* @param maxItems The new value for the maxItems property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setMaxItems(Integer maxItems) {
this.maxItems = maxItems;
return this;
}
/**
* Synonym for {@link #setMaxItems(Integer)}.
*
* @param maxItems The new value for the maxItems property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo maxItems(Integer maxItems) {
return setMaxItems(maxItems);
}
/**
* Bean property getter: minItems .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor45 .
*
* @return The value of the minItems property on this bean, or null if it is not set.
*/
public Integer getMinItems() {
return minItems;
}
/**
* Bean property setter: minItems .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor45 .
*
* @param minItems The new value for the minItems property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setMinItems(Integer minItems) {
this.minItems = minItems;
return this;
}
/**
* Synonym for {@link #setMinItems(Integer)}.
*
* @param minItems The new value for the minItems property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo minItems(Integer minItems) {
return setMinItems(minItems);
}
/**
* Bean property getter: uniqueItems .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor49 .
*
* @return The value of the uniqueItems property on this bean, or null if it is not
* set.
*/
public Boolean getUniqueItems() {
return uniqueItems;
}
/**
* Bean property setter: uniqueItems .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor49 .
*
* @param uniqueItems The new value for the uniqueItems property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setUniqueItems(Boolean uniqueItems) {
this.uniqueItems = uniqueItems;
return this;
}
/**
* Synonym for {@link #setUniqueItems(Boolean)}.
*
* @param uniqueItems The new value for the uniqueItems property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo uniqueItems(Boolean uniqueItems) {
return setUniqueItems(uniqueItems);
}
/**
* Bean property getter: enum .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor76 .
*
* @return The value of the enum property on this bean, or null if it is not set.
*/
public List getEnum() {
return _enum;
}
/**
* Bean property setter: enum .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor76 .
*
* @param _enum The new value for the enum property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setEnum(List _enum) {
this._enum = _enum;
return this;
}
/**
* Bean property adder: enum .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor76 .
*
* @param _enum
* The new values to add to the enum property on this bean.
* These can either be individual objects or {@link Collection Collections} of objects.
* @return This object (for method chaining).
*/
@SuppressWarnings("unchecked")
public ParameterInfo addEnum(Object..._enum) {
for (Object o : _enum) {
if (o != null) {
if (o instanceof Collection)
addEnum((Collection)o);
else {
if (this._enum == null)
this._enum = new LinkedList();
this._enum.add(o);
}
}
}
return this;
}
/**
* Synonym for {@link #addEnum(Object...)}.
*
* @param _enum
* The new values to add to the enum property on this bean.
* These can either be individual objects or {@link Collection Collections} of objects.
* @return This object (for method chaining).
*/
public ParameterInfo _enum(Object..._enum) {
return addEnum(_enum);
}
/**
* Bean property getter: multipleOf .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor14 .
*
* @return The value of the multipleOf property on this bean, or null if it is not set.
*/
public Number getMultipleOf() {
return multipleOf;
}
/**
* Bean property setter: multipleOf .
*
*
* See
* http://json-schema.org/latest/json-schema-validation.html#anchor14 .
*
* @param multipleOf The new value for the multipleOf property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo setMultipleOf(Number multipleOf) {
this.multipleOf = multipleOf;
return this;
}
/**
* Synonym for {@link #setMultipleOf(Number)}.
*
* @param multipleOf The new value for the multipleOf property on this bean.
* @return This object (for method chaining).
*/
public ParameterInfo multipleOf(Number multipleOf) {
return setMultipleOf(multipleOf);
}
}