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(String key,
Example example)
Adds an example of the media type using the specified key.
|
Parameter |
allowEmptyValue(Boolean allowEmptyValue)
Sets the allowEmptyValue property of a Parameter instance to the given value.
|
Parameter |
allowReserved(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(Boolean deprecated)
Sets the deprecated property of a Parameter instance to the given value.
|
Parameter |
description(String description)
Sets the description property of a Parameter instance to the given string.
|
Parameter |
example(Object example)
Sets the example property of a Parameter instance to the given object.
|
Parameter |
examples(Map<String,Example> examples)
Sets the examples property of a Parameter instance to the given value.
|
Parameter |
explode(Boolean explode)
Sets the explode property of a Parameter instance to the given value.
|
Boolean |
getAllowEmptyValue()
Returns the allowEmptyValue property from a Parameter instance.
|
Boolean |
getAllowReserved()
Returns the allowReserved property from a Parameter instance.
|
Content |
getContent()
Returns the content property from a Parameter instance.
|
Boolean |
getDeprecated()
Returns the deprecated property from a Parameter instance.
|
String |
getDescription()
Returns the description property from a Parameter instance.
|
Object |
getExample()
Returns the example property from a Parameter instance.
|
Map<String,Example> |
getExamples()
Returns the examples property from a Parameter instance.
|
Boolean |
getExplode()
Returns the explode property from a Parameter instance.
|
Parameter.In |
getIn()
Returns the in property from a Parameter instance.
|
String |
getName()
Returns the name property from a Parameter instance.
|
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(String name)
Sets the name property of a Parameter instance to the given string.
|
Parameter |
required(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(Boolean allowEmptyValue)
Sets the allowEmptyValue property of a Parameter instance to the given value.
|
void |
setAllowReserved(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(Boolean deprecated)
Sets the deprecated property of a Parameter instance to the given value.
|
void |
setDescription(String description)
Sets the description property of a Parameter instance to the given string.
|
void |
setExample(Object example)
Sets the example property of a Parameter instance to the given object.
|
void |
setExamples(Map<String,Example> examples)
Sets the examples property of a Parameter instance to the given value.
|
void |
setExplode(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(String name)
Sets the name property of a Parameter instance to the given string.
|
void |
setRequired(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
String getName()
void setName(String name)
name
- the name of the parameterParameter name(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 propertyString getDescription()
void setDescription(String description)
description
- a brief description of the parameterParameter description(String description)
description
- a brief description of the parameterBoolean getRequired()
void setRequired(Boolean required)
required
- indicates whether this parameter is mandatoryParameter required(Boolean required)
required
- indicates whether this parameter is mandatoryBoolean getDeprecated()
void setDeprecated(Boolean deprecated)
deprecated
- specifies that a parameter is deprecatedParameter deprecated(Boolean deprecated)
deprecated
- specifies that a parameter is deprecatedBoolean getAllowEmptyValue()
void setAllowEmptyValue(Boolean allowEmptyValue)
allowEmptyValue
- specify the ability to pass empty-valued parametersParameter allowEmptyValue(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 serializedBoolean getExplode()
void setExplode(Boolean explode)
explode
- whether parameter values of type "array" or "object" generate separate parameters for each valueParameter explode(Boolean explode)
explode
- whether parameter values of type "array" or "object" generate separate parameters for each valueBoolean getAllowReserved()
void setAllowReserved(Boolean allowReserved)
allowReserved
- specifies whether the parameter value should allow reserved charactersParameter allowReserved(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 parameterMap<String,Example> getExamples()
void setExamples(Map<String,Example> examples)
examples
- examples of the media typeParameter examples(Map<String,Example> examples)
examples
- examples of the media typeParameter addExample(String key, Example example)
key
- string to represent the exampleexample
- example of the media typeObject getExample()
void setExample(Object example)
example
- example of the media typeParameter example(Object example)
example
- example of the media typeContent getContent()
void setContent(Content content)
content
- a map containing the media representations for the parameterCopyright © 2017–2018 Eclipse MicroProfile. All rights reserved.