Package codes.grow.packages.betterstack
Enum Class IngestEncoding
- All Implemented Interfaces:
Serializable,Comparable<IngestEncoding>,Constable
Body encodings accepted by
POST / on a Better Stack source's ingesting host.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns theContent-Typesent for this encoding.static Optional<IngestEncoding> Parses a configuration value (case-insensitive, surrounding blanks ignored).static IngestEncodingReturns the enum constant of this class with the specified name.static IngestEncoding[]values()Returns an array containing the constants of this enum class, in the order they are declared.Returns the configuration value (json,ndjsonormsgpack).
-
Enum Constant Details
-
JSON
One JSON array per request (application/json). Default. -
NDJSON
One JSON object per line (application/x-ndjson). -
MSGPACK
One MessagePack array per request (application/msgpack);dtis a MessagePack timestamp extension (type -1).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
wireValue
Returns the configuration value (json,ndjsonormsgpack).- Returns:
- the wire name
-
contentType
Returns theContent-Typesent for this encoding.- Returns:
- the media type
-
parse
Parses a configuration value (case-insensitive, surrounding blanks ignored).- Parameters:
text-json,ndjsonormsgpack- Returns:
- the encoding, or empty when unknown
-