Package com.azure.core.models
Class CloudEventDataFormat
java.lang.Object
com.azure.core.util.ExpandableStringEnum<CloudEventDataFormat>
com.azure.core.models.CloudEventDataFormat
Representation of the data format for a
CloudEvent
.
When constructing a CloudEvent
this is passed to determine the serialized format of the event's data.
If BYTES
is used the data will be stored as a Base64 encoded string,
otherwise it will be stored as a JSON serialized object.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CloudEventDataFormat
Bytes format.static final CloudEventDataFormat
JSON format. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CloudEventDataFormat
fromString
(String name) Creates or gets a CloudEventDataFormat from its string representation.Methods inherited from class com.azure.core.util.ExpandableStringEnum
equals, fromString, hashCode, toString, values
-
Field Details
-
BYTES
Bytes format. -
JSON
JSON format.
-
-
Constructor Details
-
CloudEventDataFormat
Deprecated.Use one of the constants or thefromString(String)
factory method.Creates a new instance ofCloudEventDataFormat
without aExpandableStringEnum.toString()
value.This constructor shouldn't be called as it will produce a
CloudEventDataFormat
which doesn't have a String enum value.
-
-
Method Details
-
fromString
Creates or gets a CloudEventDataFormat from its string representation.- Parameters:
name
- Name of the CloudEventDataFormat.- Returns:
- The corresponding CloudEventDataFormat.
-
fromString(String)
factory method.