NotificationSetting
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
一个 Google Pub/Sub 主题,可在营业地点更新或有新评价时发布通知。每个账号只有一个通知设置资源。
JSON 表示法 |
{
"name": string,
"pubsubTopic": string,
"notificationTypes": [
enum (NotificationType )
]
} |
字段 |
name |
string
必需。此设置对应的资源名称。其格式为 accounts/{account_id}/notificationSetting 。
|
pubsubTopic |
string
可选。当此账号管理的位置更新时,将接收通知的 Google Pub/Sub 主题。如果此政策未设置,系统将无法发布任何通知。 账号 mybusiness-api-pubsub@system.gserviceaccount.com 必须至少拥有 Pub/Sub 主题的“发布”权限。
|
notificationTypes[] |
enum (NotificationType )
将发送到 Pub/Sub 主题的通知类型。如需完全停止接收通知,请使用 NotificationSettings.UpdateNotificationSetting 并清空 notificationType,或将 pubsubTopic 设置为空字符串。
|
NotificationType
枚举 |
NOTIFICATION_TYPE_UNSPECIFIED |
无通知类型。与任何通知都不匹配。 |
GOOGLE_UPDATE |
营业地点有可供审核的 Google 更新。通知中的 location_name 字段会提供包含 Google 更新的营业地点的资源名称。 |
NEW_REVIEW |
该营业地点获得了一条新的评价。通知中的 review_name 字段将提供已添加的评价的资源名称,而 location_name 将具有营业地点的资源名称。 |
UPDATED_REVIEW |
更新了针对该地点的评价。通知中的 review_name 字段将提供已添加的评价的资源名称,而 location_name 将具有营业地点的资源名称。 |
NEW_CUSTOMER_MEDIA |
一位 Google 地图用户向该营业地点添加了新的媒体项。通知会提供新媒体项的资源名称。 |
NEW_QUESTION |
系统会向该营业地点添加新问题。通知中会提供问题的资源名称。 |
UPDATED_QUESTION |
地点问题已更新。通知中会提供问题的资源名称。 |
NEW_ANSWER |
系统会向该营业地点添加新回答。通知将提供问题和答案的资源名称。 |
UPDATED_ANSWER |
营业地点的回答已更新。通知将提供问题和答案的资源名称。 |
DUPLICATE_LOCATION |
指明营业地点元数据的重复营业地点字段是否发生更改。 |
LOSS_OF_VOICE_OF_MERCHANT |
已弃用:请将此值的现有用法迁移到扩展程度更高的“VOICE_OF_MERCHANT_UPDATED”。 |
VOICE_OF_MERCHANT_UPDATED |
指明营业地点的 Voice of Merchant (VOM) 状态是否更新。VOM 可决定营业地点是否信誉良好,以及商家是否拥有对 Google 上的商家的控制权。通过审核阶段后,对营业地点所做的任何修改都会在 Google 地图上生效。如需了解详情,请调用 GetVoiceOfMerchantState RPC。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eGoogle Pub/Sub notifications can be configured for location updates and new reviews.\u003c/p\u003e\n"],["\u003cp\u003eA single notification setting exists per account, directing notifications to a specified Pub/Sub topic.\u003c/p\u003e\n"],["\u003cp\u003eNotification types include Google updates, new/updated reviews, new customer media, new/updated Q&A, duplicate location and Voice of Merchant updates.\u003c/p\u003e\n"],["\u003cp\u003eAccount must grant \u003ccode\u003emybusiness-api-pubsub@system.gserviceaccount.com\u003c/code\u003e publish permissions on the designated Pub/Sub topic.\u003c/p\u003e\n"],["\u003cp\u003eTo disable notifications, clear the \u003ccode\u003enotificationTypes\u003c/code\u003e list or set \u003ccode\u003epubsubTopic\u003c/code\u003e to an empty string in the notification settings.\u003c/p\u003e\n"]]],[],null,["# NotificationSetting\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [NotificationType](#NotificationType)\n\nA Google Pub/Sub topic where notifications can be published when a location is updated or has a new review. There will be only one notification setting resource per-account.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"pubsubTopic\": string, \"notificationTypes\": [ enum (/my-business/reference/notifications/rest/v1/NotificationSetting#NotificationType) ] } ``` |\n\n| Fields ||\n|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The resource name this setting is for. This is of the form `accounts/{account_id}/notificationSetting`. |\n| `pubsubTopic` | `string` Optional. The Google 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 Pub/Sub topic. |\n| `notificationTypes[]` | `enum (`[NotificationType](/my-business/reference/notifications/rest/v1/NotificationSetting#NotificationType)`)` The types of notifications that will be sent to the Pub/Sub topic. To stop receiving notifications entirely, use NotificationSettings.UpdateNotificationSetting with an empty notificationTypes or set the pubsubTopic to an empty string. |\n\nNotificationType\n----------------\n\nType of notification sent to the 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 location_name 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 review_name field on the notification will provide the resource name of the review that was added, and location_name will have the location's resource name. |\n| `UPDATED_REVIEW` | A review on the location has been updated. The review_name field on the notification will provide the resource name of the review that was added, and location_name 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| `DUPLICATE_LOCATION` | Indicates whether there is a change in location metadata's duplicate location field. |\n| `LOSS_OF_VOICE_OF_MERCHANT` | Deprecated: Migrate the existing usages of this value to the more expanded \"VOICE_OF_MERCHANT_UPDATED\". | This item is deprecated! |\n| `VOICE_OF_MERCHANT_UPDATED` | Indicates whether the location has an update in Voice of Merchant (VOM) status. VOM dictates whether the location is in good standing and the merchant has control over the business on Google. Any edits made to the location will propagate to Maps after passing the review phase. Call GetVoiceOfMerchantState rpc for more details. |"]]