Notifications
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Một chủ đề trên Google Cloud Pub/Sub, trong đó bạn có thể đăng thông báo khi một vị trí được cập nhật hoặc có bài đánh giá mới. Sẽ chỉ có một tài nguyên chế độ cài đặt thông báo cho mỗi tài khoản.
Biểu diễn dưới dạng JSON |
{
"name": string,
"topicName": string,
"notificationTypes": [
enum (NotificationType )
]
} |
Trường |
name |
string
Chỉ có đầu ra. Tên tài nguyên thông báo.
|
topicName |
string
Chủ đề Google Cloud Pub/Sub sẽ nhận được thông báo khi cập nhật thông tin về các vị trí do tài khoản này quản lý. Nếu bạn không đặt chính sách này thì sẽ không có thông báo nào được đăng. Tài khoản mybusiness-api-pubsub@system.gserviceaccount.com phải có ít nhất quyền Phát hành đối với chủ đề Cloud Pub/Sub.
|
notificationTypes[] |
enum (NotificationType )
Các loại thông báo sẽ được gửi đến chủ đề Cloud Pub/Sub. Bạn phải chỉ định ít nhất một mã. Để ngừng nhận hoàn toàn thông báo, hãy sử dụng accounts.deleteNotifications .
|
NotificationType
Loại thông báo được gửi đến chủ đề Cloud Pub/Sub.
Enum |
NOTIFICATION_TYPE_UNSPECIFIED |
Không có loại thông báo nào. Sẽ không khớp với bất kỳ thông báo nào. |
GOOGLE_UPDATE |
Vị trí có nội dung cập nhật của Google cần xem xét. Trường locationName trên thông báo sẽ cung cấp tên tài nguyên của vị trí cùng với nội dung cập nhật của Google. |
NEW_REVIEW |
Một bài đánh giá mới đã được thêm vào vị trí này. Trường reviewName trên thông báo sẽ cung cấp tên tài nguyên của bài đánh giá đã được thêm, và locationName sẽ có tên tài nguyên của vị trí. |
UPDATED_REVIEW |
Một bài đánh giá về vị trí này đã được cập nhật. Trường reviewName trên thông báo sẽ cung cấp tên tài nguyên của bài đánh giá đã được thêm, và locationName sẽ có tên tài nguyên của vị trí. |
NEW_CUSTOMER_MEDIA |
Một người dùng Google Maps đã thêm một mục nội dung nghe nhìn mới vào vị trí. Thông báo sẽ cung cấp tên tài nguyên của mục nội dung đa phương tiện mới. |
NEW_QUESTION |
Một câu hỏi mới được thêm vào vị trí. Thông báo sẽ cung cấp tên tài nguyên của câu hỏi. |
UPDATED_QUESTION |
Một câu hỏi về vị trí đã được cập nhật. Thông báo sẽ cung cấp tên tài nguyên của câu hỏi. |
NEW_ANSWER |
Câu trả lời mới được thêm vào vị trí. Thông báo sẽ cung cấp tên tài nguyên của câu hỏi và câu trả lời. |
UPDATED_ANSWER |
Câu trả lời của vị trí đã được cập nhật. Thông báo sẽ cung cấp tên tài nguyên của câu hỏi và câu trả lời. |
UPDATED_LOCATION_STATE |
LocationState của vị trí đã được cập nhật. Thông báo sẽ chứa mặt nạ trường của các trường LocationState đã cập nhật. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\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. |"]]