From 49acb6a1689512923bd7ed2a112738fc1ffbdf6c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 19 Mar 2024 15:12:27 +0000 Subject: [PATCH 1/7] chore(deps): update dependency com.google.cloud:sdk-platform-java-config to v3.28.1 --- .kokoro/nightly/graalvm-native-17.cfg | 2 +- .kokoro/nightly/graalvm-native.cfg | 2 +- .kokoro/nightly/graalvm-sub-jobs/native-17/common.cfg | 2 +- .kokoro/nightly/graalvm-sub-jobs/native/common.cfg | 2 +- .kokoro/presubmit/graalvm-native-17-presubmit.cfg | 2 +- .kokoro/presubmit/graalvm-native-presubmit.cfg | 2 +- google-cloud-pom-parent/pom.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.kokoro/nightly/graalvm-native-17.cfg b/.kokoro/nightly/graalvm-native-17.cfg index 14408181dcf3..247ab003fcc3 100644 --- a/.kokoro/nightly/graalvm-native-17.cfg +++ b/.kokoro/nightly/graalvm-native-17.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.27.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.28.1" } env_vars: { diff --git a/.kokoro/nightly/graalvm-native.cfg b/.kokoro/nightly/graalvm-native.cfg index f415b5d2996c..a09aa81277fd 100644 --- a/.kokoro/nightly/graalvm-native.cfg +++ b/.kokoro/nightly/graalvm-native.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.27.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.28.1" } env_vars: { diff --git a/.kokoro/nightly/graalvm-sub-jobs/native-17/common.cfg b/.kokoro/nightly/graalvm-sub-jobs/native-17/common.cfg index 954e13a845eb..611eeee6b526 100644 --- a/.kokoro/nightly/graalvm-sub-jobs/native-17/common.cfg +++ b/.kokoro/nightly/graalvm-sub-jobs/native-17/common.cfg @@ -24,7 +24,7 @@ env_vars: { env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.27.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.28.1" } env_vars: { diff --git a/.kokoro/nightly/graalvm-sub-jobs/native/common.cfg b/.kokoro/nightly/graalvm-sub-jobs/native/common.cfg index 92ca3704c6ac..5e6fdce8cc28 100644 --- a/.kokoro/nightly/graalvm-sub-jobs/native/common.cfg +++ b/.kokoro/nightly/graalvm-sub-jobs/native/common.cfg @@ -29,7 +29,7 @@ env_vars: { env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.27.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.28.1" } # TODO: remove this after we've migrated all tests and scripts diff --git a/.kokoro/presubmit/graalvm-native-17-presubmit.cfg b/.kokoro/presubmit/graalvm-native-17-presubmit.cfg index a3e783fe3137..4393db19bccd 100644 --- a/.kokoro/presubmit/graalvm-native-17-presubmit.cfg +++ b/.kokoro/presubmit/graalvm-native-17-presubmit.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.27.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.28.1" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native-presubmit.cfg b/.kokoro/presubmit/graalvm-native-presubmit.cfg index 5b1fa668adfb..e79999939d8b 100644 --- a/.kokoro/presubmit/graalvm-native-presubmit.cfg +++ b/.kokoro/presubmit/graalvm-native-presubmit.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.27.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.28.1" } env_vars: { diff --git a/google-cloud-pom-parent/pom.xml b/google-cloud-pom-parent/pom.xml index 6b2a2a1282d5..bf1e3c9f775f 100644 --- a/google-cloud-pom-parent/pom.xml +++ b/google-cloud-pom-parent/pom.xml @@ -15,7 +15,7 @@ com.google.cloud sdk-platform-java-config - 3.27.0 + 3.28.1 From b885b13b65b0a7f83128e43432cb962c792ac182 Mon Sep 17 00:00:00 2001 From: diegomarquezp Date: Tue, 19 Mar 2024 15:43:28 +0000 Subject: [PATCH 2/7] exclude failureaccess from guava temporarily --- java-notification/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java-notification/pom.xml b/java-notification/pom.xml index 80dfb9e5d2f4..1a8fbdf24ff9 100644 --- a/java-notification/pom.xml +++ b/java-notification/pom.xml @@ -53,6 +53,12 @@ com.google.guava guava + + + com.google.guava + failureaccess + + From aefca2cde5a920837220554d46a399b6a8f7cd15 Mon Sep 17 00:00:00 2001 From: diegomarquezp Date: Wed, 20 Mar 2024 19:37:21 +0000 Subject: [PATCH 3/7] update removed files --- .../java/com/google/apps/card/v1/Action.java | 2898 ----- .../google/apps/card/v1/ActionOrBuilder.java | 224 - .../com/google/apps/card/v1/BorderStyle.java | 1118 -- .../apps/card/v1/BorderStyleOrBuilder.java | 99 - .../java/com/google/apps/card/v1/Button.java | 2134 ---- .../com/google/apps/card/v1/ButtonList.java | 937 -- .../apps/card/v1/ButtonListOrBuilder.java | 77 - .../google/apps/card/v1/ButtonOrBuilder.java | 304 - .../java/com/google/apps/card/v1/Card.java | 9492 ----------------- .../google/apps/card/v1/CardOrBuilder.java | 557 - .../com/google/apps/card/v1/CardProto.java | 690 -- .../java/com/google/apps/card/v1/Columns.java | 5786 ---------- .../google/apps/card/v1/ColumnsOrBuilder.java | 78 - .../google/apps/card/v1/DateTimePicker.java | 1702 --- .../apps/card/v1/DateTimePickerOrBuilder.java | 187 - .../google/apps/card/v1/DecoratedText.java | 4738 -------- .../apps/card/v1/DecoratedTextOrBuilder.java | 375 - .../java/com/google/apps/card/v1/Divider.java | 447 - .../google/apps/card/v1/DividerOrBuilder.java | 25 - .../java/com/google/apps/card/v1/Grid.java | 3586 ------- .../google/apps/card/v1/GridOrBuilder.java | 193 - .../java/com/google/apps/card/v1/Icon.java | 1544 --- .../google/apps/card/v1/IconOrBuilder.java | 219 - .../java/com/google/apps/card/v1/Image.java | 1119 -- .../google/apps/card/v1/ImageComponent.java | 1359 --- .../apps/card/v1/ImageComponentOrBuilder.java | 146 - .../google/apps/card/v1/ImageCropStyle.java | 960 -- .../apps/card/v1/ImageCropStyleOrBuilder.java | 73 - .../google/apps/card/v1/ImageOrBuilder.java | 123 - .../java/com/google/apps/card/v1/OnClick.java | 1793 ---- .../google/apps/card/v1/OnClickOrBuilder.java | 195 - .../com/google/apps/card/v1/OpenLink.java | 1269 --- .../apps/card/v1/OpenLinkOrBuilder.java | 115 - .../google/apps/card/v1/SelectionInput.java | 5468 ---------- .../apps/card/v1/SelectionInputOrBuilder.java | 332 - .../com/google/apps/card/v1/Suggestions.java | 1797 ---- .../apps/card/v1/SuggestionsOrBuilder.java | 83 - .../com/google/apps/card/v1/TextInput.java | 3013 ------ .../apps/card/v1/TextInputOrBuilder.java | 417 - .../google/apps/card/v1/TextParagraph.java | 648 -- .../apps/card/v1/TextParagraphOrBuilder.java | 51 - .../java/com/google/apps/card/v1/Widget.java | 6791 ------------ .../google/apps/card/v1/WidgetOrBuilder.java | 1120 -- .../com/google/shopping/type/Channel.java | 588 - .../shopping/type/ChannelOrBuilder.java | 25 - .../google/shopping/type/CustomAttribute.java | 1406 --- .../type/CustomAttributeOrBuilder.java | 160 - .../com/google/shopping/type/Destination.java | 685 -- .../shopping/type/DestinationOrBuilder.java | 25 - .../java/com/google/shopping/type/Price.java | 819 -- .../google/shopping/type/PriceOrBuilder.java | 99 - .../shopping/type/ReportingContext.java | 837 -- .../type/ReportingContextOrBuilder.java | 25 - .../com/google/shopping/type/TypesProto.java | 126 - .../com/google/shopping/type/Channel.java | 588 - .../shopping/type/ChannelOrBuilder.java | 25 - .../google/shopping/type/CustomAttribute.java | 1406 --- .../type/CustomAttributeOrBuilder.java | 160 - .../com/google/shopping/type/Destination.java | 685 -- .../shopping/type/DestinationOrBuilder.java | 25 - .../java/com/google/shopping/type/Price.java | 819 -- .../google/shopping/type/PriceOrBuilder.java | 99 - .../shopping/type/ReportingContext.java | 837 -- .../type/ReportingContextOrBuilder.java | 25 - .../com/google/shopping/type/TypesProto.java | 126 - .../com/google/shopping/type/Channel.java | 588 - .../shopping/type/ChannelOrBuilder.java | 25 - .../google/shopping/type/CustomAttribute.java | 1406 --- .../type/CustomAttributeOrBuilder.java | 160 - .../com/google/shopping/type/Destination.java | 685 -- .../shopping/type/DestinationOrBuilder.java | 25 - .../java/com/google/shopping/type/Price.java | 819 -- .../google/shopping/type/PriceOrBuilder.java | 99 - .../shopping/type/ReportingContext.java | 837 -- .../type/ReportingContextOrBuilder.java | 25 - .../com/google/shopping/type/TypesProto.java | 126 - 76 files changed, 78667 deletions(-) delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Action.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ActionOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/BorderStyle.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/BorderStyleOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Button.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonList.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonListOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Card.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/CardOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/CardProto.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Columns.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ColumnsOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DateTimePicker.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DateTimePickerOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DecoratedText.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DecoratedTextOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Divider.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DividerOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Grid.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/GridOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Icon.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/IconOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Image.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageComponent.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageComponentOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageCropStyle.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageCropStyleOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OnClick.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OnClickOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OpenLink.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OpenLinkOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/SelectionInput.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/SelectionInputOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Suggestions.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/SuggestionsOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/TextInput.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/TextInputOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/TextParagraph.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/TextParagraphOrBuilder.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Widget.java delete mode 100644 java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/WidgetOrBuilder.java delete mode 100644 java-shopping-css/proto-google-shopping-css-v1/src/main/java/com/google/shopping/type/Channel.java delete mode 100644 java-shopping-css/proto-google-shopping-css-v1/src/main/java/com/google/shopping/type/ChannelOrBuilder.java delete mode 100644 java-shopping-css/proto-google-shopping-css-v1/src/main/java/com/google/shopping/type/CustomAttribute.java delete mode 100644 java-shopping-css/proto-google-shopping-css-v1/src/main/java/com/google/shopping/type/CustomAttributeOrBuilder.java delete mode 100644 java-shopping-css/proto-google-shopping-css-v1/src/main/java/com/google/shopping/type/Destination.java delete mode 100644 java-shopping-css/proto-google-shopping-css-v1/src/main/java/com/google/shopping/type/DestinationOrBuilder.java delete mode 100644 java-shopping-css/proto-google-shopping-css-v1/src/main/java/com/google/shopping/type/Price.java delete mode 100644 java-shopping-css/proto-google-shopping-css-v1/src/main/java/com/google/shopping/type/PriceOrBuilder.java delete mode 100644 java-shopping-css/proto-google-shopping-css-v1/src/main/java/com/google/shopping/type/ReportingContext.java delete mode 100644 java-shopping-css/proto-google-shopping-css-v1/src/main/java/com/google/shopping/type/ReportingContextOrBuilder.java delete mode 100644 java-shopping-css/proto-google-shopping-css-v1/src/main/java/com/google/shopping/type/TypesProto.java delete mode 100644 java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Channel.java delete mode 100644 java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ChannelOrBuilder.java delete mode 100644 java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/CustomAttribute.java delete mode 100644 java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/CustomAttributeOrBuilder.java delete mode 100644 java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Destination.java delete mode 100644 java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/DestinationOrBuilder.java delete mode 100644 java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Price.java delete mode 100644 java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/PriceOrBuilder.java delete mode 100644 java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ReportingContext.java delete mode 100644 java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ReportingContextOrBuilder.java delete mode 100644 java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/TypesProto.java delete mode 100644 java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Channel.java delete mode 100644 java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ChannelOrBuilder.java delete mode 100644 java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/CustomAttribute.java delete mode 100644 java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/CustomAttributeOrBuilder.java delete mode 100644 java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Destination.java delete mode 100644 java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/DestinationOrBuilder.java delete mode 100644 java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Price.java delete mode 100644 java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/PriceOrBuilder.java delete mode 100644 java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ReportingContext.java delete mode 100644 java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ReportingContextOrBuilder.java delete mode 100644 java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/TypesProto.java diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Action.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Action.java deleted file mode 100644 index 636adde4c482..000000000000 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Action.java +++ /dev/null @@ -1,2898 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * 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 - * - * https://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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/apps/card/v1/card.proto - -// Protobuf Java Version: 3.25.2 -package com.google.apps.card.v1; - -/** - * - * - *
- * An action that describes the behavior when the form is submitted.
- * For example, you can invoke an Apps Script script to handle the form.
- * If the action is triggered, the form values are sent to the server.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- * 
- * - * Protobuf type {@code google.apps.card.v1.Action} - */ -public final class Action extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.apps.card.v1.Action) - ActionOrBuilder { - private static final long serialVersionUID = 0L; - // Use Action.newBuilder() to construct. - private Action(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Action() { - function_ = ""; - parameters_ = java.util.Collections.emptyList(); - loadIndicator_ = 0; - interaction_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Action(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Action_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Action_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.apps.card.v1.Action.class, com.google.apps.card.v1.Action.Builder.class); - } - - /** - * - * - *
-   * Specifies the loading indicator that the action displays while
-   * making the call to the action.
-   *
-   * [Google Workspace Add-ons and Chat
-   * apps](https://developers.google.com/workspace/extend):
-   * 
- * - * Protobuf enum {@code google.apps.card.v1.Action.LoadIndicator} - */ - public enum LoadIndicator implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Displays a spinner to indicate that content is loading.
-     * 
- * - * SPINNER = 0; - */ - SPINNER(0), - /** - * - * - *
-     * Nothing is displayed.
-     * 
- * - * NONE = 1; - */ - NONE(1), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Displays a spinner to indicate that content is loading.
-     * 
- * - * SPINNER = 0; - */ - public static final int SPINNER_VALUE = 0; - /** - * - * - *
-     * Nothing is displayed.
-     * 
- * - * NONE = 1; - */ - public static final int NONE_VALUE = 1; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LoadIndicator valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static LoadIndicator forNumber(int value) { - switch (value) { - case 0: - return SPINNER; - case 1: - return NONE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public LoadIndicator findValueByNumber(int number) { - return LoadIndicator.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.apps.card.v1.Action.getDescriptor().getEnumTypes().get(0); - } - - private static final LoadIndicator[] VALUES = values(); - - public static LoadIndicator valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private LoadIndicator(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Action.LoadIndicator) - } - - /** - * - * - *
-   * Optional. Required when opening a
-   * [dialog](https://developers.google.com/chat/how-tos/dialogs).
-   *
-   * What to do in response to an interaction with a user, such as a user
-   * clicking a button in a card message.
-   *
-   * If unspecified, the app responds by executing an `action`—like opening a
-   * link or running a function—as normal.
-   *
-   * By specifying an `interaction`, the app can respond in special interactive
-   * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
-   * open a [dialog](https://developers.google.com/chat/how-tos/dialogs).
-   *
-   * When specified, a loading indicator isn't shown. If specified for
-   * an add-on, the entire card is stripped and nothing is shown in the client.
-   *
-   * [Google Chat apps](https://developers.google.com/chat):
-   * 
- * - * Protobuf enum {@code google.apps.card.v1.Action.Interaction} - */ - public enum Interaction implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Default value. The `action` executes as normal.
-     * 
- * - * INTERACTION_UNSPECIFIED = 0; - */ - INTERACTION_UNSPECIFIED(0), - /** - * - * - *
-     * Opens a [dialog](https://developers.google.com/chat/how-tos/dialogs), a
-     * windowed, card-based interface that Chat apps use to interact with users.
-     *
-     * Only supported by Chat apps in response to button-clicks on card
-     * messages. If specified for
-     * an add-on, the entire card is stripped and nothing is shown in the
-     * client.
-     *
-     * [Google Chat apps](https://developers.google.com/chat):
-     * 
- * - * OPEN_DIALOG = 1; - */ - OPEN_DIALOG(1), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Default value. The `action` executes as normal.
-     * 
- * - * INTERACTION_UNSPECIFIED = 0; - */ - public static final int INTERACTION_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Opens a [dialog](https://developers.google.com/chat/how-tos/dialogs), a
-     * windowed, card-based interface that Chat apps use to interact with users.
-     *
-     * Only supported by Chat apps in response to button-clicks on card
-     * messages. If specified for
-     * an add-on, the entire card is stripped and nothing is shown in the
-     * client.
-     *
-     * [Google Chat apps](https://developers.google.com/chat):
-     * 
- * - * OPEN_DIALOG = 1; - */ - public static final int OPEN_DIALOG_VALUE = 1; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Interaction valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Interaction forNumber(int value) { - switch (value) { - case 0: - return INTERACTION_UNSPECIFIED; - case 1: - return OPEN_DIALOG; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Interaction findValueByNumber(int number) { - return Interaction.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.apps.card.v1.Action.getDescriptor().getEnumTypes().get(1); - } - - private static final Interaction[] VALUES = values(); - - public static Interaction valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Interaction(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Action.Interaction) - } - - public interface ActionParameterOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Action.ActionParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The name of the parameter for the action script.
-     * 
- * - * string key = 1; - * - * @return The key. - */ - java.lang.String getKey(); - /** - * - * - *
-     * The name of the parameter for the action script.
-     * 
- * - * string key = 1; - * - * @return The bytes for key. - */ - com.google.protobuf.ByteString getKeyBytes(); - - /** - * - * - *
-     * The value of the parameter.
-     * 
- * - * string value = 2; - * - * @return The value. - */ - java.lang.String getValue(); - /** - * - * - *
-     * The value of the parameter.
-     * 
- * - * string value = 2; - * - * @return The bytes for value. - */ - com.google.protobuf.ByteString getValueBytes(); - } - /** - * - * - *
-   * List of string parameters to supply when the action method is invoked.
-   * For example, consider three snooze buttons: snooze now, snooze one day,
-   * or snooze next week. You might use `action method = snooze()`, passing the
-   * snooze type and snooze time in the list of string parameters.
-   *
-   * To learn more, see
-   * [`CommonEventObject`](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
-   *
-   * [Google Workspace Add-ons and Chat
-   * apps](https://developers.google.com/workspace/extend):
-   * 
- * - * Protobuf type {@code google.apps.card.v1.Action.ActionParameter} - */ - public static final class ActionParameter extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.apps.card.v1.Action.ActionParameter) - ActionParameterOrBuilder { - private static final long serialVersionUID = 0L; - // Use ActionParameter.newBuilder() to construct. - private ActionParameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ActionParameter() { - key_ = ""; - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ActionParameter(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Action_ActionParameter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Action_ActionParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.apps.card.v1.Action.ActionParameter.class, - com.google.apps.card.v1.Action.ActionParameter.Builder.class); - } - - public static final int KEY_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object key_ = ""; - /** - * - * - *
-     * The name of the parameter for the action script.
-     * 
- * - * string key = 1; - * - * @return The key. - */ - @java.lang.Override - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } - } - /** - * - * - *
-     * The name of the parameter for the action script.
-     * 
- * - * string key = 1; - * - * @return The bytes for key. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object value_ = ""; - /** - * - * - *
-     * The value of the parameter.
-     * 
- * - * string value = 2; - * - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - * - * - *
-     * The value of the parameter.
-     * 
- * - * string value = 2; - * - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.apps.card.v1.Action.ActionParameter)) { - return super.equals(obj); - } - com.google.apps.card.v1.Action.ActionParameter other = - (com.google.apps.card.v1.Action.ActionParameter) obj; - - if (!getKey().equals(other.getKey())) return false; - if (!getValue().equals(other.getValue())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KEY_FIELD_NUMBER; - hash = (53 * hash) + getKey().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.apps.card.v1.Action.ActionParameter parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.Action.ActionParameter parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.Action.ActionParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.Action.ActionParameter parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.Action.ActionParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.Action.ActionParameter parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.Action.ActionParameter parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.Action.ActionParameter parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.apps.card.v1.Action.ActionParameter parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.Action.ActionParameter parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.apps.card.v1.Action.ActionParameter parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.Action.ActionParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.apps.card.v1.Action.ActionParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * List of string parameters to supply when the action method is invoked.
-     * For example, consider three snooze buttons: snooze now, snooze one day,
-     * or snooze next week. You might use `action method = snooze()`, passing the
-     * snooze type and snooze time in the list of string parameters.
-     *
-     * To learn more, see
-     * [`CommonEventObject`](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
-     *
-     * [Google Workspace Add-ons and Chat
-     * apps](https://developers.google.com/workspace/extend):
-     * 
- * - * Protobuf type {@code google.apps.card.v1.Action.ActionParameter} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Action.ActionParameter) - com.google.apps.card.v1.Action.ActionParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Action_ActionParameter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Action_ActionParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.apps.card.v1.Action.ActionParameter.class, - com.google.apps.card.v1.Action.ActionParameter.Builder.class); - } - - // Construct using com.google.apps.card.v1.Action.ActionParameter.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - key_ = ""; - value_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Action_ActionParameter_descriptor; - } - - @java.lang.Override - public com.google.apps.card.v1.Action.ActionParameter getDefaultInstanceForType() { - return com.google.apps.card.v1.Action.ActionParameter.getDefaultInstance(); - } - - @java.lang.Override - public com.google.apps.card.v1.Action.ActionParameter build() { - com.google.apps.card.v1.Action.ActionParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.apps.card.v1.Action.ActionParameter buildPartial() { - com.google.apps.card.v1.Action.ActionParameter result = - new com.google.apps.card.v1.Action.ActionParameter(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.apps.card.v1.Action.ActionParameter result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.key_ = key_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.value_ = value_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.apps.card.v1.Action.ActionParameter) { - return mergeFrom((com.google.apps.card.v1.Action.ActionParameter) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.apps.card.v1.Action.ActionParameter other) { - if (other == com.google.apps.card.v1.Action.ActionParameter.getDefaultInstance()) - return this; - if (!other.getKey().isEmpty()) { - key_ = other.key_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - key_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - value_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object key_ = ""; - /** - * - * - *
-       * The name of the parameter for the action script.
-       * 
- * - * string key = 1; - * - * @return The key. - */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The name of the parameter for the action script.
-       * 
- * - * string key = 1; - * - * @return The bytes for key. - */ - public com.google.protobuf.ByteString getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The name of the parameter for the action script.
-       * 
- * - * string key = 1; - * - * @param value The key to set. - * @return This builder for chaining. - */ - public Builder setKey(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - key_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-       * The name of the parameter for the action script.
-       * 
- * - * string key = 1; - * - * @return This builder for chaining. - */ - public Builder clearKey() { - key_ = getDefaultInstance().getKey(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-       * The name of the parameter for the action script.
-       * 
- * - * string key = 1; - * - * @param value The bytes for key to set. - * @return This builder for chaining. - */ - public Builder setKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - key_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - * - * - *
-       * The value of the parameter.
-       * 
- * - * string value = 2; - * - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The value of the parameter.
-       * 
- * - * string value = 2; - * - * @return The bytes for value. - */ - public com.google.protobuf.ByteString getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The value of the parameter.
-       * 
- * - * string value = 2; - * - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * The value of the parameter.
-       * 
- * - * string value = 2; - * - * @return This builder for chaining. - */ - public Builder clearValue() { - value_ = getDefaultInstance().getValue(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-       * The value of the parameter.
-       * 
- * - * string value = 2; - * - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - value_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.apps.card.v1.Action.ActionParameter) - } - - // @@protoc_insertion_point(class_scope:google.apps.card.v1.Action.ActionParameter) - private static final com.google.apps.card.v1.Action.ActionParameter DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.apps.card.v1.Action.ActionParameter(); - } - - public static com.google.apps.card.v1.Action.ActionParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ActionParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.apps.card.v1.Action.ActionParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int FUNCTION_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object function_ = ""; - /** - * - * - *
-   * A custom function to invoke when the containing element is
-   * clicked or othrwise activated.
-   *
-   * For example usage, see [Create interactive
-   * cards](https://developers.google.com/chat/how-tos/cards-onclick).
-   * 
- * - * string function = 1; - * - * @return The function. - */ - @java.lang.Override - public java.lang.String getFunction() { - java.lang.Object ref = function_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - function_ = s; - return s; - } - } - /** - * - * - *
-   * A custom function to invoke when the containing element is
-   * clicked or othrwise activated.
-   *
-   * For example usage, see [Create interactive
-   * cards](https://developers.google.com/chat/how-tos/cards-onclick).
-   * 
- * - * string function = 1; - * - * @return The bytes for function. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFunctionBytes() { - java.lang.Object ref = function_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - function_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARAMETERS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List parameters_; - /** - * - * - *
-   * List of action parameters.
-   * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - @java.lang.Override - public java.util.List getParametersList() { - return parameters_; - } - /** - * - * - *
-   * List of action parameters.
-   * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - @java.lang.Override - public java.util.List - getParametersOrBuilderList() { - return parameters_; - } - /** - * - * - *
-   * List of action parameters.
-   * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - @java.lang.Override - public int getParametersCount() { - return parameters_.size(); - } - /** - * - * - *
-   * List of action parameters.
-   * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - @java.lang.Override - public com.google.apps.card.v1.Action.ActionParameter getParameters(int index) { - return parameters_.get(index); - } - /** - * - * - *
-   * List of action parameters.
-   * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - @java.lang.Override - public com.google.apps.card.v1.Action.ActionParameterOrBuilder getParametersOrBuilder(int index) { - return parameters_.get(index); - } - - public static final int LOAD_INDICATOR_FIELD_NUMBER = 3; - private int loadIndicator_ = 0; - /** - * - * - *
-   * Specifies the loading indicator that the action displays while
-   * making the call to the action.
-   * 
- * - * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - * - * @return The enum numeric value on the wire for loadIndicator. - */ - @java.lang.Override - public int getLoadIndicatorValue() { - return loadIndicator_; - } - /** - * - * - *
-   * Specifies the loading indicator that the action displays while
-   * making the call to the action.
-   * 
- * - * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - * - * @return The loadIndicator. - */ - @java.lang.Override - public com.google.apps.card.v1.Action.LoadIndicator getLoadIndicator() { - com.google.apps.card.v1.Action.LoadIndicator result = - com.google.apps.card.v1.Action.LoadIndicator.forNumber(loadIndicator_); - return result == null ? com.google.apps.card.v1.Action.LoadIndicator.UNRECOGNIZED : result; - } - - public static final int PERSIST_VALUES_FIELD_NUMBER = 4; - private boolean persistValues_ = false; - /** - * - * - *
-   * Indicates whether form values persist after the action. The default value
-   * is `false`.
-   *
-   * If `true`, form values remain after the action is triggered. To let the
-   * user make changes while the action is being processed, set
-   * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
-   * to `NONE`. For [card
-   * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create)
-   * in Chat apps, you must also set the action's
-   * [`ResponseType`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#responsetype)
-   * to `UPDATE_MESSAGE` and use the same
-   * [`card_id`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#CardWithId)
-   * from the card that contained the action.
-   *
-   * If `false`, the form values are cleared when the action is triggered.
-   * To prevent the user from making changes while the action is being
-   * processed, set
-   * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
-   * to `SPINNER`.
-   * 
- * - * bool persist_values = 4; - * - * @return The persistValues. - */ - @java.lang.Override - public boolean getPersistValues() { - return persistValues_; - } - - public static final int INTERACTION_FIELD_NUMBER = 5; - private int interaction_ = 0; - /** - * - * - *
-   * Optional. Required when opening a
-   * [dialog](https://developers.google.com/chat/how-tos/dialogs).
-   *
-   * What to do in response to an interaction with a user, such as a user
-   * clicking a button in a card message.
-   *
-   * If unspecified, the app responds by executing an `action`—like opening a
-   * link or running a function—as normal.
-   *
-   * By specifying an `interaction`, the app can respond in special interactive
-   * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
-   * open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When
-   * specified, a loading indicator isn't shown. If specified for
-   * an add-on, the entire card is stripped and nothing is shown in the client.
-   *
-   * [Google Chat apps](https://developers.google.com/chat):
-   * 
- * - * .google.apps.card.v1.Action.Interaction interaction = 5; - * - * @return The enum numeric value on the wire for interaction. - */ - @java.lang.Override - public int getInteractionValue() { - return interaction_; - } - /** - * - * - *
-   * Optional. Required when opening a
-   * [dialog](https://developers.google.com/chat/how-tos/dialogs).
-   *
-   * What to do in response to an interaction with a user, such as a user
-   * clicking a button in a card message.
-   *
-   * If unspecified, the app responds by executing an `action`—like opening a
-   * link or running a function—as normal.
-   *
-   * By specifying an `interaction`, the app can respond in special interactive
-   * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
-   * open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When
-   * specified, a loading indicator isn't shown. If specified for
-   * an add-on, the entire card is stripped and nothing is shown in the client.
-   *
-   * [Google Chat apps](https://developers.google.com/chat):
-   * 
- * - * .google.apps.card.v1.Action.Interaction interaction = 5; - * - * @return The interaction. - */ - @java.lang.Override - public com.google.apps.card.v1.Action.Interaction getInteraction() { - com.google.apps.card.v1.Action.Interaction result = - com.google.apps.card.v1.Action.Interaction.forNumber(interaction_); - return result == null ? com.google.apps.card.v1.Action.Interaction.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(function_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, function_); - } - for (int i = 0; i < parameters_.size(); i++) { - output.writeMessage(2, parameters_.get(i)); - } - if (loadIndicator_ != com.google.apps.card.v1.Action.LoadIndicator.SPINNER.getNumber()) { - output.writeEnum(3, loadIndicator_); - } - if (persistValues_ != false) { - output.writeBool(4, persistValues_); - } - if (interaction_ - != com.google.apps.card.v1.Action.Interaction.INTERACTION_UNSPECIFIED.getNumber()) { - output.writeEnum(5, interaction_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(function_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, function_); - } - for (int i = 0; i < parameters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, parameters_.get(i)); - } - if (loadIndicator_ != com.google.apps.card.v1.Action.LoadIndicator.SPINNER.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, loadIndicator_); - } - if (persistValues_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, persistValues_); - } - if (interaction_ - != com.google.apps.card.v1.Action.Interaction.INTERACTION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, interaction_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.apps.card.v1.Action)) { - return super.equals(obj); - } - com.google.apps.card.v1.Action other = (com.google.apps.card.v1.Action) obj; - - if (!getFunction().equals(other.getFunction())) return false; - if (!getParametersList().equals(other.getParametersList())) return false; - if (loadIndicator_ != other.loadIndicator_) return false; - if (getPersistValues() != other.getPersistValues()) return false; - if (interaction_ != other.interaction_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FUNCTION_FIELD_NUMBER; - hash = (53 * hash) + getFunction().hashCode(); - if (getParametersCount() > 0) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParametersList().hashCode(); - } - hash = (37 * hash) + LOAD_INDICATOR_FIELD_NUMBER; - hash = (53 * hash) + loadIndicator_; - hash = (37 * hash) + PERSIST_VALUES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPersistValues()); - hash = (37 * hash) + INTERACTION_FIELD_NUMBER; - hash = (53 * hash) + interaction_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.apps.card.v1.Action parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.Action parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.Action parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.Action parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.Action parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.Action parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.Action parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.Action parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.apps.card.v1.Action parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.Action parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.apps.card.v1.Action parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.Action parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.apps.card.v1.Action prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * An action that describes the behavior when the form is submitted.
-   * For example, you can invoke an Apps Script script to handle the form.
-   * If the action is triggered, the form values are sent to the server.
-   *
-   * [Google Workspace Add-ons and Chat
-   * apps](https://developers.google.com/workspace/extend):
-   * 
- * - * Protobuf type {@code google.apps.card.v1.Action} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Action) - com.google.apps.card.v1.ActionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Action_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Action_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.apps.card.v1.Action.class, com.google.apps.card.v1.Action.Builder.class); - } - - // Construct using com.google.apps.card.v1.Action.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - function_ = ""; - if (parametersBuilder_ == null) { - parameters_ = java.util.Collections.emptyList(); - } else { - parameters_ = null; - parametersBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - loadIndicator_ = 0; - persistValues_ = false; - interaction_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Action_descriptor; - } - - @java.lang.Override - public com.google.apps.card.v1.Action getDefaultInstanceForType() { - return com.google.apps.card.v1.Action.getDefaultInstance(); - } - - @java.lang.Override - public com.google.apps.card.v1.Action build() { - com.google.apps.card.v1.Action result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.apps.card.v1.Action buildPartial() { - com.google.apps.card.v1.Action result = new com.google.apps.card.v1.Action(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.apps.card.v1.Action result) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - parameters_ = java.util.Collections.unmodifiableList(parameters_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.parameters_ = parameters_; - } else { - result.parameters_ = parametersBuilder_.build(); - } - } - - private void buildPartial0(com.google.apps.card.v1.Action result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.function_ = function_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.loadIndicator_ = loadIndicator_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.persistValues_ = persistValues_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.interaction_ = interaction_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.apps.card.v1.Action) { - return mergeFrom((com.google.apps.card.v1.Action) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.apps.card.v1.Action other) { - if (other == com.google.apps.card.v1.Action.getDefaultInstance()) return this; - if (!other.getFunction().isEmpty()) { - function_ = other.function_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (parametersBuilder_ == null) { - if (!other.parameters_.isEmpty()) { - if (parameters_.isEmpty()) { - parameters_ = other.parameters_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureParametersIsMutable(); - parameters_.addAll(other.parameters_); - } - onChanged(); - } - } else { - if (!other.parameters_.isEmpty()) { - if (parametersBuilder_.isEmpty()) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - parameters_ = other.parameters_; - bitField0_ = (bitField0_ & ~0x00000002); - parametersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getParametersFieldBuilder() - : null; - } else { - parametersBuilder_.addAllMessages(other.parameters_); - } - } - } - if (other.loadIndicator_ != 0) { - setLoadIndicatorValue(other.getLoadIndicatorValue()); - } - if (other.getPersistValues() != false) { - setPersistValues(other.getPersistValues()); - } - if (other.interaction_ != 0) { - setInteractionValue(other.getInteractionValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - function_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.apps.card.v1.Action.ActionParameter m = - input.readMessage( - com.google.apps.card.v1.Action.ActionParameter.parser(), extensionRegistry); - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.add(m); - } else { - parametersBuilder_.addMessage(m); - } - break; - } // case 18 - case 24: - { - loadIndicator_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 32: - { - persistValues_ = input.readBool(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 40: - { - interaction_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object function_ = ""; - /** - * - * - *
-     * A custom function to invoke when the containing element is
-     * clicked or othrwise activated.
-     *
-     * For example usage, see [Create interactive
-     * cards](https://developers.google.com/chat/how-tos/cards-onclick).
-     * 
- * - * string function = 1; - * - * @return The function. - */ - public java.lang.String getFunction() { - java.lang.Object ref = function_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - function_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A custom function to invoke when the containing element is
-     * clicked or othrwise activated.
-     *
-     * For example usage, see [Create interactive
-     * cards](https://developers.google.com/chat/how-tos/cards-onclick).
-     * 
- * - * string function = 1; - * - * @return The bytes for function. - */ - public com.google.protobuf.ByteString getFunctionBytes() { - java.lang.Object ref = function_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - function_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A custom function to invoke when the containing element is
-     * clicked or othrwise activated.
-     *
-     * For example usage, see [Create interactive
-     * cards](https://developers.google.com/chat/how-tos/cards-onclick).
-     * 
- * - * string function = 1; - * - * @param value The function to set. - * @return This builder for chaining. - */ - public Builder setFunction(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - function_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * A custom function to invoke when the containing element is
-     * clicked or othrwise activated.
-     *
-     * For example usage, see [Create interactive
-     * cards](https://developers.google.com/chat/how-tos/cards-onclick).
-     * 
- * - * string function = 1; - * - * @return This builder for chaining. - */ - public Builder clearFunction() { - function_ = getDefaultInstance().getFunction(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * A custom function to invoke when the containing element is
-     * clicked or othrwise activated.
-     *
-     * For example usage, see [Create interactive
-     * cards](https://developers.google.com/chat/how-tos/cards-onclick).
-     * 
- * - * string function = 1; - * - * @param value The bytes for function to set. - * @return This builder for chaining. - */ - public Builder setFunctionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - function_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List parameters_ = - java.util.Collections.emptyList(); - - private void ensureParametersIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - parameters_ = - new java.util.ArrayList(parameters_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.apps.card.v1.Action.ActionParameter, - com.google.apps.card.v1.Action.ActionParameter.Builder, - com.google.apps.card.v1.Action.ActionParameterOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public java.util.List getParametersList() { - if (parametersBuilder_ == null) { - return java.util.Collections.unmodifiableList(parameters_); - } else { - return parametersBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public int getParametersCount() { - if (parametersBuilder_ == null) { - return parameters_.size(); - } else { - return parametersBuilder_.getCount(); - } - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public com.google.apps.card.v1.Action.ActionParameter getParameters(int index) { - if (parametersBuilder_ == null) { - return parameters_.get(index); - } else { - return parametersBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public Builder setParameters(int index, com.google.apps.card.v1.Action.ActionParameter value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParametersIsMutable(); - parameters_.set(index, value); - onChanged(); - } else { - parametersBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public Builder setParameters( - int index, com.google.apps.card.v1.Action.ActionParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.set(index, builderForValue.build()); - onChanged(); - } else { - parametersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public Builder addParameters(com.google.apps.card.v1.Action.ActionParameter value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParametersIsMutable(); - parameters_.add(value); - onChanged(); - } else { - parametersBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public Builder addParameters(int index, com.google.apps.card.v1.Action.ActionParameter value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParametersIsMutable(); - parameters_.add(index, value); - onChanged(); - } else { - parametersBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public Builder addParameters( - com.google.apps.card.v1.Action.ActionParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.add(builderForValue.build()); - onChanged(); - } else { - parametersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public Builder addParameters( - int index, com.google.apps.card.v1.Action.ActionParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.add(index, builderForValue.build()); - onChanged(); - } else { - parametersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public Builder addAllParameters( - java.lang.Iterable values) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); - onChanged(); - } else { - parametersBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public Builder clearParameters() { - if (parametersBuilder_ == null) { - parameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - parametersBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public Builder removeParameters(int index) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.remove(index); - onChanged(); - } else { - parametersBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public com.google.apps.card.v1.Action.ActionParameter.Builder getParametersBuilder(int index) { - return getParametersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public com.google.apps.card.v1.Action.ActionParameterOrBuilder getParametersOrBuilder( - int index) { - if (parametersBuilder_ == null) { - return parameters_.get(index); - } else { - return parametersBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public java.util.List - getParametersOrBuilderList() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(parameters_); - } - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public com.google.apps.card.v1.Action.ActionParameter.Builder addParametersBuilder() { - return getParametersFieldBuilder() - .addBuilder(com.google.apps.card.v1.Action.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public com.google.apps.card.v1.Action.ActionParameter.Builder addParametersBuilder(int index) { - return getParametersFieldBuilder() - .addBuilder(index, com.google.apps.card.v1.Action.ActionParameter.getDefaultInstance()); - } - /** - * - * - *
-     * List of action parameters.
-     * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - public java.util.List - getParametersBuilderList() { - return getParametersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.apps.card.v1.Action.ActionParameter, - com.google.apps.card.v1.Action.ActionParameter.Builder, - com.google.apps.card.v1.Action.ActionParameterOrBuilder> - getParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.apps.card.v1.Action.ActionParameter, - com.google.apps.card.v1.Action.ActionParameter.Builder, - com.google.apps.card.v1.Action.ActionParameterOrBuilder>( - parameters_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - private int loadIndicator_ = 0; - /** - * - * - *
-     * Specifies the loading indicator that the action displays while
-     * making the call to the action.
-     * 
- * - * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - * - * @return The enum numeric value on the wire for loadIndicator. - */ - @java.lang.Override - public int getLoadIndicatorValue() { - return loadIndicator_; - } - /** - * - * - *
-     * Specifies the loading indicator that the action displays while
-     * making the call to the action.
-     * 
- * - * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - * - * @param value The enum numeric value on the wire for loadIndicator to set. - * @return This builder for chaining. - */ - public Builder setLoadIndicatorValue(int value) { - loadIndicator_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the loading indicator that the action displays while
-     * making the call to the action.
-     * 
- * - * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - * - * @return The loadIndicator. - */ - @java.lang.Override - public com.google.apps.card.v1.Action.LoadIndicator getLoadIndicator() { - com.google.apps.card.v1.Action.LoadIndicator result = - com.google.apps.card.v1.Action.LoadIndicator.forNumber(loadIndicator_); - return result == null ? com.google.apps.card.v1.Action.LoadIndicator.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Specifies the loading indicator that the action displays while
-     * making the call to the action.
-     * 
- * - * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - * - * @param value The loadIndicator to set. - * @return This builder for chaining. - */ - public Builder setLoadIndicator(com.google.apps.card.v1.Action.LoadIndicator value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - loadIndicator_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Specifies the loading indicator that the action displays while
-     * making the call to the action.
-     * 
- * - * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - * - * @return This builder for chaining. - */ - public Builder clearLoadIndicator() { - bitField0_ = (bitField0_ & ~0x00000004); - loadIndicator_ = 0; - onChanged(); - return this; - } - - private boolean persistValues_; - /** - * - * - *
-     * Indicates whether form values persist after the action. The default value
-     * is `false`.
-     *
-     * If `true`, form values remain after the action is triggered. To let the
-     * user make changes while the action is being processed, set
-     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
-     * to `NONE`. For [card
-     * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create)
-     * in Chat apps, you must also set the action's
-     * [`ResponseType`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#responsetype)
-     * to `UPDATE_MESSAGE` and use the same
-     * [`card_id`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#CardWithId)
-     * from the card that contained the action.
-     *
-     * If `false`, the form values are cleared when the action is triggered.
-     * To prevent the user from making changes while the action is being
-     * processed, set
-     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
-     * to `SPINNER`.
-     * 
- * - * bool persist_values = 4; - * - * @return The persistValues. - */ - @java.lang.Override - public boolean getPersistValues() { - return persistValues_; - } - /** - * - * - *
-     * Indicates whether form values persist after the action. The default value
-     * is `false`.
-     *
-     * If `true`, form values remain after the action is triggered. To let the
-     * user make changes while the action is being processed, set
-     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
-     * to `NONE`. For [card
-     * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create)
-     * in Chat apps, you must also set the action's
-     * [`ResponseType`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#responsetype)
-     * to `UPDATE_MESSAGE` and use the same
-     * [`card_id`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#CardWithId)
-     * from the card that contained the action.
-     *
-     * If `false`, the form values are cleared when the action is triggered.
-     * To prevent the user from making changes while the action is being
-     * processed, set
-     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
-     * to `SPINNER`.
-     * 
- * - * bool persist_values = 4; - * - * @param value The persistValues to set. - * @return This builder for chaining. - */ - public Builder setPersistValues(boolean value) { - - persistValues_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Indicates whether form values persist after the action. The default value
-     * is `false`.
-     *
-     * If `true`, form values remain after the action is triggered. To let the
-     * user make changes while the action is being processed, set
-     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
-     * to `NONE`. For [card
-     * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create)
-     * in Chat apps, you must also set the action's
-     * [`ResponseType`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#responsetype)
-     * to `UPDATE_MESSAGE` and use the same
-     * [`card_id`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#CardWithId)
-     * from the card that contained the action.
-     *
-     * If `false`, the form values are cleared when the action is triggered.
-     * To prevent the user from making changes while the action is being
-     * processed, set
-     * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
-     * to `SPINNER`.
-     * 
- * - * bool persist_values = 4; - * - * @return This builder for chaining. - */ - public Builder clearPersistValues() { - bitField0_ = (bitField0_ & ~0x00000008); - persistValues_ = false; - onChanged(); - return this; - } - - private int interaction_ = 0; - /** - * - * - *
-     * Optional. Required when opening a
-     * [dialog](https://developers.google.com/chat/how-tos/dialogs).
-     *
-     * What to do in response to an interaction with a user, such as a user
-     * clicking a button in a card message.
-     *
-     * If unspecified, the app responds by executing an `action`—like opening a
-     * link or running a function—as normal.
-     *
-     * By specifying an `interaction`, the app can respond in special interactive
-     * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
-     * open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When
-     * specified, a loading indicator isn't shown. If specified for
-     * an add-on, the entire card is stripped and nothing is shown in the client.
-     *
-     * [Google Chat apps](https://developers.google.com/chat):
-     * 
- * - * .google.apps.card.v1.Action.Interaction interaction = 5; - * - * @return The enum numeric value on the wire for interaction. - */ - @java.lang.Override - public int getInteractionValue() { - return interaction_; - } - /** - * - * - *
-     * Optional. Required when opening a
-     * [dialog](https://developers.google.com/chat/how-tos/dialogs).
-     *
-     * What to do in response to an interaction with a user, such as a user
-     * clicking a button in a card message.
-     *
-     * If unspecified, the app responds by executing an `action`—like opening a
-     * link or running a function—as normal.
-     *
-     * By specifying an `interaction`, the app can respond in special interactive
-     * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
-     * open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When
-     * specified, a loading indicator isn't shown. If specified for
-     * an add-on, the entire card is stripped and nothing is shown in the client.
-     *
-     * [Google Chat apps](https://developers.google.com/chat):
-     * 
- * - * .google.apps.card.v1.Action.Interaction interaction = 5; - * - * @param value The enum numeric value on the wire for interaction to set. - * @return This builder for chaining. - */ - public Builder setInteractionValue(int value) { - interaction_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Required when opening a
-     * [dialog](https://developers.google.com/chat/how-tos/dialogs).
-     *
-     * What to do in response to an interaction with a user, such as a user
-     * clicking a button in a card message.
-     *
-     * If unspecified, the app responds by executing an `action`—like opening a
-     * link or running a function—as normal.
-     *
-     * By specifying an `interaction`, the app can respond in special interactive
-     * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
-     * open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When
-     * specified, a loading indicator isn't shown. If specified for
-     * an add-on, the entire card is stripped and nothing is shown in the client.
-     *
-     * [Google Chat apps](https://developers.google.com/chat):
-     * 
- * - * .google.apps.card.v1.Action.Interaction interaction = 5; - * - * @return The interaction. - */ - @java.lang.Override - public com.google.apps.card.v1.Action.Interaction getInteraction() { - com.google.apps.card.v1.Action.Interaction result = - com.google.apps.card.v1.Action.Interaction.forNumber(interaction_); - return result == null ? com.google.apps.card.v1.Action.Interaction.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Optional. Required when opening a
-     * [dialog](https://developers.google.com/chat/how-tos/dialogs).
-     *
-     * What to do in response to an interaction with a user, such as a user
-     * clicking a button in a card message.
-     *
-     * If unspecified, the app responds by executing an `action`—like opening a
-     * link or running a function—as normal.
-     *
-     * By specifying an `interaction`, the app can respond in special interactive
-     * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
-     * open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When
-     * specified, a loading indicator isn't shown. If specified for
-     * an add-on, the entire card is stripped and nothing is shown in the client.
-     *
-     * [Google Chat apps](https://developers.google.com/chat):
-     * 
- * - * .google.apps.card.v1.Action.Interaction interaction = 5; - * - * @param value The interaction to set. - * @return This builder for chaining. - */ - public Builder setInteraction(com.google.apps.card.v1.Action.Interaction value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - interaction_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Required when opening a
-     * [dialog](https://developers.google.com/chat/how-tos/dialogs).
-     *
-     * What to do in response to an interaction with a user, such as a user
-     * clicking a button in a card message.
-     *
-     * If unspecified, the app responds by executing an `action`—like opening a
-     * link or running a function—as normal.
-     *
-     * By specifying an `interaction`, the app can respond in special interactive
-     * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
-     * open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When
-     * specified, a loading indicator isn't shown. If specified for
-     * an add-on, the entire card is stripped and nothing is shown in the client.
-     *
-     * [Google Chat apps](https://developers.google.com/chat):
-     * 
- * - * .google.apps.card.v1.Action.Interaction interaction = 5; - * - * @return This builder for chaining. - */ - public Builder clearInteraction() { - bitField0_ = (bitField0_ & ~0x00000010); - interaction_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.apps.card.v1.Action) - } - - // @@protoc_insertion_point(class_scope:google.apps.card.v1.Action) - private static final com.google.apps.card.v1.Action DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.apps.card.v1.Action(); - } - - public static com.google.apps.card.v1.Action getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Action parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.apps.card.v1.Action getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ActionOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ActionOrBuilder.java deleted file mode 100644 index 1358940129e9..000000000000 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ActionOrBuilder.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * 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 - * - * https://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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/apps/card/v1/card.proto - -// Protobuf Java Version: 3.25.2 -package com.google.apps.card.v1; - -public interface ActionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Action) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A custom function to invoke when the containing element is
-   * clicked or othrwise activated.
-   *
-   * For example usage, see [Create interactive
-   * cards](https://developers.google.com/chat/how-tos/cards-onclick).
-   * 
- * - * string function = 1; - * - * @return The function. - */ - java.lang.String getFunction(); - /** - * - * - *
-   * A custom function to invoke when the containing element is
-   * clicked or othrwise activated.
-   *
-   * For example usage, see [Create interactive
-   * cards](https://developers.google.com/chat/how-tos/cards-onclick).
-   * 
- * - * string function = 1; - * - * @return The bytes for function. - */ - com.google.protobuf.ByteString getFunctionBytes(); - - /** - * - * - *
-   * List of action parameters.
-   * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - java.util.List getParametersList(); - /** - * - * - *
-   * List of action parameters.
-   * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - com.google.apps.card.v1.Action.ActionParameter getParameters(int index); - /** - * - * - *
-   * List of action parameters.
-   * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - int getParametersCount(); - /** - * - * - *
-   * List of action parameters.
-   * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - java.util.List - getParametersOrBuilderList(); - /** - * - * - *
-   * List of action parameters.
-   * 
- * - * repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - com.google.apps.card.v1.Action.ActionParameterOrBuilder getParametersOrBuilder(int index); - - /** - * - * - *
-   * Specifies the loading indicator that the action displays while
-   * making the call to the action.
-   * 
- * - * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - * - * @return The enum numeric value on the wire for loadIndicator. - */ - int getLoadIndicatorValue(); - /** - * - * - *
-   * Specifies the loading indicator that the action displays while
-   * making the call to the action.
-   * 
- * - * .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - * - * @return The loadIndicator. - */ - com.google.apps.card.v1.Action.LoadIndicator getLoadIndicator(); - - /** - * - * - *
-   * Indicates whether form values persist after the action. The default value
-   * is `false`.
-   *
-   * If `true`, form values remain after the action is triggered. To let the
-   * user make changes while the action is being processed, set
-   * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
-   * to `NONE`. For [card
-   * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create)
-   * in Chat apps, you must also set the action's
-   * [`ResponseType`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#responsetype)
-   * to `UPDATE_MESSAGE` and use the same
-   * [`card_id`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#CardWithId)
-   * from the card that contained the action.
-   *
-   * If `false`, the form values are cleared when the action is triggered.
-   * To prevent the user from making changes while the action is being
-   * processed, set
-   * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
-   * to `SPINNER`.
-   * 
- * - * bool persist_values = 4; - * - * @return The persistValues. - */ - boolean getPersistValues(); - - /** - * - * - *
-   * Optional. Required when opening a
-   * [dialog](https://developers.google.com/chat/how-tos/dialogs).
-   *
-   * What to do in response to an interaction with a user, such as a user
-   * clicking a button in a card message.
-   *
-   * If unspecified, the app responds by executing an `action`—like opening a
-   * link or running a function—as normal.
-   *
-   * By specifying an `interaction`, the app can respond in special interactive
-   * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
-   * open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When
-   * specified, a loading indicator isn't shown. If specified for
-   * an add-on, the entire card is stripped and nothing is shown in the client.
-   *
-   * [Google Chat apps](https://developers.google.com/chat):
-   * 
- * - * .google.apps.card.v1.Action.Interaction interaction = 5; - * - * @return The enum numeric value on the wire for interaction. - */ - int getInteractionValue(); - /** - * - * - *
-   * Optional. Required when opening a
-   * [dialog](https://developers.google.com/chat/how-tos/dialogs).
-   *
-   * What to do in response to an interaction with a user, such as a user
-   * clicking a button in a card message.
-   *
-   * If unspecified, the app responds by executing an `action`—like opening a
-   * link or running a function—as normal.
-   *
-   * By specifying an `interaction`, the app can respond in special interactive
-   * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
-   * open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When
-   * specified, a loading indicator isn't shown. If specified for
-   * an add-on, the entire card is stripped and nothing is shown in the client.
-   *
-   * [Google Chat apps](https://developers.google.com/chat):
-   * 
- * - * .google.apps.card.v1.Action.Interaction interaction = 5; - * - * @return The interaction. - */ - com.google.apps.card.v1.Action.Interaction getInteraction(); -} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/BorderStyle.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/BorderStyle.java deleted file mode 100644 index 91a97a9842c5..000000000000 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/BorderStyle.java +++ /dev/null @@ -1,1118 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * 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 - * - * https://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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/apps/card/v1/card.proto - -// Protobuf Java Version: 3.25.2 -package com.google.apps.card.v1; - -/** - * - * - *
- * The style options for the border of a card or widget, including the border
- * type and color.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- * 
- * - * Protobuf type {@code google.apps.card.v1.BorderStyle} - */ -public final class BorderStyle extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.apps.card.v1.BorderStyle) - BorderStyleOrBuilder { - private static final long serialVersionUID = 0L; - // Use BorderStyle.newBuilder() to construct. - private BorderStyle(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BorderStyle() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BorderStyle(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_BorderStyle_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_BorderStyle_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.apps.card.v1.BorderStyle.class, - com.google.apps.card.v1.BorderStyle.Builder.class); - } - - /** - * - * - *
-   * Represents the border types applied to widgets.
-   *
-   * [Google Workspace Add-ons
-   * and Chat apps](https://developers.google.com/workspace/extend):
-   * 
- * - * Protobuf enum {@code google.apps.card.v1.BorderStyle.BorderType} - */ - public enum BorderType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Don't use. Unspecified.
-     * 
- * - * BORDER_TYPE_UNSPECIFIED = 0; - */ - BORDER_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * Default value. No border.
-     * 
- * - * NO_BORDER = 1; - */ - NO_BORDER(1), - /** - * - * - *
-     * Outline.
-     * 
- * - * STROKE = 2; - */ - STROKE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Don't use. Unspecified.
-     * 
- * - * BORDER_TYPE_UNSPECIFIED = 0; - */ - public static final int BORDER_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Default value. No border.
-     * 
- * - * NO_BORDER = 1; - */ - public static final int NO_BORDER_VALUE = 1; - /** - * - * - *
-     * Outline.
-     * 
- * - * STROKE = 2; - */ - public static final int STROKE_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BorderType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BorderType forNumber(int value) { - switch (value) { - case 0: - return BORDER_TYPE_UNSPECIFIED; - case 1: - return NO_BORDER; - case 2: - return STROKE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BorderType findValueByNumber(int number) { - return BorderType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.apps.card.v1.BorderStyle.getDescriptor().getEnumTypes().get(0); - } - - private static final BorderType[] VALUES = values(); - - public static BorderType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BorderType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.apps.card.v1.BorderStyle.BorderType) - } - - private int bitField0_; - public static final int TYPE_FIELD_NUMBER = 1; - private int type_ = 0; - /** - * - * - *
-   * The border type.
-   * 
- * - * .google.apps.card.v1.BorderStyle.BorderType type = 1; - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-   * The border type.
-   * 
- * - * .google.apps.card.v1.BorderStyle.BorderType type = 1; - * - * @return The type. - */ - @java.lang.Override - public com.google.apps.card.v1.BorderStyle.BorderType getType() { - com.google.apps.card.v1.BorderStyle.BorderType result = - com.google.apps.card.v1.BorderStyle.BorderType.forNumber(type_); - return result == null ? com.google.apps.card.v1.BorderStyle.BorderType.UNRECOGNIZED : result; - } - - public static final int STROKE_COLOR_FIELD_NUMBER = 2; - private com.google.type.Color strokeColor_; - /** - * - * - *
-   * The colors to use when the type is `BORDER_TYPE_STROKE`.
-   * 
- * - * .google.type.Color stroke_color = 2; - * - * @return Whether the strokeColor field is set. - */ - @java.lang.Override - public boolean hasStrokeColor() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * The colors to use when the type is `BORDER_TYPE_STROKE`.
-   * 
- * - * .google.type.Color stroke_color = 2; - * - * @return The strokeColor. - */ - @java.lang.Override - public com.google.type.Color getStrokeColor() { - return strokeColor_ == null ? com.google.type.Color.getDefaultInstance() : strokeColor_; - } - /** - * - * - *
-   * The colors to use when the type is `BORDER_TYPE_STROKE`.
-   * 
- * - * .google.type.Color stroke_color = 2; - */ - @java.lang.Override - public com.google.type.ColorOrBuilder getStrokeColorOrBuilder() { - return strokeColor_ == null ? com.google.type.Color.getDefaultInstance() : strokeColor_; - } - - public static final int CORNER_RADIUS_FIELD_NUMBER = 3; - private int cornerRadius_ = 0; - /** - * - * - *
-   * The corner radius for the border.
-   * 
- * - * int32 corner_radius = 3; - * - * @return The cornerRadius. - */ - @java.lang.Override - public int getCornerRadius() { - return cornerRadius_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (type_ - != com.google.apps.card.v1.BorderStyle.BorderType.BORDER_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, type_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getStrokeColor()); - } - if (cornerRadius_ != 0) { - output.writeInt32(3, cornerRadius_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ - != com.google.apps.card.v1.BorderStyle.BorderType.BORDER_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStrokeColor()); - } - if (cornerRadius_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, cornerRadius_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.apps.card.v1.BorderStyle)) { - return super.equals(obj); - } - com.google.apps.card.v1.BorderStyle other = (com.google.apps.card.v1.BorderStyle) obj; - - if (type_ != other.type_) return false; - if (hasStrokeColor() != other.hasStrokeColor()) return false; - if (hasStrokeColor()) { - if (!getStrokeColor().equals(other.getStrokeColor())) return false; - } - if (getCornerRadius() != other.getCornerRadius()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - if (hasStrokeColor()) { - hash = (37 * hash) + STROKE_COLOR_FIELD_NUMBER; - hash = (53 * hash) + getStrokeColor().hashCode(); - } - hash = (37 * hash) + CORNER_RADIUS_FIELD_NUMBER; - hash = (53 * hash) + getCornerRadius(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.apps.card.v1.BorderStyle parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.BorderStyle parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.BorderStyle parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.BorderStyle parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.BorderStyle parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.BorderStyle parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.BorderStyle parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.BorderStyle parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.apps.card.v1.BorderStyle parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.BorderStyle parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.apps.card.v1.BorderStyle parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.BorderStyle parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.apps.card.v1.BorderStyle prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The style options for the border of a card or widget, including the border
-   * type and color.
-   *
-   * [Google Workspace Add-ons and Chat
-   * apps](https://developers.google.com/workspace/extend):
-   * 
- * - * Protobuf type {@code google.apps.card.v1.BorderStyle} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.apps.card.v1.BorderStyle) - com.google.apps.card.v1.BorderStyleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_BorderStyle_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_BorderStyle_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.apps.card.v1.BorderStyle.class, - com.google.apps.card.v1.BorderStyle.Builder.class); - } - - // Construct using com.google.apps.card.v1.BorderStyle.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStrokeColorFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = 0; - strokeColor_ = null; - if (strokeColorBuilder_ != null) { - strokeColorBuilder_.dispose(); - strokeColorBuilder_ = null; - } - cornerRadius_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_BorderStyle_descriptor; - } - - @java.lang.Override - public com.google.apps.card.v1.BorderStyle getDefaultInstanceForType() { - return com.google.apps.card.v1.BorderStyle.getDefaultInstance(); - } - - @java.lang.Override - public com.google.apps.card.v1.BorderStyle build() { - com.google.apps.card.v1.BorderStyle result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.apps.card.v1.BorderStyle buildPartial() { - com.google.apps.card.v1.BorderStyle result = new com.google.apps.card.v1.BorderStyle(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.apps.card.v1.BorderStyle result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.strokeColor_ = - strokeColorBuilder_ == null ? strokeColor_ : strokeColorBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.cornerRadius_ = cornerRadius_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.apps.card.v1.BorderStyle) { - return mergeFrom((com.google.apps.card.v1.BorderStyle) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.apps.card.v1.BorderStyle other) { - if (other == com.google.apps.card.v1.BorderStyle.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.hasStrokeColor()) { - mergeStrokeColor(other.getStrokeColor()); - } - if (other.getCornerRadius() != 0) { - setCornerRadius(other.getCornerRadius()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - input.readMessage(getStrokeColorFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - cornerRadius_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int type_ = 0; - /** - * - * - *
-     * The border type.
-     * 
- * - * .google.apps.card.v1.BorderStyle.BorderType type = 1; - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-     * The border type.
-     * 
- * - * .google.apps.card.v1.BorderStyle.BorderType type = 1; - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The border type.
-     * 
- * - * .google.apps.card.v1.BorderStyle.BorderType type = 1; - * - * @return The type. - */ - @java.lang.Override - public com.google.apps.card.v1.BorderStyle.BorderType getType() { - com.google.apps.card.v1.BorderStyle.BorderType result = - com.google.apps.card.v1.BorderStyle.BorderType.forNumber(type_); - return result == null ? com.google.apps.card.v1.BorderStyle.BorderType.UNRECOGNIZED : result; - } - /** - * - * - *
-     * The border type.
-     * 
- * - * .google.apps.card.v1.BorderStyle.BorderType type = 1; - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.apps.card.v1.BorderStyle.BorderType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The border type.
-     * 
- * - * .google.apps.card.v1.BorderStyle.BorderType type = 1; - * - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = 0; - onChanged(); - return this; - } - - private com.google.type.Color strokeColor_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> - strokeColorBuilder_; - /** - * - * - *
-     * The colors to use when the type is `BORDER_TYPE_STROKE`.
-     * 
- * - * .google.type.Color stroke_color = 2; - * - * @return Whether the strokeColor field is set. - */ - public boolean hasStrokeColor() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * The colors to use when the type is `BORDER_TYPE_STROKE`.
-     * 
- * - * .google.type.Color stroke_color = 2; - * - * @return The strokeColor. - */ - public com.google.type.Color getStrokeColor() { - if (strokeColorBuilder_ == null) { - return strokeColor_ == null ? com.google.type.Color.getDefaultInstance() : strokeColor_; - } else { - return strokeColorBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The colors to use when the type is `BORDER_TYPE_STROKE`.
-     * 
- * - * .google.type.Color stroke_color = 2; - */ - public Builder setStrokeColor(com.google.type.Color value) { - if (strokeColorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - strokeColor_ = value; - } else { - strokeColorBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The colors to use when the type is `BORDER_TYPE_STROKE`.
-     * 
- * - * .google.type.Color stroke_color = 2; - */ - public Builder setStrokeColor(com.google.type.Color.Builder builderForValue) { - if (strokeColorBuilder_ == null) { - strokeColor_ = builderForValue.build(); - } else { - strokeColorBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The colors to use when the type is `BORDER_TYPE_STROKE`.
-     * 
- * - * .google.type.Color stroke_color = 2; - */ - public Builder mergeStrokeColor(com.google.type.Color value) { - if (strokeColorBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && strokeColor_ != null - && strokeColor_ != com.google.type.Color.getDefaultInstance()) { - getStrokeColorBuilder().mergeFrom(value); - } else { - strokeColor_ = value; - } - } else { - strokeColorBuilder_.mergeFrom(value); - } - if (strokeColor_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The colors to use when the type is `BORDER_TYPE_STROKE`.
-     * 
- * - * .google.type.Color stroke_color = 2; - */ - public Builder clearStrokeColor() { - bitField0_ = (bitField0_ & ~0x00000002); - strokeColor_ = null; - if (strokeColorBuilder_ != null) { - strokeColorBuilder_.dispose(); - strokeColorBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The colors to use when the type is `BORDER_TYPE_STROKE`.
-     * 
- * - * .google.type.Color stroke_color = 2; - */ - public com.google.type.Color.Builder getStrokeColorBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getStrokeColorFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The colors to use when the type is `BORDER_TYPE_STROKE`.
-     * 
- * - * .google.type.Color stroke_color = 2; - */ - public com.google.type.ColorOrBuilder getStrokeColorOrBuilder() { - if (strokeColorBuilder_ != null) { - return strokeColorBuilder_.getMessageOrBuilder(); - } else { - return strokeColor_ == null ? com.google.type.Color.getDefaultInstance() : strokeColor_; - } - } - /** - * - * - *
-     * The colors to use when the type is `BORDER_TYPE_STROKE`.
-     * 
- * - * .google.type.Color stroke_color = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> - getStrokeColorFieldBuilder() { - if (strokeColorBuilder_ == null) { - strokeColorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, - com.google.type.Color.Builder, - com.google.type.ColorOrBuilder>( - getStrokeColor(), getParentForChildren(), isClean()); - strokeColor_ = null; - } - return strokeColorBuilder_; - } - - private int cornerRadius_; - /** - * - * - *
-     * The corner radius for the border.
-     * 
- * - * int32 corner_radius = 3; - * - * @return The cornerRadius. - */ - @java.lang.Override - public int getCornerRadius() { - return cornerRadius_; - } - /** - * - * - *
-     * The corner radius for the border.
-     * 
- * - * int32 corner_radius = 3; - * - * @param value The cornerRadius to set. - * @return This builder for chaining. - */ - public Builder setCornerRadius(int value) { - - cornerRadius_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * The corner radius for the border.
-     * 
- * - * int32 corner_radius = 3; - * - * @return This builder for chaining. - */ - public Builder clearCornerRadius() { - bitField0_ = (bitField0_ & ~0x00000004); - cornerRadius_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.apps.card.v1.BorderStyle) - } - - // @@protoc_insertion_point(class_scope:google.apps.card.v1.BorderStyle) - private static final com.google.apps.card.v1.BorderStyle DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.apps.card.v1.BorderStyle(); - } - - public static com.google.apps.card.v1.BorderStyle getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BorderStyle parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.apps.card.v1.BorderStyle getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/BorderStyleOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/BorderStyleOrBuilder.java deleted file mode 100644 index 044befc5c3c0..000000000000 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/BorderStyleOrBuilder.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * 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 - * - * https://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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/apps/card/v1/card.proto - -// Protobuf Java Version: 3.25.2 -package com.google.apps.card.v1; - -public interface BorderStyleOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.apps.card.v1.BorderStyle) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The border type.
-   * 
- * - * .google.apps.card.v1.BorderStyle.BorderType type = 1; - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * - * - *
-   * The border type.
-   * 
- * - * .google.apps.card.v1.BorderStyle.BorderType type = 1; - * - * @return The type. - */ - com.google.apps.card.v1.BorderStyle.BorderType getType(); - - /** - * - * - *
-   * The colors to use when the type is `BORDER_TYPE_STROKE`.
-   * 
- * - * .google.type.Color stroke_color = 2; - * - * @return Whether the strokeColor field is set. - */ - boolean hasStrokeColor(); - /** - * - * - *
-   * The colors to use when the type is `BORDER_TYPE_STROKE`.
-   * 
- * - * .google.type.Color stroke_color = 2; - * - * @return The strokeColor. - */ - com.google.type.Color getStrokeColor(); - /** - * - * - *
-   * The colors to use when the type is `BORDER_TYPE_STROKE`.
-   * 
- * - * .google.type.Color stroke_color = 2; - */ - com.google.type.ColorOrBuilder getStrokeColorOrBuilder(); - - /** - * - * - *
-   * The corner radius for the border.
-   * 
- * - * int32 corner_radius = 3; - * - * @return The cornerRadius. - */ - int getCornerRadius(); -} diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Button.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Button.java deleted file mode 100644 index 3a4ba0a1f928..000000000000 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Button.java +++ /dev/null @@ -1,2134 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * 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 - * - * https://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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/apps/card/v1/card.proto - -// Protobuf Java Version: 3.25.2 -package com.google.apps.card.v1; - -/** - * - * - *
- * A text, icon, or text and icon button that users can click. For an example in
- * Google Chat apps, see
- * [Button list](https://developers.google.com/chat/ui/widgets/button-list).
- *
- * To make an image a clickable button, specify an
- * [`Image`][google.apps.card.v1.Image] (not an
- * [`ImageComponent`][google.apps.card.v1.ImageComponent]) and set an
- * `onClick` action.
- *
- * [Google Workspace
- * Add-ons and Chat apps](https://developers.google.com/workspace/extend):
- * 
- * - * Protobuf type {@code google.apps.card.v1.Button} - */ -public final class Button extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.apps.card.v1.Button) - ButtonOrBuilder { - private static final long serialVersionUID = 0L; - // Use Button.newBuilder() to construct. - private Button(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Button() { - text_ = ""; - altText_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Button(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Button_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Button_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.apps.card.v1.Button.class, com.google.apps.card.v1.Button.Builder.class); - } - - private int bitField0_; - public static final int TEXT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object text_ = ""; - /** - * - * - *
-   * The text displayed inside the button.
-   * 
- * - * string text = 1; - * - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } - } - /** - * - * - *
-   * The text displayed inside the button.
-   * 
- * - * string text = 1; - * - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ICON_FIELD_NUMBER = 2; - private com.google.apps.card.v1.Icon icon_; - /** - * - * - *
-   * The icon image. If both `icon` and `text` are set, then the icon appears
-   * before the text.
-   * 
- * - * .google.apps.card.v1.Icon icon = 2; - * - * @return Whether the icon field is set. - */ - @java.lang.Override - public boolean hasIcon() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * The icon image. If both `icon` and `text` are set, then the icon appears
-   * before the text.
-   * 
- * - * .google.apps.card.v1.Icon icon = 2; - * - * @return The icon. - */ - @java.lang.Override - public com.google.apps.card.v1.Icon getIcon() { - return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_; - } - /** - * - * - *
-   * The icon image. If both `icon` and `text` are set, then the icon appears
-   * before the text.
-   * 
- * - * .google.apps.card.v1.Icon icon = 2; - */ - @java.lang.Override - public com.google.apps.card.v1.IconOrBuilder getIconOrBuilder() { - return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_; - } - - public static final int COLOR_FIELD_NUMBER = 3; - private com.google.type.Color color_; - /** - * - * - *
-   * If set, the button is filled with a solid background color and the font
-   * color changes to maintain contrast with the background color. For example,
-   * setting a blue background likely results in white text.
-   *
-   * If unset, the image background is white and the font color is blue.
-   *
-   * For red, green, and blue, the value of each field is a `float` number that
-   * you can express in either of two ways: as a number between 0 and 255
-   * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-   * the absence of a color and 1 or 255/255 represent the full presence of that
-   * color on the RGB scale.
-   *
-   * Optionally set `alpha`, which sets a level of transparency using this
-   * equation:
-   *
-   * ```
-   * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-   * ```
-   *
-   * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-   * `0` corresponds with a completely transparent color.
-   *
-   * For example, the following color represents a half transparent red:
-   *
-   * ```
-   * "color": {
-   *    "red": 1,
-   *    "green": 0,
-   *    "blue": 0,
-   *    "alpha": 0.5
-   * }
-   * ```
-   * 
- * - * .google.type.Color color = 3; - * - * @return Whether the color field is set. - */ - @java.lang.Override - public boolean hasColor() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * If set, the button is filled with a solid background color and the font
-   * color changes to maintain contrast with the background color. For example,
-   * setting a blue background likely results in white text.
-   *
-   * If unset, the image background is white and the font color is blue.
-   *
-   * For red, green, and blue, the value of each field is a `float` number that
-   * you can express in either of two ways: as a number between 0 and 255
-   * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-   * the absence of a color and 1 or 255/255 represent the full presence of that
-   * color on the RGB scale.
-   *
-   * Optionally set `alpha`, which sets a level of transparency using this
-   * equation:
-   *
-   * ```
-   * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-   * ```
-   *
-   * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-   * `0` corresponds with a completely transparent color.
-   *
-   * For example, the following color represents a half transparent red:
-   *
-   * ```
-   * "color": {
-   *    "red": 1,
-   *    "green": 0,
-   *    "blue": 0,
-   *    "alpha": 0.5
-   * }
-   * ```
-   * 
- * - * .google.type.Color color = 3; - * - * @return The color. - */ - @java.lang.Override - public com.google.type.Color getColor() { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } - /** - * - * - *
-   * If set, the button is filled with a solid background color and the font
-   * color changes to maintain contrast with the background color. For example,
-   * setting a blue background likely results in white text.
-   *
-   * If unset, the image background is white and the font color is blue.
-   *
-   * For red, green, and blue, the value of each field is a `float` number that
-   * you can express in either of two ways: as a number between 0 and 255
-   * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-   * the absence of a color and 1 or 255/255 represent the full presence of that
-   * color on the RGB scale.
-   *
-   * Optionally set `alpha`, which sets a level of transparency using this
-   * equation:
-   *
-   * ```
-   * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-   * ```
-   *
-   * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-   * `0` corresponds with a completely transparent color.
-   *
-   * For example, the following color represents a half transparent red:
-   *
-   * ```
-   * "color": {
-   *    "red": 1,
-   *    "green": 0,
-   *    "blue": 0,
-   *    "alpha": 0.5
-   * }
-   * ```
-   * 
- * - * .google.type.Color color = 3; - */ - @java.lang.Override - public com.google.type.ColorOrBuilder getColorOrBuilder() { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } - - public static final int ON_CLICK_FIELD_NUMBER = 4; - private com.google.apps.card.v1.OnClick onClick_; - /** - * - * - *
-   * Required. The action to perform when a user clicks the button, such as
-   * opening a hyperlink or running a custom function.
-   * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - * - * @return Whether the onClick field is set. - */ - @java.lang.Override - public boolean hasOnClick() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-   * Required. The action to perform when a user clicks the button, such as
-   * opening a hyperlink or running a custom function.
-   * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - * - * @return The onClick. - */ - @java.lang.Override - public com.google.apps.card.v1.OnClick getOnClick() { - return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_; - } - /** - * - * - *
-   * Required. The action to perform when a user clicks the button, such as
-   * opening a hyperlink or running a custom function.
-   * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - */ - @java.lang.Override - public com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder() { - return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_; - } - - public static final int DISABLED_FIELD_NUMBER = 5; - private boolean disabled_ = false; - /** - * - * - *
-   * If `true`, the button is displayed in an inactive state and doesn't respond
-   * to user actions.
-   * 
- * - * bool disabled = 5; - * - * @return The disabled. - */ - @java.lang.Override - public boolean getDisabled() { - return disabled_; - } - - public static final int ALT_TEXT_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object altText_ = ""; - /** - * - * - *
-   * The alternative text that's used for accessibility.
-   *
-   * Set descriptive text that lets users know what the button does. For
-   * example, if a button opens a hyperlink, you might write: "Opens a new
-   * browser tab and navigates to the Google Chat developer documentation at
-   * https://developers.google.com/chat".
-   * 
- * - * string alt_text = 6; - * - * @return The altText. - */ - @java.lang.Override - public java.lang.String getAltText() { - java.lang.Object ref = altText_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - altText_ = s; - return s; - } - } - /** - * - * - *
-   * The alternative text that's used for accessibility.
-   *
-   * Set descriptive text that lets users know what the button does. For
-   * example, if a button opens a hyperlink, you might write: "Opens a new
-   * browser tab and navigates to the Google Chat developer documentation at
-   * https://developers.google.com/chat".
-   * 
- * - * string alt_text = 6; - * - * @return The bytes for altText. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAltTextBytes() { - java.lang.Object ref = altText_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - altText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getIcon()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getColor()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(4, getOnClick()); - } - if (disabled_ != false) { - output.writeBool(5, disabled_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, altText_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getIcon()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getColor()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOnClick()); - } - if (disabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, disabled_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, altText_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.apps.card.v1.Button)) { - return super.equals(obj); - } - com.google.apps.card.v1.Button other = (com.google.apps.card.v1.Button) obj; - - if (!getText().equals(other.getText())) return false; - if (hasIcon() != other.hasIcon()) return false; - if (hasIcon()) { - if (!getIcon().equals(other.getIcon())) return false; - } - if (hasColor() != other.hasColor()) return false; - if (hasColor()) { - if (!getColor().equals(other.getColor())) return false; - } - if (hasOnClick() != other.hasOnClick()) return false; - if (hasOnClick()) { - if (!getOnClick().equals(other.getOnClick())) return false; - } - if (getDisabled() != other.getDisabled()) return false; - if (!getAltText().equals(other.getAltText())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - if (hasIcon()) { - hash = (37 * hash) + ICON_FIELD_NUMBER; - hash = (53 * hash) + getIcon().hashCode(); - } - if (hasColor()) { - hash = (37 * hash) + COLOR_FIELD_NUMBER; - hash = (53 * hash) + getColor().hashCode(); - } - if (hasOnClick()) { - hash = (37 * hash) + ON_CLICK_FIELD_NUMBER; - hash = (53 * hash) + getOnClick().hashCode(); - } - hash = (37 * hash) + DISABLED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled()); - hash = (37 * hash) + ALT_TEXT_FIELD_NUMBER; - hash = (53 * hash) + getAltText().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.apps.card.v1.Button parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.Button parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.Button parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.Button parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.Button parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.apps.card.v1.Button parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.apps.card.v1.Button parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.Button parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.apps.card.v1.Button parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.Button parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.apps.card.v1.Button parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.apps.card.v1.Button parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.apps.card.v1.Button prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A text, icon, or text and icon button that users can click. For an example in
-   * Google Chat apps, see
-   * [Button list](https://developers.google.com/chat/ui/widgets/button-list).
-   *
-   * To make an image a clickable button, specify an
-   * [`Image`][google.apps.card.v1.Image] (not an
-   * [`ImageComponent`][google.apps.card.v1.ImageComponent]) and set an
-   * `onClick` action.
-   *
-   * [Google Workspace
-   * Add-ons and Chat apps](https://developers.google.com/workspace/extend):
-   * 
- * - * Protobuf type {@code google.apps.card.v1.Button} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Button) - com.google.apps.card.v1.ButtonOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Button_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Button_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.apps.card.v1.Button.class, com.google.apps.card.v1.Button.Builder.class); - } - - // Construct using com.google.apps.card.v1.Button.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getIconFieldBuilder(); - getColorFieldBuilder(); - getOnClickFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - text_ = ""; - icon_ = null; - if (iconBuilder_ != null) { - iconBuilder_.dispose(); - iconBuilder_ = null; - } - color_ = null; - if (colorBuilder_ != null) { - colorBuilder_.dispose(); - colorBuilder_ = null; - } - onClick_ = null; - if (onClickBuilder_ != null) { - onClickBuilder_.dispose(); - onClickBuilder_ = null; - } - disabled_ = false; - altText_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.apps.card.v1.CardProto - .internal_static_google_apps_card_v1_Button_descriptor; - } - - @java.lang.Override - public com.google.apps.card.v1.Button getDefaultInstanceForType() { - return com.google.apps.card.v1.Button.getDefaultInstance(); - } - - @java.lang.Override - public com.google.apps.card.v1.Button build() { - com.google.apps.card.v1.Button result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.apps.card.v1.Button buildPartial() { - com.google.apps.card.v1.Button result = new com.google.apps.card.v1.Button(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.apps.card.v1.Button result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.text_ = text_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.icon_ = iconBuilder_ == null ? icon_ : iconBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.color_ = colorBuilder_ == null ? color_ : colorBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.onClick_ = onClickBuilder_ == null ? onClick_ : onClickBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.disabled_ = disabled_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.altText_ = altText_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.apps.card.v1.Button) { - return mergeFrom((com.google.apps.card.v1.Button) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.apps.card.v1.Button other) { - if (other == com.google.apps.card.v1.Button.getDefaultInstance()) return this; - if (!other.getText().isEmpty()) { - text_ = other.text_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasIcon()) { - mergeIcon(other.getIcon()); - } - if (other.hasColor()) { - mergeColor(other.getColor()); - } - if (other.hasOnClick()) { - mergeOnClick(other.getOnClick()); - } - if (other.getDisabled() != false) { - setDisabled(other.getDisabled()); - } - if (!other.getAltText().isEmpty()) { - altText_ = other.altText_; - bitField0_ |= 0x00000020; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - text_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getIconFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getColorFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - input.readMessage(getOnClickFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: - { - disabled_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 50: - { - altText_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object text_ = ""; - /** - * - * - *
-     * The text displayed inside the button.
-     * 
- * - * string text = 1; - * - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The text displayed inside the button.
-     * 
- * - * string text = 1; - * - * @return The bytes for text. - */ - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The text displayed inside the button.
-     * 
- * - * string text = 1; - * - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - text_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The text displayed inside the button.
-     * 
- * - * string text = 1; - * - * @return This builder for chaining. - */ - public Builder clearText() { - text_ = getDefaultInstance().getText(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The text displayed inside the button.
-     * 
- * - * string text = 1; - * - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - text_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.apps.card.v1.Icon icon_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.apps.card.v1.Icon, - com.google.apps.card.v1.Icon.Builder, - com.google.apps.card.v1.IconOrBuilder> - iconBuilder_; - /** - * - * - *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
-     * 
- * - * .google.apps.card.v1.Icon icon = 2; - * - * @return Whether the icon field is set. - */ - public boolean hasIcon() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
-     * 
- * - * .google.apps.card.v1.Icon icon = 2; - * - * @return The icon. - */ - public com.google.apps.card.v1.Icon getIcon() { - if (iconBuilder_ == null) { - return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_; - } else { - return iconBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
-     * 
- * - * .google.apps.card.v1.Icon icon = 2; - */ - public Builder setIcon(com.google.apps.card.v1.Icon value) { - if (iconBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - icon_ = value; - } else { - iconBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
-     * 
- * - * .google.apps.card.v1.Icon icon = 2; - */ - public Builder setIcon(com.google.apps.card.v1.Icon.Builder builderForValue) { - if (iconBuilder_ == null) { - icon_ = builderForValue.build(); - } else { - iconBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
-     * 
- * - * .google.apps.card.v1.Icon icon = 2; - */ - public Builder mergeIcon(com.google.apps.card.v1.Icon value) { - if (iconBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && icon_ != null - && icon_ != com.google.apps.card.v1.Icon.getDefaultInstance()) { - getIconBuilder().mergeFrom(value); - } else { - icon_ = value; - } - } else { - iconBuilder_.mergeFrom(value); - } - if (icon_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
-     * 
- * - * .google.apps.card.v1.Icon icon = 2; - */ - public Builder clearIcon() { - bitField0_ = (bitField0_ & ~0x00000002); - icon_ = null; - if (iconBuilder_ != null) { - iconBuilder_.dispose(); - iconBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
-     * 
- * - * .google.apps.card.v1.Icon icon = 2; - */ - public com.google.apps.card.v1.Icon.Builder getIconBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getIconFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
-     * 
- * - * .google.apps.card.v1.Icon icon = 2; - */ - public com.google.apps.card.v1.IconOrBuilder getIconOrBuilder() { - if (iconBuilder_ != null) { - return iconBuilder_.getMessageOrBuilder(); - } else { - return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_; - } - } - /** - * - * - *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
-     * 
- * - * .google.apps.card.v1.Icon icon = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.apps.card.v1.Icon, - com.google.apps.card.v1.Icon.Builder, - com.google.apps.card.v1.IconOrBuilder> - getIconFieldBuilder() { - if (iconBuilder_ == null) { - iconBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.apps.card.v1.Icon, - com.google.apps.card.v1.Icon.Builder, - com.google.apps.card.v1.IconOrBuilder>( - getIcon(), getParentForChildren(), isClean()); - icon_ = null; - } - return iconBuilder_; - } - - private com.google.type.Color color_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> - colorBuilder_; - /** - * - * - *
-     * If set, the button is filled with a solid background color and the font
-     * color changes to maintain contrast with the background color. For example,
-     * setting a blue background likely results in white text.
-     *
-     * If unset, the image background is white and the font color is blue.
-     *
-     * For red, green, and blue, the value of each field is a `float` number that
-     * you can express in either of two ways: as a number between 0 and 255
-     * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-     * the absence of a color and 1 or 255/255 represent the full presence of that
-     * color on the RGB scale.
-     *
-     * Optionally set `alpha`, which sets a level of transparency using this
-     * equation:
-     *
-     * ```
-     * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * ```
-     *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
-     *
-     * For example, the following color represents a half transparent red:
-     *
-     * ```
-     * "color": {
-     *    "red": 1,
-     *    "green": 0,
-     *    "blue": 0,
-     *    "alpha": 0.5
-     * }
-     * ```
-     * 
- * - * .google.type.Color color = 3; - * - * @return Whether the color field is set. - */ - public boolean hasColor() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * If set, the button is filled with a solid background color and the font
-     * color changes to maintain contrast with the background color. For example,
-     * setting a blue background likely results in white text.
-     *
-     * If unset, the image background is white and the font color is blue.
-     *
-     * For red, green, and blue, the value of each field is a `float` number that
-     * you can express in either of two ways: as a number between 0 and 255
-     * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-     * the absence of a color and 1 or 255/255 represent the full presence of that
-     * color on the RGB scale.
-     *
-     * Optionally set `alpha`, which sets a level of transparency using this
-     * equation:
-     *
-     * ```
-     * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * ```
-     *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
-     *
-     * For example, the following color represents a half transparent red:
-     *
-     * ```
-     * "color": {
-     *    "red": 1,
-     *    "green": 0,
-     *    "blue": 0,
-     *    "alpha": 0.5
-     * }
-     * ```
-     * 
- * - * .google.type.Color color = 3; - * - * @return The color. - */ - public com.google.type.Color getColor() { - if (colorBuilder_ == null) { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } else { - return colorBuilder_.getMessage(); - } - } - /** - * - * - *
-     * If set, the button is filled with a solid background color and the font
-     * color changes to maintain contrast with the background color. For example,
-     * setting a blue background likely results in white text.
-     *
-     * If unset, the image background is white and the font color is blue.
-     *
-     * For red, green, and blue, the value of each field is a `float` number that
-     * you can express in either of two ways: as a number between 0 and 255
-     * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-     * the absence of a color and 1 or 255/255 represent the full presence of that
-     * color on the RGB scale.
-     *
-     * Optionally set `alpha`, which sets a level of transparency using this
-     * equation:
-     *
-     * ```
-     * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * ```
-     *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
-     *
-     * For example, the following color represents a half transparent red:
-     *
-     * ```
-     * "color": {
-     *    "red": 1,
-     *    "green": 0,
-     *    "blue": 0,
-     *    "alpha": 0.5
-     * }
-     * ```
-     * 
- * - * .google.type.Color color = 3; - */ - public Builder setColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - color_ = value; - } else { - colorBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * If set, the button is filled with a solid background color and the font
-     * color changes to maintain contrast with the background color. For example,
-     * setting a blue background likely results in white text.
-     *
-     * If unset, the image background is white and the font color is blue.
-     *
-     * For red, green, and blue, the value of each field is a `float` number that
-     * you can express in either of two ways: as a number between 0 and 255
-     * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-     * the absence of a color and 1 or 255/255 represent the full presence of that
-     * color on the RGB scale.
-     *
-     * Optionally set `alpha`, which sets a level of transparency using this
-     * equation:
-     *
-     * ```
-     * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * ```
-     *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
-     *
-     * For example, the following color represents a half transparent red:
-     *
-     * ```
-     * "color": {
-     *    "red": 1,
-     *    "green": 0,
-     *    "blue": 0,
-     *    "alpha": 0.5
-     * }
-     * ```
-     * 
- * - * .google.type.Color color = 3; - */ - public Builder setColor(com.google.type.Color.Builder builderForValue) { - if (colorBuilder_ == null) { - color_ = builderForValue.build(); - } else { - colorBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * If set, the button is filled with a solid background color and the font
-     * color changes to maintain contrast with the background color. For example,
-     * setting a blue background likely results in white text.
-     *
-     * If unset, the image background is white and the font color is blue.
-     *
-     * For red, green, and blue, the value of each field is a `float` number that
-     * you can express in either of two ways: as a number between 0 and 255
-     * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-     * the absence of a color and 1 or 255/255 represent the full presence of that
-     * color on the RGB scale.
-     *
-     * Optionally set `alpha`, which sets a level of transparency using this
-     * equation:
-     *
-     * ```
-     * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * ```
-     *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
-     *
-     * For example, the following color represents a half transparent red:
-     *
-     * ```
-     * "color": {
-     *    "red": 1,
-     *    "green": 0,
-     *    "blue": 0,
-     *    "alpha": 0.5
-     * }
-     * ```
-     * 
- * - * .google.type.Color color = 3; - */ - public Builder mergeColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && color_ != null - && color_ != com.google.type.Color.getDefaultInstance()) { - getColorBuilder().mergeFrom(value); - } else { - color_ = value; - } - } else { - colorBuilder_.mergeFrom(value); - } - if (color_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - * - * - *
-     * If set, the button is filled with a solid background color and the font
-     * color changes to maintain contrast with the background color. For example,
-     * setting a blue background likely results in white text.
-     *
-     * If unset, the image background is white and the font color is blue.
-     *
-     * For red, green, and blue, the value of each field is a `float` number that
-     * you can express in either of two ways: as a number between 0 and 255
-     * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-     * the absence of a color and 1 or 255/255 represent the full presence of that
-     * color on the RGB scale.
-     *
-     * Optionally set `alpha`, which sets a level of transparency using this
-     * equation:
-     *
-     * ```
-     * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * ```
-     *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
-     *
-     * For example, the following color represents a half transparent red:
-     *
-     * ```
-     * "color": {
-     *    "red": 1,
-     *    "green": 0,
-     *    "blue": 0,
-     *    "alpha": 0.5
-     * }
-     * ```
-     * 
- * - * .google.type.Color color = 3; - */ - public Builder clearColor() { - bitField0_ = (bitField0_ & ~0x00000004); - color_ = null; - if (colorBuilder_ != null) { - colorBuilder_.dispose(); - colorBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * If set, the button is filled with a solid background color and the font
-     * color changes to maintain contrast with the background color. For example,
-     * setting a blue background likely results in white text.
-     *
-     * If unset, the image background is white and the font color is blue.
-     *
-     * For red, green, and blue, the value of each field is a `float` number that
-     * you can express in either of two ways: as a number between 0 and 255
-     * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-     * the absence of a color and 1 or 255/255 represent the full presence of that
-     * color on the RGB scale.
-     *
-     * Optionally set `alpha`, which sets a level of transparency using this
-     * equation:
-     *
-     * ```
-     * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * ```
-     *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
-     *
-     * For example, the following color represents a half transparent red:
-     *
-     * ```
-     * "color": {
-     *    "red": 1,
-     *    "green": 0,
-     *    "blue": 0,
-     *    "alpha": 0.5
-     * }
-     * ```
-     * 
- * - * .google.type.Color color = 3; - */ - public com.google.type.Color.Builder getColorBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getColorFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * If set, the button is filled with a solid background color and the font
-     * color changes to maintain contrast with the background color. For example,
-     * setting a blue background likely results in white text.
-     *
-     * If unset, the image background is white and the font color is blue.
-     *
-     * For red, green, and blue, the value of each field is a `float` number that
-     * you can express in either of two ways: as a number between 0 and 255
-     * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-     * the absence of a color and 1 or 255/255 represent the full presence of that
-     * color on the RGB scale.
-     *
-     * Optionally set `alpha`, which sets a level of transparency using this
-     * equation:
-     *
-     * ```
-     * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * ```
-     *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
-     *
-     * For example, the following color represents a half transparent red:
-     *
-     * ```
-     * "color": {
-     *    "red": 1,
-     *    "green": 0,
-     *    "blue": 0,
-     *    "alpha": 0.5
-     * }
-     * ```
-     * 
- * - * .google.type.Color color = 3; - */ - public com.google.type.ColorOrBuilder getColorOrBuilder() { - if (colorBuilder_ != null) { - return colorBuilder_.getMessageOrBuilder(); - } else { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } - } - /** - * - * - *
-     * If set, the button is filled with a solid background color and the font
-     * color changes to maintain contrast with the background color. For example,
-     * setting a blue background likely results in white text.
-     *
-     * If unset, the image background is white and the font color is blue.
-     *
-     * For red, green, and blue, the value of each field is a `float` number that
-     * you can express in either of two ways: as a number between 0 and 255
-     * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
-     * the absence of a color and 1 or 255/255 represent the full presence of that
-     * color on the RGB scale.
-     *
-     * Optionally set `alpha`, which sets a level of transparency using this
-     * equation:
-     *
-     * ```
-     * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * ```
-     *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
-     *
-     * For example, the following color represents a half transparent red:
-     *
-     * ```
-     * "color": {
-     *    "red": 1,
-     *    "green": 0,
-     *    "blue": 0,
-     *    "alpha": 0.5
-     * }
-     * ```
-     * 
- * - * .google.type.Color color = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> - getColorFieldBuilder() { - if (colorBuilder_ == null) { - colorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, - com.google.type.Color.Builder, - com.google.type.ColorOrBuilder>(getColor(), getParentForChildren(), isClean()); - color_ = null; - } - return colorBuilder_; - } - - private com.google.apps.card.v1.OnClick onClick_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.apps.card.v1.OnClick, - com.google.apps.card.v1.OnClick.Builder, - com.google.apps.card.v1.OnClickOrBuilder> - onClickBuilder_; - /** - * - * - *
-     * Required. The action to perform when a user clicks the button, such as
-     * opening a hyperlink or running a custom function.
-     * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - * - * @return Whether the onClick field is set. - */ - public boolean hasOnClick() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-     * Required. The action to perform when a user clicks the button, such as
-     * opening a hyperlink or running a custom function.
-     * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - * - * @return The onClick. - */ - public com.google.apps.card.v1.OnClick getOnClick() { - if (onClickBuilder_ == null) { - return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_; - } else { - return onClickBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The action to perform when a user clicks the button, such as
-     * opening a hyperlink or running a custom function.
-     * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - */ - public Builder setOnClick(com.google.apps.card.v1.OnClick value) { - if (onClickBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - onClick_ = value; - } else { - onClickBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The action to perform when a user clicks the button, such as
-     * opening a hyperlink or running a custom function.
-     * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - */ - public Builder setOnClick(com.google.apps.card.v1.OnClick.Builder builderForValue) { - if (onClickBuilder_ == null) { - onClick_ = builderForValue.build(); - } else { - onClickBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The action to perform when a user clicks the button, such as
-     * opening a hyperlink or running a custom function.
-     * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - */ - public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) { - if (onClickBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && onClick_ != null - && onClick_ != com.google.apps.card.v1.OnClick.getDefaultInstance()) { - getOnClickBuilder().mergeFrom(value); - } else { - onClick_ = value; - } - } else { - onClickBuilder_.mergeFrom(value); - } - if (onClick_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Required. The action to perform when a user clicks the button, such as
-     * opening a hyperlink or running a custom function.
-     * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - */ - public Builder clearOnClick() { - bitField0_ = (bitField0_ & ~0x00000008); - onClick_ = null; - if (onClickBuilder_ != null) { - onClickBuilder_.dispose(); - onClickBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The action to perform when a user clicks the button, such as
-     * opening a hyperlink or running a custom function.
-     * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - */ - public com.google.apps.card.v1.OnClick.Builder getOnClickBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getOnClickFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The action to perform when a user clicks the button, such as
-     * opening a hyperlink or running a custom function.
-     * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - */ - public com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder() { - if (onClickBuilder_ != null) { - return onClickBuilder_.getMessageOrBuilder(); - } else { - return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_; - } - } - /** - * - * - *
-     * Required. The action to perform when a user clicks the button, such as
-     * opening a hyperlink or running a custom function.
-     * 
- * - * .google.apps.card.v1.OnClick on_click = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.apps.card.v1.OnClick, - com.google.apps.card.v1.OnClick.Builder, - com.google.apps.card.v1.OnClickOrBuilder> - getOnClickFieldBuilder() { - if (onClickBuilder_ == null) { - onClickBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.apps.card.v1.OnClick, - com.google.apps.card.v1.OnClick.Builder, - com.google.apps.card.v1.OnClickOrBuilder>( - getOnClick(), getParentForChildren(), isClean()); - onClick_ = null; - } - return onClickBuilder_; - } - - private boolean disabled_; - /** - * - * - *
-     * If `true`, the button is displayed in an inactive state and doesn't respond
-     * to user actions.
-     * 
- * - * bool disabled = 5; - * - * @return The disabled. - */ - @java.lang.Override - public boolean getDisabled() { - return disabled_; - } - /** - * - * - *
-     * If `true`, the button is displayed in an inactive state and doesn't respond
-     * to user actions.
-     * 
- * - * bool disabled = 5; - * - * @param value The disabled to set. - * @return This builder for chaining. - */ - public Builder setDisabled(boolean value) { - - disabled_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * If `true`, the button is displayed in an inactive state and doesn't respond
-     * to user actions.
-     * 
- * - * bool disabled = 5; - * - * @return This builder for chaining. - */ - public Builder clearDisabled() { - bitField0_ = (bitField0_ & ~0x00000010); - disabled_ = false; - onChanged(); - return this; - } - - private java.lang.Object altText_ = ""; - /** - * - * - *
-     * The alternative text that's used for accessibility.
-     *
-     * Set descriptive text that lets users know what the button does. For
-     * example, if a button opens a hyperlink, you might write: "Opens a new
-     * browser tab and navigates to the Google Chat developer documentation at
-     * https://developers.google.com/chat".
-     * 
- * - * string alt_text = 6; - * - * @return The altText. - */ - public java.lang.String getAltText() { - java.lang.Object ref = altText_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - altText_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The alternative text that's used for accessibility.
-     *
-     * Set descriptive text that lets users know what the button does. For
-     * example, if a button opens a hyperlink, you might write: "Opens a new
-     * browser tab and navigates to the Google Chat developer documentation at
-     * https://developers.google.com/chat".
-     * 
- * - * string alt_text = 6; - * - * @return The bytes for altText. - */ - public com.google.protobuf.ByteString getAltTextBytes() { - java.lang.Object ref = altText_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - altText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The alternative text that's used for accessibility.
-     *
-     * Set descriptive text that lets users know what the button does. For
-     * example, if a button opens a hyperlink, you might write: "Opens a new
-     * browser tab and navigates to the Google Chat developer documentation at
-     * https://developers.google.com/chat".
-     * 
- * - * string alt_text = 6; - * - * @param value The altText to set. - * @return This builder for chaining. - */ - public Builder setAltText(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - altText_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * The alternative text that's used for accessibility.
-     *
-     * Set descriptive text that lets users know what the button does. For
-     * example, if a button opens a hyperlink, you might write: "Opens a new
-     * browser tab and navigates to the Google Chat developer documentation at
-     * https://developers.google.com/chat".
-     * 
- * - * string alt_text = 6; - * - * @return This builder for chaining. - */ - public Builder clearAltText() { - altText_ = getDefaultInstance().getAltText(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * The alternative text that's used for accessibility.
-     *
-     * Set descriptive text that lets users know what the button does. For
-     * example, if a button opens a hyperlink, you might write: "Opens a new
-     * browser tab and navigates to the Google Chat developer documentation at
-     * https://developers.google.com/chat".
-     * 
- * - * string alt_text = 6; - * - * @param value The bytes for altText to set. - * @return This builder for chaining. - */ - public Builder setAltTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - altText_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.apps.card.v1.Button) - } - - // @@protoc_insertion_point(class_scope:google.apps.card.v1.Button) - private static final com.google.apps.card.v1.Button DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.apps.card.v1.Button(); - } - - public static com.google.apps.card.v1.Button getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser