The resource name of the subscription for which this event was
generated. The format of the value is
projects/{project-id}/subscriptions/{subscription-id}.
The resource name of the subscription for which this event was
generated. The format of the value is
projects/{project-id}/subscriptions/{subscription-id}.
[[["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 MessagePublishedDataOrBuilder (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.MessagePublishedDataOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.pubsub.v1.MessagePublishedDataOrBuilder)\n- [0.14.1](/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.pubsub.v1.MessagePublishedDataOrBuilder) \n\n public interface MessagePublishedDataOrBuilder 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### getMessage()\n\n public abstract PubsubMessage getMessage()\n\nThe message that was published.\n\n`.google.events.cloud.pubsub.v1.PubsubMessage message = 1;`\n\n### getMessageOrBuilder()\n\n public abstract PubsubMessageOrBuilder getMessageOrBuilder()\n\nThe message that was published.\n\n`.google.events.cloud.pubsub.v1.PubsubMessage message = 1;`\n\n### getSubscription()\n\n public abstract String getSubscription()\n\nThe resource name of the subscription for which this event was\ngenerated. The format of the value is\n`projects/{project-id}/subscriptions/{subscription-id}`.\n\n`string subscription = 2;`\n\n### getSubscriptionBytes()\n\n public abstract ByteString getSubscriptionBytes()\n\nThe resource name of the subscription for which this event was\ngenerated. The format of the value is\n`projects/{project-id}/subscriptions/{subscription-id}`.\n\n`string subscription = 2;`\n\n### hasMessage()\n\n public abstract boolean hasMessage()\n\nThe message that was published.\n\n`.google.events.cloud.pubsub.v1.PubsubMessage message = 1;`"]]