+ * {@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.ListThis 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 @@