Class CloudEvent
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.eventarc.publishing.v1.CloudEvent
- All Implemented Interfaces:
CloudEventOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class CloudEvent
extends com.google.protobuf.GeneratedMessage
implements CloudEventOrBuilder
CloudEvent represents a vendor-neutral specification for defining the format of event data.Protobuf type
google.cloud.eventarc.publishing.v1.CloudEvent- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classCloudEvent represents a vendor-neutral specification for defining the format of event data.static final classThe following abstract data types are available for use in attributes.static interfacestatic enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsAttributes(String key) Optional.booleanDeprecated.intOptional.Optional.getAttributesOrDefault(String key, CloudEvent.CloudEventAttributeValue defaultValue) Optional.Optional.com.google.protobuf.ByteStringOptional.static CloudEventstatic final com.google.protobuf.Descriptors.DescriptorgetId()Required.com.google.protobuf.ByteStringRequired.com.google.protobuf.Parser<CloudEvent>com.google.protobuf.AnyOptional.com.google.protobuf.AnyOrBuilderOptional.intRequired.com.google.protobuf.ByteStringRequired.Required.com.google.protobuf.ByteStringRequired.Optional.com.google.protobuf.ByteStringOptional.getType()Required.com.google.protobuf.ByteStringRequired.booleanOptional.inthashCode()booleanOptional.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) final booleanstatic CloudEvent.Builderstatic CloudEvent.BuildernewBuilder(CloudEvent prototype) protected CloudEvent.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static CloudEventparseDelimitedFrom(InputStream input) static CloudEventparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CloudEventparseFrom(byte[] data) static CloudEventparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CloudEventparseFrom(com.google.protobuf.ByteString data) static CloudEventparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CloudEventparseFrom(com.google.protobuf.CodedInputStream input) static CloudEventparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CloudEventparseFrom(InputStream input) static CloudEventparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CloudEventparseFrom(ByteBuffer data) static CloudEventparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<CloudEvent>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER- See Also:
-
SOURCE_FIELD_NUMBER
public static final int SOURCE_FIELD_NUMBER- See Also:
-
SPEC_VERSION_FIELD_NUMBER
public static final int SPEC_VERSION_FIELD_NUMBER- See Also:
-
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER- See Also:
-
ATTRIBUTES_FIELD_NUMBER
public static final int ATTRIBUTES_FIELD_NUMBER- See Also:
-
BINARY_DATA_FIELD_NUMBER
public static final int BINARY_DATA_FIELD_NUMBER- See Also:
-
TEXT_DATA_FIELD_NUMBER
public static final int TEXT_DATA_FIELD_NUMBER- See Also:
-
PROTO_DATA_FIELD_NUMBER
public static final int PROTO_DATA_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getDataCase
- Specified by:
getDataCasein interfaceCloudEventOrBuilder
-
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];- Specified by:
getIdin interfaceCloudEventOrBuilder- Returns:
- The id.
-
getIdBytes
public com.google.protobuf.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];- Specified by:
getIdBytesin interfaceCloudEventOrBuilder- Returns:
- The bytes for id.
-
getSource
Required. Identifies the context in which an event happened. URI-reference
string source = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getSourcein interfaceCloudEventOrBuilder- Returns:
- The source.
-
getSourceBytes
public com.google.protobuf.ByteString getSourceBytes()Required. Identifies the context in which an event happened. URI-reference
string source = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getSourceBytesin interfaceCloudEventOrBuilder- Returns:
- The bytes for source.
-
getSpecVersion
Required. The version of the CloudEvents specification which the event uses.
string spec_version = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getSpecVersionin interfaceCloudEventOrBuilder- Returns:
- The specVersion.
-
getSpecVersionBytes
public com.google.protobuf.ByteString getSpecVersionBytes()Required. The version of the CloudEvents specification which the event uses.
string spec_version = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getSpecVersionBytesin interfaceCloudEventOrBuilder- Returns:
- The bytes for specVersion.
-
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];- Specified by:
getTypein interfaceCloudEventOrBuilder- Returns:
- The type.
-
getTypeBytes
public com.google.protobuf.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];- Specified by:
getTypeBytesin interfaceCloudEventOrBuilder- Returns:
- The bytes for type.
-
getAttributesCount
public int getAttributesCount()Description copied from interface:CloudEventOrBuilderOptional. Used for Optional & Extension Attributes
map<string, .google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue> attributes = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getAttributesCountin interfaceCloudEventOrBuilder
-
containsAttributes
Optional. Used for Optional & Extension Attributes
map<string, .google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue> attributes = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
containsAttributesin interfaceCloudEventOrBuilder
-
getAttributes
Deprecated.UsegetAttributesMap()instead.- Specified by:
getAttributesin interfaceCloudEventOrBuilder
-
getAttributesMap
Optional. Used for Optional & Extension Attributes
map<string, .google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue> attributes = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getAttributesMapin interfaceCloudEventOrBuilder
-
getAttributesOrDefault
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];- Specified by:
getAttributesOrDefaultin interfaceCloudEventOrBuilder
-
getAttributesOrThrow
Optional. Used for Optional & Extension Attributes
map<string, .google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue> attributes = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getAttributesOrThrowin interfaceCloudEventOrBuilder
-
hasBinaryData
public boolean hasBinaryData()Optional. Binary data.
bytes binary_data = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasBinaryDatain interfaceCloudEventOrBuilder- Returns:
- Whether the binaryData field is set.
-
getBinaryData
public com.google.protobuf.ByteString getBinaryData()Optional. Binary data.
bytes binary_data = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getBinaryDatain interfaceCloudEventOrBuilder- Returns:
- The binaryData.
-
hasTextData
public boolean hasTextData()Optional. Text data.
string text_data = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasTextDatain interfaceCloudEventOrBuilder- Returns:
- Whether the textData field is set.
-
getTextData
Optional. Text data.
string text_data = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTextDatain interfaceCloudEventOrBuilder- Returns:
- The textData.
-
getTextDataBytes
public com.google.protobuf.ByteString getTextDataBytes()Optional. Text data.
string text_data = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTextDataBytesin interfaceCloudEventOrBuilder- Returns:
- The bytes for textData.
-
hasProtoData
public boolean hasProtoData()Optional. Proto data. NOTE: The `protoData` field only functions as expected when the payload is specifically a `CloudEvent` message type, and can't be used for arbitrary protocol buffer messages. For any other protocol buffer type, you must serialize your proto message into bytes, and use the `binaryData` field instead.
.google.protobuf.Any proto_data = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasProtoDatain interfaceCloudEventOrBuilder- Returns:
- Whether the protoData field is set.
-
getProtoData
public com.google.protobuf.Any getProtoData()Optional. Proto data. NOTE: The `protoData` field only functions as expected when the payload is specifically a `CloudEvent` message type, and can't be used for arbitrary protocol buffer messages. For any other protocol buffer type, you must serialize your proto message into bytes, and use the `binaryData` field instead.
.google.protobuf.Any proto_data = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getProtoDatain interfaceCloudEventOrBuilder- Returns:
- The protoData.
-
getProtoDataOrBuilder
public com.google.protobuf.AnyOrBuilder getProtoDataOrBuilder()Optional. Proto data. NOTE: The `protoData` field only functions as expected when the payload is specifically a `CloudEvent` message type, and can't be used for arbitrary protocol buffer messages. For any other protocol buffer type, you must serialize your proto message into bytes, and use the `binaryData` field instead.
.google.protobuf.Any proto_data = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getProtoDataOrBuilderin interfaceCloudEventOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CloudEvent parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CloudEvent parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CloudEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CloudEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CloudEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CloudEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static CloudEvent parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static CloudEvent parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static CloudEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CloudEvent.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-