Skip to content

Commit 26dadeb

Browse files
Google APIscopybara-github
authored andcommitted
fix!: Changed field behavior for an existing field name in message .google.chat.v1.QuotedMessageMetadata
fix!: Changed field behavior for an existing field `last_update_time` in message `.google.chat.v1.QuotedMessageMetadata` docs: A comment for field `quoted_message_metadata` in message `.google.chat.v1.Message` is changed docs: A comment for message `QuotedMessageMetadata` is changed docs: A comment for field `name` in message `.google.chat.v1.QuotedMessageMetadata` is changed docs: A comment for field `last_update_time` in message `.google.chat.v1.QuotedMessageMetadata` is changed docs: A comment for field `update_mask` in message `.google.chat.v1.UpdateMessageRequest` is changed docs: A comment for field `customer` in message `.google.chat.v1.Space` is changed PiperOrigin-RevId: 799541738
1 parent 1765b55 commit 26dadeb

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

google/chat/v1/message.proto

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,19 @@ message Message {
238238
DeletionMetadata deletion_metadata = 38
239239
[(google.api.field_behavior) = OUTPUT_ONLY];
240240

241-
// Output only. Information about a message that's quoted by a Google Chat
242-
// user in a space. Google Chat users can quote a message to reply to it.
241+
// Optional. Information about a message that another message quotes.
242+
//
243+
// When you create a message, you can quote messages within the same
244+
// thread, or quote a root message to create a new root message.
245+
// However, you can't quote a message reply from a different thread.
246+
//
247+
// When you update a message, you can't add or replace the
248+
// `quotedMessageMetadata` field, but you can remove it.
249+
//
250+
// For example usage, see [Quote another
251+
// message](https://developers.google.com/workspace/chat/create-messages#quote-a-message).
243252
QuotedMessageMetadata quoted_message_metadata = 39
244-
[(google.api.field_behavior) = OUTPUT_ONLY];
253+
[(google.api.field_behavior) = OPTIONAL];
245254

246255
// Output only. GIF images that are attached to the message.
247256
repeated AttachedGif attached_gifs = 42
@@ -266,25 +275,41 @@ message AttachedGif {
266275
string uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
267276
}
268277

269-
// Information about a quoted message.
278+
// Information about a message that another message quotes.
279+
//
280+
// When you create a message, you can quote messages within the same
281+
// thread, or quote a root message to create a new root message.
282+
// However, you can't quote a message reply from a different thread.
283+
//
284+
// When you update a message, you can't add or replace the
285+
// `quotedMessageMetadata` field, but you can remove it.
286+
//
287+
// For example usage, see [Quote another
288+
// message](https://developers.google.com/workspace/chat/create-messages#quote-a-message).
270289
message QuotedMessageMetadata {
271290
option (google.api.resource) = {
272291
type: "chat.googleapis.com/QuotedMessageMetadata"
273292
pattern: "spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}"
274293
};
275294

276-
// Output only. Resource name of the quoted message.
295+
// Required. Resource name of the message that is quoted.
277296
//
278297
// Format: `spaces/{space}/messages/{message}`
279298
string name = 1 [
280-
(google.api.field_behavior) = OUTPUT_ONLY,
299+
(google.api.field_behavior) = REQUIRED,
281300
(google.api.resource_reference) = { type: "chat.googleapis.com/Message" }
282301
];
283302

284-
// Output only. The timestamp when the quoted message was created or when the
303+
// Required. The timestamp when the quoted message was created or when the
285304
// quoted message was last updated.
305+
//
306+
// If the message was edited, use this field, `last_update_time`.
307+
// If the message was never edited, use `create_time`.
308+
//
309+
// If `last_update_time` doesn't match the latest version of the quoted
310+
// message, the request fails.
286311
google.protobuf.Timestamp last_update_time = 2
287-
[(google.api.field_behavior) = OUTPUT_ONLY];
312+
[(google.api.field_behavior) = REQUIRED];
288313
}
289314

290315
// A thread in a Google Chat space. For example usage, see
@@ -456,6 +481,8 @@ message UpdateMessageRequest {
456481
//
457482
// - `accessory_widgets` (Requires [app
458483
// authentication](/chat/api/guides/auth/service-accounts).)
484+
//
485+
// - `quoted_message_metadata` (Only allows removal of the quoted message.)
459486
google.protobuf.FieldMask update_mask = 2
460487
[(google.api.field_behavior) = REQUIRED];
461488

google/chat/v1/space.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ message Space {
355355
// and `SpaceType` is `SPACE`, otherwise should not be set.
356356
//
357357
// In the format `customers/{customer}`, where `customer` is the `id` from the
358-
// [Admin SDK customer resource](
359-
// https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers).
358+
// [Admin SDK customer
359+
// resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers).
360360
// Private apps can also use the `customers/my_customer` alias to create
361361
// the space in the same Google Workspace organization as the app.
362362
//

0 commit comments

Comments
 (0)