public interface Parameter extends Constructible, Extensible<Parameter>, Reference<Parameter>
Describes a single operation parameter.
A unique parameter is defined by a combination of a name and location. There are four possible parameter locations
specified by the in
field:
The rules for serialization of the parameter are specified in one of two ways. For simpler scenarios, a schema and style can describe the structure and syntax of the parameter.
For more complex scenarios, the content property can define the media type and schema of the parameter. A parameter must contain either a schema property, or a content property, but not both.
Modifier and Type | Interface and Description |
---|---|
static class |
Parameter.In
The values allowed for the in field.
|
static class |
Parameter.Style
The values allowed for the style field.
|
Modifier and Type | Method and Description |
---|---|
Parameter |
addExample(java.lang.String key,
Example example)
Adds an example of the parameter using the specified key.
|
default Parameter |
allowEmptyValue(java.lang.Boolean allowEmptyValue)
Sets the allowEmptyValue property of a Parameter instance to the given value.
|
default Parameter |
allowReserved(java.lang.Boolean allowReserved)
Sets the allowReserved property of a Parameter instance to the given value.
|
default Parameter |
content(Content content)
Sets the content property of a Parameter instance to the given object.
|
default Parameter |
deprecated(java.lang.Boolean deprecated)
Sets the deprecated property of a Parameter instance to the given value.
|
default Parameter |
description(java.lang.String description)
Sets the description property of a Parameter instance to the given string.
|
default Parameter |
example(java.lang.Object example)
Sets the example property of a Parameter instance to the given object.
|
default Parameter |
examples(java.util.Map<java.lang.String,Example> examples)
Sets the examples property of a Parameter instance to the given value.
|
default Parameter |
explode(java.lang.Boolean explode)
Sets the explode property of a Parameter instance to the given value.
|
java.lang.Boolean |
getAllowEmptyValue()
Returns the allowEmptyValue property from a Parameter instance.
|
java.lang.Boolean |
getAllowReserved()
Returns the allowReserved property from a Parameter instance.
|
Content |
getContent()
Returns the content property from a Parameter instance.
|
java.lang.Boolean |
getDeprecated()
Returns the deprecated property from a Parameter instance.
|
java.lang.String |
getDescription()
Returns the description property from a Parameter instance.
|
java.lang.Object |
getExample()
Returns the example property from a Parameter instance.
|
java.util.Map<java.lang.String,Example> |
getExamples()
Returns the examples property from a Parameter instance.
|
java.lang.Boolean |
getExplode()
Returns the explode property from a Parameter instance.
|
Parameter.In |
getIn()
Returns the in property from a Parameter instance.
|
java.lang.String |
getName()
Returns the name property from a Parameter instance.
|
java.lang.Boolean |
getRequired()
Returns the required property from a Parameter instance.
|
Schema |
getSchema()
Returns the schema property from a Parameter instance.
|
Parameter.Style |
getStyle()
Returns the style property from a Parameter instance.
|
default Parameter |
in(Parameter.In in)
Sets the in property of a Parameter instance to the given value.
|
default Parameter |
name(java.lang.String name)
Sets the name property of a Parameter instance to the given string.
|
void |
removeExample(java.lang.String key)
Removes an example of the parameter using the specified key.
|
default Parameter |
required(java.lang.Boolean required)
Sets the required property of a Parameter instance to the given value.
|
default Parameter |
schema(Schema schema)
Sets the schema property of a Parameter instance to the given value.
|
void |
setAllowEmptyValue(java.lang.Boolean allowEmptyValue)
Sets the allowEmptyValue property of a Parameter instance to the given value.
|
void |
setAllowReserved(java.lang.Boolean allowReserved)
Sets the allowReserved property of a Parameter instance to the given value.
|
void |
setContent(Content content)
Sets the content property of a Parameter instance to the given object.
|
void |
setDeprecated(java.lang.Boolean deprecated)
Sets the deprecated property of a Parameter instance to the given value.
|
void |
setDescription(java.lang.String description)
Sets the description property of a Parameter instance to the given string.
|
void |
setExample(java.lang.Object example)
Sets the example property of a Parameter instance to the given object.
|
void |
setExamples(java.util.Map<java.lang.String,Example> examples)
Sets the examples property of a Parameter instance to the given value.
|
void |
setExplode(java.lang.Boolean explode)
Sets the explode property of a Parameter instance to the given value.
|
void |
setIn(Parameter.In in)
Sets the in property of a Parameter instance to the given value.
|
void |
setName(java.lang.String name)
Sets the name property of a Parameter instance to the given string.
|
void |
setRequired(java.lang.Boolean required)
Sets the required property of a Parameter instance to the given value.
|
void |
setSchema(Schema schema)
Sets the schema property of a Parameter instance to the given value.
|
void |
setStyle(Parameter.Style style)
Sets the style property of a Parameter instance to the given value.
|
default Parameter |
style(Parameter.Style style)
Sets the style property of a Parameter instance to the given value.
|
addExtension, extensions, getExtensions, removeExtension, setExtensions
java.lang.String getName()
void setName(java.lang.String name)
name
- the name of the parameterdefault Parameter name(java.lang.String name)
name
- the name of the parameterParameter.In getIn()
void setIn(Parameter.In in)
in
- the value of the in propertydefault Parameter in(Parameter.In in)
in
- the value of the in propertyjava.lang.String getDescription()
void setDescription(java.lang.String description)
description
- a brief description of the parameterdefault Parameter description(java.lang.String description)
description
- a brief description of the parameterjava.lang.Boolean getRequired()
void setRequired(java.lang.Boolean required)
required
- indicates whether this parameter is mandatorydefault Parameter required(java.lang.Boolean required)
required
- indicates whether this parameter is mandatoryjava.lang.Boolean getDeprecated()
void setDeprecated(java.lang.Boolean deprecated)
deprecated
- specifies that a parameter is deprecateddefault Parameter deprecated(java.lang.Boolean deprecated)
deprecated
- specifies that a parameter is deprecatedjava.lang.Boolean getAllowEmptyValue()
void setAllowEmptyValue(java.lang.Boolean allowEmptyValue)
allowEmptyValue
- specify the ability to pass empty-valued parametersdefault Parameter allowEmptyValue(java.lang.Boolean allowEmptyValue)
allowEmptyValue
- specify the ability to pass empty-valued parametersParameter.Style getStyle()
void setStyle(Parameter.Style style)
style
- describes how the parameter value will be serializeddefault Parameter style(Parameter.Style style)
style
- describes how the parameter value will be serializedjava.lang.Boolean getExplode()
void setExplode(java.lang.Boolean explode)
explode
- whether parameter values of type "array" or "object" generate separate parameters for each valuedefault Parameter explode(java.lang.Boolean explode)
explode
- whether parameter values of type "array" or "object" generate separate parameters for each valuejava.lang.Boolean getAllowReserved()
void setAllowReserved(java.lang.Boolean allowReserved)
allowReserved
- specifies whether the parameter value should allow reserved charactersdefault Parameter allowReserved(java.lang.Boolean allowReserved)
allowReserved
- specifies whether the parameter value should allow reserved charactersSchema getSchema()
void setSchema(Schema schema)
schema
- schema defining the type used for the parameterdefault Parameter schema(Schema schema)
schema
- schema defining the type used for the parameterjava.util.Map<java.lang.String,Example> getExamples()
void setExamples(java.util.Map<java.lang.String,Example> examples)
examples
- examples of the parameterdefault Parameter examples(java.util.Map<java.lang.String,Example> examples)
examples
- examples of the parameterParameter addExample(java.lang.String key, Example example)
key
- string to represent the exampleexample
- example of the parameter. null values will be rejected (implementation will throw an exception) or ignored.void removeExample(java.lang.String key)
key
- string to represent the examplejava.lang.Object getExample()
void setExample(java.lang.Object example)
example
- example of the parameterdefault Parameter example(java.lang.Object example)
example
- example of the parameterContent getContent()
void setContent(Content content)
content
- a map containing the media representations for the parameter