Top Description Inners Methods
org.eclipse.microprofile.openapi.models.media

public Interface Encoding

extends Constructible, Extensible<Encoding>
Imports
java.util.Map, org.eclipse.microprofile.openapi.models.Constructible, .Extensible, org.eclipse.microprofile.openapi.models.headers.Header

Encoding
See Also
OpenAPI Specification Encoding Object

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public Encoding

Returns:

the current Encoding object
addHeader
(String
a key conforming to the format required for this object
key
,
Header
the header object. null values will be rejected (implementation will throw an exception) or ignored.
header
)

Adds the given header to this Encoding' list of headers with the given string as its key.

public default Encoding

Returns:

Encoding
allowReserved
(Boolean
a boolean that determines whether the parameter value SHOULD allow reserved characters
allowReserved
)

AllowReserved determines whether the parameter value SHOULD allow reserved characters to be encoded without percent-encoding.

public default Encoding

Returns:

Encoding
contentType
(String
a string that describes the type of content of the encoding
contentType
)

The Content-Type for encoding a specific property.

public default Encoding

Returns:

Encoding
explode
(Boolean
a boolean that indicates whether the property values of array or object will generate separate parameters
explode
)

When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map.

public Boolean

Returns:

Boolean allowReserved
getAllowReserved
()

AllowReserved determines whether the parameter value SHOULD allow reserved characters to be encoded without percent-encoding.

public String

Returns:

String contentType
getContentType
()

The Content-Type for encoding a specific property.

public Boolean

Returns:

Boolean explode
getExplode
()

When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map.

public Map<String, Header>

Returns:

a copy Map (potentially immutable) containing headers
getHeaders
()

Headers property of an Encoding is a map that allows additional information to be provided as headers

This method returns the headers property from a Encoding instance.

public Encoding.Style

Returns:

String style
getStyle
()

Style describes how the encoding value will be serialized depending on the type of the parameter value.

public default Encoding

Returns:

Encoding
headers
(Map<String, Header>
a map of name to corresponding header object
headers
)

Headers property of an Encoding is a map that allows additional information to be provided as headers

This method sets the headers property of Encoding instance to the passed headers argument and returns the modified instance.

public void
removeHeader(String
a key conforming to the format required for this object
key
)

Removes the given header to this Encoding' list of headers with the given string as its key.

public void
setAllowReserved(Boolean
a boolean that determines whether the parameter value SHOULD allow reserved characters
allowReserved
)

AllowReserved determines whether the parameter value SHOULD allow reserved characters to be encoded without percent-encoding.

public void
setContentType(String
a string that describes the type of content of the encoding
contentType
)

The Content-Type for encoding a specific property.

public void
setExplode(Boolean
a boolean that indicates whether the property values of array or object will generate separate parameters
explode
)

When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map.

public void
setHeaders(Map<String, Header>
a map of name to corresponding header object
headers
)

Headers property of an Encoding is a map that allows additional information to be provided as headers

This method sets the headers property of Encoding instance to the passed headers argument.

public void
setStyle(Encoding.Style
a string that descibes how encoding value will be serialized
style
)

Style describes how the encoding value will be serialized depending on the type of the parameter value.

public default Encoding

Returns:

Encoding
style
(Encoding.Style
a string that descibes how encoding value will be serialized
style
)

Style describes how the encoding value will be serialized depending on the type of the parameter value.

Inherited from org.eclipse.microprofile.openapi.models.Extensible:
addExtensionextensionsgetExtensionsremoveExtensionsetExtensions

Method Detail

addHeaderback to summary
public Encoding addHeader(String key, Header header)

Adds the given header to this Encoding' list of headers with the given string as its key.

Parameters
key:String

a key conforming to the format required for this object

header:Header

the header object. null values will be rejected (implementation will throw an exception) or ignored.

Returns:Encoding

the current Encoding object

allowReservedback to summary
public default Encoding allowReserved(Boolean allowReserved)

AllowReserved determines whether the parameter value SHOULD allow reserved characters to be encoded without percent-encoding.

This method sets the allowReserved property of Encoding instance to the given allowReserved argument and returns the instance.

Parameters
allowReserved:Boolean

a boolean that determines whether the parameter value SHOULD allow reserved characters

Returns:Encoding

Encoding

contentTypeback to summary
public default Encoding contentType(String contentType)

The Content-Type for encoding a specific property. Default value depends on the property type: i.e. for binary string - contentType is application/octet-stream, for primitive types - text/plain, for object - application/json.

This method sets contentType property for the Encoding instance to the passed parameter and returns the modified instance

Parameters
contentType:String

a string that describes the type of content of the encoding

Returns:Encoding

Encoding

explodeback to summary
public default Encoding explode(Boolean explode)

