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(java.lang.String key,
Example example)
Adds an example of the header using the specified key to this Header instance.
|
default Header |
allowEmptyValue(java.lang.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(java.lang.Boolean deprecated)
Sets this Header's deprecated property to the given value.
|
default Header |
description(java.lang.String description)
Sets this Header's description property to the given string.
|
default Header |
example(java.lang.Object example)
Sets this Header's example property to the given object.
|
default Header |
examples(java.util.Map<java.lang.String,Example> examples)
Sets the examples property of this Header instance to the given map.
|
default Header |
explode(java.lang.Boolean explode)
Sets this Header's explode property to the given value.
|
java.lang.Boolean |
getAllowEmptyValue()
Returns the allowEmptyValue property from a Header instance.
|
Content |
getContent()
Returns the content property from a Header instance.
|
java.lang.Boolean |
getDeprecated()
Returns the deprecated property from a Header instance.
|
java.lang.String |
getDescription()
Returns the description property from a Header instance.
|
java.lang.Object |
getExample()
Returns the example property from a Header instance.
|
java.util.Map<java.lang.String,Example> |
getExamples()
Returns the examples property from a Header instance.
|
java.lang.Boolean |
getExplode()
Returns the explode property from a Header instance.
|
java.lang.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(java.lang.String key)
Removes an example of the header using the specified key to this Header instance.
|
default Header |
required(java.lang.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(java.lang.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(java.lang.Boolean deprecated)
Sets this Header's deprecated property to the given value.
|
void |
setDescription(java.lang.String description)
Sets this Header's description property to the given string.
|
void |
setExample(java.lang.Object example)
Sets this Header's example property to the given object.
|
void |
setExamples(java.util.Map<java.lang.String,Example> examples)
Sets the examples property of this Header instance to the given map.
|
void |
setExplode(java.lang.Boolean explode)
Sets this Header's explode property to the given value.
|
void |
setRequired(java.lang.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
java.lang.String getDescription()
void setDescription(java.lang.String description)
description
- a brief description of the header parameterdefault Header description(java.lang.String description)
description
- a brief description of the header parameterjava.lang.Boolean getRequired()
void setRequired(java.lang.Boolean required)
required
- whether this parameter is mandatorydefault Header required(java.lang.Boolean required)
required
- whether this parameter is mandatoryjava.lang.Boolean getDeprecated()
void setDeprecated(java.lang.Boolean deprecated)
deprecated
- whether the header parameter is deprecateddefault Header deprecated(java.lang.Boolean deprecated)
deprecated
- whether the header parameter is deprecatedjava.lang.Boolean getAllowEmptyValue()
void setAllowEmptyValue(java.lang.Boolean allowEmptyValue)
allowEmptyValue
- specify the ability to pass empty-valued parametersdefault Header allowEmptyValue(java.lang.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 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 Header explode(java.lang.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 parameterjava.util.Map<java.lang.String,Example> getExamples()
void setExamples(java.util.Map<java.lang.String,Example> examples)
examples
- examples of the headerdefault Header examples(java.util.Map<java.lang.String,Example> examples)
examples
- examples of the headerHeader addExample(java.lang.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(java.lang.String key)
key
- string to represent the examplejava.lang.Object getExample()
void setExample(java.lang.Object example)
example
- example of the headerdefault Header example(java.lang.Object example)
example
- example of the headerContent getContent()
void setContent(Content content)
content
- a map containing the media representations for the parameter