All Superinterfaces:
Constructible, Extensible<Header>, Reference<Header>

public interface Header extends Constructible, Extensible<Header>, Reference<Header>
Header

Describes a single header parameter for an operation.

See Also:
  • Method Details

    • getDescription

      String getDescription()
      Returns the description property from a Header instance.
      Returns:
      a brief description of the header parameter.
    • setDescription

      void setDescription(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(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

      Boolean getRequired()
      Returns the required property from a Header instance.
      Returns:
      whether this parameter is mandatory
    • setRequired

      void setRequired(Boolean required)
      Sets this Header's required property to the given value.
      Parameters:
      required - whether this parameter is mandatory
    • required

      default Header required(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

      Boolean getDeprecated()
      Returns the deprecated property from a Header instance.
      Returns:
      whether the header parameter is deprecated
    • setDeprecated

      void setDeprecated(Boolean deprecated)
      Sets this Header's deprecated property to the given value.
      Parameters:
      deprecated - whether the header parameter is deprecated
    • deprecated

      default Header deprecated(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

      Boolean getAllowEmptyValue()
      Returns the allowEmptyValue property from a Header instance.
      Returns:
      the ability to pass empty-valued parameters
    • setAllowEmptyValue

      void setAllowEmptyValue(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(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

      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(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(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

      Map<String,Example> getExamples()
      Returns the examples property from a Header instance.
      Returns:
      a copy Map (potentially immutable) of examples of the header
    • setExamples

      void setExamples(Map<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 header
    • examples

      default Header examples(Map<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 header
      Returns:
      the current Header instance
    • addExample

      Header addExample(String key, Example example)
      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 example
      example - example of the header. null values will be rejected (implementation will throw an exception) or ignored.
      Returns:
      the current Header instance
    • removeExample

      void removeExample(String key)
      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

      void setExample(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 header
    • example

      default Header example(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 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

      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
    • content

      default Header content(Content 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