Skip to content

Commit 71b30db

Browse files
fix!: [chat] Changed field behavior for an existing field name in message .google.chat.v1.QuotedMessageMetadata (#6619)
* 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 Source-Link: googleapis/googleapis@26dadeb Source-Link: googleapis/googleapis-gen@be88b6a Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNoYXQvLk93bEJvdC55YW1sIiwiaCI6ImJlODhiNmFhNDY2MTgxNmM2NmIxYWY1ZmIxODgzODY3NDAwYmFiYTUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 20de60f commit 71b30db

6 files changed

Lines changed: 44 additions & 14 deletions

File tree

packages/google-chat/protos/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

packages/google-chat/protos/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
//

packages/google-chat/protos/protos.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-chat/samples/generated/v1/chat_service.update_message.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function main(message, updateMask) {
4444
* authentication (/chat/api/guides/auth/service-accounts).)
4545
* - `accessory_widgets` (Requires app
4646
* authentication (/chat/api/guides/auth/service-accounts).)
47+
* - `quoted_message_metadata` (Only allows removal of the quoted message.)
4748
*/
4849
// const updateMask = {}
4950
/**

packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290
"segments": [
291291
{
292292
"start": 25,
293-
"end": 75,
293+
"end": 76,
294294
"type": "FULL"
295295
}
296296
],

packages/google-chat/src/v1/chat_service_client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,8 @@ export class ChatServiceClient {
895895
*
896896
* - `accessory_widgets` (Requires [app
897897
* authentication](/chat/api/guides/auth/service-accounts).)
898+
*
899+
* - `quoted_message_metadata` (Only allows removal of the quoted message.)
898900
* @param {boolean} [request.allowMissing]
899901
* Optional. If `true` and the message isn't found, a new message is created
900902
* and `updateMask` is ignored. The specified message ID must be

0 commit comments

Comments
 (0)