|
| 1 | +// Copyright 2025 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.chat.v1; |
| 18 | + |
| 19 | +import "google/api/field_behavior.proto"; |
| 20 | +import "google/api/resource.proto"; |
| 21 | +import "google/protobuf/field_mask.proto"; |
| 22 | + |
| 23 | +option csharp_namespace = "Google.Apps.Chat.V1"; |
| 24 | +option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; |
| 25 | +option java_multiple_files = true; |
| 26 | +option java_outer_classname = "SpaceNotificationSettingProto"; |
| 27 | +option java_package = "com.google.chat.v1"; |
| 28 | +option objc_class_prefix = "DYNAPIProto"; |
| 29 | +option php_namespace = "Google\\Apps\\Chat\\V1"; |
| 30 | +option ruby_package = "Google::Apps::Chat::V1"; |
| 31 | + |
| 32 | +// The notification setting of a user in a space. |
| 33 | +message SpaceNotificationSetting { |
| 34 | + option (google.api.resource) = { |
| 35 | + type: "chat.googleapis.com/SpaceNotificationSetting" |
| 36 | + pattern: "users/{user}/spaces/{space}/spaceNotificationSetting" |
| 37 | + singular: "spaceNotificationSetting" |
| 38 | + }; |
| 39 | + |
| 40 | + // The notification setting types. Other types might be supported in the |
| 41 | + // future. |
| 42 | + enum NotificationSetting { |
| 43 | + // Reserved. |
| 44 | + NOTIFICATION_SETTING_UNSPECIFIED = 0; |
| 45 | + |
| 46 | + // Notifications are triggered by @mentions, followed threads, first |
| 47 | + // message of new threads. All new threads are automatically followed, |
| 48 | + // unless manually unfollowed by the user. |
| 49 | + ALL = 1; |
| 50 | + |
| 51 | + // The notification is triggered by @mentions, followed threads, first |
| 52 | + // message of new threads. Not available for 1:1 direct messages. |
| 53 | + MAIN_CONVERSATIONS = 2; |
| 54 | + |
| 55 | + // The notification is triggered by @mentions, followed threads. Not |
| 56 | + // available for 1:1 direct messages. |
| 57 | + FOR_YOU = 3; |
| 58 | + |
| 59 | + // Notification is off. |
| 60 | + OFF = 4; |
| 61 | + } |
| 62 | + |
| 63 | + // The space notification mute setting types. |
| 64 | + enum MuteSetting { |
| 65 | + // Reserved. |
| 66 | + MUTE_SETTING_UNSPECIFIED = 0; |
| 67 | + |
| 68 | + // The user will receive notifications for the space based on the |
| 69 | + // notification setting. |
| 70 | + UNMUTED = 1; |
| 71 | + |
| 72 | + // The user will not receive any notifications for the space, regardless of |
| 73 | + // the notification setting. |
| 74 | + MUTED = 2; |
| 75 | + } |
| 76 | + |
| 77 | + // Identifier. The resource name of the space notification setting. |
| 78 | + // Format: `users/{user}/spaces/{space}/spaceNotificationSetting`. |
| 79 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 80 | + |
| 81 | + // The notification setting. |
| 82 | + optional NotificationSetting notification_setting = 2; |
| 83 | + |
| 84 | + // The space notification mute setting. |
| 85 | + optional MuteSetting mute_setting = 3; |
| 86 | +} |
| 87 | + |
| 88 | +// Request message to get space notification setting. |
| 89 | +// Only supports getting notification setting for the calling user. |
| 90 | +message GetSpaceNotificationSettingRequest { |
| 91 | + // Required. Format: users/{user}/spaces/{space}/spaceNotificationSetting |
| 92 | + // |
| 93 | + // - `users/me/spaces/{space}/spaceNotificationSetting`, OR |
| 94 | + // - `users/[email protected]/spaces/{space}/spaceNotificationSetting`, OR |
| 95 | + // - `users/123456789/spaces/{space}/spaceNotificationSetting`. |
| 96 | + // Note: Only the caller's user id or email is allowed in the path. |
| 97 | + string name = 1 [ |
| 98 | + (google.api.field_behavior) = REQUIRED, |
| 99 | + (google.api.resource_reference) = { |
| 100 | + type: "chat.googleapis.com/SpaceNotificationSetting" |
| 101 | + } |
| 102 | + ]; |
| 103 | +} |
| 104 | + |
| 105 | +// Request to update the space notification settings. |
| 106 | +// Only supports updating notification setting for the calling user. |
| 107 | +message UpdateSpaceNotificationSettingRequest { |
| 108 | + // Required. The resource name for the space notification settings must be |
| 109 | + // populated in the form of |
| 110 | + // `users/{user}/spaces/{space}/spaceNotificationSetting`. Only fields |
| 111 | + // specified by `update_mask` are updated. |
| 112 | + SpaceNotificationSetting space_notification_setting = 1 |
| 113 | + [(google.api.field_behavior) = REQUIRED]; |
| 114 | + |
| 115 | + // Required. Supported field paths: |
| 116 | + // |
| 117 | + // - `notification_setting` |
| 118 | + // |
| 119 | + // - `mute_setting` |
| 120 | + google.protobuf.FieldMask update_mask = 2 |
| 121 | + [(google.api.field_behavior) = REQUIRED]; |
| 122 | +} |
0 commit comments