Package com.azure.core.models
Class CloudEventDataFormat
java.lang.Object
com.azure.core.util.ExpandableStringEnum<CloudEventDataFormat>
com.azure.core.models.CloudEventDataFormat
- All Implemented Interfaces:
ExpandableEnum<String>
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.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CloudEventDataFormatBytes format.static final CloudEventDataFormatJSON format. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CloudEventDataFormatfromString(String name) Creates or gets a CloudEventDataFormat from its string representation.Methods inherited from class com.azure.core.util.ExpandableStringEnum
equals, fromString, getValue, 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 ofCloudEventDataFormatwithout aExpandableStringEnum.toString()value.This constructor shouldn't be called as it will produce a
CloudEventDataFormatwhich 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.