[[["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 2025-08-14 UTC."],[],[],null,["# Class Topic (2.39.0)\n\nVersion 2.39.0keyboard_arrow_down\n\n- [2.42.0-rc (latest)](/cpp/docs/reference/pubsub/latest/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.41.0](/cpp/docs/reference/pubsub/2.41.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.40.0](/cpp/docs/reference/pubsub/2.40.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.39.0](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.38.0](/cpp/docs/reference/pubsub/2.38.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.37.0](/cpp/docs/reference/pubsub/2.37.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.36.0](/cpp/docs/reference/pubsub/2.36.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.35.0](/cpp/docs/reference/pubsub/2.35.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.34.0](/cpp/docs/reference/pubsub/2.34.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.33.0](/cpp/docs/reference/pubsub/2.33.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.32.0](/cpp/docs/reference/pubsub/2.32.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.31.0](/cpp/docs/reference/pubsub/2.31.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.30.0](/cpp/docs/reference/pubsub/2.30.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.29.0](/cpp/docs/reference/pubsub/2.29.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.28.0](/cpp/docs/reference/pubsub/2.28.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.27.0](/cpp/docs/reference/pubsub/2.27.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.26.0](/cpp/docs/reference/pubsub/2.26.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.25.1](/cpp/docs/reference/pubsub/2.25.1/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.24.0](/cpp/docs/reference/pubsub/2.24.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.23.0](/cpp/docs/reference/pubsub/2.23.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.22.1](/cpp/docs/reference/pubsub/2.22.1/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.21.0](/cpp/docs/reference/pubsub/2.21.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.20.0](/cpp/docs/reference/pubsub/2.20.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.19.0](/cpp/docs/reference/pubsub/2.19.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.18.0](/cpp/docs/reference/pubsub/2.18.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.17.0](/cpp/docs/reference/pubsub/2.17.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.16.0](/cpp/docs/reference/pubsub/2.16.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.15.1](/cpp/docs/reference/pubsub/2.15.1/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.14.0](/cpp/docs/reference/pubsub/2.14.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.13.0](/cpp/docs/reference/pubsub/2.13.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.12.0](/cpp/docs/reference/pubsub/2.12.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic)\n- [2.11.0](/cpp/docs/reference/pubsub/2.11.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic) \nObjects of this class identify a Cloud Pub/Sub topic. \n| **Note:** This class makes no effort to validate the ids provided. The application should verify that any ids passed to this application conform to the Cloud Pub/Sub [resource name](https://cloud.google.com/pubsub/docs/admin#resource_names) restrictions.\n\nConstructors\n------------\n\n### Topic(Topic const \\&)\n\nCopy and move\n\n### Topic(Topic \\&\\&)\n\nCopy and move\n\n### Topic(std::string, std::string)\n\nOperators\n---------\n\n### operator=(Topic const \\&)\n\nCopy and move\n\n### operator=(Topic \\&\\&)\n\nCopy and move\n\nFunctions\n---------\n\n### project_id() const\n\nReturns the [Project](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.html) ID.\n\n### topic_id() const\n\nReturns the [Topic](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1Topic) ID.\n\n### FullName() const\n\nReturns the fully qualified topic name as a string of the form: \"projects/"]]