@@ -204,6 +204,10 @@ message Message {
204204 // `false`.
205205 bool thread_reply = 25 [(google.api.field_behavior ) = OUTPUT_ONLY ];
206206
207+ // Output only. Whether this is a silent message. Silent messages are messages
208+ // where Chat suppresses push notifications for recipients.
209+ bool silent = 46 [(google.api.field_behavior ) = OUTPUT_ONLY ];
210+
207211 // Optional. A custom ID for the message. You can use field to identify a
208212 // message, or to get, delete, or update a message. To set a custom ID,
209213 // specify the
@@ -646,6 +650,43 @@ message CreateMessageRequest {
646650 // For details, see [Name a
647651 // message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
648652 string message_id = 9 [(google.api.field_behavior ) = OPTIONAL ];
653+
654+ // Optional. Controls the notification behavior when the message is posted.
655+ // To learn more, see [Force notifications or send silent
656+ // messages](https://developer.google.com/workspace/chat/create-messages#force-notify-silent).
657+ CreateMessageNotificationOptions create_message_notification_options = 10
658+ [(google.api.field_behavior ) = OPTIONAL ];
659+ }
660+
661+ // Options for the notification behavior when the message is posted.
662+ message CreateMessageNotificationOptions {
663+ // The notification types options for the message.
664+ enum NotificationType {
665+ // Default behavior. Notification behavior is similar to when the human user
666+ // sends the message using the Chat UI: no notification is sent to the
667+ // human sender.
668+ NOTIFICATION_TYPE_NONE = 0 ;
669+
670+ // Force notify recipients. This bypasses users' space notification settings
671+ // and [Chat Do Not Disturb
672+ // settings](https://support.google.com/chat/answer/9093489). This option
673+ // does not bypass device-level Do Not Disturb settings.
674+ //
675+ // Requires [app authentication]
676+ // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
677+ NOTIFICATION_TYPE_FORCE_NOTIFY = 2 ;
678+
679+ // Silence the notification as if the recipients have [Chat Do Not
680+ // Disturb](https://support.google.com/chat/answer/9093489) enabled or
681+ // have muted the space.
682+ //
683+ // Requires [app authentication]
684+ // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
685+ NOTIFICATION_TYPE_SILENT = 3 ;
686+ }
687+
688+ // The notification type for the message.
689+ NotificationType notification_type = 1 ;
649690}
650691
651692// Lists messages in the specified space, that the user is a member of.
0 commit comments