When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false.

This method sets the explode property of Encoding instance to the given explode argument and returns the instance.

Parameters
explode:Boolean

a boolean that indicates whether the property values of array or object will generate separate parameters

Returns:Encoding

Encoding

getAllowReservedback to summary
public Boolean getAllowReserved()

AllowReserved determines whether the parameter value SHOULD allow reserved characters to be encoded without percent-encoding.

This method returns the allowReserved property from a Encoding instance.

Returns:Boolean

Boolean allowReserved

getContentTypeback to summary
public String getContentType()

The Content-Type for encoding a specific property. Default value depends on the property type: i.e. for binary string - contentType is application/octet-stream, for primitive types - text/plain, for object - application/json.

This method returns the contentType property from an Encoding instance.

Returns:String

String contentType

getExplodeback to summary
public Boolean getExplode()

When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false.

This method returns the explode property from a Encoding instance.

Returns:Boolean

Boolean explode

getHeadersback to summary
public Map<String, Header> getHeaders()

Headers property of an Encoding is a map that allows additional information to be provided as headers

This method returns the headers property from a Encoding instance.

Returns:Map<String, Header>

a copy Map (potentially immutable) containing headers

getStyleback to summary
public Encoding.Style getStyle()

Style describes how the encoding value will be serialized depending on the type of the parameter value.

This method returns the style property from a Encoding instance.

Returns:Encoding.Style

String style

headersback to summary
public default Encoding headers(Map<String, Header> headers)

Headers property of an Encoding is a map that allows additional information to be provided as headers

This method sets the headers property of Encoding instance to the passed headers argument and returns the modified instance.

Parameters
headers:Map<String, Header>

a map of name to corresponding header object

Returns:Encoding

Encoding

removeHeaderback to summary
public void removeHeader(String key)

Removes the given header to this Encoding' list of headers with the given string as its key.

Parameters
key:String

a key conforming to the format required for this object

setAllowReservedback to summary
public void setAllowReserved(Boolean allowReserved)

AllowReserved determines whether the parameter value SHOULD allow reserved characters to be encoded without percent-encoding.

This method sets the allowReserved property to the given allowReserved argument.

Parameters
allowReserved:Boolean

a boolean that determines whether the parameter value SHOULD allow reserved characters

setContentTypeback to summary
public void setContentType(String contentType)

The Content-Type for encoding a specific property. Default value depends on the property type: i.e. for binary string - contentType is application/octet-stream, for primitive types - text/plain, for object - application/json.

This method sets thecontentType property of an Encoding instance to the passed contentType parameter.

Parameters
contentType:String

a string that describes the type of content of the encoding

setExplodeback to summary
public void setExplode(Boolean explode)

When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false.

This method sets the explode property of Encoding instance to the given explode argument.

Parameters
explode:Boolean

a boolean that indicates whether the property values of array or object will generate separate parameters

setHeadersback to summary
public void setHeaders(Map<String, Header> headers)

Headers property of an Encoding is a map that allows additional information to be provided as headers

This method sets the headers property of Encoding instance to the passed headers argument.

Parameters
headers:Map<String, Header>

a map of name to corresponding header object

setStyleback to summary
public void setStyle(Encoding.Style style)

Style describes how the encoding value will be serialized depending on the type of the parameter value.

This method sets the style property of Encoding instance to the given style argument.

Parameters
style:Encoding.Style

a string that descibes how encoding value will be serialized

styleback to summary
public default Encoding style(Encoding.Style style)

Style describes how the encoding value will be serialized depending on the type of the parameter value.

This method sets the style property of Encoding instance to the passed style argument and returns the modified instance

Parameters
style:Encoding.Style

a string that descibes how encoding value will be serialized

Returns:Encoding

Encoding

org.eclipse.microprofile.openapi.models.media back to summary

public final Enum Encoding.Style

extends Enum<Encoding.Style>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final Encoding.Style
public static final Encoding.Style
public static final Encoding.Style
public static final Encoding.Style
private String

Constructor Summary

AccessConstructor and Description
private
Style(String value)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.

public static Encoding.Style
public static Encoding.Style[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

DEEP_OBJECTback to summary
public static final Encoding.Style DEEP_OBJECT
FORMback to summary
public static final Encoding.Style FORM
PIPE_DELIMITEDback to summary
public static final Encoding.Style PIPE_DELIMITED
SPACE_DELIMITEDback to summary
public static final Encoding.Style SPACE_DELIMITED
valueback to summary
private String value

Constructor Detail

Styleback to summary
private Style(String value)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

Annotations
@Override
valueOfback to summary
public static Encoding.Style valueOf(String name)
valuesback to summary
public static Encoding.Style[] values()