[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Interface PubsubMessageOrBuilder (0.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.16.0 (latest)](/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.pubsub.v1.PubsubMessageOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.pubsub.v1.PubsubMessageOrBuilder)\n- [0.14.1](/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.pubsub.v1.PubsubMessageOrBuilder) \n\n public interface PubsubMessageOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### containsAttributes(String key)\n\n public abstract boolean containsAttributes(String key)\n\nAttributes for this message.\n\n`map\u003cstring, string\u003e attributes = 2;`\n\n### getAttributes()\n\n public abstract Map\u003cString,String\u003e getAttributes()\n\nUse [#getAttributesMap()](/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.pubsub.v1.PubsubMessageOrBuilder#com_google_events_cloud_pubsub_v1_PubsubMessageOrBuilder_getAttributesMap__) instead.\n\n### getAttributesCount()\n\n public abstract int getAttributesCount()\n\nAttributes for this message.\n\n`map\u003cstring, string\u003e attributes = 2;`\n\n### getAttributesMap()\n\n public abstract Map\u003cString,String\u003e getAttributesMap()\n\nAttributes for this message.\n\n`map\u003cstring, string\u003e attributes = 2;`\n\n### getAttributesOrDefault(String key, String defaultValue)\n\n public abstract String getAttributesOrDefault(String key, String defaultValue)\n\nAttributes for this message.\n\n`map\u003cstring, string\u003e attributes = 2;`\n\n### getAttributesOrThrow(String key)\n\n public abstract String getAttributesOrThrow(String key)\n\nAttributes for this message.\n\n`map\u003cstring, string\u003e attributes = 2;`\n\n### getData()\n\n public abstract ByteString getData()\n\nThe binary data in the message.\n\n`bytes data = 1;`\n\n### getMessageId()\n\n public abstract String getMessageId()\n\nID of this message, assigned by the server when the message is published.\nGuaranteed to be unique within the topic.\n\n`string message_id = 3;`\n\n### getMessageIdBytes()\n\n public abstract ByteString getMessageIdBytes()\n\nID of this message, assigned by the server when the message is published.\nGuaranteed to be unique within the topic.\n\n`string message_id = 3;`\n\n### getOrderingKey()\n\n public abstract String getOrderingKey()\n\nIf non-empty, identifies related messages for which publish order should be\nrespected.\n\n`string ordering_key = 5;`\n\n### getOrderingKeyBytes()\n\n public abstract ByteString getOrderingKeyBytes()\n\nIf non-empty, identifies related messages for which publish order should be\nrespected.\n\n`string ordering_key = 5;`\n\n### getPublishTime()\n\n public abstract Timestamp getPublishTime()\n\nThe time at which the message was published, populated by the server when\nit receives the `Publish` call.\n\n`.google.protobuf.Timestamp publish_time = 4;`\n\n### getPublishTimeOrBuilder()\n\n public abstract TimestampOrBuilder getPublishTimeOrBuilder()\n\nThe time at which the message was published, populated by the server when\nit receives the `Publish` call.\n\n`.google.protobuf.Timestamp publish_time = 4;`\n\n### hasPublishTime()\n\n public abstract boolean hasPublishTime()\n\nThe time at which the message was published, populated by the server when\nit receives the `Publish` call.\n\n`.google.protobuf.Timestamp publish_time = 4;`"]]