Notifications
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
一个 Google Cloud Pub/Sub 主题,可在营业地点更新或有新评价时发布通知。每个账号只能有一项通知设置资源。
JSON 表示法 |
{
"name": string,
"topicName": string,
"notificationTypes": [
enum (NotificationType )
]
} |
NotificationType
发送到 Cloud Pub/Sub 主题的通知类型。
枚举 |
NOTIFICATION_TYPE_UNSPECIFIED |
无通知类型。与任何通知都不匹配。 |
GOOGLE_UPDATE |
营业地点有可供审核的 Google 更新。通知中的 locationName 字段会提供包含 Google 更新的营业地点的资源名称。 |
NEW_REVIEW |
该营业地点获得了一条新的评价。通知中的 reviewName 字段会提供已添加的评价的资源名称,而 locationName 将包含该营业地点的资源名称。 |
UPDATED_REVIEW |
更新了针对该地点的评价。通知中的 reviewName 字段会提供已添加的评价的资源名称,而 locationName 将包含营业地点的资源名称。 |
NEW_CUSTOMER_MEDIA |
一位 Google 地图用户向该营业地点添加了新的媒体项。通知会提供新媒体项的资源名称。 |
NEW_QUESTION |
系统会向该营业地点添加新问题。通知中会提供问题的资源名称。 |
UPDATED_QUESTION |
地点问题已更新。通知中会提供问题的资源名称。 |
NEW_ANSWER |
系统会向该营业地点添加新回答。通知将提供问题和答案的资源名称。 |
UPDATED_ANSWER |
营业地点的回答已更新。通知将提供问题和答案的资源名称。 |
UPDATED_LOCATION_STATE |
营业地点的 LocationState 已更新。通知将包含已更新的 LocationState 字段的字段掩码。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eGoogle Cloud Pub/Sub topic allows business accounts to receive notifications about location updates and new reviews.\u003c/p\u003e\n"],["\u003cp\u003eEach account has a single notification settings resource which can be configured to receive different types of notifications.\u003c/p\u003e\n"],["\u003cp\u003eNotifications can be triggered by various events including Google updates, new/updated reviews, customer media, questions, answers, and location state changes.\u003c/p\u003e\n"],["\u003cp\u003eTo receive notifications, the 'mybusiness-api-pubsub@system.gserviceaccount.com' must have publish permissions on the specified Cloud Pub/Sub topic.\u003c/p\u003e\n"],["\u003cp\u003eBusinesses can stop receiving notifications completely using the \u003ccode\u003eaccounts.deleteNotifications\u003c/code\u003e method.\u003c/p\u003e\n"]]],[],null,["# Notifications\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [NotificationType](#NotificationType)\n\nA Google Cloud Pub/Sub topic where notifications can be published when a location is updated or has a new review. There will be only one notification settings resource per-account.\n\n| JSON representation ||\n|------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"name\": string, \"topicName\": string, \"notificationTypes\": [ enum (/my-business/reference/rest/v4/Notifications#NotificationType) ] } ``` |\n\n| Fields ||\n|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. The notifications resource name. |\n| `topicName` | `string` The Google Cloud Pub/Sub topic that will receive notifications when locations managed by this account are updated. If unset, no notifications will be posted. The account [mybusiness-api-pubsub@system.gserviceaccount.com](mailto:mybusiness-api-pubsub@system.gserviceaccount.com) must have at least Publish permissions on the Cloud Pub/Sub topic. |\n| `notificationTypes[]` | `enum (`[NotificationType](/my-business/reference/rest/v4/Notifications#NotificationType)`)` The types of notifications that will be sent to the Cloud Pub/Sub topic. At least one must be specified. To stop receiving notifications entirely, use [accounts.deleteNotifications](/my-business/reference/rest/v4/accounts/deleteNotifications#google.mybusiness.v4.Accounts.DeleteNotifications). |\n\nNotificationType\n----------------\n\nType of notification sent to the Cloud Pub/Sub topic.\n\n| Enums ||\n|---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `NOTIFICATION_TYPE_UNSPECIFIED` | No notification type. Will not match any notifications. |\n| `GOOGLE_UPDATE` | The location has Google updates for review. The locationName field on the notification will provide the resource name of the location with Google updates. |\n| `NEW_REVIEW` | A new review has been added to the location. The reviewName field on the notification will provide the resource name of the review that was added, and locationName will have the location's resource name. |\n| `UPDATED_REVIEW` | A review on the location has been updated. The reviewName field on the notification will provide the resource name of the review that was added, and locationName will have the location's resource name. |\n| `NEW_CUSTOMER_MEDIA` | A new media item has been added to the location by a Google Maps user. The notification will provide the resource name of the new media item. |\n| `NEW_QUESTION` | A new question is added to the location. The notification will provide the resource name of question. |\n| `UPDATED_QUESTION` | A question of the location is updated. The notification will provide the resource name of question. |\n| `NEW_ANSWER` | A new answer is added to the location. The notification will provide the resource name of question and answer. |\n| `UPDATED_ANSWER` | An answer of the location is updated. The notification will provide the resource name of question and answer. |\n| `UPDATED_LOCATION_STATE` | The LocationState of the Location was updated. The Notification will contain the field mask of the updated LocationState fields. |"]]