[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-24 UTC."],[],[],null,["# pubsub.TopicBuilder class\n\nThe Google Cloud Pub/Sub topic builder.\n\nAccess via `functions.pubsub.topic()`.\n\n**Signature:** \n\n export declare class TopicBuilder \n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|----------------------------------------------------------------------------------------------------------------------|-----------|-------------------------------------------------------|\n| [(constructor)(triggerResource, options)](./firebase-functions.pubsub.topicbuilder.md#pubsubtopicbuilderconstructor) | | Constructs a new instance of the `TopicBuilder` class |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|-----------------------------------------------------------------------------------------------|-----------|---------------------------------------------------------------------------|\n| [onPublish(handler)](./firebase-functions.pubsub.topicbuilder.md#pubsubtopicbuilderonpublish) | | Event handler that fires every time a Cloud Pub/Sub message is published. |\n\npubsub.TopicBuilder.(constructor)\n---------------------------------\n\nConstructs a new instance of the `TopicBuilder` class\n\n**Signature:** \n\n constructor(triggerResource: () =\u003e string, options: DeploymentOptions);\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------------|--------------------------------------------------------------------------------------------|-------------|\n| triggerResource | () =\\\u003e string | |\n| options | [DeploymentOptions](./firebase-functions.deploymentoptions.md#deploymentoptions_interface) | |\n\npubsub.TopicBuilder.onPublish()\n-------------------------------\n\nEvent handler that fires every time a Cloud Pub/Sub message is published.\n\n**Signature:** \n\n onPublish(handler: (message: Message, context: EventContext) =\u003e PromiseLike\u003cany\u003e | any): CloudFunction\u003cMessage\u003e;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|\n| handler | (message: [Message](./firebase-functions.pubsub.message.md#pubsubmessage_class), context: [EventContext](./firebase-functions.eventcontext.md#eventcontext_interface)) =\\\u003e PromiseLike\\\u003cany\\\u003e \\| any | Event handler that runs every time a Cloud Pub/Sub message is published. |\n\n**Returns:**\n\n[CloudFunction](./firebase-functions.cloudfunction.md#cloudfunction_interface)\\\u003c[Message](./firebase-functions.pubsub.message.md#pubsubmessage_class)\\\u003e\n\nA function that you can export and deploy."]]