public final class CloudEvent extends GeneratedMessageV3 implements CloudEventOrBuilder
CloudEvent represents a vendor-neutral specification for defining the format
of event data.
Protobuf type google.cloud.eventarc.publishing.v1.CloudEvent
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
ATTRIBUTES_FIELD_NUMBER
public static final int ATTRIBUTES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
BINARY_DATA_FIELD_NUMBER
public static final int BINARY_DATA_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
PROTO_DATA_FIELD_NUMBER
public static final int PROTO_DATA_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SOURCE_FIELD_NUMBER
public static final int SOURCE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SPEC_VERSION_FIELD_NUMBER
public static final int SPEC_VERSION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
TEXT_DATA_FIELD_NUMBER
public static final int TEXT_DATA_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static CloudEvent getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static CloudEvent.Builder newBuilder()
newBuilder(CloudEvent prototype)
public static CloudEvent.Builder newBuilder(CloudEvent prototype)
public static CloudEvent parseDelimitedFrom(InputStream input)
public static CloudEvent parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static CloudEvent parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CloudEvent parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static CloudEvent parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CloudEvent parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CloudEvent parseFrom(CodedInputStream input)
public static CloudEvent parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static CloudEvent parseFrom(InputStream input)
public static CloudEvent parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static CloudEvent parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CloudEvent parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<CloudEvent> parser()
Methods
containsAttributes(String key)
public boolean containsAttributes(String key)
Optional. Used for Optional & Extension Attributes
map<string, .google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue> attributes = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
key |
String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getAttributes() (deprecated)
public Map<String,CloudEvent.CloudEventAttributeValue> getAttributes()
getAttributesCount()
public int getAttributesCount()
Optional. Used for Optional & Extension Attributes
map<string, .google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue> attributes = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
int |
|
getAttributesMap()
public Map<String,CloudEvent.CloudEventAttributeValue> getAttributesMap()
Optional. Used for Optional & Extension Attributes
map<string, .google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue> attributes = 5 [(.google.api.field_behavior) = OPTIONAL];
getAttributesOrDefault(String key, CloudEvent.CloudEventAttributeValue defaultValue)
public CloudEvent.CloudEventAttributeValue getAttributesOrDefault(String key, CloudEvent.CloudEventAttributeValue defaultValue)
Optional. Used for Optional & Extension Attributes
map<string, .google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue> attributes = 5 [(.google.api.field_behavior) = OPTIONAL];
getAttributesOrThrow(String key)
public CloudEvent.CloudEventAttributeValue getAttributesOrThrow(String key)
Optional. Used for Optional & Extension Attributes
map<string, .google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue> attributes = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
key |
String
|
getBinaryData()
public ByteString getBinaryData()
Optional. Binary data.
bytes binary_data = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
ByteString |
The binaryData.
|
getDataCase()
public CloudEvent.DataCase getDataCase()
getDefaultInstanceForType()
public CloudEvent getDefaultInstanceForType()
getId()
Required. Identifies the event. Producers MUST ensure that source + id is
unique for each distinct event.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
String |
The id.
|
getIdBytes()
public ByteString getIdBytes()
Required. Identifies the event. Producers MUST ensure that source + id is
unique for each distinct event.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
ByteString |
The bytes for id.
|
getParserForType()
public Parser<CloudEvent> getParserForType()
Overrides
getProtoData()
public Any getProtoData()
Optional. Proto data.
.google.protobuf.Any proto_data = 8 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
Any |
The protoData.
|
getProtoDataOrBuilder()
public AnyOrBuilder getProtoDataOrBuilder()
Optional. Proto data.
.google.protobuf.Any proto_data = 8 [(.google.api.field_behavior) = OPTIONAL];
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
getSource()
public String getSource()
Required. Identifies the context in which an event happened.
URI-reference
string source = 2 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
String |
The source.
|
getSourceBytes()
public ByteString getSourceBytes()
Required. Identifies the context in which an event happened.
URI-reference
string source = 2 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
ByteString |
The bytes for source.
|
getSpecVersion()
public String getSpecVersion()
Required. The version of the CloudEvents specification which the event
uses.
string spec_version = 3 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
String |
The specVersion.
|
getSpecVersionBytes()
public ByteString getSpecVersionBytes()
Required. The version of the CloudEvents specification which the event
uses.
string spec_version = 3 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
ByteString |
The bytes for specVersion.
|
getTextData()
public String getTextData()
Optional. Text data.
string text_data = 7 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
String |
The textData.
|
getTextDataBytes()
public ByteString getTextDataBytes()
Optional. Text data.
string text_data = 7 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
ByteString |
The bytes for textData.
|
getType()
Required. This attribute contains a value describing the type of event
related to the originating occurrence.
string type = 4 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
String |
The type.
|
getTypeBytes()
public ByteString getTypeBytes()
Required. This attribute contains a value describing the type of event
related to the originating occurrence.
string type = 4 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
ByteString |
The bytes for type.
|
hasBinaryData()
public boolean hasBinaryData()
Optional. Binary data.
bytes binary_data = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
boolean |
Whether the binaryData field is set.
|
hasProtoData()
public boolean hasProtoData()
Optional. Proto data.
.google.protobuf.Any proto_data = 8 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
boolean |
Whether the protoData field is set.
|
hasTextData()
public boolean hasTextData()
Optional. Text data.
string text_data = 7 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
boolean |
Whether the textData field is set.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public CloudEvent.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CloudEvent.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public CloudEvent.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides