From 680a2c6ee14c5271734e9eec1c48113afde473be Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 20 Oct 2026 18:11:56 -0700 Subject: [PATCH] chore: regenerate chat client --- .../v1/2.0.0/README.md | 4 +- .../api/services/chat/v1/HangoutsChat.java | 147 ++++++++++++++++++ .../services/chat/v1/model/CardWithId.java | 24 +++ .../v1/model/ReplaceMessageCardsRequest.java | 81 ++++++++++ .../v1/model/ReplaceMessageCardsResponse.java | 42 +++++ .../google-api-services-chat/v1/2.0.0/pom.xml | 4 +- clients/google-api-services-chat/v1/README.md | 4 +- 7 files changed, 300 insertions(+), 6 deletions(-) create mode 100644 clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ReplaceMessageCardsRequest.java create mode 100644 clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ReplaceMessageCardsResponse.java diff --git a/clients/google-api-services-chat/v1/2.0.0/README.md b/clients/google-api-services-chat/v1/2.0.0/README.md index fc3281b30f4..dc2021145a7 100644 --- a/clients/google-api-services-chat/v1/2.0.0/README.md +++ b/clients/google-api-services-chat/v1/2.0.0/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-chat - v1-rev20260927-2.0.0 + v1-rev20261015-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-chat:v1-rev20260927-2.0.0' + implementation 'com.google.apis:google-api-services-chat:v1-rev20261015-2.0.0' } ``` diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChat.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChat.java index 4558b577b9b..cfada0b8da6 100644 --- a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChat.java +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChat.java @@ -6878,6 +6878,153 @@ public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } + /** + * Replaces the cards included in a message. A Chat app can only replace cards on a human-created + * message if the message already contains cards, and the cards were created by the app. If the app + * replaces the cards with an empty list, the cards are removed. After removing the cards, the app + * cannot add cards back to the message. Requires [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.bot` + * + * Create a request for the method "messages.replaceCards". + * + * This request holds the parameters needed by the chat server. After setting any optional + * parameters, call the {@link ReplaceCards#execute()} method to invoke the remote operation. + * + * @param name Required. The resource name of the message. Format: `spaces/{space}/messages/{message}` + * @param content the {@link com.google.api.services.chat.v1.model.ReplaceMessageCardsRequest} + * @return the request + */ + public ReplaceCards replaceCards(java.lang.String name, com.google.api.services.chat.v1.model.ReplaceMessageCardsRequest content) throws java.io.IOException { + ReplaceCards result = new ReplaceCards(name, content); + initialize(result); + return result; + } + + public class ReplaceCards extends HangoutsChatRequest { + + private static final String REST_PATH = "v1/{+name}:replaceCards"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^spaces/[^/]+/messages/[^/]+$"); + + /** + * Replaces the cards included in a message. A Chat app can only replace cards on a human-created + * message if the message already contains cards, and the cards were created by the app. If the + * app replaces the cards with an empty list, the cards are removed. After removing the cards, the + * app cannot add cards back to the message. Requires [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.bot` + * + * Create a request for the method "messages.replaceCards". + * + * This request holds the parameters needed by the the chat server. After setting any optional + * parameters, call the {@link ReplaceCards#execute()} method to invoke the remote operation.

+ * {@link + * ReplaceCards#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Required. The resource name of the message. Format: `spaces/{space}/messages/{message}` + * @param content the {@link com.google.api.services.chat.v1.model.ReplaceMessageCardsRequest} + * @since 1.13 + */ + protected ReplaceCards(java.lang.String name, com.google.api.services.chat.v1.model.ReplaceMessageCardsRequest content) { + super(HangoutsChat.this, "POST", REST_PATH, content, com.google.api.services.chat.v1.model.ReplaceMessageCardsResponse.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^spaces/[^/]+/messages/[^/]+$"); + } + } + + @Override + public ReplaceCards set$Xgafv(java.lang.String $Xgafv) { + return (ReplaceCards) super.set$Xgafv($Xgafv); + } + + @Override + public ReplaceCards setAccessToken(java.lang.String accessToken) { + return (ReplaceCards) super.setAccessToken(accessToken); + } + + @Override + public ReplaceCards setAlt(java.lang.String alt) { + return (ReplaceCards) super.setAlt(alt); + } + + @Override + public ReplaceCards setCallback(java.lang.String callback) { + return (ReplaceCards) super.setCallback(callback); + } + + @Override + public ReplaceCards setFields(java.lang.String fields) { + return (ReplaceCards) super.setFields(fields); + } + + @Override + public ReplaceCards setKey(java.lang.String key) { + return (ReplaceCards) super.setKey(key); + } + + @Override + public ReplaceCards setOauthToken(java.lang.String oauthToken) { + return (ReplaceCards) super.setOauthToken(oauthToken); + } + + @Override + public ReplaceCards setPrettyPrint(java.lang.Boolean prettyPrint) { + return (ReplaceCards) super.setPrettyPrint(prettyPrint); + } + + @Override + public ReplaceCards setQuotaUser(java.lang.String quotaUser) { + return (ReplaceCards) super.setQuotaUser(quotaUser); + } + + @Override + public ReplaceCards setUploadType(java.lang.String uploadType) { + return (ReplaceCards) super.setUploadType(uploadType); + } + + @Override + public ReplaceCards setUploadProtocol(java.lang.String uploadProtocol) { + return (ReplaceCards) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The resource name of the message. Format: `spaces/{space}/messages/{message}` + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The resource name of the message. Format: `spaces/{space}/messages/{message}` + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The resource name of the message. Format: `spaces/{space}/messages/{message}` + */ + public ReplaceCards setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^spaces/[^/]+/messages/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public ReplaceCards set(String parameterName, Object value) { + return (ReplaceCards) super.set(parameterName, value); + } + } /** * Searches for messages in Google Chat that the calling user has access to. Returns a list of * messages matching the search criteria. To search across all spaces the user has access to, set diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/CardWithId.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/CardWithId.java index db3e099de91..c75dbb2a26e 100644 --- a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/CardWithId.java +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/CardWithId.java @@ -51,6 +51,13 @@ public final class CardWithId extends com.google.api.client.json.GenericJson { @com.google.api.client.util.Key private java.lang.String cardId; + /** + * Output only. The app that owns the card. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private User ownerUser; + /** * A card. Maximum size is 32 KB. * @return value or {@code null} for none @@ -85,6 +92,23 @@ public CardWithId setCardId(java.lang.String cardId) { return this; } + /** + * Output only. The app that owns the card. + * @return value or {@code null} for none + */ + public User getOwnerUser() { + return ownerUser; + } + + /** + * Output only. The app that owns the card. + * @param ownerUser ownerUser or {@code null} for none + */ + public CardWithId setOwnerUser(User ownerUser) { + this.ownerUser = ownerUser; + return this; + } + @Override public CardWithId set(String fieldName, Object value) { return (CardWithId) super.set(fieldName, value); diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ReplaceMessageCardsRequest.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ReplaceMessageCardsRequest.java new file mode 100644 index 00000000000..360f9442fec --- /dev/null +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ReplaceMessageCardsRequest.java @@ -0,0 +1,81 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.chat.v1.model; + +/** + * Request message for ReplaceMessageCards API method. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Google Chat API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ReplaceMessageCardsRequest extends com.google.api.client.json.GenericJson { + + /** + * Optional. An array of + * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards) to be + * included in the message. These cards will replace the existing cards of the message. If empty, + * the original cards included in the message will be cleared. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List cardsV2; + + static { + // hack to force ProGuard to consider CardWithId used, since otherwise it would be stripped out + // see https://github.com/google/google-api-java-client/issues/543 + com.google.api.client.util.Data.nullOf(CardWithId.class); + } + + /** + * Optional. An array of + * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards) to be + * included in the message. These cards will replace the existing cards of the message. If empty, + * the original cards included in the message will be cleared. + * @return value or {@code null} for none + */ + public java.util.List getCardsV2() { + return cardsV2; + } + + /** + * Optional. An array of + * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards) to be + * included in the message. These cards will replace the existing cards of the message. If empty, + * the original cards included in the message will be cleared. + * @param cardsV2 cardsV2 or {@code null} for none + */ + public ReplaceMessageCardsRequest setCardsV2(java.util.List cardsV2) { + this.cardsV2 = cardsV2; + return this; + } + + @Override + public ReplaceMessageCardsRequest set(String fieldName, Object value) { + return (ReplaceMessageCardsRequest) super.set(fieldName, value); + } + + @Override + public ReplaceMessageCardsRequest clone() { + return (ReplaceMessageCardsRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ReplaceMessageCardsResponse.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ReplaceMessageCardsResponse.java new file mode 100644 index 00000000000..1dfe079edd5 --- /dev/null +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ReplaceMessageCardsResponse.java @@ -0,0 +1,42 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.chat.v1.model; + +/** + * Response message for ReplaceMessageCards API. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Google Chat API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ReplaceMessageCardsResponse extends com.google.api.client.json.GenericJson { + + @Override + public ReplaceMessageCardsResponse set(String fieldName, Object value) { + return (ReplaceMessageCardsResponse) super.set(fieldName, value); + } + + @Override + public ReplaceMessageCardsResponse clone() { + return (ReplaceMessageCardsResponse) super.clone(); + } + +} diff --git a/clients/google-api-services-chat/v1/2.0.0/pom.xml b/clients/google-api-services-chat/v1/2.0.0/pom.xml index 543a447737b..0403a2438ef 100644 --- a/clients/google-api-services-chat/v1/2.0.0/pom.xml +++ b/clients/google-api-services-chat/v1/2.0.0/pom.xml @@ -8,8 +8,8 @@ com.google.apis google-api-services-chat - v1-rev20260927-2.0.0 - Google Chat API v1-rev20260927-2.0.0 + v1-rev20261015-2.0.0 + Google Chat API v1-rev20261015-2.0.0 jar 2011 diff --git a/clients/google-api-services-chat/v1/README.md b/clients/google-api-services-chat/v1/README.md index fc3281b30f4..dc2021145a7 100644 --- a/clients/google-api-services-chat/v1/README.md +++ b/clients/google-api-services-chat/v1/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-chat - v1-rev20260927-2.0.0 + v1-rev20261015-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-chat:v1-rev20260927-2.0.0' + implementation 'com.google.apis:google-api-services-chat:v1-rev20261015-2.0.0' } ```