public interface Parameter extends Constructible, Extensible, 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 media type using the specified key.
|
Parameter |
allowEmptyValue(java.lang.Boolean allowEmptyValue)
Sets the allowEmptyValue property of a Parameter instance to the given value.
|
Parameter |
allowReserved(java.lang.Boolean allowReserved)
Sets the allowReserved property of a Parameter instance to the given value.
|
Parameter |
content(Content content)
Sets the content property of a Parameter instance to the given object.
|
Parameter |
deprecated(java.lang.Boolean deprecated)
Sets the deprecated property of a Parameter instance to the given value.
|
Parameter |
description(java.lang.String description)
Sets the description property of a Parameter instance to the given string.
|
Parameter |
example(java.lang.Object example)
Sets the example property of a Parameter instance to the given object.
|
Parameter |
examples(java.util.Map<java.lang.String,Example> examples)
Sets the examples property of a Parameter instance to the given value.
|
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.
|
Parameter |
in(Parameter.In in)
Sets the in property of a Parameter instance to the given value.
|
Parameter |
name(java.lang.String name)
Sets the name property of a Parameter instance to the given string.
|
Parameter |
required(java.lang.Boolean required)
Sets the required property of a Parameter instance to the given value.
|
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.
|
Parameter |
style(Parameter.Style style)
Sets the style property of a Parameter instance to the given value.
|
addExtension, getExtensions, setExtensions
java.lang.String getName()
void setName(java.lang.String name)
name
- the name of the parameterParameter name(java.lang.String name)
name
- the name of the parameterParameter.In getIn()
void setIn(Parameter.In in)
in
- the value of the in propertyParameter 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 parameterParameter 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 mandatoryParameter 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 deprecatedParameter 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 parametersParameter 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 serializedParameter 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 valueParameter 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 charactersParameter 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 parameterParameter 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 media typeParameter examples(java.util.Map<java.lang.String,Example> examples)
examples
- examples of the media typeParameter addExample(java.lang.String key, Example example)
key
- string to represent the exampleexample
- example of the media typejava.lang.Object getExample()
void setExample(java.lang.Object example)
example
- example of the media typeParameter example(java.lang.Object example)
example
- example of the media typeContent getContent()
void setContent(Content content)
content
- a map containing the media representations for the parameter