Interface Header
-
- All Superinterfaces:
Constructible
,Extensible<Header>
,Reference<Header>
public interface Header extends Constructible, Extensible<Header>, Reference<Header>
HeaderDescribes a single header parameter for an operation.
- See Also:
- OpenAPI Specification Header Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Header.Style
Controls the style of serialization.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Header
addExample(java.lang.String key, Example example)
Adds an example of the media type 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 media type 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.-
Methods inherited from interface org.eclipse.microprofile.openapi.models.Extensible
addExtension, extensions, getExtensions, removeExtension, setExtensions
-
-
-
-
Method Detail
-
getDescription
java.lang.String getDescription()
Returns the description property from a Header instance.- Returns:
- a brief description of the header parameter.
-
setDescription
void setDescription(java.lang.String description)
Sets this Header's description property to the given string.- Parameters:
description
- a brief description of the header parameter
-
description
default Header description(java.lang.String 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
java.lang.Boolean getRequired()
Returns the required property from a Header instance.- Returns:
- whether this parameter is mandatory
-
setRequired
void setRequired(java.lang.Boolean required)
Sets this Header's required property to the given value.- Parameters:
required
- whether this parameter is mandatory
-
required
default Header required(java.lang.Boolean required)
Sets this Header's required property to the given value.- Parameters:
required
- whether this parameter is mandatory- Returns:
- the current Header instance
-
getDeprecated
java.lang.Boolean getDeprecated()
Returns the deprecated property from a Header instance.- Returns:
- whether the header parameter is deprecated
-
setDeprecated
void setDeprecated(java.lang.Boolean deprecated)
Sets this Header's deprecated property to the given value.- Parameters:
deprecated
- whether the header parameter is deprecated
-
deprecated
default Header deprecated(java.lang.Boolean 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
java.lang.Boolean getAllowEmptyValue()
Returns the allowEmptyValue property from a Header instance.- Returns:
- the ability to pass empty-valued parameters
-
setAllowEmptyValue
void setAllowEmptyValue(java.lang.Boolean allowEmptyValue)
Sets this Header's allowEmptyValue property to the given value.- Parameters:
allowEmptyValue
- specify the ability to pass empty-valued parameters
-
allowEmptyValue
default Header allowEmptyValue(java.lang.Boolean 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
void setStyle(Header.Style style)
Sets this Header's style property to the given style.- Parameters:
style
- how the parameter value will be serialized
-
style
default Header style(Header.Style 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
java.lang.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
void setExplode(java.lang.Boolean 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
-
explode
default Header explode(java.lang.Boolean 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
void setSchema(Schema schema)
Sets this Header's schema property to the given object.- Parameters:
schema
- schema defining the type used for the header parameter
-
schema
default Header schema(Schema 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
java.util.Map<java.lang.String,Example> getExamples()
Returns the examples property from a Header instance.- Returns:
- examples of the media type
-
setExamples
void setExamples(java.util.Map<java.lang.String,Example> 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 media type
-
examples
default Header examples(java.util.Map<java.lang.String,Example> 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 media type- Returns:
- the current Header instance
-
addExample
Header addExample(java.lang.String key, Example example)
Adds an example of the media type 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 media type. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Header instance
-
removeExample
void removeExample(java.lang.String key)
Removes an example of the media type using the specified key to this Header instance.- Parameters:
key
- string to represent the example
-
getExample
java.lang.Object getExample()
Returns the example property from a Header instance.- Returns:
- example of the media type
-
setExample
void setExample(java.lang.Object 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 media type
-
example
default Header example(java.lang.Object 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 media type- 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
void setContent(Content content)
Sets this Header's content property to the given object.- Parameters:
content
- a map containing the media representations for the parameter
-
-