public interface Header extends Constructible, Extensible<Header>, Reference<Header>
Describes a single header parameter for an operation.
Modifier and Type | Interface and Description |
---|---|
static class |
Header.Style
Controls the style of serialization.
|
Modifier and Type | Method and Description |
---|---|
Header |
addExample(String key,
Example example)
Adds an example of the header using the specified key to this Header instance.
|
default Header |
allowEmptyValue(Boolean allowEmptyValue)
Sets this Header's allowEmptyValue property to the given value.
|
default Header |
content(Content content)
Sets this Header's content property to the given object.
|
default Header |
deprecated(Boolean deprecated)
Sets this Header's deprecated property to the given value.
|
default Header |
description(String description)
Sets this Header's description property to the given string.
|
default Header |
example(Object example)
Sets this Header's example property to the given object.
|
default Header |
examples(Map<String,Example> examples)
Sets the examples property of this Header instance to the given map.
|
default Header |
explode(Boolean explode)
Sets this Header's explode property to the given value.
|
Boolean |
getAllowEmptyValue()
Returns the allowEmptyValue property from a Header instance.
|
Content |
getContent()
Returns the content property from a Header instance.
|
Boolean |
getDeprecated()
Returns the deprecated property from a Header instance.
|
String |
getDescription()
Returns the description property from a Header instance.
|
Object |
getExample()
Returns the example property from a Header instance.
|
Map<String,Example> |
getExamples()
Returns the examples property from a Header instance.
|
Boolean |
getExplode()
Returns the explode property from a Header instance.
|
Boolean |
getRequired()
Returns the required property from a Header instance.
|
Schema |
getSchema()
Returns the schema property from a Header instance.
|
Header.Style |
getStyle()
Returns the style property from a Header instance.
|
void |
removeExample(String key)
Removes an example of the header using the specified key to this Header instance.
|
default Header |
required(Boolean required)
Sets this Header's required property to the given value.
|
default Header |
schema(Schema schema)
Sets this Header's schema property to the given object.
|
void |
setAllowEmptyValue(Boolean allowEmptyValue)
Sets this Header's allowEmptyValue property to the given value.
|
void |
setContent(Content content)
Sets this Header's content property to the given object.
|
void |
setDeprecated(Boolean deprecated)
Sets this Header's deprecated property to the given value.
|
void |
setDescription(String description)
Sets this Header's description property to the given string.
|
void |
setExample(Object example)
Sets this Header's example property to the given object.
|
void |
setExamples(Map<String,Example> examples)
Sets the examples property of this Header instance to the given map.
|
void |
setExplode(Boolean explode)
Sets this Header's explode property to the given value.
|
void |
setRequired(Boolean required)
Sets this Header's required property to the given value.
|
void |
setSchema(Schema schema)
Sets this Header's schema property to the given object.
|
void |
setStyle(Header.Style style)
Sets this Header's style property to the given style.
|
default Header |
style(Header.Style style)
Sets this Header's style property to the given style.
|
addExtension, extensions, getExtensions, removeExtension, setExtensions
String getDescription()
void setDescription(String description)
description
- a brief description of the header parameterdefault Header description(String description)
description
- a brief description of the header parameterBoolean getRequired()
void setRequired(Boolean required)
required
- whether this parameter is mandatorydefault Header required(Boolean required)
required
- whether this parameter is mandatoryBoolean getDeprecated()
void setDeprecated(Boolean deprecated)
deprecated
- whether the header parameter is deprecateddefault Header deprecated(Boolean deprecated)
deprecated
- whether the header parameter is deprecatedBoolean getAllowEmptyValue()
void setAllowEmptyValue(Boolean allowEmptyValue)
allowEmptyValue
- specify the ability to pass empty-valued parametersdefault Header allowEmptyValue(Boolean allowEmptyValue)
allowEmptyValue
- specify the ability to pass empty-valued parametersHeader.Style getStyle()
void setStyle(Header.Style style)
style
- how the parameter value will be serializeddefault Header style(Header.Style style)
style
- 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 valuedefault Header explode(Boolean explode)
explode
- whether parameter values of type "array" or "object" generate separate parameters for each valueSchema getSchema()
void setSchema(Schema schema)
schema
- schema defining the type used for the header parameterdefault Header schema(Schema schema)
schema
- schema defining the type used for the header parameterMap<String,Example> getExamples()
void setExamples(Map<String,Example> examples)
examples
- examples of the headerdefault Header examples(Map<String,Example> examples)
examples
- examples of the headerHeader addExample(String key, Example example)
key
- string to represent the exampleexample
- example of the header. null values will be rejected (implementation will throw an exception) or
ignored.void removeExample(String key)
key
- string to represent the exampleObject getExample()
void setExample(Object example)
example
- example of the headerdefault Header example(Object example)
example
- example of the headerContent getContent()
void setContent(Content content)
content
- a map containing the media representations for the parameterCopyright © 2017 – 2022 Eclipse Foundation. All rights reserved.
Use is subject to license terms.