Interface Header
- All Superinterfaces:
Constructible
,Extensible<Header>
,Reference<Header>
Header
Describes a single header parameter for an operation.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Controls the style of serialization. -
Method Summary
Modifier and TypeMethodDescriptionaddExample
(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
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
Sets this Header's example property to the given object.default Header
Sets the examples property of this Header instance to the given map.default Header
Sets this Header's explode property to the given value.Returns the allowEmptyValue property from a Header instance.Returns the content property from a Header instance.Returns the deprecated property from a Header instance.Returns the description property from a Header instance.Returns the example property from a Header instance.Returns the examples property from a Header instance.Returns the explode property from a Header instance.Returns the required property from a Header instance.Returns the schema property from a Header instance.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
Sets this Header's required property to the given value.default Header
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
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.Methods inherited from interface org.eclipse.microprofile.openapi.models.Extensible
addExtension, extensions, getExtensions, removeExtension, setExtensions
-
Method Details
-
getDescription
String getDescription()Returns the description property from a Header instance.- Returns:
- a brief description of the header parameter.
-
setDescription
Sets this Header's description property to the given string.- Parameters:
description
- a brief description of the header parameter
-
description
Sets this Header's description property to the given string.- Parameters:
description
- a brief description of the header parameter- Returns:
- the current Header instance
-
getRequired
Boolean getRequired()Returns the required property from a Header instance.- Returns:
- whether this parameter is mandatory
-
setRequired
Sets this Header's required property to the given value.- Parameters:
required
- whether this parameter is mandatory
-
required
Sets this Header's required property to the given value.- Parameters:
required
- whether this parameter is mandatory- Returns:
- the current Header instance
-
getDeprecated
Boolean getDeprecated()Returns the deprecated property from a Header instance.- Returns:
- whether the header parameter is deprecated
-
setDeprecated
Sets this Header's deprecated property to the given value.- Parameters:
deprecated
- whether the header parameter is deprecated
-
deprecated
Sets this Header's deprecated property to the given value.- Parameters:
deprecated
- whether the header parameter is deprecated- Returns:
- the current Header instance
-
getAllowEmptyValue
Boolean getAllowEmptyValue()Returns the allowEmptyValue property from a Header instance.- Returns:
- the ability to pass empty-valued parameters
-
setAllowEmptyValue
Sets this Header's allowEmptyValue property to the given value.- Parameters:
allowEmptyValue
- specify the ability to pass empty-valued parameters
-
allowEmptyValue
Sets this Header's allowEmptyValue property to the given value.- Parameters:
allowEmptyValue
- specify the ability to pass empty-valued parameters- Returns:
- the current Header instance
-
getStyle
Header.Style getStyle()Returns the style property from a Header instance.- Returns:
- how the parameter value will be serialized
-
setStyle
Sets this Header's style property to the given style.- Parameters:
style
- how the parameter value will be serialized
-
style
Sets this Header's style property to the given style.- Parameters:
style
- how the parameter value will be serialized- Returns:
- the current Header instance
-
getExplode
Boolean getExplode()Returns the explode property from a Header instance.- Returns:
- whether parameter values of type "array" or "object" generate separate parameters for each value
-
setExplode
Sets this Header's explode property to the given value.- Parameters:
explode
- whether parameter values of type "array" or "object" generate separate parameters for each value
-
explode
Sets this Header's explode property to the given value.- Parameters:
explode
- whether parameter values of type "array" or "object" generate separate parameters for each value- Returns:
- the current Header instance
-
getSchema
Schema getSchema()Returns the schema property from a Header instance.- Returns:
- schema defining the type used for the header parameter
-
setSchema
Sets this Header's schema property to the given object.- Parameters:
schema
- schema defining the type used for the header parameter
-
schema
Sets this Header's schema property to the given object.- Parameters:
schema
- schema defining the type used for the header parameter- Returns:
- the current Header instance
-
getExamples
Returns the examples property from a Header instance.- Returns:
- a copy Map (potentially immutable) of examples of the header
-
setExamples
Sets the examples property of this Header instance to the given map. Each example should contain a value in the correct format as specified in the parameter encoding. The examples object is mutually exclusive of the example object.- Parameters:
examples
- examples of the header
-
examples
Sets the examples property of this Header instance to the given map. Each example should contain a value in the correct format as specified in the parameter encoding. The examples object is mutually exclusive of the example object.- Parameters:
examples
- examples of the header- Returns:
- the current Header instance
-
addExample
Adds an example of the header using the specified key to this Header instance. The example should contain a value in the correct format as specified in the parameter encoding.- Parameters:
key
- string to represent the exampleexample
- example of the header. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Header instance
-
removeExample
Removes an example of the header using the specified key to this Header instance.- Parameters:
key
- string to represent the example
-
getExample
Object getExample()Returns the example property from a Header instance.- Returns:
- example of the header
-
setExample
Sets this Header's example property to the given object. The example should match the specified schema and encoding properties if present. The examples object is mutually exclusive of the example object.- Parameters:
example
- example of the header
-
example
Sets this Header's example property to the given object. The example should match the specified schema and encoding properties if present. The examples object is mutually exclusive of the example object.- Parameters:
example
- example of the header- Returns:
- the current Header instance
-
getContent
Content getContent()Returns the content property from a Header instance.- Returns:
- a map containing the media representations for the parameter
-
setContent
Sets this Header's content property to the given object.- Parameters:
content
- a map containing the media representations for the parameter
-
content
Sets this Header's content property to the given object.- Parameters:
content
- a map containing the media representations for the parameter- Returns:
- the current Header instance
-