diff --git a/generation_config.yaml b/generation_config.yaml index 970d96946e..fee5723e6c 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,4 +1,4 @@ -googleapis_commitish: ac02e45c23e8f55b81fd1425190dd7d4e11390f7 +googleapis_commitish: b6bb60733a7314d0c45e294b12d563fd6194b8f5 # the libraries are ordered with respect to library name, which is # java-{library.library_name} or java-{library.api-shortname} when # library.library_name is not defined. diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Action.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Action.java index ffcc47d4cf..28f4764d12 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Action.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Action.java @@ -27,7 +27,7 @@ * 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 + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -49,6 +49,7 @@ private Action() { parameters_ = java.util.Collections.emptyList(); loadIndicator_ = 0; interaction_ = 0; + requiredWidgets_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -77,7 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Specifies the loading indicator that the action displays while * making the call to the action. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -448,7 +449,7 @@ public interface ActionParameterOrBuilder * To learn more, see * [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -779,7 +780,7 @@ protected Builder newBuilderForType( * To learn more, see * [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -1273,7 +1274,7 @@ public com.google.apps.card.v1.Action.ActionParameter getDefaultInstanceForType( * *
    * A custom function to invoke when the containing element is
-   * clicked or othrwise activated.
+   * clicked or otherwise activated.
    *
    * For example usage, see [Read form
    * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -1301,7 +1302,7 @@ public java.lang.String getFunction() {
    *
    * 
    * A custom function to invoke when the containing element is
-   * clicked or othrwise activated.
+   * clicked or otherwise activated.
    *
    * For example usage, see [Read form
    * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -1543,6 +1544,125 @@ public com.google.apps.card.v1.Action.Interaction getInteraction() {
     return result == null ? com.google.apps.card.v1.Action.Interaction.UNRECOGNIZED : result;
   }
 
+  public static final int REQUIRED_WIDGETS_FIELD_NUMBER = 6;
+
+  @SuppressWarnings("serial")
+  private com.google.protobuf.LazyStringArrayList requiredWidgets_ =
+      com.google.protobuf.LazyStringArrayList.emptyList();
+
+  /**
+   *
+   *
+   * 
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @return A list containing the requiredWidgets. + */ + public com.google.protobuf.ProtocolStringList getRequiredWidgetsList() { + return requiredWidgets_; + } + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @return The count of requiredWidgets. + */ + public int getRequiredWidgetsCount() { + return requiredWidgets_.size(); + } + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the element to return. + * @return The requiredWidgets at the given index. + */ + public java.lang.String getRequiredWidgets(int index) { + return requiredWidgets_.get(index); + } + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the value to return. + * @return The bytes of the requiredWidgets at the given index. + */ + public com.google.protobuf.ByteString getRequiredWidgetsBytes(int index) { + return requiredWidgets_.getByteString(index); + } + + public static final int ALL_WIDGETS_ARE_REQUIRED_FIELD_NUMBER = 7; + private boolean allWidgetsAreRequired_ = false; + + /** + * + * + *
+   * Optional. If this is true, then all widgets are considered required by
+   * this action.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * bool all_widgets_are_required = 7; + * + * @return The allWidgetsAreRequired. + */ + @java.lang.Override + public boolean getAllWidgetsAreRequired() { + return allWidgetsAreRequired_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1573,6 +1693,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.apps.card.v1.Action.Interaction.INTERACTION_UNSPECIFIED.getNumber()) { output.writeEnum(5, interaction_); } + for (int i = 0; i < requiredWidgets_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, requiredWidgets_.getRaw(i)); + } + if (allWidgetsAreRequired_ != false) { + output.writeBool(7, allWidgetsAreRequired_); + } getUnknownFields().writeTo(output); } @@ -1598,6 +1724,17 @@ public int getSerializedSize() { != com.google.apps.card.v1.Action.Interaction.INTERACTION_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, interaction_); } + { + int dataSize = 0; + for (int i = 0; i < requiredWidgets_.size(); i++) { + dataSize += computeStringSizeNoTag(requiredWidgets_.getRaw(i)); + } + size += dataSize; + size += 1 * getRequiredWidgetsList().size(); + } + if (allWidgetsAreRequired_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, allWidgetsAreRequired_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1618,6 +1755,8 @@ public boolean equals(final java.lang.Object obj) { if (loadIndicator_ != other.loadIndicator_) return false; if (getPersistValues() != other.getPersistValues()) return false; if (interaction_ != other.interaction_) return false; + if (!getRequiredWidgetsList().equals(other.getRequiredWidgetsList())) return false; + if (getAllWidgetsAreRequired() != other.getAllWidgetsAreRequired()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1641,6 +1780,12 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPersistValues()); hash = (37 * hash) + INTERACTION_FIELD_NUMBER; hash = (53 * hash) + interaction_; + if (getRequiredWidgetsCount() > 0) { + hash = (37 * hash) + REQUIRED_WIDGETS_FIELD_NUMBER; + hash = (53 * hash) + getRequiredWidgetsList().hashCode(); + } + hash = (37 * hash) + ALL_WIDGETS_ARE_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllWidgetsAreRequired()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1749,7 +1894,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * 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 + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): *
* @@ -1795,6 +1940,8 @@ public Builder clear() { loadIndicator_ = 0; persistValues_ = false; interaction_ = 0; + requiredWidgets_ = com.google.protobuf.LazyStringArrayList.emptyList(); + allWidgetsAreRequired_ = false; return this; } @@ -1855,6 +2002,13 @@ private void buildPartial0(com.google.apps.card.v1.Action result) { if (((from_bitField0_ & 0x00000010) != 0)) { result.interaction_ = interaction_; } + if (((from_bitField0_ & 0x00000020) != 0)) { + requiredWidgets_.makeImmutable(); + result.requiredWidgets_ = requiredWidgets_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.allWidgetsAreRequired_ = allWidgetsAreRequired_; + } } @java.lang.Override @@ -1943,6 +2097,19 @@ public Builder mergeFrom(com.google.apps.card.v1.Action other) { if (other.interaction_ != 0) { setInteractionValue(other.getInteractionValue()); } + if (!other.requiredWidgets_.isEmpty()) { + if (requiredWidgets_.isEmpty()) { + requiredWidgets_ = other.requiredWidgets_; + bitField0_ |= 0x00000020; + } else { + ensureRequiredWidgetsIsMutable(); + requiredWidgets_.addAll(other.requiredWidgets_); + } + onChanged(); + } + if (other.getAllWidgetsAreRequired() != false) { + setAllWidgetsAreRequired(other.getAllWidgetsAreRequired()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2006,6 +2173,19 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 40 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRequiredWidgetsIsMutable(); + requiredWidgets_.add(s); + break; + } // case 50 + case 56: + { + allWidgetsAreRequired_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2032,7 +2212,7 @@ public Builder mergeFrom( * *
      * A custom function to invoke when the containing element is
-     * clicked or othrwise activated.
+     * clicked or otherwise activated.
      *
      * For example usage, see [Read form
      * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -2059,7 +2239,7 @@ public java.lang.String getFunction() {
      *
      * 
      * A custom function to invoke when the containing element is
-     * clicked or othrwise activated.
+     * clicked or otherwise activated.
      *
      * For example usage, see [Read form
      * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -2086,7 +2266,7 @@ public com.google.protobuf.ByteString getFunctionBytes() {
      *
      * 
      * A custom function to invoke when the containing element is
-     * clicked or othrwise activated.
+     * clicked or otherwise activated.
      *
      * For example usage, see [Read form
      * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -2112,7 +2292,7 @@ public Builder setFunction(java.lang.String value) {
      *
      * 
      * A custom function to invoke when the containing element is
-     * clicked or othrwise activated.
+     * clicked or otherwise activated.
      *
      * For example usage, see [Read form
      * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -2134,7 +2314,7 @@ public Builder clearFunction() {
      *
      * 
      * A custom function to invoke when the containing element is
-     * clicked or othrwise activated.
+     * clicked or otherwise activated.
      *
      * For example usage, see [Read form
      * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -2905,6 +3085,320 @@ public Builder clearInteraction() {
       return this;
     }
 
+    private com.google.protobuf.LazyStringArrayList requiredWidgets_ =
+        com.google.protobuf.LazyStringArrayList.emptyList();
+
+    private void ensureRequiredWidgetsIsMutable() {
+      if (!requiredWidgets_.isModifiable()) {
+        requiredWidgets_ = new com.google.protobuf.LazyStringArrayList(requiredWidgets_);
+      }
+      bitField0_ |= 0x00000020;
+    }
+
+    /**
+     *
+     *
+     * 
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @return A list containing the requiredWidgets. + */ + public com.google.protobuf.ProtocolStringList getRequiredWidgetsList() { + requiredWidgets_.makeImmutable(); + return requiredWidgets_; + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @return The count of requiredWidgets. + */ + public int getRequiredWidgetsCount() { + return requiredWidgets_.size(); + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the element to return. + * @return The requiredWidgets at the given index. + */ + public java.lang.String getRequiredWidgets(int index) { + return requiredWidgets_.get(index); + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the value to return. + * @return The bytes of the requiredWidgets at the given index. + */ + public com.google.protobuf.ByteString getRequiredWidgetsBytes(int index) { + return requiredWidgets_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index to set the value at. + * @param value The requiredWidgets to set. + * @return This builder for chaining. + */ + public Builder setRequiredWidgets(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredWidgetsIsMutable(); + requiredWidgets_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param value The requiredWidgets to add. + * @return This builder for chaining. + */ + public Builder addRequiredWidgets(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredWidgetsIsMutable(); + requiredWidgets_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param values The requiredWidgets to add. + * @return This builder for chaining. + */ + public Builder addAllRequiredWidgets(java.lang.Iterable values) { + ensureRequiredWidgetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requiredWidgets_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @return This builder for chaining. + */ + public Builder clearRequiredWidgets() { + requiredWidgets_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Fill this list with the names of widgets that this Action
+     * needs for a valid submission.
+     *
+     * If the widgets listed here don't have a value when this Action is invoked,
+     * the form submission is aborted.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * repeated string required_widgets = 6; + * + * @param value The bytes of the requiredWidgets to add. + * @return This builder for chaining. + */ + public Builder addRequiredWidgetsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRequiredWidgetsIsMutable(); + requiredWidgets_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean allWidgetsAreRequired_; + + /** + * + * + *
+     * Optional. If this is true, then all widgets are considered required by
+     * this action.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * bool all_widgets_are_required = 7; + * + * @return The allWidgetsAreRequired. + */ + @java.lang.Override + public boolean getAllWidgetsAreRequired() { + return allWidgetsAreRequired_; + } + + /** + * + * + *
+     * Optional. If this is true, then all widgets are considered required by
+     * this action.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * bool all_widgets_are_required = 7; + * + * @param value The allWidgetsAreRequired to set. + * @return This builder for chaining. + */ + public Builder setAllWidgetsAreRequired(boolean value) { + + allWidgetsAreRequired_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If this is true, then all widgets are considered required by
+     * this action.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * bool all_widgets_are_required = 7; + * + * @return This builder for chaining. + */ + public Builder clearAllWidgetsAreRequired() { + bitField0_ = (bitField0_ & ~0x00000040); + allWidgetsAreRequired_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ActionOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ActionOrBuilder.java index d4d37eae3d..8edf767ad2 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ActionOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ActionOrBuilder.java @@ -29,7 +29,7 @@ public interface ActionOrBuilder * *
    * A custom function to invoke when the containing element is
-   * clicked or othrwise activated.
+   * clicked or otherwise activated.
    *
    * For example usage, see [Read form
    * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -46,7 +46,7 @@ public interface ActionOrBuilder
    *
    * 
    * A custom function to invoke when the containing element is
-   * clicked or othrwise activated.
+   * clicked or otherwise activated.
    *
    * For example usage, see [Read form
    * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -228,4 +228,103 @@ public interface ActionOrBuilder
    * @return The interaction.
    */
   com.google.apps.card.v1.Action.Interaction getInteraction();
+
+  /**
+   *
+   *
+   * 
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @return A list containing the requiredWidgets. + */ + java.util.List getRequiredWidgetsList(); + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @return The count of requiredWidgets. + */ + int getRequiredWidgetsCount(); + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the element to return. + * @return The requiredWidgets at the given index. + */ + java.lang.String getRequiredWidgets(int index); + + /** + * + * + *
+   * Optional. Fill this list with the names of widgets that this Action
+   * needs for a valid submission.
+   *
+   * If the widgets listed here don't have a value when this Action is invoked,
+   * the form submission is aborted.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * repeated string required_widgets = 6; + * + * @param index The index of the value to return. + * @return The bytes of the requiredWidgets at the given index. + */ + com.google.protobuf.ByteString getRequiredWidgetsBytes(int index); + + /** + * + * + *
+   * Optional. If this is true, then all widgets are considered required by
+   * this action.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * bool all_widgets_are_required = 7; + * + * @return The allWidgetsAreRequired. + */ + boolean getAllWidgetsAreRequired(); } diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/BorderStyle.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/BorderStyle.java index d91b1bbd99..3addf66de6 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/BorderStyle.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/BorderStyle.java @@ -26,7 +26,7 @@ * The style options for the border of a card or widget, including the border * type and color. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): *
* @@ -74,7 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Represents the border types applied to widgets.
    *
-   * [Google Workspace Add-ons
+   * [Google Workspace add-ons
    * and Chat apps](https://developers.google.com/workspace/extend):
    * 
* @@ -95,7 +95,7 @@ public enum BorderType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Default value. No border.
+     * No border.
      * 
* * NO_BORDER = 1; @@ -105,7 +105,7 @@ public enum BorderType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Outline.
+     * Default value. Outline.
      * 
* * STROKE = 2; @@ -129,7 +129,7 @@ public enum BorderType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Default value. No border.
+     * No border.
      * 
* * NO_BORDER = 1; @@ -140,7 +140,7 @@ public enum BorderType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Outline.
+     * Default value. Outline.
      * 
* * STROKE = 2; @@ -276,6 +276,25 @@ public com.google.apps.card.v1.BorderStyle.BorderType getType() { * *
    * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   *    "red": 1,
+   *    "green": 0,
+   *    "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color stroke_color = 2; @@ -292,6 +311,25 @@ public boolean hasStrokeColor() { * *
    * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   *    "red": 1,
+   *    "green": 0,
+   *    "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color stroke_color = 2; @@ -308,6 +346,25 @@ public com.google.type.Color getStrokeColor() { * *
    * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   *    "red": 1,
+   *    "green": 0,
+   *    "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color stroke_color = 2; @@ -526,7 +583,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * The style options for the border of a card or widget, including the border * type and color. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): *
* @@ -850,6 +907,25 @@ public Builder clearType() { * *
      * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     *    "red": 1,
+     *    "green": 0,
+     *    "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color stroke_color = 2; @@ -865,6 +941,25 @@ public boolean hasStrokeColor() { * *
      * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     *    "red": 1,
+     *    "green": 0,
+     *    "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color stroke_color = 2; @@ -884,6 +979,25 @@ public com.google.type.Color getStrokeColor() { * *
      * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     *    "red": 1,
+     *    "green": 0,
+     *    "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color stroke_color = 2; @@ -907,6 +1021,25 @@ public Builder setStrokeColor(com.google.type.Color value) { * *
      * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     *    "red": 1,
+     *    "green": 0,
+     *    "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color stroke_color = 2; @@ -927,6 +1060,25 @@ public Builder setStrokeColor(com.google.type.Color.Builder builderForValue) { * *
      * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     *    "red": 1,
+     *    "green": 0,
+     *    "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color stroke_color = 2; @@ -955,6 +1107,25 @@ public Builder mergeStrokeColor(com.google.type.Color value) { * *
      * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     *    "red": 1,
+     *    "green": 0,
+     *    "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color stroke_color = 2; @@ -975,6 +1146,25 @@ public Builder clearStrokeColor() { * *
      * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     *    "red": 1,
+     *    "green": 0,
+     *    "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color stroke_color = 2; @@ -990,6 +1180,25 @@ public com.google.type.Color.Builder getStrokeColorBuilder() { * *
      * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     *    "red": 1,
+     *    "green": 0,
+     *    "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color stroke_color = 2; @@ -1007,6 +1216,25 @@ public com.google.type.ColorOrBuilder getStrokeColorOrBuilder() { * *
      * The colors to use when the type is `BORDER_TYPE_STROKE`.
+     *
+     * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
+     *
+     * For example, the following sets the color to red at its maximum intensity:
+     *
+     * ```
+     * "color": {
+     *    "red": 1,
+     *    "green": 0,
+     *    "blue": 0,
+     * }
+     * ```
+     *
+     * The `alpha` field is unavailable for stroke color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color stroke_color = 2; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/BorderStyleOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/BorderStyleOrBuilder.java index c54fea4820..4b9d1f35fe 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/BorderStyleOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/BorderStyleOrBuilder.java @@ -55,6 +55,25 @@ public interface BorderStyleOrBuilder * *
    * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   *    "red": 1,
+   *    "green": 0,
+   *    "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color stroke_color = 2; @@ -68,6 +87,25 @@ public interface BorderStyleOrBuilder * *
    * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   *    "red": 1,
+   *    "green": 0,
+   *    "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color stroke_color = 2; @@ -81,6 +119,25 @@ public interface BorderStyleOrBuilder * *
    * The colors to use when the type is `BORDER_TYPE_STROKE`.
+   *
+   * To set the stroke color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
+   *
+   * For example, the following sets the color to red at its maximum intensity:
+   *
+   * ```
+   * "color": {
+   *    "red": 1,
+   *    "green": 0,
+   *    "blue": 0,
+   * }
+   * ```
+   *
+   * The `alpha` field is unavailable for stroke color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color stroke_color = 2; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Button.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Button.java index 316d5ebca8..81af6dcfc6 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Button.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Button.java @@ -34,7 +34,7 @@ * `onClick` action. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): *
* * Protobuf type {@code google.apps.card.v1.Button} @@ -53,6 +53,7 @@ private Button(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Button() { text_ = ""; altText_ = ""; + type_ = 0; } @java.lang.Override @@ -74,6 +75,231 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.apps.card.v1.Button.class, com.google.apps.card.v1.Button.Builder.class); } + /** + * + * + *
+   * Optional. The
+   * [type](https://m3.material.io/components/all-buttons#9134ac95-678e-49ae-a50a-e71948011b05)
+   * of a button. If `color` field is set, the `type` is forced to `FILLED`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * Protobuf enum {@code google.apps.card.v1.Button.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Don't use. Unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Outlined buttons are medium-emphasis buttons. They usually contain
+     * actions that are important, but aren’t the primary action in a Chat app
+     * or an add-on.
+     * 
+ * + * OUTLINED = 1; + */ + OUTLINED(1), + /** + * + * + *
+     * A filled button has a container with a solid color. It has the most
+     * visual impact and is recommended for the important and primary action in
+     * a Chat app or an add-on.
+     * 
+ * + * FILLED = 2; + */ + FILLED(2), + /** + * + * + *
+     * A filled tonal button is an alternative middle ground between filled and
+     * outlined buttons. They’re useful in contexts where a lower-priority
+     * button requires slightly more emphasis than an outline button would give.
+     * 
+ * + * FILLED_TONAL = 3; + */ + FILLED_TONAL(3), + /** + * + * + *
+     * A button does not have an invisible container in its default state. It is
+     * often used for the lowest priority actions, especially when presenting
+     * multiple options.
+     * 
+ * + * BORDERLESS = 4; + */ + BORDERLESS(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Don't use. Unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Outlined buttons are medium-emphasis buttons. They usually contain
+     * actions that are important, but aren’t the primary action in a Chat app
+     * or an add-on.
+     * 
+ * + * OUTLINED = 1; + */ + public static final int OUTLINED_VALUE = 1; + + /** + * + * + *
+     * A filled button has a container with a solid color. It has the most
+     * visual impact and is recommended for the important and primary action in
+     * a Chat app or an add-on.
+     * 
+ * + * FILLED = 2; + */ + public static final int FILLED_VALUE = 2; + + /** + * + * + *
+     * A filled tonal button is an alternative middle ground between filled and
+     * outlined buttons. They’re useful in contexts where a lower-priority
+     * button requires slightly more emphasis than an outline button would give.
+     * 
+ * + * FILLED_TONAL = 3; + */ + public static final int FILLED_TONAL_VALUE = 3; + + /** + * + * + *
+     * A button does not have an invisible container in its default state. It is
+     * often used for the lowest priority actions, especially when presenting
+     * multiple options.
+     * 
+ * + * BORDERLESS = 4; + */ + public static final int BORDERLESS_VALUE = 4; + + 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 Type 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 Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return OUTLINED; + case 2: + return FILLED; + case 3: + return FILLED_TONAL; + case 4: + return BORDERLESS; + 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 Type findValueByNumber(int number) { + return Type.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.Button.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type 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 Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Button.Type) + } + private int bitField0_; public static final int TEXT_FIELD_NUMBER = 1; @@ -135,8 +361,8 @@ public com.google.protobuf.ByteString getTextBytes() { * * *
-   * The icon image. If both `icon` and `text` are set, then the icon appears
-   * before the text.
+   * An icon displayed inside the button. If both `icon` and `text` are set,
+   * then the icon appears before the text.
    * 
* * .google.apps.card.v1.Icon icon = 2; @@ -152,8 +378,8 @@ public boolean hasIcon() { * * *
-   * The icon image. If both `icon` and `text` are set, then the icon appears
-   * before the text.
+   * An icon displayed inside the button. If both `icon` and `text` are set,
+   * then the icon appears before the text.
    * 
* * .google.apps.card.v1.Icon icon = 2; @@ -169,8 +395,8 @@ public com.google.apps.card.v1.Icon getIcon() { * * *
-   * The icon image. If both `icon` and `text` are set, then the icon appears
-   * before the text.
+   * An icon displayed inside the button. If both `icon` and `text` are set,
+   * then the icon appears before the text.
    * 
* * .google.apps.card.v1.Icon icon = 2; @@ -187,38 +413,29 @@ public com.google.apps.card.v1.IconOrBuilder getIconOrBuilder() { * * *
-   * 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.
+   * Optional. The color of the button. If set, the button `type` is set to
+   * `FILLED` and the color of `text` and `icon` fields are set to a
+   * contrasting color for readability. For example, if the button color is
+   * set to blue, any text or icons in the button are set to white.
    *
-   * 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.
+   * To set the button color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
    *
-   * 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:
+   * For example, the following sets the color to red at its maximum intensity:
    *
    * ```
    * "color": {
    *    "red": 1,
    *    "green": 0,
    *    "blue": 0,
-   *    "alpha": 0.5
    * }
    * ```
+   *
+   * The `alpha` field is unavailable for button color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color color = 3; @@ -234,38 +451,29 @@ public boolean hasColor() { * * *
-   * 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)
-   * ```
+   * Optional. The color of the button. If set, the button `type` is set to
+   * `FILLED` and the color of `text` and `icon` fields are set to a
+   * contrasting color for readability. For example, if the button color is
+   * set to blue, any text or icons in the button are set to white.
    *
-   * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-   * `0` corresponds with a completely transparent color.
+   * To set the button color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
    *
-   * For example, the following color represents a half transparent red:
+   * For example, the following sets the color to red at its maximum intensity:
    *
    * ```
    * "color": {
    *    "red": 1,
    *    "green": 0,
    *    "blue": 0,
-   *    "alpha": 0.5
    * }
    * ```
+   *
+   * The `alpha` field is unavailable for button color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color color = 3; @@ -281,38 +489,29 @@ public com.google.type.Color getColor() { * * *
-   * 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.
+   * Optional. The color of the button. If set, the button `type` is set to
+   * `FILLED` and the color of `text` and `icon` fields are set to a
+   * contrasting color for readability. For example, if the button color is
+   * set to blue, any text or icons in the button are set to white.
    *
-   * 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.
+   * To set the button color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
    *
-   * 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:
+   * For example, the following sets the color to red at its maximum intensity:
    *
    * ```
    * "color": {
    *    "red": 1,
    *    "green": 0,
    *    "blue": 0,
-   *    "alpha": 0.5
    * }
    * ```
+   *
+   * The `alpha` field is unavailable for button color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color color = 3; @@ -457,6 +656,47 @@ public com.google.protobuf.ByteString getAltTextBytes() { } } + public static final int TYPE_FIELD_NUMBER = 7; + private int type_ = 0; + + /** + * + * + *
+   * Optional. The type of a button. If unset, button type defaults to
+   * `OUTLINED`. If the `color` field is set, the button type is forced to
+   * `FILLED` and any value set for this field is ignored.
+   * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Optional. The type of a button. If unset, button type defaults to
+   * `OUTLINED`. If the `color` field is set, the button type is forced to
+   * `FILLED` and any value set for this field is ignored.
+   * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return The type. + */ + @java.lang.Override + public com.google.apps.card.v1.Button.Type getType() { + com.google.apps.card.v1.Button.Type result = + com.google.apps.card.v1.Button.Type.forNumber(type_); + return result == null ? com.google.apps.card.v1.Button.Type.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -489,6 +729,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, altText_); } + if (type_ != com.google.apps.card.v1.Button.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, type_); + } getUnknownFields().writeTo(output); } @@ -516,6 +759,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, altText_); } + if (type_ != com.google.apps.card.v1.Button.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, type_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -546,6 +792,7 @@ public boolean equals(final java.lang.Object obj) { } if (getDisabled() != other.getDisabled()) return false; if (!getAltText().equals(other.getAltText())) return false; + if (type_ != other.type_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -575,6 +822,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled()); hash = (37 * hash) + ALT_TEXT_FIELD_NUMBER; hash = (53 * hash) + getAltText().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -690,7 +939,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * `onClick` action. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): *
* * Protobuf type {@code google.apps.card.v1.Button} @@ -753,6 +1002,7 @@ public Builder clear() { } disabled_ = false; altText_ = ""; + type_ = 0; return this; } @@ -810,6 +1060,9 @@ private void buildPartial0(com.google.apps.card.v1.Button result) { if (((from_bitField0_ & 0x00000020) != 0)) { result.altText_ = altText_; } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.type_ = type_; + } result.bitField0_ |= to_bitField0_; } @@ -880,6 +1133,9 @@ public Builder mergeFrom(com.google.apps.card.v1.Button other) { bitField0_ |= 0x00000020; onChanged(); } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -942,6 +1198,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000020; break; } // case 50 + case 56: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1083,8 +1345,8 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { * * *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
      * 
* * .google.apps.card.v1.Icon icon = 2; @@ -1099,8 +1361,8 @@ public boolean hasIcon() { * * *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
      * 
* * .google.apps.card.v1.Icon icon = 2; @@ -1119,8 +1381,8 @@ public com.google.apps.card.v1.Icon getIcon() { * * *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
      * 
* * .google.apps.card.v1.Icon icon = 2; @@ -1143,8 +1405,8 @@ public Builder setIcon(com.google.apps.card.v1.Icon value) { * * *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
      * 
* * .google.apps.card.v1.Icon icon = 2; @@ -1164,8 +1426,8 @@ public Builder setIcon(com.google.apps.card.v1.Icon.Builder builderForValue) { * * *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
      * 
* * .google.apps.card.v1.Icon icon = 2; @@ -1193,8 +1455,8 @@ public Builder mergeIcon(com.google.apps.card.v1.Icon value) { * * *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
      * 
* * .google.apps.card.v1.Icon icon = 2; @@ -1214,8 +1476,8 @@ public Builder clearIcon() { * * *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
      * 
* * .google.apps.card.v1.Icon icon = 2; @@ -1230,8 +1492,8 @@ public com.google.apps.card.v1.Icon.Builder getIconBuilder() { * * *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
      * 
* * .google.apps.card.v1.Icon icon = 2; @@ -1248,8 +1510,8 @@ public com.google.apps.card.v1.IconOrBuilder getIconOrBuilder() { * * *
-     * The icon image. If both `icon` and `text` are set, then the icon appears
-     * before the text.
+     * An icon displayed inside the button. If both `icon` and `text` are set,
+     * then the icon appears before the text.
      * 
* * .google.apps.card.v1.Icon icon = 2; @@ -1280,38 +1542,29 @@ public com.google.apps.card.v1.IconOrBuilder getIconOrBuilder() { * * *
-     * 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.
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
      *
-     * If unset, the image background is white and the font color is blue.
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
      *
-     * 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:
+     * For example, the following sets the color to red at its maximum intensity:
      *
      * ```
      * "color": {
      *    "red": 1,
      *    "green": 0,
      *    "blue": 0,
-     *    "alpha": 0.5
      * }
      * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color color = 3; @@ -1326,38 +1579,29 @@ public boolean hasColor() { * * *
-     * 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.
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
      *
-     * Optionally set `alpha`, which sets a level of transparency using this
-     * equation:
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
      *
-     * ```
-     * 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:
+     * For example, the following sets the color to red at its maximum intensity:
      *
      * ```
      * "color": {
      *    "red": 1,
      *    "green": 0,
      *    "blue": 0,
-     *    "alpha": 0.5
      * }
      * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color color = 3; @@ -1376,38 +1620,29 @@ public com.google.type.Color getColor() { * * *
-     * 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)
-     * ```
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
      *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
      *
-     * For example, the following color represents a half transparent red:
+     * For example, the following sets the color to red at its maximum intensity:
      *
      * ```
      * "color": {
      *    "red": 1,
      *    "green": 0,
      *    "blue": 0,
-     *    "alpha": 0.5
      * }
      * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color color = 3; @@ -1430,38 +1665,29 @@ public Builder setColor(com.google.type.Color value) { * * *
-     * 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.
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
      *
-     * Optionally set `alpha`, which sets a level of transparency using this
-     * equation:
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
      *
-     * ```
-     * 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:
+     * For example, the following sets the color to red at its maximum intensity:
      *
      * ```
      * "color": {
      *    "red": 1,
      *    "green": 0,
      *    "blue": 0,
-     *    "alpha": 0.5
      * }
      * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color color = 3; @@ -1481,38 +1707,29 @@ public Builder setColor(com.google.type.Color.Builder builderForValue) { * * *
-     * 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.
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
      *
-     * If unset, the image background is white and the font color is blue.
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
      *
-     * 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:
+     * For example, the following sets the color to red at its maximum intensity:
      *
      * ```
      * "color": {
      *    "red": 1,
      *    "green": 0,
      *    "blue": 0,
-     *    "alpha": 0.5
      * }
      * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color color = 3; @@ -1540,38 +1757,29 @@ public Builder mergeColor(com.google.type.Color value) { * * *
-     * 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.
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
      *
-     * If unset, the image background is white and the font color is blue.
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
      *
-     * 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:
+     * For example, the following sets the color to red at its maximum intensity:
      *
      * ```
      * "color": {
      *    "red": 1,
      *    "green": 0,
      *    "blue": 0,
-     *    "alpha": 0.5
      * }
      * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color color = 3; @@ -1591,38 +1799,29 @@ public Builder clearColor() { * * *
-     * 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)
-     * ```
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
      *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
      *
-     * For example, the following color represents a half transparent red:
+     * For example, the following sets the color to red at its maximum intensity:
      *
      * ```
      * "color": {
      *    "red": 1,
      *    "green": 0,
      *    "blue": 0,
-     *    "alpha": 0.5
      * }
      * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color color = 3; @@ -1637,38 +1836,29 @@ public com.google.type.Color.Builder getColorBuilder() { * * *
-     * 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)
-     * ```
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
      *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
      *
-     * For example, the following color represents a half transparent red:
+     * For example, the following sets the color to red at its maximum intensity:
      *
      * ```
      * "color": {
      *    "red": 1,
      *    "green": 0,
      *    "blue": 0,
-     *    "alpha": 0.5
      * }
      * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color color = 3; @@ -1685,38 +1875,29 @@ public com.google.type.ColorOrBuilder getColorOrBuilder() { * * *
-     * 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)
-     * ```
+     * Optional. The color of the button. If set, the button `type` is set to
+     * `FILLED` and the color of `text` and `icon` fields are set to a
+     * contrasting color for readability. For example, if the button color is
+     * set to blue, any text or icons in the button are set to white.
      *
-     * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-     * `0` corresponds with a completely transparent color.
+     * To set the button color, specify a value for the `red`, `green`, and `blue`
+     * fields.
+     * The value must be a float number between 0 and 1 based on the RGB color
+     * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+     * represents the maximum intensity of the color.
      *
-     * For example, the following color represents a half transparent red:
+     * For example, the following sets the color to red at its maximum intensity:
      *
      * ```
      * "color": {
      *    "red": 1,
      *    "green": 0,
      *    "blue": 0,
-     *    "alpha": 0.5
      * }
      * ```
+     *
+     * The `alpha` field is unavailable for button color. If specified, this field
+     * is ignored.
      * 
* * .google.type.Color color = 3; @@ -2129,6 +2310,111 @@ public Builder setAltTextBytes(com.google.protobuf.ByteString value) { return this; } + private int type_ = 0; + + /** + * + * + *
+     * Optional. The type of a button. If unset, button type defaults to
+     * `OUTLINED`. If the `color` field is set, the button type is forced to
+     * `FILLED` and any value set for this field is ignored.
+     * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Optional. The type of a button. If unset, button type defaults to
+     * `OUTLINED`. If the `color` field is set, the button type is forced to
+     * `FILLED` and any value set for this field is ignored.
+     * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @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_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of a button. If unset, button type defaults to
+     * `OUTLINED`. If the `color` field is set, the button type is forced to
+     * `FILLED` and any value set for this field is ignored.
+     * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return The type. + */ + @java.lang.Override + public com.google.apps.card.v1.Button.Type getType() { + com.google.apps.card.v1.Button.Type result = + com.google.apps.card.v1.Button.Type.forNumber(type_); + return result == null ? com.google.apps.card.v1.Button.Type.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. The type of a button. If unset, button type defaults to
+     * `OUTLINED`. If the `color` field is set, the button type is forced to
+     * `FILLED` and any value set for this field is ignored.
+     * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.apps.card.v1.Button.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of a button. If unset, button type defaults to
+     * `OUTLINED`. If the `color` field is set, the button type is forced to
+     * `FILLED` and any value set for this field is ignored.
+     * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000040); + type_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ButtonList.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ButtonList.java index 3c3f79dcaf..c01cedfa00 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ButtonList.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ButtonList.java @@ -28,7 +28,7 @@ * [Add a * button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): *
* @@ -315,7 +315,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * [Add a * button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): *
* diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ButtonOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ButtonOrBuilder.java index cfb8d27966..f651b22ed7 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ButtonOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ButtonOrBuilder.java @@ -54,8 +54,8 @@ public interface ButtonOrBuilder * * *
-   * The icon image. If both `icon` and `text` are set, then the icon appears
-   * before the text.
+   * An icon displayed inside the button. If both `icon` and `text` are set,
+   * then the icon appears before the text.
    * 
* * .google.apps.card.v1.Icon icon = 2; @@ -68,8 +68,8 @@ public interface ButtonOrBuilder * * *
-   * The icon image. If both `icon` and `text` are set, then the icon appears
-   * before the text.
+   * An icon displayed inside the button. If both `icon` and `text` are set,
+   * then the icon appears before the text.
    * 
* * .google.apps.card.v1.Icon icon = 2; @@ -82,8 +82,8 @@ public interface ButtonOrBuilder * * *
-   * The icon image. If both `icon` and `text` are set, then the icon appears
-   * before the text.
+   * An icon displayed inside the button. If both `icon` and `text` are set,
+   * then the icon appears before the text.
    * 
* * .google.apps.card.v1.Icon icon = 2; @@ -94,38 +94,29 @@ public interface ButtonOrBuilder * * *
-   * 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.
+   * Optional. The color of the button. If set, the button `type` is set to
+   * `FILLED` and the color of `text` and `icon` fields are set to a
+   * contrasting color for readability. For example, if the button color is
+   * set to blue, any text or icons in the button are set to white.
    *
-   * If unset, the image background is white and the font color is blue.
+   * To set the button color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
    *
-   * 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:
+   * For example, the following sets the color to red at its maximum intensity:
    *
    * ```
    * "color": {
    *    "red": 1,
    *    "green": 0,
    *    "blue": 0,
-   *    "alpha": 0.5
    * }
    * ```
+   *
+   * The `alpha` field is unavailable for button color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color color = 3; @@ -138,38 +129,29 @@ public interface ButtonOrBuilder * * *
-   * 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:
+   * Optional. The color of the button. If set, the button `type` is set to
+   * `FILLED` and the color of `text` and `icon` fields are set to a
+   * contrasting color for readability. For example, if the button color is
+   * set to blue, any text or icons in the button are set to white.
    *
-   * ```
-   * 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.
+   * To set the button color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
    *
-   * For example, the following color represents a half transparent red:
+   * For example, the following sets the color to red at its maximum intensity:
    *
    * ```
    * "color": {
    *    "red": 1,
    *    "green": 0,
    *    "blue": 0,
-   *    "alpha": 0.5
    * }
    * ```
+   *
+   * The `alpha` field is unavailable for button color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color color = 3; @@ -182,38 +164,29 @@ public interface ButtonOrBuilder * * *
-   * 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)
-   * ```
+   * Optional. The color of the button. If set, the button `type` is set to
+   * `FILLED` and the color of `text` and `icon` fields are set to a
+   * contrasting color for readability. For example, if the button color is
+   * set to blue, any text or icons in the button are set to white.
    *
-   * For `alpha`, a value of `1` corresponds with a solid color, and a value of
-   * `0` corresponds with a completely transparent color.
+   * To set the button color, specify a value for the `red`, `green`, and `blue`
+   * fields.
+   * The value must be a float number between 0 and 1 based on the RGB color
+   * value, where `0` (0/255) represents the absence of color  and `1` (255/255)
+   * represents the maximum intensity of the color.
    *
-   * For example, the following color represents a half transparent red:
+   * For example, the following sets the color to red at its maximum intensity:
    *
    * ```
    * "color": {
    *    "red": 1,
    *    "green": 0,
    *    "blue": 0,
-   *    "alpha": 0.5
    * }
    * ```
+   *
+   * The `alpha` field is unavailable for button color. If specified, this field
+   * is ignored.
    * 
* * .google.type.Color color = 3; @@ -309,4 +282,34 @@ public interface ButtonOrBuilder * @return The bytes for altText. */ com.google.protobuf.ByteString getAltTextBytes(); + + /** + * + * + *
+   * Optional. The type of a button. If unset, button type defaults to
+   * `OUTLINED`. If the `color` field is set, the button type is forced to
+   * `FILLED` and any value set for this field is ignored.
+   * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Optional. The type of a button. If unset, button type defaults to
+   * `OUTLINED`. If the `color` field is set, the button type is forced to
+   * `FILLED` and any value set for this field is ignored.
+   * 
+ * + * .google.apps.card.v1.Button.Type type = 7; + * + * @return The type. + */ + com.google.apps.card.v1.Button.Type getType(); } diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Card.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Card.java index 12b4ef3365..feea5697c4 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Card.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Card.java @@ -24,7 +24,7 @@ * *
  * A card interface displayed in a Google Chat message or Google Workspace
- * Add-on.
+ * add-on.
  *
  * Cards support a defined layout, interactive UI elements like buttons, and
  * rich media like images. Use cards to present detailed information,
@@ -37,9 +37,13 @@
  *
  * * For Google Chat apps, see [Design the components of a card or
  *   dialog](https://developers.google.com/workspace/chat/design-components-card-dialog).
- * * For Google Workspace Add-ons, see [Card-based
+ * * For Google Workspace add-ons, see [Card-based
  * interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards).
  *
+ * Note: You can add up to 100 widgets per card. Any widgets beyond this
+ * limit are ignored. This limit applies to both card messages and dialogs
+ * in Google Chat apps, and to cards in Google Workspace add-ons.
+ *
  * **Example: Card message for a Google Chat app**
  *
  * ![Example contact
@@ -176,7 +180,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * The divider style of a card. Currently only used for dividers betweens card
    * sections.
    *
-   * [Google Workspace Add-ons and Chat
+   * [Google Workspace add-ons and Chat
    * apps](https://developers.google.com/workspace/extend):
    * 
* @@ -197,7 +201,7 @@ public enum DividerStyle implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Default option. Render a solid divider between sections.
+     * Default option. Render a solid divider.
      * 
* * SOLID_DIVIDER = 1; @@ -207,7 +211,8 @@ public enum DividerStyle implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * If set, no divider is rendered between sections.
+     * If set, no divider is rendered. This style completely removes the divider
+     * from the layout. The result is equivalent to not adding a divider at all.
      * 
* * NO_DIVIDER = 2; @@ -231,7 +236,7 @@ public enum DividerStyle implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Default option. Render a solid divider between sections.
+     * Default option. Render a solid divider.
      * 
* * SOLID_DIVIDER = 1; @@ -242,7 +247,8 @@ public enum DividerStyle implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * If set, no divider is rendered between sections.
+     * If set, no divider is rendered. This style completely removes the divider
+     * from the layout. The result is equivalent to not adding a divider at all.
      * 
* * NO_DIVIDER = 2; @@ -336,11 +342,11 @@ private DividerStyle(int value) { * * *
-   * In Google Workspace Add-ons,
+   * In Google Workspace add-ons,
    * determines how a card is displayed.
    *
    * [Google Workspace
-   * Add-ons](https://developers.google.com/workspace/add-ons):
+   * add-ons](https://developers.google.com/workspace/add-ons):
    * 
* * Protobuf enum {@code google.apps.card.v1.Card.DisplayStyle} @@ -574,7 +580,7 @@ public interface CardHeaderOrBuilder *
      * The shape used to crop the image.
      *
-     * [Google Workspace Add-ons and Chat
+     * [Google Workspace add-ons and Chat
      * apps](https://developers.google.com/workspace/extend):
      * 
* @@ -590,7 +596,7 @@ public interface CardHeaderOrBuilder *
      * The shape used to crop the image.
      *
-     * [Google Workspace Add-ons and Chat
+     * [Google Workspace add-ons and Chat
      * apps](https://developers.google.com/workspace/extend):
      * 
* @@ -660,7 +666,7 @@ public interface CardHeaderOrBuilder * Represents a card header. For an example in Google Chat apps, see [Add a * header](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): *
* @@ -829,7 +835,7 @@ public com.google.protobuf.ByteString getSubtitleBytes() { *
      * The shape used to crop the image.
      *
-     * [Google Workspace Add-ons and Chat
+     * [Google Workspace add-ons and Chat
      * apps](https://developers.google.com/workspace/extend):
      * 
* @@ -848,7 +854,7 @@ public int getImageTypeValue() { *
      * The shape used to crop the image.
      *
-     * [Google Workspace Add-ons and Chat
+     * [Google Workspace add-ons and Chat
      * apps](https://developers.google.com/workspace/extend):
      * 
* @@ -1172,7 +1178,7 @@ protected Builder newBuilderForType( * Represents a card header. For an example in Google Chat apps, see [Add a * header](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): *
* @@ -1662,7 +1668,7 @@ public Builder setSubtitleBytes(com.google.protobuf.ByteString value) { *
        * The shape used to crop the image.
        *
-       * [Google Workspace Add-ons and Chat
+       * [Google Workspace add-ons and Chat
        * apps](https://developers.google.com/workspace/extend):
        * 
* @@ -1681,7 +1687,7 @@ public int getImageTypeValue() { *
        * The shape used to crop the image.
        *
-       * [Google Workspace Add-ons and Chat
+       * [Google Workspace add-ons and Chat
        * apps](https://developers.google.com/workspace/extend):
        * 
* @@ -1703,7 +1709,7 @@ public Builder setImageTypeValue(int value) { *
        * The shape used to crop the image.
        *
-       * [Google Workspace Add-ons and Chat
+       * [Google Workspace add-ons and Chat
        * apps](https://developers.google.com/workspace/extend):
        * 
* @@ -1724,7 +1730,7 @@ public com.google.apps.card.v1.Widget.ImageType getImageType() { *
        * The shape used to crop the image.
        *
-       * [Google Workspace Add-ons and Chat
+       * [Google Workspace add-ons and Chat
        * apps](https://developers.google.com/workspace/extend):
        * 
* @@ -1749,7 +1755,7 @@ public Builder setImageType(com.google.apps.card.v1.Widget.ImageType value) { *
        * The shape used to crop the image.
        *
-       * [Google Workspace Add-ons and Chat
+       * [Google Workspace add-ons and Chat
        * apps](https://developers.google.com/workspace/extend):
        * 
* @@ -2067,7 +2073,7 @@ public interface SectionOrBuilder * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string header = 1; @@ -2088,7 +2094,7 @@ public interface SectionOrBuilder * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string header = 1; @@ -2196,6 +2202,49 @@ public interface SectionOrBuilder * @return The uncollapsibleWidgetsCount. */ int getUncollapsibleWidgetsCount(); + + /** + * + * + *
+     * Optional. Define the expand and collapse button of the section.
+     * This button will be shown only if the section is collapsible.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + * + * @return Whether the collapseControl field is set. + */ + boolean hasCollapseControl(); + + /** + * + * + *
+     * Optional. Define the expand and collapse button of the section.
+     * This button will be shown only if the section is collapsible.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + * + * @return The collapseControl. + */ + com.google.apps.card.v1.CollapseControl getCollapseControl(); + + /** + * + * + *
+     * Optional. Define the expand and collapse button of the section.
+     * This button will be shown only if the section is collapsible.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + */ + com.google.apps.card.v1.CollapseControlOrBuilder getCollapseControlOrBuilder(); } /** @@ -2205,7 +2254,7 @@ public interface SectionOrBuilder * A section contains a collection of widgets that are rendered * vertically in the order that they're specified. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -2248,6 +2297,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.apps.card.v1.Card.Section.Builder.class); } + private int bitField0_; public static final int HEADER_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -2265,7 +2315,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string header = 1; @@ -2297,7 +2347,7 @@ public java.lang.String getHeader() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string header = 1; @@ -2450,6 +2500,65 @@ public int getUncollapsibleWidgetsCount() { return uncollapsibleWidgetsCount_; } + public static final int COLLAPSE_CONTROL_FIELD_NUMBER = 8; + private com.google.apps.card.v1.CollapseControl collapseControl_; + + /** + * + * + *
+     * Optional. Define the expand and collapse button of the section.
+     * This button will be shown only if the section is collapsible.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + * + * @return Whether the collapseControl field is set. + */ + @java.lang.Override + public boolean hasCollapseControl() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Define the expand and collapse button of the section.
+     * This button will be shown only if the section is collapsible.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + * + * @return The collapseControl. + */ + @java.lang.Override + public com.google.apps.card.v1.CollapseControl getCollapseControl() { + return collapseControl_ == null + ? com.google.apps.card.v1.CollapseControl.getDefaultInstance() + : collapseControl_; + } + + /** + * + * + *
+     * Optional. Define the expand and collapse button of the section.
+     * This button will be shown only if the section is collapsible.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + */ + @java.lang.Override + public com.google.apps.card.v1.CollapseControlOrBuilder getCollapseControlOrBuilder() { + return collapseControl_ == null + ? com.google.apps.card.v1.CollapseControl.getDefaultInstance() + : collapseControl_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2476,6 +2585,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (uncollapsibleWidgetsCount_ != 0) { output.writeInt32(6, uncollapsibleWidgetsCount_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getCollapseControl()); + } getUnknownFields().writeTo(output); } @@ -2498,6 +2610,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, uncollapsibleWidgetsCount_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCollapseControl()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2517,6 +2632,10 @@ public boolean equals(final java.lang.Object obj) { if (!getWidgetsList().equals(other.getWidgetsList())) return false; if (getCollapsible() != other.getCollapsible()) return false; if (getUncollapsibleWidgetsCount() != other.getUncollapsibleWidgetsCount()) return false; + if (hasCollapseControl() != other.hasCollapseControl()) return false; + if (hasCollapseControl()) { + if (!getCollapseControl().equals(other.getCollapseControl())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2538,6 +2657,10 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCollapsible()); hash = (37 * hash) + UNCOLLAPSIBLE_WIDGETS_COUNT_FIELD_NUMBER; hash = (53 * hash) + getUncollapsibleWidgetsCount(); + if (hasCollapseControl()) { + hash = (37 * hash) + COLLAPSE_CONTROL_FIELD_NUMBER; + hash = (53 * hash) + getCollapseControl().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2647,7 +2770,7 @@ protected Builder newBuilderForType( * A section contains a collection of widgets that are rendered * vertically in the order that they're specified. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -2674,10 +2797,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.apps.card.v1.Card.Section.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getWidgetsFieldBuilder(); + getCollapseControlFieldBuilder(); + } } @java.lang.Override @@ -2694,6 +2827,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); collapsible_ = false; uncollapsibleWidgetsCount_ = 0; + collapseControl_ = null; + if (collapseControlBuilder_ != null) { + collapseControlBuilder_.dispose(); + collapseControlBuilder_ = null; + } return this; } @@ -2752,6 +2890,13 @@ private void buildPartial0(com.google.apps.card.v1.Card.Section result) { if (((from_bitField0_ & 0x00000008) != 0)) { result.uncollapsibleWidgetsCount_ = uncollapsibleWidgetsCount_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.collapseControl_ = + collapseControlBuilder_ == null ? collapseControl_ : collapseControlBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -2839,6 +2984,9 @@ public Builder mergeFrom(com.google.apps.card.v1.Card.Section other) { if (other.getUncollapsibleWidgetsCount() != 0) { setUncollapsibleWidgetsCount(other.getUncollapsibleWidgetsCount()); } + if (other.hasCollapseControl()) { + mergeCollapseControl(other.getCollapseControl()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2895,6 +3043,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 48 + case 66: + { + input.readMessage( + getCollapseControlFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2928,7 +3083,7 @@ public Builder mergeFrom( * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string header = 1; @@ -2959,7 +3114,7 @@ public java.lang.String getHeader() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string header = 1; @@ -2990,7 +3145,7 @@ public com.google.protobuf.ByteString getHeaderBytes() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string header = 1; @@ -3020,7 +3175,7 @@ public Builder setHeader(java.lang.String value) { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string header = 1; @@ -3046,7 +3201,7 @@ public Builder clearHeader() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string header = 1; @@ -3600,6 +3755,219 @@ public Builder clearUncollapsibleWidgetsCount() { return this; } + private com.google.apps.card.v1.CollapseControl collapseControl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.CollapseControl, + com.google.apps.card.v1.CollapseControl.Builder, + com.google.apps.card.v1.CollapseControlOrBuilder> + collapseControlBuilder_; + + /** + * + * + *
+       * Optional. Define the expand and collapse button of the section.
+       * This button will be shown only if the section is collapsible.
+       * If this field isn't set, the default button is used.
+       * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + * + * @return Whether the collapseControl field is set. + */ + public boolean hasCollapseControl() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+       * Optional. Define the expand and collapse button of the section.
+       * This button will be shown only if the section is collapsible.
+       * If this field isn't set, the default button is used.
+       * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + * + * @return The collapseControl. + */ + public com.google.apps.card.v1.CollapseControl getCollapseControl() { + if (collapseControlBuilder_ == null) { + return collapseControl_ == null + ? com.google.apps.card.v1.CollapseControl.getDefaultInstance() + : collapseControl_; + } else { + return collapseControlBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. Define the expand and collapse button of the section.
+       * This button will be shown only if the section is collapsible.
+       * If this field isn't set, the default button is used.
+       * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + */ + public Builder setCollapseControl(com.google.apps.card.v1.CollapseControl value) { + if (collapseControlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + collapseControl_ = value; + } else { + collapseControlBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Define the expand and collapse button of the section.
+       * This button will be shown only if the section is collapsible.
+       * If this field isn't set, the default button is used.
+       * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + */ + public Builder setCollapseControl( + com.google.apps.card.v1.CollapseControl.Builder builderForValue) { + if (collapseControlBuilder_ == null) { + collapseControl_ = builderForValue.build(); + } else { + collapseControlBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Define the expand and collapse button of the section.
+       * This button will be shown only if the section is collapsible.
+       * If this field isn't set, the default button is used.
+       * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + */ + public Builder mergeCollapseControl(com.google.apps.card.v1.CollapseControl value) { + if (collapseControlBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && collapseControl_ != null + && collapseControl_ != com.google.apps.card.v1.CollapseControl.getDefaultInstance()) { + getCollapseControlBuilder().mergeFrom(value); + } else { + collapseControl_ = value; + } + } else { + collapseControlBuilder_.mergeFrom(value); + } + if (collapseControl_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. Define the expand and collapse button of the section.
+       * This button will be shown only if the section is collapsible.
+       * If this field isn't set, the default button is used.
+       * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + */ + public Builder clearCollapseControl() { + bitField0_ = (bitField0_ & ~0x00000010); + collapseControl_ = null; + if (collapseControlBuilder_ != null) { + collapseControlBuilder_.dispose(); + collapseControlBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Define the expand and collapse button of the section.
+       * This button will be shown only if the section is collapsible.
+       * If this field isn't set, the default button is used.
+       * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + */ + public com.google.apps.card.v1.CollapseControl.Builder getCollapseControlBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCollapseControlFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. Define the expand and collapse button of the section.
+       * This button will be shown only if the section is collapsible.
+       * If this field isn't set, the default button is used.
+       * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + */ + public com.google.apps.card.v1.CollapseControlOrBuilder getCollapseControlOrBuilder() { + if (collapseControlBuilder_ != null) { + return collapseControlBuilder_.getMessageOrBuilder(); + } else { + return collapseControl_ == null + ? com.google.apps.card.v1.CollapseControl.getDefaultInstance() + : collapseControl_; + } + } + + /** + * + * + *
+       * Optional. Define the expand and collapse button of the section.
+       * This button will be shown only if the section is collapsible.
+       * If this field isn't set, the default button is used.
+       * 
+ * + * .google.apps.card.v1.CollapseControl collapse_control = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.CollapseControl, + com.google.apps.card.v1.CollapseControl.Builder, + com.google.apps.card.v1.CollapseControlOrBuilder> + getCollapseControlFieldBuilder() { + if (collapseControlBuilder_ == null) { + collapseControlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.CollapseControl, + com.google.apps.card.v1.CollapseControl.Builder, + com.google.apps.card.v1.CollapseControlOrBuilder>( + getCollapseControl(), getParentForChildren(), isClean()); + collapseControl_ = null; + } + return collapseControlBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -3742,7 +4110,7 @@ public interface CardActionOrBuilder * invoice, or open the invoice in a browser. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * Protobuf type {@code google.apps.card.v1.Card.CardAction} @@ -4069,7 +4437,7 @@ protected Builder newBuilderForType( * invoice, or open the invoice in a browser. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * Protobuf type {@code google.apps.card.v1.Card.CardAction} @@ -4644,112 +5012,1655 @@ public com.google.apps.card.v1.Card.CardAction getDefaultInstanceForType() { } } - public interface CardFixedFooterOrBuilder + public interface NestedWidgetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Card.CardFixedFooter) + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Card.NestedWidget) com.google.protobuf.MessageOrBuilder { /** * * *
-     * The primary button of the fixed footer. The button must be a text button
-     * with text and color set.
+     * A text paragraph widget.
      * 
* - * .google.apps.card.v1.Button primary_button = 1; + * .google.apps.card.v1.TextParagraph text_paragraph = 1; * - * @return Whether the primaryButton field is set. + * @return Whether the textParagraph field is set. */ - boolean hasPrimaryButton(); + boolean hasTextParagraph(); /** * * *
-     * The primary button of the fixed footer. The button must be a text button
-     * with text and color set.
+     * A text paragraph widget.
      * 
* - * .google.apps.card.v1.Button primary_button = 1; + * .google.apps.card.v1.TextParagraph text_paragraph = 1; * - * @return The primaryButton. + * @return The textParagraph. */ - com.google.apps.card.v1.Button getPrimaryButton(); + com.google.apps.card.v1.TextParagraph getTextParagraph(); /** * * *
-     * The primary button of the fixed footer. The button must be a text button
-     * with text and color set.
+     * A text paragraph widget.
      * 
* - * .google.apps.card.v1.Button primary_button = 1; + * .google.apps.card.v1.TextParagraph text_paragraph = 1; */ - com.google.apps.card.v1.ButtonOrBuilder getPrimaryButtonOrBuilder(); + com.google.apps.card.v1.TextParagraphOrBuilder getTextParagraphOrBuilder(); /** * * *
-     * The secondary button of the fixed footer.  The button must be a text
-     * button with text and color set.
-     * If `secondaryButton` is set, you must also set `primaryButton`.
+     * A button list widget.
      * 
* - * .google.apps.card.v1.Button secondary_button = 2; + * .google.apps.card.v1.ButtonList button_list = 3; * - * @return Whether the secondaryButton field is set. + * @return Whether the buttonList field is set. */ - boolean hasSecondaryButton(); + boolean hasButtonList(); /** * * *
-     * The secondary button of the fixed footer.  The button must be a text
-     * button with text and color set.
-     * If `secondaryButton` is set, you must also set `primaryButton`.
+     * A button list widget.
      * 
* - * .google.apps.card.v1.Button secondary_button = 2; + * .google.apps.card.v1.ButtonList button_list = 3; * - * @return The secondaryButton. + * @return The buttonList. */ - com.google.apps.card.v1.Button getSecondaryButton(); + com.google.apps.card.v1.ButtonList getButtonList(); /** * * *
-     * The secondary button of the fixed footer.  The button must be a text
-     * button with text and color set.
-     * If `secondaryButton` is set, you must also set `primaryButton`.
+     * A button list widget.
      * 
* - * .google.apps.card.v1.Button secondary_button = 2; + * .google.apps.card.v1.ButtonList button_list = 3; */ - com.google.apps.card.v1.ButtonOrBuilder getSecondaryButtonOrBuilder(); - } + com.google.apps.card.v1.ButtonListOrBuilder getButtonListOrBuilder(); - /** - * - * - *
-   * A persistent (sticky) footer that that appears at the bottom of the card.
-   *
-   * Setting `fixedFooter` without specifying a `primaryButton` or a
-   * `secondaryButton` causes an error.
-   *
-   * For Chat apps, you can use fixed footers in
-   * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not
-   * [card
-   * messages](https://developers.google.com/workspace/chat/create-messages#create).
-   * For an example in Google Chat apps, see [Add a persistent
+    /**
+     *
+     *
+     * 
+     * An image widget.
+     * 
+ * + * .google.apps.card.v1.Image image = 10; + * + * @return Whether the image field is set. + */ + boolean hasImage(); + + /** + * + * + *
+     * An image widget.
+     * 
+ * + * .google.apps.card.v1.Image image = 10; + * + * @return The image. + */ + com.google.apps.card.v1.Image getImage(); + + /** + * + * + *
+     * An image widget.
+     * 
+ * + * .google.apps.card.v1.Image image = 10; + */ + com.google.apps.card.v1.ImageOrBuilder getImageOrBuilder(); + + com.google.apps.card.v1.Card.NestedWidget.DataCase getDataCase(); + } + + /** + * + * + *
+   * A list of widgets that can be displayed in a containing layout, such
+   * as a `CarouselCard`.
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.Card.NestedWidget} + */ + public static final class NestedWidget extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.Card.NestedWidget) + NestedWidgetOrBuilder { + private static final long serialVersionUID = 0L; + + // Use NestedWidget.newBuilder() to construct. + private NestedWidget(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NestedWidget() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NestedWidget(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Card_NestedWidget_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Card_NestedWidget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Card.NestedWidget.class, + com.google.apps.card.v1.Card.NestedWidget.Builder.class); + } + + private int dataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object data_; + + public enum DataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT_PARAGRAPH(1), + BUTTON_LIST(3), + IMAGE(10), + DATA_NOT_SET(0); + private final int value; + + private DataCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataCase valueOf(int value) { + return forNumber(value); + } + + public static DataCase forNumber(int value) { + switch (value) { + case 1: + return TEXT_PARAGRAPH; + case 3: + return BUTTON_LIST; + case 10: + return IMAGE; + case 0: + return DATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public static final int TEXT_PARAGRAPH_FIELD_NUMBER = 1; + + /** + * + * + *
+     * A text paragraph widget.
+     * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + * + * @return Whether the textParagraph field is set. + */ + @java.lang.Override + public boolean hasTextParagraph() { + return dataCase_ == 1; + } + + /** + * + * + *
+     * A text paragraph widget.
+     * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + * + * @return The textParagraph. + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraph getTextParagraph() { + if (dataCase_ == 1) { + return (com.google.apps.card.v1.TextParagraph) data_; + } + return com.google.apps.card.v1.TextParagraph.getDefaultInstance(); + } + + /** + * + * + *
+     * A text paragraph widget.
+     * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraphOrBuilder getTextParagraphOrBuilder() { + if (dataCase_ == 1) { + return (com.google.apps.card.v1.TextParagraph) data_; + } + return com.google.apps.card.v1.TextParagraph.getDefaultInstance(); + } + + public static final int BUTTON_LIST_FIELD_NUMBER = 3; + + /** + * + * + *
+     * A button list widget.
+     * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + * + * @return Whether the buttonList field is set. + */ + @java.lang.Override + public boolean hasButtonList() { + return dataCase_ == 3; + } + + /** + * + * + *
+     * A button list widget.
+     * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + * + * @return The buttonList. + */ + @java.lang.Override + public com.google.apps.card.v1.ButtonList getButtonList() { + if (dataCase_ == 3) { + return (com.google.apps.card.v1.ButtonList) data_; + } + return com.google.apps.card.v1.ButtonList.getDefaultInstance(); + } + + /** + * + * + *
+     * A button list widget.
+     * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + */ + @java.lang.Override + public com.google.apps.card.v1.ButtonListOrBuilder getButtonListOrBuilder() { + if (dataCase_ == 3) { + return (com.google.apps.card.v1.ButtonList) data_; + } + return com.google.apps.card.v1.ButtonList.getDefaultInstance(); + } + + public static final int IMAGE_FIELD_NUMBER = 10; + + /** + * + * + *
+     * An image widget.
+     * 
+ * + * .google.apps.card.v1.Image image = 10; + * + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return dataCase_ == 10; + } + + /** + * + * + *
+     * An image widget.
+     * 
+ * + * .google.apps.card.v1.Image image = 10; + * + * @return The image. + */ + @java.lang.Override + public com.google.apps.card.v1.Image getImage() { + if (dataCase_ == 10) { + return (com.google.apps.card.v1.Image) data_; + } + return com.google.apps.card.v1.Image.getDefaultInstance(); + } + + /** + * + * + *
+     * An image widget.
+     * 
+ * + * .google.apps.card.v1.Image image = 10; + */ + @java.lang.Override + public com.google.apps.card.v1.ImageOrBuilder getImageOrBuilder() { + if (dataCase_ == 10) { + return (com.google.apps.card.v1.Image) data_; + } + return com.google.apps.card.v1.Image.getDefaultInstance(); + } + + 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 (dataCase_ == 1) { + output.writeMessage(1, (com.google.apps.card.v1.TextParagraph) data_); + } + if (dataCase_ == 3) { + output.writeMessage(3, (com.google.apps.card.v1.ButtonList) data_); + } + if (dataCase_ == 10) { + output.writeMessage(10, (com.google.apps.card.v1.Image) data_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.apps.card.v1.TextParagraph) data_); + } + if (dataCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.apps.card.v1.ButtonList) data_); + } + if (dataCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.apps.card.v1.Image) data_); + } + 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.Card.NestedWidget)) { + return super.equals(obj); + } + com.google.apps.card.v1.Card.NestedWidget other = + (com.google.apps.card.v1.Card.NestedWidget) obj; + + if (!getDataCase().equals(other.getDataCase())) return false; + switch (dataCase_) { + case 1: + if (!getTextParagraph().equals(other.getTextParagraph())) return false; + break; + case 3: + if (!getButtonList().equals(other.getButtonList())) return false; + break; + case 10: + if (!getImage().equals(other.getImage())) return false; + break; + case 0: + default: + } + 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(); + switch (dataCase_) { + case 1: + hash = (37 * hash) + TEXT_PARAGRAPH_FIELD_NUMBER; + hash = (53 * hash) + getTextParagraph().hashCode(); + break; + case 3: + hash = (37 * hash) + BUTTON_LIST_FIELD_NUMBER; + hash = (53 * hash) + getButtonList().hashCode(); + break; + case 10: + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.Card.NestedWidget parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Card.NestedWidget 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.Card.NestedWidget parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Card.NestedWidget 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.Card.NestedWidget parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Card.NestedWidget 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.Card.NestedWidget parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Card.NestedWidget 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.Card.NestedWidget parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Card.NestedWidget 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.Card.NestedWidget 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.Card.NestedWidget 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.Card.NestedWidget 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 list of widgets that can be displayed in a containing layout, such
+     * as a `CarouselCard`.
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * Protobuf type {@code google.apps.card.v1.Card.NestedWidget} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Card.NestedWidget) + com.google.apps.card.v1.Card.NestedWidgetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Card_NestedWidget_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Card_NestedWidget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Card.NestedWidget.class, + com.google.apps.card.v1.Card.NestedWidget.Builder.class); + } + + // Construct using com.google.apps.card.v1.Card.NestedWidget.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (textParagraphBuilder_ != null) { + textParagraphBuilder_.clear(); + } + if (buttonListBuilder_ != null) { + buttonListBuilder_.clear(); + } + if (imageBuilder_ != null) { + imageBuilder_.clear(); + } + dataCase_ = 0; + data_ = null; + 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_Card_NestedWidget_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.Card.NestedWidget getDefaultInstanceForType() { + return com.google.apps.card.v1.Card.NestedWidget.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.Card.NestedWidget build() { + com.google.apps.card.v1.Card.NestedWidget result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.Card.NestedWidget buildPartial() { + com.google.apps.card.v1.Card.NestedWidget result = + new com.google.apps.card.v1.Card.NestedWidget(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.apps.card.v1.Card.NestedWidget result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.apps.card.v1.Card.NestedWidget result) { + result.dataCase_ = dataCase_; + result.data_ = this.data_; + if (dataCase_ == 1 && textParagraphBuilder_ != null) { + result.data_ = textParagraphBuilder_.build(); + } + if (dataCase_ == 3 && buttonListBuilder_ != null) { + result.data_ = buttonListBuilder_.build(); + } + if (dataCase_ == 10 && imageBuilder_ != null) { + result.data_ = imageBuilder_.build(); + } + } + + @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.Card.NestedWidget) { + return mergeFrom((com.google.apps.card.v1.Card.NestedWidget) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.Card.NestedWidget other) { + if (other == com.google.apps.card.v1.Card.NestedWidget.getDefaultInstance()) return this; + switch (other.getDataCase()) { + case TEXT_PARAGRAPH: + { + mergeTextParagraph(other.getTextParagraph()); + break; + } + case BUTTON_LIST: + { + mergeButtonList(other.getButtonList()); + break; + } + case IMAGE: + { + mergeImage(other.getImage()); + break; + } + case DATA_NOT_SET: + { + break; + } + } + 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: + { + input.readMessage(getTextParagraphFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 1; + break; + } // case 10 + case 26: + { + input.readMessage(getButtonListFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 3; + break; + } // case 26 + case 82: + { + input.readMessage(getImageFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 10; + break; + } // case 82 + 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 dataCase_ = 0; + private java.lang.Object data_; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public Builder clearData() { + dataCase_ = 0; + data_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder> + textParagraphBuilder_; + + /** + * + * + *
+       * A text paragraph widget.
+       * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + * + * @return Whether the textParagraph field is set. + */ + @java.lang.Override + public boolean hasTextParagraph() { + return dataCase_ == 1; + } + + /** + * + * + *
+       * A text paragraph widget.
+       * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + * + * @return The textParagraph. + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraph getTextParagraph() { + if (textParagraphBuilder_ == null) { + if (dataCase_ == 1) { + return (com.google.apps.card.v1.TextParagraph) data_; + } + return com.google.apps.card.v1.TextParagraph.getDefaultInstance(); + } else { + if (dataCase_ == 1) { + return textParagraphBuilder_.getMessage(); + } + return com.google.apps.card.v1.TextParagraph.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A text paragraph widget.
+       * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + */ + public Builder setTextParagraph(com.google.apps.card.v1.TextParagraph value) { + if (textParagraphBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + textParagraphBuilder_.setMessage(value); + } + dataCase_ = 1; + return this; + } + + /** + * + * + *
+       * A text paragraph widget.
+       * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + */ + public Builder setTextParagraph( + com.google.apps.card.v1.TextParagraph.Builder builderForValue) { + if (textParagraphBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + textParagraphBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 1; + return this; + } + + /** + * + * + *
+       * A text paragraph widget.
+       * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + */ + public Builder mergeTextParagraph(com.google.apps.card.v1.TextParagraph value) { + if (textParagraphBuilder_ == null) { + if (dataCase_ == 1 + && data_ != com.google.apps.card.v1.TextParagraph.getDefaultInstance()) { + data_ = + com.google.apps.card.v1.TextParagraph.newBuilder( + (com.google.apps.card.v1.TextParagraph) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 1) { + textParagraphBuilder_.mergeFrom(value); + } else { + textParagraphBuilder_.setMessage(value); + } + } + dataCase_ = 1; + return this; + } + + /** + * + * + *
+       * A text paragraph widget.
+       * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + */ + public Builder clearTextParagraph() { + if (textParagraphBuilder_ == null) { + if (dataCase_ == 1) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 1) { + dataCase_ = 0; + data_ = null; + } + textParagraphBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * A text paragraph widget.
+       * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + */ + public com.google.apps.card.v1.TextParagraph.Builder getTextParagraphBuilder() { + return getTextParagraphFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * A text paragraph widget.
+       * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraphOrBuilder getTextParagraphOrBuilder() { + if ((dataCase_ == 1) && (textParagraphBuilder_ != null)) { + return textParagraphBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 1) { + return (com.google.apps.card.v1.TextParagraph) data_; + } + return com.google.apps.card.v1.TextParagraph.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A text paragraph widget.
+       * 
+ * + * .google.apps.card.v1.TextParagraph text_paragraph = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder> + getTextParagraphFieldBuilder() { + if (textParagraphBuilder_ == null) { + if (!(dataCase_ == 1)) { + data_ = com.google.apps.card.v1.TextParagraph.getDefaultInstance(); + } + textParagraphBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder>( + (com.google.apps.card.v1.TextParagraph) data_, getParentForChildren(), isClean()); + data_ = null; + } + dataCase_ = 1; + onChanged(); + return textParagraphBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.ButtonList, + com.google.apps.card.v1.ButtonList.Builder, + com.google.apps.card.v1.ButtonListOrBuilder> + buttonListBuilder_; + + /** + * + * + *
+       * A button list widget.
+       * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + * + * @return Whether the buttonList field is set. + */ + @java.lang.Override + public boolean hasButtonList() { + return dataCase_ == 3; + } + + /** + * + * + *
+       * A button list widget.
+       * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + * + * @return The buttonList. + */ + @java.lang.Override + public com.google.apps.card.v1.ButtonList getButtonList() { + if (buttonListBuilder_ == null) { + if (dataCase_ == 3) { + return (com.google.apps.card.v1.ButtonList) data_; + } + return com.google.apps.card.v1.ButtonList.getDefaultInstance(); + } else { + if (dataCase_ == 3) { + return buttonListBuilder_.getMessage(); + } + return com.google.apps.card.v1.ButtonList.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A button list widget.
+       * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + */ + public Builder setButtonList(com.google.apps.card.v1.ButtonList value) { + if (buttonListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + buttonListBuilder_.setMessage(value); + } + dataCase_ = 3; + return this; + } + + /** + * + * + *
+       * A button list widget.
+       * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + */ + public Builder setButtonList(com.google.apps.card.v1.ButtonList.Builder builderForValue) { + if (buttonListBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + buttonListBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 3; + return this; + } + + /** + * + * + *
+       * A button list widget.
+       * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + */ + public Builder mergeButtonList(com.google.apps.card.v1.ButtonList value) { + if (buttonListBuilder_ == null) { + if (dataCase_ == 3 && data_ != com.google.apps.card.v1.ButtonList.getDefaultInstance()) { + data_ = + com.google.apps.card.v1.ButtonList.newBuilder( + (com.google.apps.card.v1.ButtonList) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 3) { + buttonListBuilder_.mergeFrom(value); + } else { + buttonListBuilder_.setMessage(value); + } + } + dataCase_ = 3; + return this; + } + + /** + * + * + *
+       * A button list widget.
+       * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + */ + public Builder clearButtonList() { + if (buttonListBuilder_ == null) { + if (dataCase_ == 3) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 3) { + dataCase_ = 0; + data_ = null; + } + buttonListBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * A button list widget.
+       * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + */ + public com.google.apps.card.v1.ButtonList.Builder getButtonListBuilder() { + return getButtonListFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * A button list widget.
+       * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + */ + @java.lang.Override + public com.google.apps.card.v1.ButtonListOrBuilder getButtonListOrBuilder() { + if ((dataCase_ == 3) && (buttonListBuilder_ != null)) { + return buttonListBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 3) { + return (com.google.apps.card.v1.ButtonList) data_; + } + return com.google.apps.card.v1.ButtonList.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A button list widget.
+       * 
+ * + * .google.apps.card.v1.ButtonList button_list = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.ButtonList, + com.google.apps.card.v1.ButtonList.Builder, + com.google.apps.card.v1.ButtonListOrBuilder> + getButtonListFieldBuilder() { + if (buttonListBuilder_ == null) { + if (!(dataCase_ == 3)) { + data_ = com.google.apps.card.v1.ButtonList.getDefaultInstance(); + } + buttonListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.ButtonList, + com.google.apps.card.v1.ButtonList.Builder, + com.google.apps.card.v1.ButtonListOrBuilder>( + (com.google.apps.card.v1.ButtonList) data_, getParentForChildren(), isClean()); + data_ = null; + } + dataCase_ = 3; + onChanged(); + return buttonListBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Image, + com.google.apps.card.v1.Image.Builder, + com.google.apps.card.v1.ImageOrBuilder> + imageBuilder_; + + /** + * + * + *
+       * An image widget.
+       * 
+ * + * .google.apps.card.v1.Image image = 10; + * + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return dataCase_ == 10; + } + + /** + * + * + *
+       * An image widget.
+       * 
+ * + * .google.apps.card.v1.Image image = 10; + * + * @return The image. + */ + @java.lang.Override + public com.google.apps.card.v1.Image getImage() { + if (imageBuilder_ == null) { + if (dataCase_ == 10) { + return (com.google.apps.card.v1.Image) data_; + } + return com.google.apps.card.v1.Image.getDefaultInstance(); + } else { + if (dataCase_ == 10) { + return imageBuilder_.getMessage(); + } + return com.google.apps.card.v1.Image.getDefaultInstance(); + } + } + + /** + * + * + *
+       * An image widget.
+       * 
+ * + * .google.apps.card.v1.Image image = 10; + */ + public Builder setImage(com.google.apps.card.v1.Image value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + dataCase_ = 10; + return this; + } + + /** + * + * + *
+       * An image widget.
+       * 
+ * + * .google.apps.card.v1.Image image = 10; + */ + public Builder setImage(com.google.apps.card.v1.Image.Builder builderForValue) { + if (imageBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 10; + return this; + } + + /** + * + * + *
+       * An image widget.
+       * 
+ * + * .google.apps.card.v1.Image image = 10; + */ + public Builder mergeImage(com.google.apps.card.v1.Image value) { + if (imageBuilder_ == null) { + if (dataCase_ == 10 && data_ != com.google.apps.card.v1.Image.getDefaultInstance()) { + data_ = + com.google.apps.card.v1.Image.newBuilder((com.google.apps.card.v1.Image) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 10) { + imageBuilder_.mergeFrom(value); + } else { + imageBuilder_.setMessage(value); + } + } + dataCase_ = 10; + return this; + } + + /** + * + * + *
+       * An image widget.
+       * 
+ * + * .google.apps.card.v1.Image image = 10; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + if (dataCase_ == 10) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 10) { + dataCase_ = 0; + data_ = null; + } + imageBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * An image widget.
+       * 
+ * + * .google.apps.card.v1.Image image = 10; + */ + public com.google.apps.card.v1.Image.Builder getImageBuilder() { + return getImageFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * An image widget.
+       * 
+ * + * .google.apps.card.v1.Image image = 10; + */ + @java.lang.Override + public com.google.apps.card.v1.ImageOrBuilder getImageOrBuilder() { + if ((dataCase_ == 10) && (imageBuilder_ != null)) { + return imageBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 10) { + return (com.google.apps.card.v1.Image) data_; + } + return com.google.apps.card.v1.Image.getDefaultInstance(); + } + } + + /** + * + * + *
+       * An image widget.
+       * 
+ * + * .google.apps.card.v1.Image image = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Image, + com.google.apps.card.v1.Image.Builder, + com.google.apps.card.v1.ImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + if (!(dataCase_ == 10)) { + data_ = com.google.apps.card.v1.Image.getDefaultInstance(); + } + imageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Image, + com.google.apps.card.v1.Image.Builder, + com.google.apps.card.v1.ImageOrBuilder>( + (com.google.apps.card.v1.Image) data_, getParentForChildren(), isClean()); + data_ = null; + } + dataCase_ = 10; + onChanged(); + return imageBuilder_; + } + + @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.Card.NestedWidget) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.Card.NestedWidget) + private static final com.google.apps.card.v1.Card.NestedWidget DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.Card.NestedWidget(); + } + + public static com.google.apps.card.v1.Card.NestedWidget getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NestedWidget 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.Card.NestedWidget getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CardFixedFooterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Card.CardFixedFooter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The primary button of the fixed footer. The button must be a text button
+     * with text and color set.
+     * 
+ * + * .google.apps.card.v1.Button primary_button = 1; + * + * @return Whether the primaryButton field is set. + */ + boolean hasPrimaryButton(); + + /** + * + * + *
+     * The primary button of the fixed footer. The button must be a text button
+     * with text and color set.
+     * 
+ * + * .google.apps.card.v1.Button primary_button = 1; + * + * @return The primaryButton. + */ + com.google.apps.card.v1.Button getPrimaryButton(); + + /** + * + * + *
+     * The primary button of the fixed footer. The button must be a text button
+     * with text and color set.
+     * 
+ * + * .google.apps.card.v1.Button primary_button = 1; + */ + com.google.apps.card.v1.ButtonOrBuilder getPrimaryButtonOrBuilder(); + + /** + * + * + *
+     * The secondary button of the fixed footer.  The button must be a text
+     * button with text and color set.
+     * If `secondaryButton` is set, you must also set `primaryButton`.
+     * 
+ * + * .google.apps.card.v1.Button secondary_button = 2; + * + * @return Whether the secondaryButton field is set. + */ + boolean hasSecondaryButton(); + + /** + * + * + *
+     * The secondary button of the fixed footer.  The button must be a text
+     * button with text and color set.
+     * If `secondaryButton` is set, you must also set `primaryButton`.
+     * 
+ * + * .google.apps.card.v1.Button secondary_button = 2; + * + * @return The secondaryButton. + */ + com.google.apps.card.v1.Button getSecondaryButton(); + + /** + * + * + *
+     * The secondary button of the fixed footer.  The button must be a text
+     * button with text and color set.
+     * If `secondaryButton` is set, you must also set `primaryButton`.
+     * 
+ * + * .google.apps.card.v1.Button secondary_button = 2; + */ + com.google.apps.card.v1.ButtonOrBuilder getSecondaryButtonOrBuilder(); + } + + /** + * + * + *
+   * A persistent (sticky) footer that that appears at the bottom of the card.
+   *
+   * Setting `fixedFooter` without specifying a `primaryButton` or a
+   * `secondaryButton` causes an error.
+   *
+   * For Chat apps, you can use fixed footers in
+   * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not
+   * [card
+   * messages](https://developers.google.com/workspace/chat/create-messages#create).
+   * For an example in Google Chat apps, see [Add a persistent
    * footer](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer).
    *
-   * [Google Workspace Add-ons and Chat
+   * [Google Workspace add-ons and Chat
    * apps](https://developers.google.com/workspace/extend):
    * 
* @@ -5101,7 +7012,7 @@ protected Builder newBuilderForType( * For an example in Google Chat apps, see [Add a persistent * footer](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): *
* @@ -5949,7 +7860,7 @@ public com.google.apps.card.v1.Card.SectionOrBuilder getSectionsOrBuilder(int in * * *
-   * The divider style between sections.
+   * The divider style between the header, sections and footer.
    * 
* * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; @@ -5965,7 +7876,7 @@ public int getSectionDividerStyleValue() { * * *
-   * The divider style between sections.
+   * The divider style between the header, sections and footer.
    * 
* * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; @@ -5991,7 +7902,7 @@ public com.google.apps.card.v1.Card.DividerStyle getSectionDividerStyle() { * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -6039,7 +7950,7 @@ public java.util.List getCardActionsLis * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -6088,7 +7999,7 @@ public java.util.List getCardActionsLis * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -6136,7 +8047,7 @@ public int getCardActionsCount() { * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -6184,7 +8095,7 @@ public com.google.apps.card.v1.Card.CardAction getCardActions(int index) { * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -6237,7 +8148,7 @@ public com.google.apps.card.v1.Card.CardActionOrBuilder getCardActionsOrBuilder( * Name of the card. Used as a card identifier in card navigation. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * string name = 4; @@ -6264,7 +8175,7 @@ public java.lang.String getName() { * Name of the card. Used as a card identifier in card navigation. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * string name = 4; @@ -6300,7 +8211,7 @@ public com.google.protobuf.ByteString getNameBytes() { * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -6326,7 +8237,7 @@ public boolean hasFixedFooter() { * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -6354,7 +8265,7 @@ public com.google.apps.card.v1.Card.CardFixedFooter getFixedFooter() { * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -6374,11 +8285,11 @@ public com.google.apps.card.v1.Card.CardFixedFooterOrBuilder getFixedFooterOrBui * * *
-   * In Google Workspace Add-ons, sets the display properties of the
+   * In Google Workspace add-ons, sets the display properties of the
    * `peekCardHeader`.
    *
    * [Google Workspace
-   * Add-ons](https://developers.google.com/workspace/add-ons):
+   * add-ons](https://developers.google.com/workspace/add-ons):
    * 
* * .google.apps.card.v1.Card.DisplayStyle display_style = 6; @@ -6394,11 +8305,11 @@ public int getDisplayStyleValue() { * * *
-   * In Google Workspace Add-ons, sets the display properties of the
+   * In Google Workspace add-ons, sets the display properties of the
    * `peekCardHeader`.
    *
    * [Google Workspace
-   * Add-ons](https://developers.google.com/workspace/add-ons):
+   * add-ons](https://developers.google.com/workspace/add-ons):
    * 
* * .google.apps.card.v1.Card.DisplayStyle display_style = 6; @@ -6424,7 +8335,7 @@ public com.google.apps.card.v1.Card.DisplayStyle getDisplayStyle() { * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -6445,7 +8356,7 @@ public boolean hasPeekCardHeader() { * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -6468,7 +8379,7 @@ public com.google.apps.card.v1.Card.CardHeader getPeekCardHeader() { * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -6729,7 +8640,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * A card interface displayed in a Google Chat message or Google Workspace
-   * Add-on.
+   * add-on.
    *
    * Cards support a defined layout, interactive UI elements like buttons, and
    * rich media like images. Use cards to present detailed information,
@@ -6742,9 +8653,13 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    *
    * * For Google Chat apps, see [Design the components of a card or
    *   dialog](https://developers.google.com/workspace/chat/design-components-card-dialog).
-   * * For Google Workspace Add-ons, see [Card-based
+   * * For Google Workspace add-ons, see [Card-based
    * interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards).
    *
+   * Note: You can add up to 100 widgets per card. Any widgets beyond this
+   * limit are ignored. This limit applies to both card messages and dialogs
+   * in Google Chat apps, and to cards in Google Workspace add-ons.
+   *
    * **Example: Card message for a Google Chat app**
    *
    * ![Example contact
@@ -7846,7 +9761,7 @@ public java.util.List getSectionsB
      *
      *
      * 
-     * The divider style between sections.
+     * The divider style between the header, sections and footer.
      * 
* * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; @@ -7862,7 +9777,7 @@ public int getSectionDividerStyleValue() { * * *
-     * The divider style between sections.
+     * The divider style between the header, sections and footer.
      * 
* * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; @@ -7881,7 +9796,7 @@ public Builder setSectionDividerStyleValue(int value) { * * *
-     * The divider style between sections.
+     * The divider style between the header, sections and footer.
      * 
* * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; @@ -7899,7 +9814,7 @@ public com.google.apps.card.v1.Card.DividerStyle getSectionDividerStyle() { * * *
-     * The divider style between sections.
+     * The divider style between the header, sections and footer.
      * 
* * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; @@ -7921,7 +9836,7 @@ public Builder setSectionDividerStyle(com.google.apps.card.v1.Card.DividerStyle * * *
-     * The divider style between sections.
+     * The divider style between the header, sections and footer.
      * 
* * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; @@ -7959,7 +9874,7 @@ private void ensureCardActionsIsMutable() { * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8010,7 +9925,7 @@ public java.util.List getCardActionsLis * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8061,7 +9976,7 @@ public int getCardActionsCount() { * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8112,7 +10027,7 @@ public com.google.apps.card.v1.Card.CardAction getCardActions(int index) { * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8169,7 +10084,7 @@ public Builder setCardActions(int index, com.google.apps.card.v1.Card.CardAction * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8224,7 +10139,7 @@ public Builder setCardActions( * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8281,7 +10196,7 @@ public Builder addCardActions(com.google.apps.card.v1.Card.CardAction value) { * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8338,7 +10253,7 @@ public Builder addCardActions(int index, com.google.apps.card.v1.Card.CardAction * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8392,7 +10307,7 @@ public Builder addCardActions(com.google.apps.card.v1.Card.CardAction.Builder bu * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8447,7 +10362,7 @@ public Builder addCardActions( * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8502,7 +10417,7 @@ public Builder addAllCardActions( * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8556,7 +10471,7 @@ public Builder clearCardActions() { * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8610,7 +10525,7 @@ public Builder removeCardActions(int index) { * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8657,7 +10572,7 @@ public com.google.apps.card.v1.Card.CardAction.Builder getCardActionsBuilder(int * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8708,7 +10623,7 @@ public com.google.apps.card.v1.Card.CardActionOrBuilder getCardActionsOrBuilder( * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8760,7 +10675,7 @@ public com.google.apps.card.v1.Card.CardActionOrBuilder getCardActionsOrBuilder( * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8808,7 +10723,7 @@ public com.google.apps.card.v1.Card.CardAction.Builder addCardActionsBuilder() { * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8856,7 +10771,7 @@ public com.google.apps.card.v1.Card.CardAction.Builder addCardActionsBuilder(int * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -8923,7 +10838,7 @@ public com.google.apps.card.v1.Card.CardAction.Builder addCardActionsBuilder(int * Name of the card. Used as a card identifier in card navigation. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): *
* * string name = 4; @@ -8949,7 +10864,7 @@ public java.lang.String getName() { * Name of the card. Used as a card identifier in card navigation. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * string name = 4; @@ -8975,7 +10890,7 @@ public com.google.protobuf.ByteString getNameBytes() { * Name of the card. Used as a card identifier in card navigation. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * string name = 4; @@ -9000,7 +10915,7 @@ public Builder setName(java.lang.String value) { * Name of the card. Used as a card identifier in card navigation. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * string name = 4; @@ -9021,7 +10936,7 @@ public Builder clearName() { * Name of the card. Used as a card identifier in card navigation. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * string name = 4; @@ -9060,7 +10975,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -9085,7 +11000,7 @@ public boolean hasFixedFooter() { * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -9116,7 +11031,7 @@ public com.google.apps.card.v1.Card.CardFixedFooter getFixedFooter() { * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -9149,7 +11064,7 @@ public Builder setFixedFooter(com.google.apps.card.v1.Card.CardFixedFooter value * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -9180,7 +11095,7 @@ public Builder setFixedFooter( * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -9218,7 +11133,7 @@ public Builder mergeFixedFooter(com.google.apps.card.v1.Card.CardFixedFooter val * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -9248,7 +11163,7 @@ public Builder clearFixedFooter() { * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -9273,7 +11188,7 @@ public com.google.apps.card.v1.Card.CardFixedFooter.Builder getFixedFooterBuilde * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -9302,7 +11217,7 @@ public com.google.apps.card.v1.Card.CardFixedFooterOrBuilder getFixedFooterOrBui * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -9331,11 +11246,11 @@ public com.google.apps.card.v1.Card.CardFixedFooterOrBuilder getFixedFooterOrBui * * *
-     * In Google Workspace Add-ons, sets the display properties of the
+     * In Google Workspace add-ons, sets the display properties of the
      * `peekCardHeader`.
      *
      * [Google Workspace
-     * Add-ons](https://developers.google.com/workspace/add-ons):
+     * add-ons](https://developers.google.com/workspace/add-ons):
      * 
* * .google.apps.card.v1.Card.DisplayStyle display_style = 6; @@ -9351,11 +11266,11 @@ public int getDisplayStyleValue() { * * *
-     * In Google Workspace Add-ons, sets the display properties of the
+     * In Google Workspace add-ons, sets the display properties of the
      * `peekCardHeader`.
      *
      * [Google Workspace
-     * Add-ons](https://developers.google.com/workspace/add-ons):
+     * add-ons](https://developers.google.com/workspace/add-ons):
      * 
* * .google.apps.card.v1.Card.DisplayStyle display_style = 6; @@ -9374,11 +11289,11 @@ public Builder setDisplayStyleValue(int value) { * * *
-     * In Google Workspace Add-ons, sets the display properties of the
+     * In Google Workspace add-ons, sets the display properties of the
      * `peekCardHeader`.
      *
      * [Google Workspace
-     * Add-ons](https://developers.google.com/workspace/add-ons):
+     * add-ons](https://developers.google.com/workspace/add-ons):
      * 
* * .google.apps.card.v1.Card.DisplayStyle display_style = 6; @@ -9396,11 +11311,11 @@ public com.google.apps.card.v1.Card.DisplayStyle getDisplayStyle() { * * *
-     * In Google Workspace Add-ons, sets the display properties of the
+     * In Google Workspace add-ons, sets the display properties of the
      * `peekCardHeader`.
      *
      * [Google Workspace
-     * Add-ons](https://developers.google.com/workspace/add-ons):
+     * add-ons](https://developers.google.com/workspace/add-ons):
      * 
* * .google.apps.card.v1.Card.DisplayStyle display_style = 6; @@ -9422,11 +11337,11 @@ public Builder setDisplayStyle(com.google.apps.card.v1.Card.DisplayStyle value) * * *
-     * In Google Workspace Add-ons, sets the display properties of the
+     * In Google Workspace add-ons, sets the display properties of the
      * `peekCardHeader`.
      *
      * [Google Workspace
-     * Add-ons](https://developers.google.com/workspace/add-ons):
+     * add-ons](https://developers.google.com/workspace/add-ons):
      * 
* * .google.apps.card.v1.Card.DisplayStyle display_style = 6; @@ -9456,7 +11371,7 @@ public Builder clearDisplayStyle() { * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -9476,7 +11391,7 @@ public boolean hasPeekCardHeader() { * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -9502,7 +11417,7 @@ public com.google.apps.card.v1.Card.CardHeader getPeekCardHeader() { * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -9530,7 +11445,7 @@ public Builder setPeekCardHeader(com.google.apps.card.v1.Card.CardHeader value) * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -9556,7 +11471,7 @@ public Builder setPeekCardHeader( * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -9589,7 +11504,7 @@ public Builder mergePeekCardHeader(com.google.apps.card.v1.Card.CardHeader value * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -9614,7 +11529,7 @@ public Builder clearPeekCardHeader() { * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -9634,7 +11549,7 @@ public com.google.apps.card.v1.Card.CardHeader.Builder getPeekCardHeaderBuilder( * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -9658,7 +11573,7 @@ public com.google.apps.card.v1.Card.CardHeaderOrBuilder getPeekCardHeaderOrBuild * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CardOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CardOrBuilder.java index ac165f289d..e7064a4d45 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CardOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CardOrBuilder.java @@ -139,7 +139,7 @@ public interface CardOrBuilder * * *
-   * The divider style between sections.
+   * The divider style between the header, sections and footer.
    * 
* * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; @@ -152,7 +152,7 @@ public interface CardOrBuilder * * *
-   * The divider style between sections.
+   * The divider style between the header, sections and footer.
    * 
* * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; @@ -168,7 +168,7 @@ public interface CardOrBuilder * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -213,7 +213,7 @@ public interface CardOrBuilder * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -258,7 +258,7 @@ public interface CardOrBuilder * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -303,7 +303,7 @@ public interface CardOrBuilder * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -349,7 +349,7 @@ public interface CardOrBuilder * The card's actions. Actions are added to the card's toolbar menu. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * For example, the following JSON constructs a card action menu with * `Settings` and `Send Feedback` options: @@ -394,7 +394,7 @@ public interface CardOrBuilder * Name of the card. Used as a card identifier in card navigation. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * string name = 4; @@ -410,7 +410,7 @@ public interface CardOrBuilder * Name of the card. Used as a card identifier in card navigation. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * string name = 4; @@ -432,7 +432,7 @@ public interface CardOrBuilder * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -455,7 +455,7 @@ public interface CardOrBuilder * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -478,7 +478,7 @@ public interface CardOrBuilder * [card * messages](https://developers.google.com/workspace/chat/create-messages#create). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -490,11 +490,11 @@ public interface CardOrBuilder * * *
-   * In Google Workspace Add-ons, sets the display properties of the
+   * In Google Workspace add-ons, sets the display properties of the
    * `peekCardHeader`.
    *
    * [Google Workspace
-   * Add-ons](https://developers.google.com/workspace/add-ons):
+   * add-ons](https://developers.google.com/workspace/add-ons):
    * 
* * .google.apps.card.v1.Card.DisplayStyle display_style = 6; @@ -507,11 +507,11 @@ public interface CardOrBuilder * * *
-   * In Google Workspace Add-ons, sets the display properties of the
+   * In Google Workspace add-ons, sets the display properties of the
    * `peekCardHeader`.
    *
    * [Google Workspace
-   * Add-ons](https://developers.google.com/workspace/add-ons):
+   * add-ons](https://developers.google.com/workspace/add-ons):
    * 
* * .google.apps.card.v1.Card.DisplayStyle display_style = 6; @@ -529,7 +529,7 @@ public interface CardOrBuilder * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -547,7 +547,7 @@ public interface CardOrBuilder * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; @@ -565,7 +565,7 @@ public interface CardOrBuilder * cards and the contextual cards. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card.CardHeader peek_card_header = 7; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CardProto.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CardProto.java index 2cd8a74d2e..75af237788 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CardProto.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CardProto.java @@ -44,6 +44,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_apps_card_v1_Card_CardAction_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_apps_card_v1_Card_CardAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_apps_card_v1_Card_NestedWidget_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_apps_card_v1_Card_NestedWidget_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_apps_card_v1_Card_CardFixedFooter_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -104,6 +108,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_apps_card_v1_DateTimePicker_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_apps_card_v1_DateTimePicker_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_apps_card_v1_OverflowMenu_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_apps_card_v1_OverflowMenu_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_apps_card_v1_OverflowMenu_OverflowMenuItem_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_apps_card_v1_OverflowMenu_OverflowMenuItem_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_apps_card_v1_Button_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -148,6 +160,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_apps_card_v1_Columns_Column_Widgets_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_apps_card_v1_Columns_Column_Widgets_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_apps_card_v1_Carousel_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_apps_card_v1_Carousel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_apps_card_v1_Carousel_CarouselCard_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_apps_card_v1_Carousel_CarouselCard_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_apps_card_v1_CollapseControl_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_apps_card_v1_CollapseControl_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_apps_card_v1_OnClick_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -164,6 +188,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_apps_card_v1_Action_ActionParameter_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_apps_card_v1_Action_ActionParameter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_apps_card_v1_Validation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_apps_card_v1_Validation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_apps_card_v1_ChipList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_apps_card_v1_ChipList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_apps_card_v1_Chip_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_apps_card_v1_Chip_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -175,7 +211,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n" + "\036google/apps/card/v1/card.proto\022\023google" - + ".apps.card.v1\032\027google/type/color.proto\"\307\010\n" + + ".apps.card.v1\032\027google/type/color.proto\"\303\n\n" + "\004Card\0224\n" + "\006header\030\001 \001(\0132$.google.apps.card.v1.Card.CardHeader\0223\n" + "\010sections\030\002 \003(\0132!.google.apps.card.v1.Card.Section\022E\n" @@ -192,15 +228,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010subtitle\030\002 \001(\t\0229\n\n" + "image_type\030\003 \001(\0162%.google.apps.card.v1.Widget.ImageType\022\021\n" + "\timage_url\030\004 \001(\t\022\026\n" - + "\016image_alt_text\030\005 \001(\t\032\201\001\n" + + "\016image_alt_text\030\005 \001(\t\032\301\001\n" + "\007Section\022\016\n" + "\006header\030\001 \001(\t\022,\n" + "\007widgets\030\002 \003(\0132\033.google.apps.card.v1.Widget\022\023\n" + "\013collapsible\030\005 \001(\010\022#\n" - + "\033uncollapsible_widgets_count\030\006 \001(\005\032R\n\n" + + "\033uncollapsible_widgets_count\030\006 \001(\005\022>\n" + + "\020collapse_control\030\010 \001(\0132$.google.apps.card.v1.CollapseControl\032R\n" + + "\n" + "CardAction\022\024\n" + "\014action_label\030\001 \001(\t\022.\n" - + "\010on_click\030\002 \001(\0132\034.google.apps.card.v1.OnClick\032}\n" + + "\010on_click\030\002 \001(\0132\034.google.apps.card.v1.OnClick\032\271\001\n" + + "\014NestedWidget\022<\n" + + "\016text_paragraph\030\001 \001(\0132\".google.apps.card.v1.TextParagraphH\000\0226\n" + + "\013button_list\030\003 \001(\0132\037.google.apps.card.v1.ButtonListH\000\022+\n" + + "\005image\030\n" + + " \001(\0132\032.google.apps.card.v1.ImageH\000B\006\n" + + "\004data\032}\n" + "\017CardFixedFooter\0223\n" + "\016primary_button\030\001 \001(\0132\033.google.apps.card.v1.Button\0225\n" + "\020secondary_button\030\002 \001(\0132\033.google.apps.card.v1.Button\"P\n" @@ -211,7 +255,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014DisplayStyle\022\035\n" + "\031DISPLAY_STYLE_UNSPECIFIED\020\000\022\010\n" + "\004PEEK\020\001\022\013\n" - + "\007REPLACE\020\002\"\206\006\n" + + "\007REPLACE\020\002\"\307\007\n" + "\006Widget\022<\n" + "\016text_paragraph\030\001 \001(\0132\".google.apps.card.v1.TextParagraphH\000\022+\n" + "\005image\030\002 \001(\0132\032.google.apps.card.v1.ImageH\000\022<\n" @@ -224,9 +268,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\007divider\030\t \001(\0132\034.google.apps.card.v1.DividerH\000\022)\n" + "\004grid\030\n" + " \001(\0132\031.google.apps.card.v1.GridH\000\022/\n" - + "\007columns\030\013 \001(\0132\034.google.apps.card.v1.ColumnsH\000\022M\n" - + "\024horizontal_alignment\030\010" - + " \001(\0162/.google.apps.card.v1.Widget.HorizontalAlignment\"#\n" + + "\007columns\030\013 \001(\0132\034.google.apps.card.v1.ColumnsH\000\0221\n" + + "\010carousel\030\r" + + " \001(\0132\035.google.apps.card.v1.CarouselH\000\0222\n" + + "\tchip_list\030\016 \001(\0132\035.google.apps.card.v1.ChipListH\000\022M\n" + + "\024horizontal_alignment\030\010 \001(" + + "\0162/.google.apps.card.v1.Widget.HorizontalAlignment\"#\n" + "\tImageType\022\n\n" + "\006SQUARE\020\000\022\n\n" + "\006CIRCLE\020\001\"[\n" @@ -234,39 +281,56 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " HORIZONTAL_ALIGNMENT_UNSPECIFIED\020\000\022\t\n" + "\005START\020\001\022\n\n" + "\006CENTER\020\002\022\007\n" - + "\003END\020\003B\006\n" - + "\004data\"\035\n\r" + + "\003END\020\003\"X\n" + + "\021VerticalAlignment\022\"\n" + + "\036VERTICAL_ALIGNMENT_UNSPECIFIED\020\000\022\007\n" + + "\003TOP\020\001\022\n\n" + + "\006MIDDLE\020\002\022\n\n" + + "\006BOTTOM\020\003B\006\n" + + "\004data\"\267\001\n\r" + "TextParagraph\022\014\n" - + "\004text\030\001 \001(\t\"\\\n" + + "\004text\030\001 \001(\t\022\021\n" + + "\tmax_lines\030\002 \001(\005\022B\n" + + "\013text_syntax\030\004 \001(\0162-.google.apps.card.v1.TextParagraph.TextSyntax\"A\n" + + "\n" + + "TextSyntax\022\033\n" + + "\027TEXT_SYNTAX_UNSPECIFIED\020\000\022\010\n" + + "\004HTML\020\001\022\014\n" + + "\010MARKDOWN\020\002\"\\\n" + "\005Image\022\021\n" + "\timage_url\030\001 \001(\t\022.\n" + "\010on_click\030\002 \001(\0132\034.google.apps.card.v1.OnClick\022\020\n" + "\010alt_text\030\003 \001(\t\"\t\n" - + "\007Divider\"\236\005\n\r" + + "\007Divider\"\251\007\n\r" + "DecoratedText\022+\n" + "\004icon\030\001 \001(\0132\031.google.apps.card.v1.IconB\002\030\001\022-\n\n" - + "start_icon\030\014 \001(\0132\031.google.apps.card.v1.Icon\022\021\n" - + "\ttop_label\030\003 \001(\t\022\014\n" - + "\004text\030\004 \001(\t\022\021\n" + + "start_icon\030\014 \001(\0132\031.google.apps.card.v1.Icon\022T\n" + + "\035start_icon_vertical_alignment\030\r" + + " \001(\0162-.google.apps.card.v1.Widget.VerticalAlignment\022\021\n" + + "\ttop_label\030\003 \001(\t\022:\n" + + "\016top_label_text\030\021 \001(\0132\".google.apps.card.v1.TextParagraph\022\014\n" + + "\004text\030\004 \001(\t\0228\n" + + "\014content_text\030\022 \001(\0132\".google.apps.card.v1.TextParagraph\022\021\n" + "\twrap_text\030\005 \001(\010\022\024\n" - + "\014bottom_label\030\006 \001(\t\022.\n" + + "\014bottom_label\030\006 \001(\t\022=\n" + + "\021bottom_label_text\030\023 \001(\0132\".google.apps.card.v1.TextParagraph\022.\n" + "\010on_click\030\007 \001(\0132\034.google.apps.card.v1.OnClick\022-\n" + "\006button\030\010 \001(\0132\033.google.apps.card.v1.ButtonH\000\022J\n" - + "\016switch_control\030\t \001(\01320.googl" - + "e.apps.card.v1.DecoratedText.SwitchControlH\000\022-\n" + + "\016switch_control\030\t" + + " \001(\01320.google.apps.card.v1.DecoratedText.SwitchControlH\000\022-\n" + "\010end_icon\030\013 \001(\0132\031.google.apps.card.v1.IconH\000\032\201\002\n\r" + "SwitchControl\022\014\n" + "\004name\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t\022\020\n" + "\010selected\030\003 \001(\010\0225\n" + "\020on_change_action\030\004 \001(\0132\033.google.apps.card.v1.Action\022R\n" - + "\014control_type\030\005 \001(\0162<.goog" - + "le.apps.card.v1.DecoratedText.SwitchControl.ControlType\"6\n" + + "\014control_type\030\005 \001(\0162<.google.apps.card." + + "v1.DecoratedText.SwitchControl.ControlType\"6\n" + "\013ControlType\022\n\n" + "\006SWITCH\020\000\022\014\n" + "\010CHECKBOX\020\001\022\r\n" + "\tCHECK_BOX\020\002B\t\n" - + "\007control\"\364\002\n" + + "\007control\"\251\003\n" + "\tTextInput\022\014\n" + "\004name\030\001 \001(\t\022\r\n" + "\005label\030\002 \001(\t\022\021\n" @@ -275,7 +339,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004type\030\005 \001(\0162#.google.apps.card.v1.TextInput.Type\0225\n" + "\020on_change_action\030\006 \001(\0132\033.google.apps.card.v1.Action\022=\n" + "\023initial_suggestions\030\007 \001(\0132 .google.apps.card.v1.Suggestions\0229\n" - + "\024auto_complete_action\030\010 \001(\0132\033.google.apps.card.v1.Action\022\030\n" + + "\024auto_complete_action\030\010 \001(\0132\033.google.apps.card.v1.Action\0223\n\n" + + "validation\030\013 \001(\0132\037.google.apps.card.v1.Validation\022\030\n" + "\020placeholder_text\030\014 \001(\t\"*\n" + "\004Type\022\017\n" + "\013SINGLE_LINE\020\000\022\021\n\r" @@ -286,58 +351,76 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004text\030\001 \001(\tH\000B\t\n" + "\007content\":\n\n" + "ButtonList\022,\n" - + "\007buttons\030\001 \003(\0132\033.google.apps.card.v1.Button\"\353\006\n" + + "\007buttons\030\001 \003(\0132\033.google.apps.card.v1.Button\"\244\007\n" + "\016SelectionInput\022\014\n" + "\004name\030\001 \001(\t\022\r\n" + "\005label\030\002 \001(\t\022?\n" + "\004type\030\003 \001(\01621.google.apps.card.v1.SelectionInput.SelectionType\022@\n" + "\005items\030\004 \003(\01321.google.apps.card.v1.SelectionInput.SelectionItem\0225\n" - + "\020on_change_action\030\005 \001(\0132\033.google.apps.card.v1.Action\022\'\n" - + "\037multi_select_max_selected_items\030\006 \001(\005\022%\n" + + "\020on_change_action\030\005 \001(\0132\033.google.apps.card.v1.Action\022,\n" + + "\037multi_select_max_selected_items\030\006 \001(\005H\001\210\001\001\022%\n" + "\035multi_select_min_query_length\030\007 \001(\005\022;\n" + "\024external_data_source\030\010 \001(\0132\033.google.apps.card.v1.ActionH\000\022V\n" + "\024platform_data_source\030\t" - + " \001(\01326.google.apps.card.v1.SelectionInput.PlatformDataSourceH\000\032k\n\r" + + " \001(\01326.google.apps.card.v1.SelectionInput.PlatformDataSourceH\000\032{\n\r" + "SelectionItem\022\014\n" + "\004text\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t\022\020\n" - + "\010selected\030\003 \001(\010\022\026\n" - + "\016start_icon_uri\030\004 \001(\t\022\023\n" - + "\013bottom_text\030\005 \001(\t\032\265\001\n" + + "\010selected\030\003 \001(\010\022\030\n" + + "\016start_icon_uri\030\004 \001(\tH\000\022\023\n" + + "\013bottom_text\030\005 \001(\tB\014\n\n" + + "start_icon\032\265\001\n" + "\022PlatformDataSource\022e\n" - + "\022common_data_source\030\001 \001(\0162G.google.apps.c" - + "ard.v1.SelectionInput.PlatformDataSource.CommonDataSourceH\000\")\n" + + "\022common_data_source\030\001 \001(\0162G.google.apps.card.v1.SelectionInp" + + "ut.PlatformDataSource.CommonDataSourceH\000\")\n" + "\020CommonDataSource\022\013\n" + "\007UNKNOWN\020\000\022\010\n" + "\004USER\020\001B\r\n" - + "\013data_source\"\\\n" - + "\r" + + "\013data_source\"\\\n\r" + "SelectionType\022\r\n" + "\tCHECK_BOX\020\000\022\020\n" + "\014RADIO_BUTTON\020\001\022\n\n" + "\006SWITCH\020\002\022\014\n" + "\010DROPDOWN\020\003\022\020\n" + "\014MULTI_SELECT\020\004B\032\n" - + "\030multi_select_data_source\"\247\002\n" + + "\030multi_select_data_sourceB\"\n" + + " _multi_select_max_selected_items\"\277\002\n" + "\016DateTimePicker\022\014\n" + "\004name\030\001 \001(\t\022\r\n" + "\005label\030\002 \001(\t\022D\n" - + "\004type\030\003" - + " \001(\01626.google.apps.card.v1.DateTimePicker.DateTimePickerType\022\026\n" - + "\016value_ms_epoch\030\004 \001(\003\022\034\n" + + "\004type\030\003 \001(\01626" + + ".google.apps.card.v1.DateTimePicker.DateTimePickerType\022\033\n" + + "\016value_ms_epoch\030\004 \001(\003H\000\210\001\001\022\034\n" + "\024timezone_offset_date\030\005 \001(\005\0225\n" + "\020on_change_action\030\006 \001(\0132\033.google.apps.card.v1.Action\"E\n" + "\022DateTimePickerType\022\021\n\r" + "DATE_AND_TIME\020\000\022\r\n" + "\tDATE_ONLY\020\001\022\r\n" - + "\tTIME_ONLY\020\002\"\266\001\n" + + "\tTIME_ONLY\020\002B\021\n" + + "\017_value_ms_epoch\"\345\001\n" + + "\014OverflowMenu\022A\n" + + "\005items\030\001" + + " \003(\01322.google.apps.card.v1.OverflowMenu.OverflowMenuItem\032\221\001\n" + + "\020OverflowMenuItem\022-\n\n" + + "start_icon\030\001 \001(\0132\031.google.apps.card.v1.Icon\022\014\n" + + "\004text\030\002 \001(\t\022.\n" + + "\010on_click\030\003 \001(\0132\034.google.apps.card.v1.OnClick\022\020\n" + + "\010disabled\030\004 \001(\010\"\300\002\n" + "\006Button\022\014\n" + "\004text\030\001 \001(\t\022\'\n" + "\004icon\030\002 \001(\0132\031.google.apps.card.v1.Icon\022!\n" + "\005color\030\003 \001(\0132\022.google.type.Color\022.\n" + "\010on_click\030\004 \001(\0132\034.google.apps.card.v1.OnClick\022\020\n" + "\010disabled\030\005 \001(\010\022\020\n" - + "\010alt_text\030\006 \001(\t\"\302\001\n" + + "\010alt_text\030\006 \001(\t\022.\n" + + "\004type\030\007 \001(\0162 .google.apps.card.v1.Button.Type\"X\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\014\n" + + "\010OUTLINED\020\001\022\n\n" + + "\006FILLED\020\002\022\020\n" + + "\014FILLED_TONAL\020\003\022\016\n" + + "\n" + + "BORDERLESS\020\004\"\302\001\n" + "\004Icon\022\024\n\n" + "known_icon\030\001 \001(\tH\000\022\022\n" + "\010icon_url\030\002 \001(\tH\000\022:\n\r" @@ -351,8 +434,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006weight\030\003 \001(\005\022\r\n" + "\005grade\030\004 \001(\005\"\332\001\n" + "\016ImageCropStyle\022?\n" - + "\004type\030\001 \001(\01621.google.app" - + "s.card.v1.ImageCropStyle.ImageCropType\022\024\n" + + "\004type\030\001 \001(\01621" + + ".google.apps.card.v1.ImageCropStyle.ImageCropType\022\024\n" + "\014aspect_ratio\030\002 \001(\001\"q\n\r" + "ImageCropType\022\037\n" + "\033IMAGE_CROP_TYPE_UNSPECIFIED\020\000\022\n\n" @@ -365,8 +448,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014stroke_color\030\002 \001(\0132\022.google.type.Color\022\025\n\r" + "corner_radius\030\003 \001(\005\"D\n\n" + "BorderType\022\033\n" - + "\027BORDER_TYPE_UNSPECIFIED\020\000\022\r" - + "\n" + + "\027BORDER_TYPE_UNSPECIFIED\020\000\022\r\n" + "\tNO_BORDER\020\001\022\n\n" + "\006STROKE\020\002\"\246\001\n" + "\016ImageComponent\022\021\n" @@ -389,18 +471,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016GridItemLayout\022 \n" + "\034GRID_ITEM_LAYOUT_UNSPECIFIED\020\000\022\016\n\n" + "TEXT_BELOW\020\001\022\016\n\n" - + "TEXT_ABOVE\020\002\"\375\007\n" + + "TEXT_ABOVE\020\002\"\261\010\n" + "\007Columns\0229\n" - + "\014column_items\030\002 \003(\0132#.google.apps.card.v1.Columns.Column\032\266\007\n" + + "\014column_items\030\002 \003(\0132#.google.apps.card.v1.Columns.Column\032\352\007\n" + "\006Column\022V\n" + "\025horizontal_size_style\030\001" + " \001(\01627.google.apps.card.v1.Columns.Column.HorizontalSizeStyle\022M\n" + "\024horizontal_alignment\030\002" + " \001(\0162/.google.apps.card.v1.Widget.HorizontalAlignment\022Q\n" - + "\022vertical_alignment\030\003" - + " \001(\01625.google.apps.card.v1.Columns.Column.VerticalAlignment\022<\n" + + "\022vertical_alignment\030\003 \001(\01625.google.apps.c" + + "ard.v1.Columns.Column.VerticalAlignment\022<\n" + "\007widgets\030\004" - + " \003(\0132+.google.apps.card.v1.Columns.Column.Widgets\032\251\003\n" + + " \003(\0132+.google.apps.card.v1.Columns.Column.Widgets\032\335\003\n" + "\007Widgets\022<\n" + "\016text_paragraph\030\001 \001(\0132\".google.apps.card.v1.TextParagraphH\000\022+\n" + "\005image\030\002 \001(\0132\032.google.apps.card.v1.ImageH\000\022<\n" @@ -408,8 +490,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013button_list\030\004 \001(\0132\037.google.apps.card.v1.ButtonListH\000\0224\n\n" + "text_input\030\005 \001(\0132\036.google.apps.card.v1.TextInputH\000\022>\n" + "\017selection_input\030\006 \001(\0132#.google.apps.card.v1.SelectionInputH\000\022?\n" - + "\020date_time_picker\030\007" - + " \001(\0132#.google.apps.card.v1.DateTimePickerH\000B\006\n" + + "\020date_time_picker\030\007 \001" + + "(\0132#.google.apps.card.v1.DateTimePickerH\000\0222\n" + + "\tchip_list\030\010 \001(\0132\035.google.apps.card.v1.ChipListH\000B\006\n" + "\004data\"n\n" + "\023HorizontalSizeStyle\022%\n" + "!HORIZONTAL_SIZE_STYLE_UNSPECIFIED\020\000\022\030\n" @@ -419,13 +502,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\036VERTICAL_ALIGNMENT_UNSPECIFIED\020\000\022\n\n" + "\006CENTER\020\001\022\007\n" + "\003TOP\020\002\022\n\n" - + "\006BOTTOM\020\003\"\340\001\n" + + "\006BOTTOM\020\003\"\330\001\n" + + "\010Carousel\022B\n" + + "\016carousel_cards\030\004" + + " \003(\0132*.google.apps.card.v1.Carousel.CarouselCard\032\207\001\n" + + "\014CarouselCard\0227\n" + + "\007widgets\030\001 \003(\0132&.google.apps.card.v1.Card.NestedWidget\022>\n" + + "\016footer_widgets\030\002 \003" + + "(\0132&.google.apps.card.v1.Card.NestedWidget\"\312\001\n" + + "\017CollapseControl\022M\n" + + "\024horizontal_alignment\030\001" + + " \001(\0162/.google.apps.card.v1.Widget.HorizontalAlignment\0222\n\r" + + "expand_button\030\002 \001(\0132\033.google.apps.card.v1.Button\0224\n" + + "\017collapse_button\030\003 \001(\0132\033.google.apps.card.v1.Button\"\234\002\n" + "\007OnClick\022-\n" + "\006action\030\001 \001(\0132\033.google.apps.card.v1.ActionH\000\0222\n" + "\topen_link\030\002 \001(\0132\035.google.apps.card.v1.OpenLinkH\000\022?\n" + "\030open_dynamic_link_action\030\003" + " \001(\0132\033.google.apps.card.v1.ActionH\000\022)\n" - + "\004card\030\004 \001(\0132\031.google.apps.card.v1.CardH\000B\006\n" + + "\004card\030\004 \001(\0132\031.google.apps.card.v1.CardH\000\022:\n\r" + + "overflow_menu\030\010 \001(\0132!.google.apps.card.v1.OverflowMenuH\000B\006\n" + "\004data\"\321\001\n" + "\010OpenLink\022\013\n" + "\003url\030\001 \001(\t\0225\n" @@ -436,28 +532,52 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\007OVERLAY\020\001\"\"\n" + "\007OnClose\022\013\n" + "\007NOTHING\020\000\022\n\n" - + "\006RELOAD\020\001\"\210\003\n" + + "\006RELOAD\020\001\"\304\003\n" + "\006Action\022\020\n" + "\010function\030\001 \001(\t\022?\n\n" + "parameters\030\002 \003(\0132+.google.apps.card.v1.Action.ActionParameter\022A\n" - + "\016load_indicator\030\003 \001(\0162)." - + "google.apps.card.v1.Action.LoadIndicator\022\026\n" + + "\016load_indicator\030\003" + + " \001(\0162).google.apps.card.v1.Action.LoadIndicator\022\026\n" + "\016persist_values\030\004 \001(\010\022<\n" - + "\013interaction\030\005 \001(\0162\'.google.apps.card.v1.Action.Interaction\032-\n" + + "\013interaction\030\005 \001(\0162\'.google.apps.card.v1.Action.Interaction\022\030\n" + + "\020required_widgets\030\006 \003(\t\022 \n" + + "\030all_widgets_are_required\030\007 \001(\010\032-\n" + "\017ActionParameter\022\013\n" - + "\003key\030\001 \001(\t\022\r" - + "\n" + + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t\"&\n\r" + "LoadIndicator\022\013\n" + "\007SPINNER\020\000\022\010\n" + "\004NONE\020\001\";\n" + "\013Interaction\022\033\n" + "\027INTERACTION_UNSPECIFIED\020\000\022\017\n" - + "\013OPEN_DIALOG\020\001B\244\001\n" - + "\027com.google.apps.card.v1B\tCardProtoP\001Z7goo" - + "gle.golang.org/genproto/googleapis/apps/" - + "card/v1;card\252\002\023Google.Apps.Card.V1\312\002\023Goo" - + "gle\\Apps\\Card\\V1\352\002\026Google::Apps::Card::V1b\006proto3" + + "\013OPEN_DIALOG\020\001\"\314\001\n\n" + + "Validation\022\027\n" + + "\017character_limit\030\001 \001(\005\022=\n\n" + + "input_type\030\002 \001(\0162).google.apps.card.v1.Validation.InputType\"f\n" + + "\tInputType\022\032\n" + + "\026INPUT_TYPE_UNSPECIFIED\020\000\022\010\n" + + "\004TEXT\020\001\022\013\n" + + "\007INTEGER\020\002\022\t\n" + + "\005FLOAT\020\003\022\t\n" + + "\005EMAIL\020\004\022\020\n" + + "\014EMOJI_PICKER\020\005\"\264\001\n" + + "\010ChipList\0224\n" + + "\006layout\030\001 \001(\0162$.google.apps.card.v1.ChipList.Layout\022(\n" + + "\005chips\030\002 \003(\0132\031.google.apps.card.v1.Chip\"H\n" + + "\006Layout\022\026\n" + + "\022LAYOUT_UNSPECIFIED\020\000\022\013\n" + + "\007WRAPPED\020\001\022\031\n" + + "\025HORIZONTAL_SCROLLABLE\020\002\"\247\001\n" + + "\004Chip\022\'\n" + + "\004icon\030\001 \001(\0132\031.google.apps.card.v1.Icon\022\r\n" + + "\005label\030\002 \001(\t\022.\n" + + "\010on_click\030\003 \001(\0132\034.google.apps.card.v1.OnClick\022\023\n" + + "\007enabled\030\004 \001(\010B\002\030\001\022\020\n" + + "\010disabled\030\006 \001(\010\022\020\n" + + "\010alt_text\030\005 \001(\tB\244\001\n" + + "\027com.google.apps.card.v1B\tCardProtoP\001Z7google.golang.org/genproto/googleapi" + + "s/apps/card/v1;card\252\002\023Google.Apps.Card.V" + + "1\312\002\023Google\\Apps\\Card\\V1\352\002\026Google::Apps::Card::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -493,7 +613,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_Card_Section_descriptor, new java.lang.String[] { - "Header", "Widgets", "Collapsible", "UncollapsibleWidgetsCount", + "Header", "Widgets", "Collapsible", "UncollapsibleWidgetsCount", "CollapseControl", }); internal_static_google_apps_card_v1_Card_CardAction_descriptor = internal_static_google_apps_card_v1_Card_descriptor.getNestedTypes().get(2); @@ -503,8 +623,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ActionLabel", "OnClick", }); - internal_static_google_apps_card_v1_Card_CardFixedFooter_descriptor = + internal_static_google_apps_card_v1_Card_NestedWidget_descriptor = internal_static_google_apps_card_v1_Card_descriptor.getNestedTypes().get(3); + internal_static_google_apps_card_v1_Card_NestedWidget_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_apps_card_v1_Card_NestedWidget_descriptor, + new java.lang.String[] { + "TextParagraph", "ButtonList", "Image", "Data", + }); + internal_static_google_apps_card_v1_Card_CardFixedFooter_descriptor = + internal_static_google_apps_card_v1_Card_descriptor.getNestedTypes().get(4); internal_static_google_apps_card_v1_Card_CardFixedFooter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_Card_CardFixedFooter_descriptor, @@ -527,6 +655,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Divider", "Grid", "Columns", + "Carousel", + "ChipList", "HorizontalAlignment", "Data", }); @@ -536,7 +666,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_TextParagraph_descriptor, new java.lang.String[] { - "Text", + "Text", "MaxLines", "TextSyntax", }); internal_static_google_apps_card_v1_Image_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_google_apps_card_v1_Image_fieldAccessorTable = @@ -558,10 +688,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Icon", "StartIcon", + "StartIconVerticalAlignment", "TopLabel", + "TopLabelText", "Text", + "ContentText", "WrapText", "BottomLabel", + "BottomLabelText", "OnClick", "Button", "SwitchControl", @@ -590,6 +724,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OnChangeAction", "InitialSuggestions", "AutoCompleteAction", + "Validation", "PlaceholderText", }); internal_static_google_apps_card_v1_Suggestions_descriptor = @@ -639,7 +774,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_SelectionInput_SelectionItem_descriptor, new java.lang.String[] { - "Text", "Value", "Selected", "StartIconUri", "BottomText", + "Text", "Value", "Selected", "StartIconUri", "BottomText", "StartIcon", }); internal_static_google_apps_card_v1_SelectionInput_PlatformDataSource_descriptor = internal_static_google_apps_card_v1_SelectionInput_descriptor.getNestedTypes().get(1); @@ -657,15 +792,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Label", "Type", "ValueMsEpoch", "TimezoneOffsetDate", "OnChangeAction", }); - internal_static_google_apps_card_v1_Button_descriptor = + internal_static_google_apps_card_v1_OverflowMenu_descriptor = getDescriptor().getMessageTypes().get(11); + internal_static_google_apps_card_v1_OverflowMenu_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_apps_card_v1_OverflowMenu_descriptor, + new java.lang.String[] { + "Items", + }); + internal_static_google_apps_card_v1_OverflowMenu_OverflowMenuItem_descriptor = + internal_static_google_apps_card_v1_OverflowMenu_descriptor.getNestedTypes().get(0); + internal_static_google_apps_card_v1_OverflowMenu_OverflowMenuItem_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_apps_card_v1_OverflowMenu_OverflowMenuItem_descriptor, + new java.lang.String[] { + "StartIcon", "Text", "OnClick", "Disabled", + }); + internal_static_google_apps_card_v1_Button_descriptor = + getDescriptor().getMessageTypes().get(12); internal_static_google_apps_card_v1_Button_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_Button_descriptor, new java.lang.String[] { - "Text", "Icon", "Color", "OnClick", "Disabled", "AltText", + "Text", "Icon", "Color", "OnClick", "Disabled", "AltText", "Type", }); - internal_static_google_apps_card_v1_Icon_descriptor = getDescriptor().getMessageTypes().get(12); + internal_static_google_apps_card_v1_Icon_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_google_apps_card_v1_Icon_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_Icon_descriptor, @@ -673,7 +824,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "KnownIcon", "IconUrl", "MaterialIcon", "AltText", "ImageType", "Icons", }); internal_static_google_apps_card_v1_MaterialIcon_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_google_apps_card_v1_MaterialIcon_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_MaterialIcon_descriptor, @@ -681,7 +832,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Fill", "Weight", "Grade", }); internal_static_google_apps_card_v1_ImageCropStyle_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_apps_card_v1_ImageCropStyle_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_ImageCropStyle_descriptor, @@ -689,7 +840,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Type", "AspectRatio", }); internal_static_google_apps_card_v1_BorderStyle_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_apps_card_v1_BorderStyle_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_BorderStyle_descriptor, @@ -697,14 +848,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Type", "StrokeColor", "CornerRadius", }); internal_static_google_apps_card_v1_ImageComponent_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_apps_card_v1_ImageComponent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_ImageComponent_descriptor, new java.lang.String[] { "ImageUri", "AltText", "CropStyle", "BorderStyle", }); - internal_static_google_apps_card_v1_Grid_descriptor = getDescriptor().getMessageTypes().get(17); + internal_static_google_apps_card_v1_Grid_descriptor = getDescriptor().getMessageTypes().get(18); internal_static_google_apps_card_v1_Grid_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_Grid_descriptor, @@ -720,7 +871,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Id", "Image", "Title", "Subtitle", "Layout", }); internal_static_google_apps_card_v1_Columns_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_apps_card_v1_Columns_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_Columns_descriptor, @@ -748,18 +899,43 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TextInput", "SelectionInput", "DateTimePicker", + "ChipList", "Data", }); + internal_static_google_apps_card_v1_Carousel_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_apps_card_v1_Carousel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_apps_card_v1_Carousel_descriptor, + new java.lang.String[] { + "CarouselCards", + }); + internal_static_google_apps_card_v1_Carousel_CarouselCard_descriptor = + internal_static_google_apps_card_v1_Carousel_descriptor.getNestedTypes().get(0); + internal_static_google_apps_card_v1_Carousel_CarouselCard_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_apps_card_v1_Carousel_CarouselCard_descriptor, + new java.lang.String[] { + "Widgets", "FooterWidgets", + }); + internal_static_google_apps_card_v1_CollapseControl_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_apps_card_v1_CollapseControl_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_apps_card_v1_CollapseControl_descriptor, + new java.lang.String[] { + "HorizontalAlignment", "ExpandButton", "CollapseButton", + }); internal_static_google_apps_card_v1_OnClick_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(22); internal_static_google_apps_card_v1_OnClick_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_OnClick_descriptor, new java.lang.String[] { - "Action", "OpenLink", "OpenDynamicLinkAction", "Card", "Data", + "Action", "OpenLink", "OpenDynamicLinkAction", "Card", "OverflowMenu", "Data", }); internal_static_google_apps_card_v1_OpenLink_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(23); internal_static_google_apps_card_v1_OpenLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_OpenLink_descriptor, @@ -767,12 +943,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Url", "OpenAs", "OnClose", }); internal_static_google_apps_card_v1_Action_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(24); internal_static_google_apps_card_v1_Action_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_apps_card_v1_Action_descriptor, new java.lang.String[] { - "Function", "Parameters", "LoadIndicator", "PersistValues", "Interaction", + "Function", + "Parameters", + "LoadIndicator", + "PersistValues", + "Interaction", + "RequiredWidgets", + "AllWidgetsAreRequired", }); internal_static_google_apps_card_v1_Action_ActionParameter_descriptor = internal_static_google_apps_card_v1_Action_descriptor.getNestedTypes().get(0); @@ -782,6 +964,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_apps_card_v1_Validation_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_apps_card_v1_Validation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_apps_card_v1_Validation_descriptor, + new java.lang.String[] { + "CharacterLimit", "InputType", + }); + internal_static_google_apps_card_v1_ChipList_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_apps_card_v1_ChipList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_apps_card_v1_ChipList_descriptor, + new java.lang.String[] { + "Layout", "Chips", + }); + internal_static_google_apps_card_v1_Chip_descriptor = getDescriptor().getMessageTypes().get(27); + internal_static_google_apps_card_v1_Chip_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_apps_card_v1_Chip_descriptor, + new java.lang.String[] { + "Icon", "Label", "OnClick", "Enabled", "Disabled", "AltText", + }); com.google.type.ColorProto.getDescriptor(); } diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Carousel.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Carousel.java new file mode 100644 index 0000000000..e5b53c36a7 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Carousel.java @@ -0,0 +1,2683 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +/** + * + * + *
+ * A carousel, also known as a slider, rotates and displays a list of widgets in
+ * a slideshow format, with buttons navigating to the previous or next widget.
+ *
+ * For example, this is a JSON representation of a carousel that contains three
+ * text paragraph widgets.
+ *
+ * ```
+ * {
+ *   "carouselCards": [
+ *     {
+ *       "widgets": [
+ *         {
+ *           "textParagraph": {
+ *             "text": "First text paragraph in carousel",
+ *           }
+ *         }
+ *       ]
+ *     },
+ *     {
+ *       "widgets": [
+ *         {
+ *           "textParagraph": {
+ *             "text": "Second text paragraph in carousel",
+ *           }
+ *         }
+ *       ]
+ *     },
+ *     {
+ *       "widgets": [
+ *         {
+ *           "textParagraph": {
+ *             "text": "Third text paragraph in carousel",
+ *           }
+ *         }
+ *       ]
+ *     }
+ *   ]
+ * }
+ * ```
+ *
+ * [Google Chat apps](https://developers.google.com/workspace/chat):
+ * 
+ * + * Protobuf type {@code google.apps.card.v1.Carousel} + */ +public final class Carousel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.Carousel) + CarouselOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Carousel.newBuilder() to construct. + private Carousel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Carousel() { + carouselCards_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Carousel(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Carousel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Carousel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Carousel.class, com.google.apps.card.v1.Carousel.Builder.class); + } + + public interface CarouselCardOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Carousel.CarouselCard) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A list of widgets displayed in the carousel card. The widgets are
+     * displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + java.util.List getWidgetsList(); + + /** + * + * + *
+     * A list of widgets displayed in the carousel card. The widgets are
+     * displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + com.google.apps.card.v1.Card.NestedWidget getWidgets(int index); + + /** + * + * + *
+     * A list of widgets displayed in the carousel card. The widgets are
+     * displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + int getWidgetsCount(); + + /** + * + * + *
+     * A list of widgets displayed in the carousel card. The widgets are
+     * displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + java.util.List + getWidgetsOrBuilderList(); + + /** + * + * + *
+     * A list of widgets displayed in the carousel card. The widgets are
+     * displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + com.google.apps.card.v1.Card.NestedWidgetOrBuilder getWidgetsOrBuilder(int index); + + /** + * + * + *
+     * A list of widgets displayed at the bottom of the carousel card. The
+     * widgets are displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + java.util.List getFooterWidgetsList(); + + /** + * + * + *
+     * A list of widgets displayed at the bottom of the carousel card. The
+     * widgets are displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + com.google.apps.card.v1.Card.NestedWidget getFooterWidgets(int index); + + /** + * + * + *
+     * A list of widgets displayed at the bottom of the carousel card. The
+     * widgets are displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + int getFooterWidgetsCount(); + + /** + * + * + *
+     * A list of widgets displayed at the bottom of the carousel card. The
+     * widgets are displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + java.util.List + getFooterWidgetsOrBuilderList(); + + /** + * + * + *
+     * A list of widgets displayed at the bottom of the carousel card. The
+     * widgets are displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + com.google.apps.card.v1.Card.NestedWidgetOrBuilder getFooterWidgetsOrBuilder(int index); + } + + /** + * + * + *
+   * A card that can be displayed as a carousel item.
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.Carousel.CarouselCard} + */ + public static final class CarouselCard extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.Carousel.CarouselCard) + CarouselCardOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CarouselCard.newBuilder() to construct. + private CarouselCard(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CarouselCard() { + widgets_ = java.util.Collections.emptyList(); + footerWidgets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CarouselCard(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Carousel_CarouselCard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Carousel_CarouselCard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Carousel.CarouselCard.class, + com.google.apps.card.v1.Carousel.CarouselCard.Builder.class); + } + + public static final int WIDGETS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List widgets_; + + /** + * + * + *
+     * A list of widgets displayed in the carousel card. The widgets are
+     * displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + @java.lang.Override + public java.util.List getWidgetsList() { + return widgets_; + } + + /** + * + * + *
+     * A list of widgets displayed in the carousel card. The widgets are
+     * displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + @java.lang.Override + public java.util.List + getWidgetsOrBuilderList() { + return widgets_; + } + + /** + * + * + *
+     * A list of widgets displayed in the carousel card. The widgets are
+     * displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + @java.lang.Override + public int getWidgetsCount() { + return widgets_.size(); + } + + /** + * + * + *
+     * A list of widgets displayed in the carousel card. The widgets are
+     * displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + @java.lang.Override + public com.google.apps.card.v1.Card.NestedWidget getWidgets(int index) { + return widgets_.get(index); + } + + /** + * + * + *
+     * A list of widgets displayed in the carousel card. The widgets are
+     * displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + @java.lang.Override + public com.google.apps.card.v1.Card.NestedWidgetOrBuilder getWidgetsOrBuilder(int index) { + return widgets_.get(index); + } + + public static final int FOOTER_WIDGETS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List footerWidgets_; + + /** + * + * + *
+     * A list of widgets displayed at the bottom of the carousel card. The
+     * widgets are displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + @java.lang.Override + public java.util.List getFooterWidgetsList() { + return footerWidgets_; + } + + /** + * + * + *
+     * A list of widgets displayed at the bottom of the carousel card. The
+     * widgets are displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + @java.lang.Override + public java.util.List + getFooterWidgetsOrBuilderList() { + return footerWidgets_; + } + + /** + * + * + *
+     * A list of widgets displayed at the bottom of the carousel card. The
+     * widgets are displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + @java.lang.Override + public int getFooterWidgetsCount() { + return footerWidgets_.size(); + } + + /** + * + * + *
+     * A list of widgets displayed at the bottom of the carousel card. The
+     * widgets are displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + @java.lang.Override + public com.google.apps.card.v1.Card.NestedWidget getFooterWidgets(int index) { + return footerWidgets_.get(index); + } + + /** + * + * + *
+     * A list of widgets displayed at the bottom of the carousel card. The
+     * widgets are displayed in the order that they are specified.
+     * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + @java.lang.Override + public com.google.apps.card.v1.Card.NestedWidgetOrBuilder getFooterWidgetsOrBuilder(int index) { + return footerWidgets_.get(index); + } + + 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 { + for (int i = 0; i < widgets_.size(); i++) { + output.writeMessage(1, widgets_.get(i)); + } + for (int i = 0; i < footerWidgets_.size(); i++) { + output.writeMessage(2, footerWidgets_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < widgets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, widgets_.get(i)); + } + for (int i = 0; i < footerWidgets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, footerWidgets_.get(i)); + } + 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.Carousel.CarouselCard)) { + return super.equals(obj); + } + com.google.apps.card.v1.Carousel.CarouselCard other = + (com.google.apps.card.v1.Carousel.CarouselCard) obj; + + if (!getWidgetsList().equals(other.getWidgetsList())) return false; + if (!getFooterWidgetsList().equals(other.getFooterWidgetsList())) 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(); + if (getWidgetsCount() > 0) { + hash = (37 * hash) + WIDGETS_FIELD_NUMBER; + hash = (53 * hash) + getWidgetsList().hashCode(); + } + if (getFooterWidgetsCount() > 0) { + hash = (37 * hash) + FOOTER_WIDGETS_FIELD_NUMBER; + hash = (53 * hash) + getFooterWidgetsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.Carousel.CarouselCard parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Carousel.CarouselCard 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.Carousel.CarouselCard parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Carousel.CarouselCard 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.Carousel.CarouselCard parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Carousel.CarouselCard 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.Carousel.CarouselCard parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Carousel.CarouselCard 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.Carousel.CarouselCard parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Carousel.CarouselCard 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.Carousel.CarouselCard 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.Carousel.CarouselCard 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.Carousel.CarouselCard 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 card that can be displayed as a carousel item.
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * Protobuf type {@code google.apps.card.v1.Carousel.CarouselCard} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Carousel.CarouselCard) + com.google.apps.card.v1.Carousel.CarouselCardOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Carousel_CarouselCard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Carousel_CarouselCard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Carousel.CarouselCard.class, + com.google.apps.card.v1.Carousel.CarouselCard.Builder.class); + } + + // Construct using com.google.apps.card.v1.Carousel.CarouselCard.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (widgetsBuilder_ == null) { + widgets_ = java.util.Collections.emptyList(); + } else { + widgets_ = null; + widgetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (footerWidgetsBuilder_ == null) { + footerWidgets_ = java.util.Collections.emptyList(); + } else { + footerWidgets_ = null; + footerWidgetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + 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_Carousel_CarouselCard_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.Carousel.CarouselCard getDefaultInstanceForType() { + return com.google.apps.card.v1.Carousel.CarouselCard.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.Carousel.CarouselCard build() { + com.google.apps.card.v1.Carousel.CarouselCard result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.Carousel.CarouselCard buildPartial() { + com.google.apps.card.v1.Carousel.CarouselCard result = + new com.google.apps.card.v1.Carousel.CarouselCard(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.apps.card.v1.Carousel.CarouselCard result) { + if (widgetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + widgets_ = java.util.Collections.unmodifiableList(widgets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.widgets_ = widgets_; + } else { + result.widgets_ = widgetsBuilder_.build(); + } + if (footerWidgetsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + footerWidgets_ = java.util.Collections.unmodifiableList(footerWidgets_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.footerWidgets_ = footerWidgets_; + } else { + result.footerWidgets_ = footerWidgetsBuilder_.build(); + } + } + + private void buildPartial0(com.google.apps.card.v1.Carousel.CarouselCard result) { + int from_bitField0_ = 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.Carousel.CarouselCard) { + return mergeFrom((com.google.apps.card.v1.Carousel.CarouselCard) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.Carousel.CarouselCard other) { + if (other == com.google.apps.card.v1.Carousel.CarouselCard.getDefaultInstance()) + return this; + if (widgetsBuilder_ == null) { + if (!other.widgets_.isEmpty()) { + if (widgets_.isEmpty()) { + widgets_ = other.widgets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWidgetsIsMutable(); + widgets_.addAll(other.widgets_); + } + onChanged(); + } + } else { + if (!other.widgets_.isEmpty()) { + if (widgetsBuilder_.isEmpty()) { + widgetsBuilder_.dispose(); + widgetsBuilder_ = null; + widgets_ = other.widgets_; + bitField0_ = (bitField0_ & ~0x00000001); + widgetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getWidgetsFieldBuilder() + : null; + } else { + widgetsBuilder_.addAllMessages(other.widgets_); + } + } + } + if (footerWidgetsBuilder_ == null) { + if (!other.footerWidgets_.isEmpty()) { + if (footerWidgets_.isEmpty()) { + footerWidgets_ = other.footerWidgets_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFooterWidgetsIsMutable(); + footerWidgets_.addAll(other.footerWidgets_); + } + onChanged(); + } + } else { + if (!other.footerWidgets_.isEmpty()) { + if (footerWidgetsBuilder_.isEmpty()) { + footerWidgetsBuilder_.dispose(); + footerWidgetsBuilder_ = null; + footerWidgets_ = other.footerWidgets_; + bitField0_ = (bitField0_ & ~0x00000002); + footerWidgetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFooterWidgetsFieldBuilder() + : null; + } else { + footerWidgetsBuilder_.addAllMessages(other.footerWidgets_); + } + } + } + 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: + { + com.google.apps.card.v1.Card.NestedWidget m = + input.readMessage( + com.google.apps.card.v1.Card.NestedWidget.parser(), extensionRegistry); + if (widgetsBuilder_ == null) { + ensureWidgetsIsMutable(); + widgets_.add(m); + } else { + widgetsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.apps.card.v1.Card.NestedWidget m = + input.readMessage( + com.google.apps.card.v1.Card.NestedWidget.parser(), extensionRegistry); + if (footerWidgetsBuilder_ == null) { + ensureFooterWidgetsIsMutable(); + footerWidgets_.add(m); + } else { + footerWidgetsBuilder_.addMessage(m); + } + 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.util.List widgets_ = + java.util.Collections.emptyList(); + + private void ensureWidgetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + widgets_ = new java.util.ArrayList(widgets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Card.NestedWidget, + com.google.apps.card.v1.Card.NestedWidget.Builder, + com.google.apps.card.v1.Card.NestedWidgetOrBuilder> + widgetsBuilder_; + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public java.util.List getWidgetsList() { + if (widgetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(widgets_); + } else { + return widgetsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public int getWidgetsCount() { + if (widgetsBuilder_ == null) { + return widgets_.size(); + } else { + return widgetsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public com.google.apps.card.v1.Card.NestedWidget getWidgets(int index) { + if (widgetsBuilder_ == null) { + return widgets_.get(index); + } else { + return widgetsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public Builder setWidgets(int index, com.google.apps.card.v1.Card.NestedWidget value) { + if (widgetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWidgetsIsMutable(); + widgets_.set(index, value); + onChanged(); + } else { + widgetsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public Builder setWidgets( + int index, com.google.apps.card.v1.Card.NestedWidget.Builder builderForValue) { + if (widgetsBuilder_ == null) { + ensureWidgetsIsMutable(); + widgets_.set(index, builderForValue.build()); + onChanged(); + } else { + widgetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public Builder addWidgets(com.google.apps.card.v1.Card.NestedWidget value) { + if (widgetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWidgetsIsMutable(); + widgets_.add(value); + onChanged(); + } else { + widgetsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public Builder addWidgets(int index, com.google.apps.card.v1.Card.NestedWidget value) { + if (widgetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWidgetsIsMutable(); + widgets_.add(index, value); + onChanged(); + } else { + widgetsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public Builder addWidgets(com.google.apps.card.v1.Card.NestedWidget.Builder builderForValue) { + if (widgetsBuilder_ == null) { + ensureWidgetsIsMutable(); + widgets_.add(builderForValue.build()); + onChanged(); + } else { + widgetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public Builder addWidgets( + int index, com.google.apps.card.v1.Card.NestedWidget.Builder builderForValue) { + if (widgetsBuilder_ == null) { + ensureWidgetsIsMutable(); + widgets_.add(index, builderForValue.build()); + onChanged(); + } else { + widgetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public Builder addAllWidgets( + java.lang.Iterable values) { + if (widgetsBuilder_ == null) { + ensureWidgetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, widgets_); + onChanged(); + } else { + widgetsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public Builder clearWidgets() { + if (widgetsBuilder_ == null) { + widgets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + widgetsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public Builder removeWidgets(int index) { + if (widgetsBuilder_ == null) { + ensureWidgetsIsMutable(); + widgets_.remove(index); + onChanged(); + } else { + widgetsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public com.google.apps.card.v1.Card.NestedWidget.Builder getWidgetsBuilder(int index) { + return getWidgetsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public com.google.apps.card.v1.Card.NestedWidgetOrBuilder getWidgetsOrBuilder(int index) { + if (widgetsBuilder_ == null) { + return widgets_.get(index); + } else { + return widgetsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public java.util.List + getWidgetsOrBuilderList() { + if (widgetsBuilder_ != null) { + return widgetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(widgets_); + } + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public com.google.apps.card.v1.Card.NestedWidget.Builder addWidgetsBuilder() { + return getWidgetsFieldBuilder() + .addBuilder(com.google.apps.card.v1.Card.NestedWidget.getDefaultInstance()); + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public com.google.apps.card.v1.Card.NestedWidget.Builder addWidgetsBuilder(int index) { + return getWidgetsFieldBuilder() + .addBuilder(index, com.google.apps.card.v1.Card.NestedWidget.getDefaultInstance()); + } + + /** + * + * + *
+       * A list of widgets displayed in the carousel card. The widgets are
+       * displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget widgets = 1; + */ + public java.util.List + getWidgetsBuilderList() { + return getWidgetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Card.NestedWidget, + com.google.apps.card.v1.Card.NestedWidget.Builder, + com.google.apps.card.v1.Card.NestedWidgetOrBuilder> + getWidgetsFieldBuilder() { + if (widgetsBuilder_ == null) { + widgetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Card.NestedWidget, + com.google.apps.card.v1.Card.NestedWidget.Builder, + com.google.apps.card.v1.Card.NestedWidgetOrBuilder>( + widgets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + widgets_ = null; + } + return widgetsBuilder_; + } + + private java.util.List footerWidgets_ = + java.util.Collections.emptyList(); + + private void ensureFooterWidgetsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + footerWidgets_ = + new java.util.ArrayList(footerWidgets_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Card.NestedWidget, + com.google.apps.card.v1.Card.NestedWidget.Builder, + com.google.apps.card.v1.Card.NestedWidgetOrBuilder> + footerWidgetsBuilder_; + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public java.util.List getFooterWidgetsList() { + if (footerWidgetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(footerWidgets_); + } else { + return footerWidgetsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public int getFooterWidgetsCount() { + if (footerWidgetsBuilder_ == null) { + return footerWidgets_.size(); + } else { + return footerWidgetsBuilder_.getCount(); + } + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public com.google.apps.card.v1.Card.NestedWidget getFooterWidgets(int index) { + if (footerWidgetsBuilder_ == null) { + return footerWidgets_.get(index); + } else { + return footerWidgetsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public Builder setFooterWidgets(int index, com.google.apps.card.v1.Card.NestedWidget value) { + if (footerWidgetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFooterWidgetsIsMutable(); + footerWidgets_.set(index, value); + onChanged(); + } else { + footerWidgetsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public Builder setFooterWidgets( + int index, com.google.apps.card.v1.Card.NestedWidget.Builder builderForValue) { + if (footerWidgetsBuilder_ == null) { + ensureFooterWidgetsIsMutable(); + footerWidgets_.set(index, builderForValue.build()); + onChanged(); + } else { + footerWidgetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public Builder addFooterWidgets(com.google.apps.card.v1.Card.NestedWidget value) { + if (footerWidgetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFooterWidgetsIsMutable(); + footerWidgets_.add(value); + onChanged(); + } else { + footerWidgetsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public Builder addFooterWidgets(int index, com.google.apps.card.v1.Card.NestedWidget value) { + if (footerWidgetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFooterWidgetsIsMutable(); + footerWidgets_.add(index, value); + onChanged(); + } else { + footerWidgetsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public Builder addFooterWidgets( + com.google.apps.card.v1.Card.NestedWidget.Builder builderForValue) { + if (footerWidgetsBuilder_ == null) { + ensureFooterWidgetsIsMutable(); + footerWidgets_.add(builderForValue.build()); + onChanged(); + } else { + footerWidgetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public Builder addFooterWidgets( + int index, com.google.apps.card.v1.Card.NestedWidget.Builder builderForValue) { + if (footerWidgetsBuilder_ == null) { + ensureFooterWidgetsIsMutable(); + footerWidgets_.add(index, builderForValue.build()); + onChanged(); + } else { + footerWidgetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public Builder addAllFooterWidgets( + java.lang.Iterable values) { + if (footerWidgetsBuilder_ == null) { + ensureFooterWidgetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, footerWidgets_); + onChanged(); + } else { + footerWidgetsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public Builder clearFooterWidgets() { + if (footerWidgetsBuilder_ == null) { + footerWidgets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + footerWidgetsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public Builder removeFooterWidgets(int index) { + if (footerWidgetsBuilder_ == null) { + ensureFooterWidgetsIsMutable(); + footerWidgets_.remove(index); + onChanged(); + } else { + footerWidgetsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public com.google.apps.card.v1.Card.NestedWidget.Builder getFooterWidgetsBuilder(int index) { + return getFooterWidgetsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public com.google.apps.card.v1.Card.NestedWidgetOrBuilder getFooterWidgetsOrBuilder( + int index) { + if (footerWidgetsBuilder_ == null) { + return footerWidgets_.get(index); + } else { + return footerWidgetsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public java.util.List + getFooterWidgetsOrBuilderList() { + if (footerWidgetsBuilder_ != null) { + return footerWidgetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(footerWidgets_); + } + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public com.google.apps.card.v1.Card.NestedWidget.Builder addFooterWidgetsBuilder() { + return getFooterWidgetsFieldBuilder() + .addBuilder(com.google.apps.card.v1.Card.NestedWidget.getDefaultInstance()); + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public com.google.apps.card.v1.Card.NestedWidget.Builder addFooterWidgetsBuilder(int index) { + return getFooterWidgetsFieldBuilder() + .addBuilder(index, com.google.apps.card.v1.Card.NestedWidget.getDefaultInstance()); + } + + /** + * + * + *
+       * A list of widgets displayed at the bottom of the carousel card. The
+       * widgets are displayed in the order that they are specified.
+       * 
+ * + * repeated .google.apps.card.v1.Card.NestedWidget footer_widgets = 2; + */ + public java.util.List + getFooterWidgetsBuilderList() { + return getFooterWidgetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Card.NestedWidget, + com.google.apps.card.v1.Card.NestedWidget.Builder, + com.google.apps.card.v1.Card.NestedWidgetOrBuilder> + getFooterWidgetsFieldBuilder() { + if (footerWidgetsBuilder_ == null) { + footerWidgetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Card.NestedWidget, + com.google.apps.card.v1.Card.NestedWidget.Builder, + com.google.apps.card.v1.Card.NestedWidgetOrBuilder>( + footerWidgets_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + footerWidgets_ = null; + } + return footerWidgetsBuilder_; + } + + @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.Carousel.CarouselCard) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.Carousel.CarouselCard) + private static final com.google.apps.card.v1.Carousel.CarouselCard DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.Carousel.CarouselCard(); + } + + public static com.google.apps.card.v1.Carousel.CarouselCard getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CarouselCard 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.Carousel.CarouselCard getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CAROUSEL_CARDS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List carouselCards_; + + /** + * + * + *
+   * A list of cards included in the carousel.
+   * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + @java.lang.Override + public java.util.List getCarouselCardsList() { + return carouselCards_; + } + + /** + * + * + *
+   * A list of cards included in the carousel.
+   * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + @java.lang.Override + public java.util.List + getCarouselCardsOrBuilderList() { + return carouselCards_; + } + + /** + * + * + *
+   * A list of cards included in the carousel.
+   * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + @java.lang.Override + public int getCarouselCardsCount() { + return carouselCards_.size(); + } + + /** + * + * + *
+   * A list of cards included in the carousel.
+   * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + @java.lang.Override + public com.google.apps.card.v1.Carousel.CarouselCard getCarouselCards(int index) { + return carouselCards_.get(index); + } + + /** + * + * + *
+   * A list of cards included in the carousel.
+   * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + @java.lang.Override + public com.google.apps.card.v1.Carousel.CarouselCardOrBuilder getCarouselCardsOrBuilder( + int index) { + return carouselCards_.get(index); + } + + 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 { + for (int i = 0; i < carouselCards_.size(); i++) { + output.writeMessage(4, carouselCards_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < carouselCards_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, carouselCards_.get(i)); + } + 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.Carousel)) { + return super.equals(obj); + } + com.google.apps.card.v1.Carousel other = (com.google.apps.card.v1.Carousel) obj; + + if (!getCarouselCardsList().equals(other.getCarouselCardsList())) 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(); + if (getCarouselCardsCount() > 0) { + hash = (37 * hash) + CAROUSEL_CARDS_FIELD_NUMBER; + hash = (53 * hash) + getCarouselCardsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.Carousel parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Carousel 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.Carousel parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Carousel 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.Carousel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Carousel 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.Carousel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Carousel 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.Carousel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Carousel 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.Carousel 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.Carousel 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.Carousel 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 carousel, also known as a slider, rotates and displays a list of widgets in
+   * a slideshow format, with buttons navigating to the previous or next widget.
+   *
+   * For example, this is a JSON representation of a carousel that contains three
+   * text paragraph widgets.
+   *
+   * ```
+   * {
+   *   "carouselCards": [
+   *     {
+   *       "widgets": [
+   *         {
+   *           "textParagraph": {
+   *             "text": "First text paragraph in carousel",
+   *           }
+   *         }
+   *       ]
+   *     },
+   *     {
+   *       "widgets": [
+   *         {
+   *           "textParagraph": {
+   *             "text": "Second text paragraph in carousel",
+   *           }
+   *         }
+   *       ]
+   *     },
+   *     {
+   *       "widgets": [
+   *         {
+   *           "textParagraph": {
+   *             "text": "Third text paragraph in carousel",
+   *           }
+   *         }
+   *       ]
+   *     }
+   *   ]
+   * }
+   * ```
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.Carousel} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Carousel) + com.google.apps.card.v1.CarouselOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Carousel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Carousel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Carousel.class, + com.google.apps.card.v1.Carousel.Builder.class); + } + + // Construct using com.google.apps.card.v1.Carousel.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (carouselCardsBuilder_ == null) { + carouselCards_ = java.util.Collections.emptyList(); + } else { + carouselCards_ = null; + carouselCardsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + 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_Carousel_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.Carousel getDefaultInstanceForType() { + return com.google.apps.card.v1.Carousel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.Carousel build() { + com.google.apps.card.v1.Carousel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.Carousel buildPartial() { + com.google.apps.card.v1.Carousel result = new com.google.apps.card.v1.Carousel(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.apps.card.v1.Carousel result) { + if (carouselCardsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + carouselCards_ = java.util.Collections.unmodifiableList(carouselCards_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.carouselCards_ = carouselCards_; + } else { + result.carouselCards_ = carouselCardsBuilder_.build(); + } + } + + private void buildPartial0(com.google.apps.card.v1.Carousel result) { + int from_bitField0_ = 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.Carousel) { + return mergeFrom((com.google.apps.card.v1.Carousel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.Carousel other) { + if (other == com.google.apps.card.v1.Carousel.getDefaultInstance()) return this; + if (carouselCardsBuilder_ == null) { + if (!other.carouselCards_.isEmpty()) { + if (carouselCards_.isEmpty()) { + carouselCards_ = other.carouselCards_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCarouselCardsIsMutable(); + carouselCards_.addAll(other.carouselCards_); + } + onChanged(); + } + } else { + if (!other.carouselCards_.isEmpty()) { + if (carouselCardsBuilder_.isEmpty()) { + carouselCardsBuilder_.dispose(); + carouselCardsBuilder_ = null; + carouselCards_ = other.carouselCards_; + bitField0_ = (bitField0_ & ~0x00000001); + carouselCardsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCarouselCardsFieldBuilder() + : null; + } else { + carouselCardsBuilder_.addAllMessages(other.carouselCards_); + } + } + } + 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 34: + { + com.google.apps.card.v1.Carousel.CarouselCard m = + input.readMessage( + com.google.apps.card.v1.Carousel.CarouselCard.parser(), extensionRegistry); + if (carouselCardsBuilder_ == null) { + ensureCarouselCardsIsMutable(); + carouselCards_.add(m); + } else { + carouselCardsBuilder_.addMessage(m); + } + break; + } // case 34 + 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.util.List carouselCards_ = + java.util.Collections.emptyList(); + + private void ensureCarouselCardsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + carouselCards_ = + new java.util.ArrayList(carouselCards_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Carousel.CarouselCard, + com.google.apps.card.v1.Carousel.CarouselCard.Builder, + com.google.apps.card.v1.Carousel.CarouselCardOrBuilder> + carouselCardsBuilder_; + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public java.util.List getCarouselCardsList() { + if (carouselCardsBuilder_ == null) { + return java.util.Collections.unmodifiableList(carouselCards_); + } else { + return carouselCardsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public int getCarouselCardsCount() { + if (carouselCardsBuilder_ == null) { + return carouselCards_.size(); + } else { + return carouselCardsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public com.google.apps.card.v1.Carousel.CarouselCard getCarouselCards(int index) { + if (carouselCardsBuilder_ == null) { + return carouselCards_.get(index); + } else { + return carouselCardsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public Builder setCarouselCards( + int index, com.google.apps.card.v1.Carousel.CarouselCard value) { + if (carouselCardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCarouselCardsIsMutable(); + carouselCards_.set(index, value); + onChanged(); + } else { + carouselCardsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public Builder setCarouselCards( + int index, com.google.apps.card.v1.Carousel.CarouselCard.Builder builderForValue) { + if (carouselCardsBuilder_ == null) { + ensureCarouselCardsIsMutable(); + carouselCards_.set(index, builderForValue.build()); + onChanged(); + } else { + carouselCardsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public Builder addCarouselCards(com.google.apps.card.v1.Carousel.CarouselCard value) { + if (carouselCardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCarouselCardsIsMutable(); + carouselCards_.add(value); + onChanged(); + } else { + carouselCardsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public Builder addCarouselCards( + int index, com.google.apps.card.v1.Carousel.CarouselCard value) { + if (carouselCardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCarouselCardsIsMutable(); + carouselCards_.add(index, value); + onChanged(); + } else { + carouselCardsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public Builder addCarouselCards( + com.google.apps.card.v1.Carousel.CarouselCard.Builder builderForValue) { + if (carouselCardsBuilder_ == null) { + ensureCarouselCardsIsMutable(); + carouselCards_.add(builderForValue.build()); + onChanged(); + } else { + carouselCardsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public Builder addCarouselCards( + int index, com.google.apps.card.v1.Carousel.CarouselCard.Builder builderForValue) { + if (carouselCardsBuilder_ == null) { + ensureCarouselCardsIsMutable(); + carouselCards_.add(index, builderForValue.build()); + onChanged(); + } else { + carouselCardsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public Builder addAllCarouselCards( + java.lang.Iterable values) { + if (carouselCardsBuilder_ == null) { + ensureCarouselCardsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, carouselCards_); + onChanged(); + } else { + carouselCardsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public Builder clearCarouselCards() { + if (carouselCardsBuilder_ == null) { + carouselCards_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + carouselCardsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public Builder removeCarouselCards(int index) { + if (carouselCardsBuilder_ == null) { + ensureCarouselCardsIsMutable(); + carouselCards_.remove(index); + onChanged(); + } else { + carouselCardsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public com.google.apps.card.v1.Carousel.CarouselCard.Builder getCarouselCardsBuilder( + int index) { + return getCarouselCardsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public com.google.apps.card.v1.Carousel.CarouselCardOrBuilder getCarouselCardsOrBuilder( + int index) { + if (carouselCardsBuilder_ == null) { + return carouselCards_.get(index); + } else { + return carouselCardsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public java.util.List + getCarouselCardsOrBuilderList() { + if (carouselCardsBuilder_ != null) { + return carouselCardsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(carouselCards_); + } + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public com.google.apps.card.v1.Carousel.CarouselCard.Builder addCarouselCardsBuilder() { + return getCarouselCardsFieldBuilder() + .addBuilder(com.google.apps.card.v1.Carousel.CarouselCard.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public com.google.apps.card.v1.Carousel.CarouselCard.Builder addCarouselCardsBuilder( + int index) { + return getCarouselCardsFieldBuilder() + .addBuilder(index, com.google.apps.card.v1.Carousel.CarouselCard.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of cards included in the carousel.
+     * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + public java.util.List + getCarouselCardsBuilderList() { + return getCarouselCardsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Carousel.CarouselCard, + com.google.apps.card.v1.Carousel.CarouselCard.Builder, + com.google.apps.card.v1.Carousel.CarouselCardOrBuilder> + getCarouselCardsFieldBuilder() { + if (carouselCardsBuilder_ == null) { + carouselCardsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Carousel.CarouselCard, + com.google.apps.card.v1.Carousel.CarouselCard.Builder, + com.google.apps.card.v1.Carousel.CarouselCardOrBuilder>( + carouselCards_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + carouselCards_ = null; + } + return carouselCardsBuilder_; + } + + @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.Carousel) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.Carousel) + private static final com.google.apps.card.v1.Carousel DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.Carousel(); + } + + public static com.google.apps.card.v1.Carousel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Carousel 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.Carousel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CarouselOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CarouselOrBuilder.java new file mode 100644 index 0000000000..055f5c9eac --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CarouselOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +public interface CarouselOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Carousel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of cards included in the carousel.
+   * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + java.util.List getCarouselCardsList(); + + /** + * + * + *
+   * A list of cards included in the carousel.
+   * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + com.google.apps.card.v1.Carousel.CarouselCard getCarouselCards(int index); + + /** + * + * + *
+   * A list of cards included in the carousel.
+   * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + int getCarouselCardsCount(); + + /** + * + * + *
+   * A list of cards included in the carousel.
+   * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + java.util.List + getCarouselCardsOrBuilderList(); + + /** + * + * + *
+   * A list of cards included in the carousel.
+   * 
+ * + * repeated .google.apps.card.v1.Carousel.CarouselCard carousel_cards = 4; + */ + com.google.apps.card.v1.Carousel.CarouselCardOrBuilder getCarouselCardsOrBuilder(int index); +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Chip.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Chip.java new file mode 100644 index 0000000000..3d0567d40d --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Chip.java @@ -0,0 +1,1652 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +/** + * + * + *
+ * A text, icon, or text and icon chip that users can click.
+ *
+ * [Google Workspace add-ons and Chat
+ * apps](https://developers.google.com/workspace/extend):
+ * 
+ * + * Protobuf type {@code google.apps.card.v1.Chip} + */ +public final class Chip extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.Chip) + ChipOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Chip.newBuilder() to construct. + private Chip(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Chip() { + label_ = ""; + altText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Chip(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Chip_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Chip_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Chip.class, com.google.apps.card.v1.Chip.Builder.class); + } + + private int bitField0_; + public static final int ICON_FIELD_NUMBER = 1; + 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 = 1; + * + * @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 = 1; + * + * @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 = 1; + */ + @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 LABEL_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object label_ = ""; + + /** + * + * + *
+   * The text displayed inside the chip.
+   * 
+ * + * string label = 2; + * + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + 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(); + label_ = s; + return s; + } + } + + /** + * + * + *
+   * The text displayed inside the chip.
+   * 
+ * + * string label = 2; + * + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ON_CLICK_FIELD_NUMBER = 3; + private com.google.apps.card.v1.OnClick onClick_; + + /** + * + * + *
+   * Optional. The action to perform when a user clicks the chip, such as
+   * opening a hyperlink or running a custom function.
+   * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @return Whether the onClick field is set. + */ + @java.lang.Override + public boolean hasOnClick() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The action to perform when a user clicks the chip, such as
+   * opening a hyperlink or running a custom function.
+   * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @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_; + } + + /** + * + * + *
+   * Optional. The action to perform when a user clicks the chip, such as
+   * opening a hyperlink or running a custom function.
+   * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + @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 ENABLED_FIELD_NUMBER = 4; + private boolean enabled_ = false; + + /** + * + * + *
+   * Whether the chip is in an active state and responds to user actions.
+   * Defaults to `true`.
+   * Deprecated. Use `disabled` instead.
+   * 
+ * + * bool enabled = 4 [deprecated = true]; + * + * @deprecated google.apps.card.v1.Chip.enabled is deprecated. See + * google/apps/card/v1/card.proto;l=2425 + * @return The enabled. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean getEnabled() { + return enabled_; + } + + public static final int DISABLED_FIELD_NUMBER = 6; + private boolean disabled_ = false; + + /** + * + * + *
+   * Whether the chip is in an inactive state and ignores user actions.
+   * Defaults to `false`.
+   * 
+ * + * bool disabled = 6; + * + * @return The disabled. + */ + @java.lang.Override + public boolean getDisabled() { + return disabled_; + } + + public static final int ALT_TEXT_FIELD_NUMBER = 5; + + @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 chip does. For
+   * example, if a chip opens a hyperlink, write: "Opens a new
+   * browser tab and navigates to the Google Chat developer documentation at
+   * https://developers.google.com/workspace/chat".
+   * 
+ * + * string alt_text = 5; + * + * @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 chip does. For
+   * example, if a chip opens a hyperlink, write: "Opens a new
+   * browser tab and navigates to the Google Chat developer documentation at
+   * https://developers.google.com/workspace/chat".
+   * 
+ * + * string alt_text = 5; + * + * @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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, label_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getOnClick()); + } + if (enabled_ != false) { + output.writeBool(4, enabled_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, altText_); + } + if (disabled_ != false) { + output.writeBool(6, disabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, label_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOnClick()); + } + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enabled_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, altText_); + } + if (disabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, disabled_); + } + 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.Chip)) { + return super.equals(obj); + } + com.google.apps.card.v1.Chip other = (com.google.apps.card.v1.Chip) obj; + + if (hasIcon() != other.hasIcon()) return false; + if (hasIcon()) { + if (!getIcon().equals(other.getIcon())) return false; + } + if (!getLabel().equals(other.getLabel())) return false; + if (hasOnClick() != other.hasOnClick()) return false; + if (hasOnClick()) { + if (!getOnClick().equals(other.getOnClick())) return false; + } + if (getEnabled() != other.getEnabled()) 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(); + if (hasIcon()) { + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + } + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + if (hasOnClick()) { + hash = (37 * hash) + ON_CLICK_FIELD_NUMBER; + hash = (53 * hash) + getOnClick().hashCode(); + } + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + 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.Chip parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Chip 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.Chip parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Chip 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.Chip parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Chip 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.Chip parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Chip 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.Chip parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Chip 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.Chip 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.Chip 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.Chip 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 chip that users can click.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.Chip} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Chip) + com.google.apps.card.v1.ChipOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Chip_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Chip_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Chip.class, com.google.apps.card.v1.Chip.Builder.class); + } + + // Construct using com.google.apps.card.v1.Chip.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(); + getOnClickFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + label_ = ""; + onClick_ = null; + if (onClickBuilder_ != null) { + onClickBuilder_.dispose(); + onClickBuilder_ = null; + } + enabled_ = false; + 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_Chip_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.Chip getDefaultInstanceForType() { + return com.google.apps.card.v1.Chip.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.Chip build() { + com.google.apps.card.v1.Chip result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.Chip buildPartial() { + com.google.apps.card.v1.Chip result = new com.google.apps.card.v1.Chip(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.apps.card.v1.Chip result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.icon_ = iconBuilder_ == null ? icon_ : iconBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.label_ = label_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.onClick_ = onClickBuilder_ == null ? onClick_ : onClickBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.enabled_ = enabled_; + } + 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.Chip) { + return mergeFrom((com.google.apps.card.v1.Chip) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.Chip other) { + if (other == com.google.apps.card.v1.Chip.getDefaultInstance()) return this; + if (other.hasIcon()) { + mergeIcon(other.getIcon()); + } + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasOnClick()) { + mergeOnClick(other.getOnClick()); + } + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + 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: + { + input.readMessage(getIconFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + label_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getOnClickFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + altText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 48: + { + disabled_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 48 + 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 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 = 1; + * + * @return Whether the icon field is set. + */ + 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 = 1; + * + * @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 = 1; + */ + 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_ |= 0x00000001; + 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 = 1; + */ + public Builder setIcon(com.google.apps.card.v1.Icon.Builder builderForValue) { + if (iconBuilder_ == null) { + icon_ = builderForValue.build(); + } else { + iconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + 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 = 1; + */ + public Builder mergeIcon(com.google.apps.card.v1.Icon value) { + if (iconBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 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_ |= 0x00000001; + 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 = 1; + */ + public Builder clearIcon() { + bitField0_ = (bitField0_ & ~0x00000001); + 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 = 1; + */ + public com.google.apps.card.v1.Icon.Builder getIconBuilder() { + bitField0_ |= 0x00000001; + 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 = 1; + */ + 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 = 1; + */ + 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 java.lang.Object label_ = ""; + + /** + * + * + *
+     * The text displayed inside the chip.
+     * 
+ * + * string label = 2; + * + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The text displayed inside the chip.
+     * 
+ * + * string label = 2; + * + * @return The bytes for label. + */ + public com.google.protobuf.ByteString getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The text displayed inside the chip.
+     * 
+ * + * string label = 2; + * + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + label_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The text displayed inside the chip.
+     * 
+ * + * string label = 2; + * + * @return This builder for chaining. + */ + public Builder clearLabel() { + label_ = getDefaultInstance().getLabel(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The text displayed inside the chip.
+     * 
+ * + * string label = 2; + * + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + label_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + 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_; + + /** + * + * + *
+     * Optional. The action to perform when a user clicks the chip, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @return Whether the onClick field is set. + */ + public boolean hasOnClick() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The action to perform when a user clicks the chip, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @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(); + } + } + + /** + * + * + *
+     * Optional. The action to perform when a user clicks the chip, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + 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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The action to perform when a user clicks the chip, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + public Builder setOnClick(com.google.apps.card.v1.OnClick.Builder builderForValue) { + if (onClickBuilder_ == null) { + onClick_ = builderForValue.build(); + } else { + onClickBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The action to perform when a user clicks the chip, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) { + if (onClickBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 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_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The action to perform when a user clicks the chip, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + public Builder clearOnClick() { + bitField0_ = (bitField0_ & ~0x00000004); + onClick_ = null; + if (onClickBuilder_ != null) { + onClickBuilder_.dispose(); + onClickBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The action to perform when a user clicks the chip, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + public com.google.apps.card.v1.OnClick.Builder getOnClickBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOnClickFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The action to perform when a user clicks the chip, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + 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_; + } + } + + /** + * + * + *
+     * Optional. The action to perform when a user clicks the chip, such as
+     * opening a hyperlink or running a custom function.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + 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 enabled_; + + /** + * + * + *
+     * Whether the chip is in an active state and responds to user actions.
+     * Defaults to `true`.
+     * Deprecated. Use `disabled` instead.
+     * 
+ * + * bool enabled = 4 [deprecated = true]; + * + * @deprecated google.apps.card.v1.Chip.enabled is deprecated. See + * google/apps/card/v1/card.proto;l=2425 + * @return The enabled. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean getEnabled() { + return enabled_; + } + + /** + * + * + *
+     * Whether the chip is in an active state and responds to user actions.
+     * Defaults to `true`.
+     * Deprecated. Use `disabled` instead.
+     * 
+ * + * bool enabled = 4 [deprecated = true]; + * + * @deprecated google.apps.card.v1.Chip.enabled is deprecated. See + * google/apps/card/v1/card.proto;l=2425 + * @param value The enabled to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Whether the chip is in an active state and responds to user actions.
+     * Defaults to `true`.
+     * Deprecated. Use `disabled` instead.
+     * 
+ * + * bool enabled = 4 [deprecated = true]; + * + * @deprecated google.apps.card.v1.Chip.enabled is deprecated. See + * google/apps/card/v1/card.proto;l=2425 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000008); + enabled_ = false; + onChanged(); + return this; + } + + private boolean disabled_; + + /** + * + * + *
+     * Whether the chip is in an inactive state and ignores user actions.
+     * Defaults to `false`.
+     * 
+ * + * bool disabled = 6; + * + * @return The disabled. + */ + @java.lang.Override + public boolean getDisabled() { + return disabled_; + } + + /** + * + * + *
+     * Whether the chip is in an inactive state and ignores user actions.
+     * Defaults to `false`.
+     * 
+ * + * bool disabled = 6; + * + * @param value The disabled to set. + * @return This builder for chaining. + */ + public Builder setDisabled(boolean value) { + + disabled_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Whether the chip is in an inactive state and ignores user actions.
+     * Defaults to `false`.
+     * 
+ * + * bool disabled = 6; + * + * @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 chip does. For
+     * example, if a chip opens a hyperlink, write: "Opens a new
+     * browser tab and navigates to the Google Chat developer documentation at
+     * https://developers.google.com/workspace/chat".
+     * 
+ * + * string alt_text = 5; + * + * @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 chip does. For
+     * example, if a chip opens a hyperlink, write: "Opens a new
+     * browser tab and navigates to the Google Chat developer documentation at
+     * https://developers.google.com/workspace/chat".
+     * 
+ * + * string alt_text = 5; + * + * @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 chip does. For
+     * example, if a chip opens a hyperlink, write: "Opens a new
+     * browser tab and navigates to the Google Chat developer documentation at
+     * https://developers.google.com/workspace/chat".
+     * 
+ * + * string alt_text = 5; + * + * @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 chip does. For
+     * example, if a chip opens a hyperlink, write: "Opens a new
+     * browser tab and navigates to the Google Chat developer documentation at
+     * https://developers.google.com/workspace/chat".
+     * 
+ * + * string alt_text = 5; + * + * @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 chip does. For
+     * example, if a chip opens a hyperlink, write: "Opens a new
+     * browser tab and navigates to the Google Chat developer documentation at
+     * https://developers.google.com/workspace/chat".
+     * 
+ * + * string alt_text = 5; + * + * @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.Chip) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.Chip) + private static final com.google.apps.card.v1.Chip DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.Chip(); + } + + public static com.google.apps.card.v1.Chip getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Chip 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.Chip getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ChipList.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ChipList.java new file mode 100644 index 0000000000..8336ee2fec --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ChipList.java @@ -0,0 +1,1269 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +/** + * + * + *
+ * A list of chips layed out horizontally, which can either scroll horizontally
+ * or wrap to the next line.
+ *
+ * [Google Workspace add-ons and Chat
+ * apps](https://developers.google.com/workspace/extend):
+ * 
+ * + * Protobuf type {@code google.apps.card.v1.ChipList} + */ +public final class ChipList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.ChipList) + ChipListOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ChipList.newBuilder() to construct. + private ChipList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChipList() { + layout_ = 0; + chips_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChipList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_ChipList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_ChipList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.ChipList.class, com.google.apps.card.v1.ChipList.Builder.class); + } + + /** + * + * + *
+   * The chip list layout.
+   * 
+ * + * Protobuf enum {@code google.apps.card.v1.ChipList.Layout} + */ + public enum Layout implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Don't use. Unspecified.
+     * 
+ * + * LAYOUT_UNSPECIFIED = 0; + */ + LAYOUT_UNSPECIFIED(0), + /** + * + * + *
+     * Default value. The chip list wraps to the next line if there isn't enough
+     * horizontal space.
+     * 
+ * + * WRAPPED = 1; + */ + WRAPPED(1), + /** + * + * + *
+     * The chips scroll horizontally if they don't fit in the available space.
+     * 
+ * + * HORIZONTAL_SCROLLABLE = 2; + */ + HORIZONTAL_SCROLLABLE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Don't use. Unspecified.
+     * 
+ * + * LAYOUT_UNSPECIFIED = 0; + */ + public static final int LAYOUT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Default value. The chip list wraps to the next line if there isn't enough
+     * horizontal space.
+     * 
+ * + * WRAPPED = 1; + */ + public static final int WRAPPED_VALUE = 1; + + /** + * + * + *
+     * The chips scroll horizontally if they don't fit in the available space.
+     * 
+ * + * HORIZONTAL_SCROLLABLE = 2; + */ + public static final int HORIZONTAL_SCROLLABLE_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 Layout 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 Layout forNumber(int value) { + switch (value) { + case 0: + return LAYOUT_UNSPECIFIED; + case 1: + return WRAPPED; + case 2: + return HORIZONTAL_SCROLLABLE; + 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 Layout findValueByNumber(int number) { + return Layout.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.ChipList.getDescriptor().getEnumTypes().get(0); + } + + private static final Layout[] VALUES = values(); + + public static Layout 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 Layout(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.apps.card.v1.ChipList.Layout) + } + + public static final int LAYOUT_FIELD_NUMBER = 1; + private int layout_ = 0; + + /** + * + * + *
+   * Specified chip list layout.
+   * 
+ * + * .google.apps.card.v1.ChipList.Layout layout = 1; + * + * @return The enum numeric value on the wire for layout. + */ + @java.lang.Override + public int getLayoutValue() { + return layout_; + } + + /** + * + * + *
+   * Specified chip list layout.
+   * 
+ * + * .google.apps.card.v1.ChipList.Layout layout = 1; + * + * @return The layout. + */ + @java.lang.Override + public com.google.apps.card.v1.ChipList.Layout getLayout() { + com.google.apps.card.v1.ChipList.Layout result = + com.google.apps.card.v1.ChipList.Layout.forNumber(layout_); + return result == null ? com.google.apps.card.v1.ChipList.Layout.UNRECOGNIZED : result; + } + + public static final int CHIPS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List chips_; + + /** + * + * + *
+   * An array of chips.
+   * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + @java.lang.Override + public java.util.List getChipsList() { + return chips_; + } + + /** + * + * + *
+   * An array of chips.
+   * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + @java.lang.Override + public java.util.List getChipsOrBuilderList() { + return chips_; + } + + /** + * + * + *
+   * An array of chips.
+   * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + @java.lang.Override + public int getChipsCount() { + return chips_.size(); + } + + /** + * + * + *
+   * An array of chips.
+   * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + @java.lang.Override + public com.google.apps.card.v1.Chip getChips(int index) { + return chips_.get(index); + } + + /** + * + * + *
+   * An array of chips.
+   * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + @java.lang.Override + public com.google.apps.card.v1.ChipOrBuilder getChipsOrBuilder(int index) { + return chips_.get(index); + } + + 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 (layout_ != com.google.apps.card.v1.ChipList.Layout.LAYOUT_UNSPECIFIED.getNumber()) { + output.writeEnum(1, layout_); + } + for (int i = 0; i < chips_.size(); i++) { + output.writeMessage(2, chips_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (layout_ != com.google.apps.card.v1.ChipList.Layout.LAYOUT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, layout_); + } + for (int i = 0; i < chips_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, chips_.get(i)); + } + 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.ChipList)) { + return super.equals(obj); + } + com.google.apps.card.v1.ChipList other = (com.google.apps.card.v1.ChipList) obj; + + if (layout_ != other.layout_) return false; + if (!getChipsList().equals(other.getChipsList())) 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) + LAYOUT_FIELD_NUMBER; + hash = (53 * hash) + layout_; + if (getChipsCount() > 0) { + hash = (37 * hash) + CHIPS_FIELD_NUMBER; + hash = (53 * hash) + getChipsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.ChipList parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.ChipList 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.ChipList parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.ChipList 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.ChipList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.ChipList 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.ChipList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.ChipList 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.ChipList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.ChipList 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.ChipList 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.ChipList 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.ChipList 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 list of chips layed out horizontally, which can either scroll horizontally
+   * or wrap to the next line.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.ChipList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.ChipList) + com.google.apps.card.v1.ChipListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_ChipList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_ChipList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.ChipList.class, + com.google.apps.card.v1.ChipList.Builder.class); + } + + // Construct using com.google.apps.card.v1.ChipList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + layout_ = 0; + if (chipsBuilder_ == null) { + chips_ = java.util.Collections.emptyList(); + } else { + chips_ = null; + chipsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + 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_ChipList_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.ChipList getDefaultInstanceForType() { + return com.google.apps.card.v1.ChipList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.ChipList build() { + com.google.apps.card.v1.ChipList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.ChipList buildPartial() { + com.google.apps.card.v1.ChipList result = new com.google.apps.card.v1.ChipList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.apps.card.v1.ChipList result) { + if (chipsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + chips_ = java.util.Collections.unmodifiableList(chips_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.chips_ = chips_; + } else { + result.chips_ = chipsBuilder_.build(); + } + } + + private void buildPartial0(com.google.apps.card.v1.ChipList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.layout_ = layout_; + } + } + + @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.ChipList) { + return mergeFrom((com.google.apps.card.v1.ChipList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.ChipList other) { + if (other == com.google.apps.card.v1.ChipList.getDefaultInstance()) return this; + if (other.layout_ != 0) { + setLayoutValue(other.getLayoutValue()); + } + if (chipsBuilder_ == null) { + if (!other.chips_.isEmpty()) { + if (chips_.isEmpty()) { + chips_ = other.chips_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureChipsIsMutable(); + chips_.addAll(other.chips_); + } + onChanged(); + } + } else { + if (!other.chips_.isEmpty()) { + if (chipsBuilder_.isEmpty()) { + chipsBuilder_.dispose(); + chipsBuilder_ = null; + chips_ = other.chips_; + bitField0_ = (bitField0_ & ~0x00000002); + chipsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChipsFieldBuilder() + : null; + } else { + chipsBuilder_.addAllMessages(other.chips_); + } + } + } + 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: + { + layout_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + com.google.apps.card.v1.Chip m = + input.readMessage(com.google.apps.card.v1.Chip.parser(), extensionRegistry); + if (chipsBuilder_ == null) { + ensureChipsIsMutable(); + chips_.add(m); + } else { + chipsBuilder_.addMessage(m); + } + 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 int layout_ = 0; + + /** + * + * + *
+     * Specified chip list layout.
+     * 
+ * + * .google.apps.card.v1.ChipList.Layout layout = 1; + * + * @return The enum numeric value on the wire for layout. + */ + @java.lang.Override + public int getLayoutValue() { + return layout_; + } + + /** + * + * + *
+     * Specified chip list layout.
+     * 
+ * + * .google.apps.card.v1.ChipList.Layout layout = 1; + * + * @param value The enum numeric value on the wire for layout to set. + * @return This builder for chaining. + */ + public Builder setLayoutValue(int value) { + layout_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specified chip list layout.
+     * 
+ * + * .google.apps.card.v1.ChipList.Layout layout = 1; + * + * @return The layout. + */ + @java.lang.Override + public com.google.apps.card.v1.ChipList.Layout getLayout() { + com.google.apps.card.v1.ChipList.Layout result = + com.google.apps.card.v1.ChipList.Layout.forNumber(layout_); + return result == null ? com.google.apps.card.v1.ChipList.Layout.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Specified chip list layout.
+     * 
+ * + * .google.apps.card.v1.ChipList.Layout layout = 1; + * + * @param value The layout to set. + * @return This builder for chaining. + */ + public Builder setLayout(com.google.apps.card.v1.ChipList.Layout value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + layout_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Specified chip list layout.
+     * 
+ * + * .google.apps.card.v1.ChipList.Layout layout = 1; + * + * @return This builder for chaining. + */ + public Builder clearLayout() { + bitField0_ = (bitField0_ & ~0x00000001); + layout_ = 0; + onChanged(); + return this; + } + + private java.util.List chips_ = java.util.Collections.emptyList(); + + private void ensureChipsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + chips_ = new java.util.ArrayList(chips_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Chip, + com.google.apps.card.v1.Chip.Builder, + com.google.apps.card.v1.ChipOrBuilder> + chipsBuilder_; + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public java.util.List getChipsList() { + if (chipsBuilder_ == null) { + return java.util.Collections.unmodifiableList(chips_); + } else { + return chipsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public int getChipsCount() { + if (chipsBuilder_ == null) { + return chips_.size(); + } else { + return chipsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public com.google.apps.card.v1.Chip getChips(int index) { + if (chipsBuilder_ == null) { + return chips_.get(index); + } else { + return chipsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public Builder setChips(int index, com.google.apps.card.v1.Chip value) { + if (chipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChipsIsMutable(); + chips_.set(index, value); + onChanged(); + } else { + chipsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public Builder setChips(int index, com.google.apps.card.v1.Chip.Builder builderForValue) { + if (chipsBuilder_ == null) { + ensureChipsIsMutable(); + chips_.set(index, builderForValue.build()); + onChanged(); + } else { + chipsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public Builder addChips(com.google.apps.card.v1.Chip value) { + if (chipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChipsIsMutable(); + chips_.add(value); + onChanged(); + } else { + chipsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public Builder addChips(int index, com.google.apps.card.v1.Chip value) { + if (chipsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChipsIsMutable(); + chips_.add(index, value); + onChanged(); + } else { + chipsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public Builder addChips(com.google.apps.card.v1.Chip.Builder builderForValue) { + if (chipsBuilder_ == null) { + ensureChipsIsMutable(); + chips_.add(builderForValue.build()); + onChanged(); + } else { + chipsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public Builder addChips(int index, com.google.apps.card.v1.Chip.Builder builderForValue) { + if (chipsBuilder_ == null) { + ensureChipsIsMutable(); + chips_.add(index, builderForValue.build()); + onChanged(); + } else { + chipsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public Builder addAllChips(java.lang.Iterable values) { + if (chipsBuilder_ == null) { + ensureChipsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chips_); + onChanged(); + } else { + chipsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public Builder clearChips() { + if (chipsBuilder_ == null) { + chips_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + chipsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public Builder removeChips(int index) { + if (chipsBuilder_ == null) { + ensureChipsIsMutable(); + chips_.remove(index); + onChanged(); + } else { + chipsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public com.google.apps.card.v1.Chip.Builder getChipsBuilder(int index) { + return getChipsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public com.google.apps.card.v1.ChipOrBuilder getChipsOrBuilder(int index) { + if (chipsBuilder_ == null) { + return chips_.get(index); + } else { + return chipsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public java.util.List getChipsOrBuilderList() { + if (chipsBuilder_ != null) { + return chipsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(chips_); + } + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public com.google.apps.card.v1.Chip.Builder addChipsBuilder() { + return getChipsFieldBuilder().addBuilder(com.google.apps.card.v1.Chip.getDefaultInstance()); + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public com.google.apps.card.v1.Chip.Builder addChipsBuilder(int index) { + return getChipsFieldBuilder() + .addBuilder(index, com.google.apps.card.v1.Chip.getDefaultInstance()); + } + + /** + * + * + *
+     * An array of chips.
+     * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + public java.util.List getChipsBuilderList() { + return getChipsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Chip, + com.google.apps.card.v1.Chip.Builder, + com.google.apps.card.v1.ChipOrBuilder> + getChipsFieldBuilder() { + if (chipsBuilder_ == null) { + chipsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.Chip, + com.google.apps.card.v1.Chip.Builder, + com.google.apps.card.v1.ChipOrBuilder>( + chips_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + chips_ = null; + } + return chipsBuilder_; + } + + @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.ChipList) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.ChipList) + private static final com.google.apps.card.v1.ChipList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.ChipList(); + } + + public static com.google.apps.card.v1.ChipList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChipList 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.ChipList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ChipListOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ChipListOrBuilder.java new file mode 100644 index 0000000000..9967403a7a --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ChipListOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +public interface ChipListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.ChipList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Specified chip list layout.
+   * 
+ * + * .google.apps.card.v1.ChipList.Layout layout = 1; + * + * @return The enum numeric value on the wire for layout. + */ + int getLayoutValue(); + + /** + * + * + *
+   * Specified chip list layout.
+   * 
+ * + * .google.apps.card.v1.ChipList.Layout layout = 1; + * + * @return The layout. + */ + com.google.apps.card.v1.ChipList.Layout getLayout(); + + /** + * + * + *
+   * An array of chips.
+   * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + java.util.List getChipsList(); + + /** + * + * + *
+   * An array of chips.
+   * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + com.google.apps.card.v1.Chip getChips(int index); + + /** + * + * + *
+   * An array of chips.
+   * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + int getChipsCount(); + + /** + * + * + *
+   * An array of chips.
+   * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + java.util.List getChipsOrBuilderList(); + + /** + * + * + *
+   * An array of chips.
+   * 
+ * + * repeated .google.apps.card.v1.Chip chips = 2; + */ + com.google.apps.card.v1.ChipOrBuilder getChipsOrBuilder(int index); +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ChipOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ChipOrBuilder.java new file mode 100644 index 0000000000..20f8cb4feb --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ChipOrBuilder.java @@ -0,0 +1,200 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +public interface ChipOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Chip) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The icon image. If both `icon` and `text` are set, then the icon appears
+   * before the text.
+   * 
+ * + * .google.apps.card.v1.Icon icon = 1; + * + * @return Whether the icon field is set. + */ + boolean hasIcon(); + + /** + * + * + *
+   * The icon image. If both `icon` and `text` are set, then the icon appears
+   * before the text.
+   * 
+ * + * .google.apps.card.v1.Icon icon = 1; + * + * @return The icon. + */ + com.google.apps.card.v1.Icon getIcon(); + + /** + * + * + *
+   * The icon image. If both `icon` and `text` are set, then the icon appears
+   * before the text.
+   * 
+ * + * .google.apps.card.v1.Icon icon = 1; + */ + com.google.apps.card.v1.IconOrBuilder getIconOrBuilder(); + + /** + * + * + *
+   * The text displayed inside the chip.
+   * 
+ * + * string label = 2; + * + * @return The label. + */ + java.lang.String getLabel(); + + /** + * + * + *
+   * The text displayed inside the chip.
+   * 
+ * + * string label = 2; + * + * @return The bytes for label. + */ + com.google.protobuf.ByteString getLabelBytes(); + + /** + * + * + *
+   * Optional. The action to perform when a user clicks the chip, such as
+   * opening a hyperlink or running a custom function.
+   * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @return Whether the onClick field is set. + */ + boolean hasOnClick(); + + /** + * + * + *
+   * Optional. The action to perform when a user clicks the chip, such as
+   * opening a hyperlink or running a custom function.
+   * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @return The onClick. + */ + com.google.apps.card.v1.OnClick getOnClick(); + + /** + * + * + *
+   * Optional. The action to perform when a user clicks the chip, such as
+   * opening a hyperlink or running a custom function.
+   * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder(); + + /** + * + * + *
+   * Whether the chip is in an active state and responds to user actions.
+   * Defaults to `true`.
+   * Deprecated. Use `disabled` instead.
+   * 
+ * + * bool enabled = 4 [deprecated = true]; + * + * @deprecated google.apps.card.v1.Chip.enabled is deprecated. See + * google/apps/card/v1/card.proto;l=2425 + * @return The enabled. + */ + @java.lang.Deprecated + boolean getEnabled(); + + /** + * + * + *
+   * Whether the chip is in an inactive state and ignores user actions.
+   * Defaults to `false`.
+   * 
+ * + * bool disabled = 6; + * + * @return The disabled. + */ + boolean getDisabled(); + + /** + * + * + *
+   * The alternative text that's used for accessibility.
+   *
+   * Set descriptive text that lets users know what the chip does. For
+   * example, if a chip opens a hyperlink, write: "Opens a new
+   * browser tab and navigates to the Google Chat developer documentation at
+   * https://developers.google.com/workspace/chat".
+   * 
+ * + * string alt_text = 5; + * + * @return The altText. + */ + java.lang.String getAltText(); + + /** + * + * + *
+   * The alternative text that's used for accessibility.
+   *
+   * Set descriptive text that lets users know what the chip does. For
+   * example, if a chip opens a hyperlink, write: "Opens a new
+   * browser tab and navigates to the Google Chat developer documentation at
+   * https://developers.google.com/workspace/chat".
+   * 
+ * + * string alt_text = 5; + * + * @return The bytes for altText. + */ + com.google.protobuf.ByteString getAltTextBytes(); +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CollapseControl.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CollapseControl.java new file mode 100644 index 0000000000..4313daefd2 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CollapseControl.java @@ -0,0 +1,1258 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +/** + * + * + *
+ * Represent an expand and collapse control.
+ *
+ * [Google Workspace add-ons and Chat
+ * apps](https://developers.google.com/workspace/extend):
+ * 
+ * + * Protobuf type {@code google.apps.card.v1.CollapseControl} + */ +public final class CollapseControl extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.CollapseControl) + CollapseControlOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CollapseControl.newBuilder() to construct. + private CollapseControl(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CollapseControl() { + horizontalAlignment_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CollapseControl(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_CollapseControl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_CollapseControl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.CollapseControl.class, + com.google.apps.card.v1.CollapseControl.Builder.class); + } + + private int bitField0_; + public static final int HORIZONTAL_ALIGNMENT_FIELD_NUMBER = 1; + private int horizontalAlignment_ = 0; + + /** + * + * + *
+   * The horizontal alignment of the expand and collapse button.
+   * 
+ * + * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 1; + * + * @return The enum numeric value on the wire for horizontalAlignment. + */ + @java.lang.Override + public int getHorizontalAlignmentValue() { + return horizontalAlignment_; + } + + /** + * + * + *
+   * The horizontal alignment of the expand and collapse button.
+   * 
+ * + * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 1; + * + * @return The horizontalAlignment. + */ + @java.lang.Override + public com.google.apps.card.v1.Widget.HorizontalAlignment getHorizontalAlignment() { + com.google.apps.card.v1.Widget.HorizontalAlignment result = + com.google.apps.card.v1.Widget.HorizontalAlignment.forNumber(horizontalAlignment_); + return result == null + ? com.google.apps.card.v1.Widget.HorizontalAlignment.UNRECOGNIZED + : result; + } + + public static final int EXPAND_BUTTON_FIELD_NUMBER = 2; + private com.google.apps.card.v1.Button expandButton_; + + /** + * + * + *
+   * Optional. Define a customizable button to expand the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + * + * @return Whether the expandButton field is set. + */ + @java.lang.Override + public boolean hasExpandButton() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Define a customizable button to expand the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + * + * @return The expandButton. + */ + @java.lang.Override + public com.google.apps.card.v1.Button getExpandButton() { + return expandButton_ == null + ? com.google.apps.card.v1.Button.getDefaultInstance() + : expandButton_; + } + + /** + * + * + *
+   * Optional. Define a customizable button to expand the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + */ + @java.lang.Override + public com.google.apps.card.v1.ButtonOrBuilder getExpandButtonOrBuilder() { + return expandButton_ == null + ? com.google.apps.card.v1.Button.getDefaultInstance() + : expandButton_; + } + + public static final int COLLAPSE_BUTTON_FIELD_NUMBER = 3; + private com.google.apps.card.v1.Button collapseButton_; + + /** + * + * + *
+   * Optional. Define a customizable button to collapse the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + * + * @return Whether the collapseButton field is set. + */ + @java.lang.Override + public boolean hasCollapseButton() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Define a customizable button to collapse the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + * + * @return The collapseButton. + */ + @java.lang.Override + public com.google.apps.card.v1.Button getCollapseButton() { + return collapseButton_ == null + ? com.google.apps.card.v1.Button.getDefaultInstance() + : collapseButton_; + } + + /** + * + * + *
+   * Optional. Define a customizable button to collapse the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + */ + @java.lang.Override + public com.google.apps.card.v1.ButtonOrBuilder getCollapseButtonOrBuilder() { + return collapseButton_ == null + ? com.google.apps.card.v1.Button.getDefaultInstance() + : collapseButton_; + } + + 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 (horizontalAlignment_ + != com.google.apps.card.v1.Widget.HorizontalAlignment.HORIZONTAL_ALIGNMENT_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, horizontalAlignment_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getExpandButton()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getCollapseButton()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (horizontalAlignment_ + != com.google.apps.card.v1.Widget.HorizontalAlignment.HORIZONTAL_ALIGNMENT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, horizontalAlignment_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExpandButton()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCollapseButton()); + } + 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.CollapseControl)) { + return super.equals(obj); + } + com.google.apps.card.v1.CollapseControl other = (com.google.apps.card.v1.CollapseControl) obj; + + if (horizontalAlignment_ != other.horizontalAlignment_) return false; + if (hasExpandButton() != other.hasExpandButton()) return false; + if (hasExpandButton()) { + if (!getExpandButton().equals(other.getExpandButton())) return false; + } + if (hasCollapseButton() != other.hasCollapseButton()) return false; + if (hasCollapseButton()) { + if (!getCollapseButton().equals(other.getCollapseButton())) 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) + HORIZONTAL_ALIGNMENT_FIELD_NUMBER; + hash = (53 * hash) + horizontalAlignment_; + if (hasExpandButton()) { + hash = (37 * hash) + EXPAND_BUTTON_FIELD_NUMBER; + hash = (53 * hash) + getExpandButton().hashCode(); + } + if (hasCollapseButton()) { + hash = (37 * hash) + COLLAPSE_BUTTON_FIELD_NUMBER; + hash = (53 * hash) + getCollapseButton().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.CollapseControl parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.CollapseControl 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.CollapseControl parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.CollapseControl 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.CollapseControl parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.CollapseControl 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.CollapseControl parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.CollapseControl 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.CollapseControl parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.CollapseControl 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.CollapseControl 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.CollapseControl 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.CollapseControl 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; + } + + /** + * + * + *
+   * Represent an expand and collapse control.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.CollapseControl} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.CollapseControl) + com.google.apps.card.v1.CollapseControlOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_CollapseControl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_CollapseControl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.CollapseControl.class, + com.google.apps.card.v1.CollapseControl.Builder.class); + } + + // Construct using com.google.apps.card.v1.CollapseControl.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExpandButtonFieldBuilder(); + getCollapseButtonFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + horizontalAlignment_ = 0; + expandButton_ = null; + if (expandButtonBuilder_ != null) { + expandButtonBuilder_.dispose(); + expandButtonBuilder_ = null; + } + collapseButton_ = null; + if (collapseButtonBuilder_ != null) { + collapseButtonBuilder_.dispose(); + collapseButtonBuilder_ = null; + } + 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_CollapseControl_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.CollapseControl getDefaultInstanceForType() { + return com.google.apps.card.v1.CollapseControl.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.CollapseControl build() { + com.google.apps.card.v1.CollapseControl result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.CollapseControl buildPartial() { + com.google.apps.card.v1.CollapseControl result = + new com.google.apps.card.v1.CollapseControl(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.apps.card.v1.CollapseControl result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.horizontalAlignment_ = horizontalAlignment_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.expandButton_ = + expandButtonBuilder_ == null ? expandButton_ : expandButtonBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.collapseButton_ = + collapseButtonBuilder_ == null ? collapseButton_ : collapseButtonBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + 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.CollapseControl) { + return mergeFrom((com.google.apps.card.v1.CollapseControl) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.CollapseControl other) { + if (other == com.google.apps.card.v1.CollapseControl.getDefaultInstance()) return this; + if (other.horizontalAlignment_ != 0) { + setHorizontalAlignmentValue(other.getHorizontalAlignmentValue()); + } + if (other.hasExpandButton()) { + mergeExpandButton(other.getExpandButton()); + } + if (other.hasCollapseButton()) { + mergeCollapseButton(other.getCollapseButton()); + } + 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: + { + horizontalAlignment_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getExpandButtonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCollapseButtonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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 horizontalAlignment_ = 0; + + /** + * + * + *
+     * The horizontal alignment of the expand and collapse button.
+     * 
+ * + * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 1; + * + * @return The enum numeric value on the wire for horizontalAlignment. + */ + @java.lang.Override + public int getHorizontalAlignmentValue() { + return horizontalAlignment_; + } + + /** + * + * + *
+     * The horizontal alignment of the expand and collapse button.
+     * 
+ * + * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 1; + * + * @param value The enum numeric value on the wire for horizontalAlignment to set. + * @return This builder for chaining. + */ + public Builder setHorizontalAlignmentValue(int value) { + horizontalAlignment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The horizontal alignment of the expand and collapse button.
+     * 
+ * + * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 1; + * + * @return The horizontalAlignment. + */ + @java.lang.Override + public com.google.apps.card.v1.Widget.HorizontalAlignment getHorizontalAlignment() { + com.google.apps.card.v1.Widget.HorizontalAlignment result = + com.google.apps.card.v1.Widget.HorizontalAlignment.forNumber(horizontalAlignment_); + return result == null + ? com.google.apps.card.v1.Widget.HorizontalAlignment.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The horizontal alignment of the expand and collapse button.
+     * 
+ * + * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 1; + * + * @param value The horizontalAlignment to set. + * @return This builder for chaining. + */ + public Builder setHorizontalAlignment( + com.google.apps.card.v1.Widget.HorizontalAlignment value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + horizontalAlignment_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The horizontal alignment of the expand and collapse button.
+     * 
+ * + * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 1; + * + * @return This builder for chaining. + */ + public Builder clearHorizontalAlignment() { + bitField0_ = (bitField0_ & ~0x00000001); + horizontalAlignment_ = 0; + onChanged(); + return this; + } + + private com.google.apps.card.v1.Button expandButton_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Button, + com.google.apps.card.v1.Button.Builder, + com.google.apps.card.v1.ButtonOrBuilder> + expandButtonBuilder_; + + /** + * + * + *
+     * Optional. Define a customizable button to expand the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + * + * @return Whether the expandButton field is set. + */ + public boolean hasExpandButton() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Define a customizable button to expand the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + * + * @return The expandButton. + */ + public com.google.apps.card.v1.Button getExpandButton() { + if (expandButtonBuilder_ == null) { + return expandButton_ == null + ? com.google.apps.card.v1.Button.getDefaultInstance() + : expandButton_; + } else { + return expandButtonBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Define a customizable button to expand the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + */ + public Builder setExpandButton(com.google.apps.card.v1.Button value) { + if (expandButtonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expandButton_ = value; + } else { + expandButtonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Define a customizable button to expand the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + */ + public Builder setExpandButton(com.google.apps.card.v1.Button.Builder builderForValue) { + if (expandButtonBuilder_ == null) { + expandButton_ = builderForValue.build(); + } else { + expandButtonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Define a customizable button to expand the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + */ + public Builder mergeExpandButton(com.google.apps.card.v1.Button value) { + if (expandButtonBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && expandButton_ != null + && expandButton_ != com.google.apps.card.v1.Button.getDefaultInstance()) { + getExpandButtonBuilder().mergeFrom(value); + } else { + expandButton_ = value; + } + } else { + expandButtonBuilder_.mergeFrom(value); + } + if (expandButton_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Define a customizable button to expand the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + */ + public Builder clearExpandButton() { + bitField0_ = (bitField0_ & ~0x00000002); + expandButton_ = null; + if (expandButtonBuilder_ != null) { + expandButtonBuilder_.dispose(); + expandButtonBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Define a customizable button to expand the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + */ + public com.google.apps.card.v1.Button.Builder getExpandButtonBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getExpandButtonFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Define a customizable button to expand the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + */ + public com.google.apps.card.v1.ButtonOrBuilder getExpandButtonOrBuilder() { + if (expandButtonBuilder_ != null) { + return expandButtonBuilder_.getMessageOrBuilder(); + } else { + return expandButton_ == null + ? com.google.apps.card.v1.Button.getDefaultInstance() + : expandButton_; + } + } + + /** + * + * + *
+     * Optional. Define a customizable button to expand the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Button, + com.google.apps.card.v1.Button.Builder, + com.google.apps.card.v1.ButtonOrBuilder> + getExpandButtonFieldBuilder() { + if (expandButtonBuilder_ == null) { + expandButtonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Button, + com.google.apps.card.v1.Button.Builder, + com.google.apps.card.v1.ButtonOrBuilder>( + getExpandButton(), getParentForChildren(), isClean()); + expandButton_ = null; + } + return expandButtonBuilder_; + } + + private com.google.apps.card.v1.Button collapseButton_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Button, + com.google.apps.card.v1.Button.Builder, + com.google.apps.card.v1.ButtonOrBuilder> + collapseButtonBuilder_; + + /** + * + * + *
+     * Optional. Define a customizable button to collapse the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + * + * @return Whether the collapseButton field is set. + */ + public boolean hasCollapseButton() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Define a customizable button to collapse the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + * + * @return The collapseButton. + */ + public com.google.apps.card.v1.Button getCollapseButton() { + if (collapseButtonBuilder_ == null) { + return collapseButton_ == null + ? com.google.apps.card.v1.Button.getDefaultInstance() + : collapseButton_; + } else { + return collapseButtonBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Define a customizable button to collapse the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + */ + public Builder setCollapseButton(com.google.apps.card.v1.Button value) { + if (collapseButtonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + collapseButton_ = value; + } else { + collapseButtonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Define a customizable button to collapse the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + */ + public Builder setCollapseButton(com.google.apps.card.v1.Button.Builder builderForValue) { + if (collapseButtonBuilder_ == null) { + collapseButton_ = builderForValue.build(); + } else { + collapseButtonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Define a customizable button to collapse the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + */ + public Builder mergeCollapseButton(com.google.apps.card.v1.Button value) { + if (collapseButtonBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && collapseButton_ != null + && collapseButton_ != com.google.apps.card.v1.Button.getDefaultInstance()) { + getCollapseButtonBuilder().mergeFrom(value); + } else { + collapseButton_ = value; + } + } else { + collapseButtonBuilder_.mergeFrom(value); + } + if (collapseButton_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Define a customizable button to collapse the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + */ + public Builder clearCollapseButton() { + bitField0_ = (bitField0_ & ~0x00000004); + collapseButton_ = null; + if (collapseButtonBuilder_ != null) { + collapseButtonBuilder_.dispose(); + collapseButtonBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Define a customizable button to collapse the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + */ + public com.google.apps.card.v1.Button.Builder getCollapseButtonBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCollapseButtonFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Define a customizable button to collapse the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + */ + public com.google.apps.card.v1.ButtonOrBuilder getCollapseButtonOrBuilder() { + if (collapseButtonBuilder_ != null) { + return collapseButtonBuilder_.getMessageOrBuilder(); + } else { + return collapseButton_ == null + ? com.google.apps.card.v1.Button.getDefaultInstance() + : collapseButton_; + } + } + + /** + * + * + *
+     * Optional. Define a customizable button to collapse the section.
+     * Both expand_button and collapse_button field must be set. Only one
+     * field set will not take into effect.
+     * If this field isn't set, the default button is used.
+     * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Button, + com.google.apps.card.v1.Button.Builder, + com.google.apps.card.v1.ButtonOrBuilder> + getCollapseButtonFieldBuilder() { + if (collapseButtonBuilder_ == null) { + collapseButtonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Button, + com.google.apps.card.v1.Button.Builder, + com.google.apps.card.v1.ButtonOrBuilder>( + getCollapseButton(), getParentForChildren(), isClean()); + collapseButton_ = null; + } + return collapseButtonBuilder_; + } + + @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.CollapseControl) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.CollapseControl) + private static final com.google.apps.card.v1.CollapseControl DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.CollapseControl(); + } + + public static com.google.apps.card.v1.CollapseControl getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CollapseControl 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.CollapseControl getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CollapseControlOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CollapseControlOrBuilder.java new file mode 100644 index 0000000000..3d10406f4a --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/CollapseControlOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +public interface CollapseControlOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.CollapseControl) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The horizontal alignment of the expand and collapse button.
+   * 
+ * + * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 1; + * + * @return The enum numeric value on the wire for horizontalAlignment. + */ + int getHorizontalAlignmentValue(); + + /** + * + * + *
+   * The horizontal alignment of the expand and collapse button.
+   * 
+ * + * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 1; + * + * @return The horizontalAlignment. + */ + com.google.apps.card.v1.Widget.HorizontalAlignment getHorizontalAlignment(); + + /** + * + * + *
+   * Optional. Define a customizable button to expand the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + * + * @return Whether the expandButton field is set. + */ + boolean hasExpandButton(); + + /** + * + * + *
+   * Optional. Define a customizable button to expand the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + * + * @return The expandButton. + */ + com.google.apps.card.v1.Button getExpandButton(); + + /** + * + * + *
+   * Optional. Define a customizable button to expand the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button expand_button = 2; + */ + com.google.apps.card.v1.ButtonOrBuilder getExpandButtonOrBuilder(); + + /** + * + * + *
+   * Optional. Define a customizable button to collapse the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + * + * @return Whether the collapseButton field is set. + */ + boolean hasCollapseButton(); + + /** + * + * + *
+   * Optional. Define a customizable button to collapse the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + * + * @return The collapseButton. + */ + com.google.apps.card.v1.Button getCollapseButton(); + + /** + * + * + *
+   * Optional. Define a customizable button to collapse the section.
+   * Both expand_button and collapse_button field must be set. Only one
+   * field set will not take into effect.
+   * If this field isn't set, the default button is used.
+   * 
+ * + * .google.apps.card.v1.Button collapse_button = 3; + */ + com.google.apps.card.v1.ButtonOrBuilder getCollapseButtonOrBuilder(); +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Columns.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Columns.java index 9c26f5a55b..25316b2f04 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Columns.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Columns.java @@ -46,13 +46,16 @@ * * On Android devices, the second column wraps if the screen width is * less than or equal to 320 dp. * - * To include more than 2 columns, or to use rows, use the + * To include more than two columns, or to use rows, use the * [`Grid`][google.apps.card.v1.Grid] widget. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): - * Columns for Google Workspace Add-ons are in - * Developer Preview. + * The add-on UIs that support columns include: + * + * * The dialog displayed when users open the add-on from an email draft. + * * The dialog displayed when users open the add-on from the + * **Add attachment** menu in a Google Calendar event. * * * Protobuf type {@code google.apps.card.v1.Columns} @@ -248,10 +251,8 @@ public interface ColumnOrBuilder *
    * A column.
    *
-   * [Google Workspace Add-ons and Chat
-   * apps](https://developers.google.com/workspace/extend):
-   * Columns for Google Workspace Add-ons are in
-   * Developer Preview.
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend)
    * 
* * Protobuf type {@code google.apps.card.v1.Columns.Column} @@ -303,10 +304,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * column depends on both the `HorizontalSizeStyle` and the width of the * widgets within the column. * - * [Google Workspace Add-ons and Chat - * apps](https://developers.google.com/workspace/extend): - * Columns for Google Workspace Add-ons are in - * Developer Preview. + * [Google Workspace add-ons and Chat + * apps](https://developers.google.com/workspace/extend) * * * Protobuf enum {@code google.apps.card.v1.Columns.Column.HorizontalSizeStyle} @@ -477,10 +476,8 @@ private HorizontalSizeStyle(int value) { * Specifies whether widgets align to the top, bottom, or center of a * column. * - * [Google Workspace Add-ons and Chat - * apps](https://developers.google.com/workspace/extend): - * Columns for Google Workspace Add-ons are in - * Developer Preview. + * [Google Workspace add-ons and Chat + * apps](https://developers.google.com/workspace/extend) * * * Protobuf enum {@code google.apps.card.v1.Columns.Column.VerticalAlignment} @@ -925,6 +922,43 @@ public interface WidgetsOrBuilder */ com.google.apps.card.v1.DateTimePickerOrBuilder getDateTimePickerOrBuilder(); + /** + * + * + *
+       * [ChipList][google.apps.card.v1.ChipList] widget.
+       * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + * + * @return Whether the chipList field is set. + */ + boolean hasChipList(); + + /** + * + * + *
+       * [ChipList][google.apps.card.v1.ChipList] widget.
+       * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + * + * @return The chipList. + */ + com.google.apps.card.v1.ChipList getChipList(); + + /** + * + * + *
+       * [ChipList][google.apps.card.v1.ChipList] widget.
+       * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + */ + com.google.apps.card.v1.ChipListOrBuilder getChipListOrBuilder(); + com.google.apps.card.v1.Columns.Column.Widgets.DataCase getDataCase(); } @@ -934,10 +968,8 @@ public interface WidgetsOrBuilder *
      * The supported widgets that you can include in a column.
      *
-     * [Google Workspace Add-ons and Chat
-     * apps](https://developers.google.com/workspace/extend):
-     * Columns for Google Workspace Add-ons are in
-     * Developer Preview.
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend)
      * 
* * Protobuf type {@code google.apps.card.v1.Columns.Column.Widgets} @@ -992,6 +1024,7 @@ public enum DataCase TEXT_INPUT(5), SELECTION_INPUT(6), DATE_TIME_PICKER(7), + CHIP_LIST(8), DATA_NOT_SET(0); private final int value; @@ -1025,6 +1058,8 @@ public static DataCase forNumber(int value) { return SELECTION_INPUT; case 7: return DATE_TIME_PICKER; + case 8: + return CHIP_LIST; case 0: return DATA_NOT_SET; default: @@ -1419,6 +1454,60 @@ public com.google.apps.card.v1.DateTimePickerOrBuilder getDateTimePickerOrBuilde return com.google.apps.card.v1.DateTimePicker.getDefaultInstance(); } + public static final int CHIP_LIST_FIELD_NUMBER = 8; + + /** + * + * + *
+       * [ChipList][google.apps.card.v1.ChipList] widget.
+       * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + * + * @return Whether the chipList field is set. + */ + @java.lang.Override + public boolean hasChipList() { + return dataCase_ == 8; + } + + /** + * + * + *
+       * [ChipList][google.apps.card.v1.ChipList] widget.
+       * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + * + * @return The chipList. + */ + @java.lang.Override + public com.google.apps.card.v1.ChipList getChipList() { + if (dataCase_ == 8) { + return (com.google.apps.card.v1.ChipList) data_; + } + return com.google.apps.card.v1.ChipList.getDefaultInstance(); + } + + /** + * + * + *
+       * [ChipList][google.apps.card.v1.ChipList] widget.
+       * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + */ + @java.lang.Override + public com.google.apps.card.v1.ChipListOrBuilder getChipListOrBuilder() { + if (dataCase_ == 8) { + return (com.google.apps.card.v1.ChipList) data_; + } + return com.google.apps.card.v1.ChipList.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1454,6 +1543,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dataCase_ == 7) { output.writeMessage(7, (com.google.apps.card.v1.DateTimePicker) data_); } + if (dataCase_ == 8) { + output.writeMessage(8, (com.google.apps.card.v1.ChipList) data_); + } getUnknownFields().writeTo(output); } @@ -1498,6 +1590,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 7, (com.google.apps.card.v1.DateTimePicker) data_); } + if (dataCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.apps.card.v1.ChipList) data_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1537,6 +1634,9 @@ public boolean equals(final java.lang.Object obj) { case 7: if (!getDateTimePicker().equals(other.getDateTimePicker())) return false; break; + case 8: + if (!getChipList().equals(other.getChipList())) return false; + break; case 0: default: } @@ -1580,6 +1680,10 @@ public int hashCode() { hash = (37 * hash) + DATE_TIME_PICKER_FIELD_NUMBER; hash = (53 * hash) + getDateTimePicker().hashCode(); break; + case 8: + hash = (37 * hash) + CHIP_LIST_FIELD_NUMBER; + hash = (53 * hash) + getChipList().hashCode(); + break; case 0: default: } @@ -1691,10 +1795,8 @@ protected Builder newBuilderForType( *
        * The supported widgets that you can include in a column.
        *
-       * [Google Workspace Add-ons and Chat
-       * apps](https://developers.google.com/workspace/extend):
-       * Columns for Google Workspace Add-ons are in
-       * Developer Preview.
+       * [Google Workspace add-ons and Chat
+       * apps](https://developers.google.com/workspace/extend)
        * 
* * Protobuf type {@code google.apps.card.v1.Columns.Column.Widgets} @@ -1751,6 +1853,9 @@ public Builder clear() { if (dateTimePickerBuilder_ != null) { dateTimePickerBuilder_.clear(); } + if (chipListBuilder_ != null) { + chipListBuilder_.clear(); + } dataCase_ = 0; data_ = null; return this; @@ -1816,6 +1921,9 @@ private void buildPartialOneofs(com.google.apps.card.v1.Columns.Column.Widgets r if (dataCase_ == 7 && dateTimePickerBuilder_ != null) { result.data_ = dateTimePickerBuilder_.build(); } + if (dataCase_ == 8 && chipListBuilder_ != null) { + result.data_ = chipListBuilder_.build(); + } } @java.lang.Override @@ -1902,6 +2010,11 @@ public Builder mergeFrom(com.google.apps.card.v1.Columns.Column.Widgets other) { mergeDateTimePicker(other.getDateTimePicker()); break; } + case CHIP_LIST: + { + mergeChipList(other.getChipList()); + break; + } case DATA_NOT_SET: { break; @@ -1979,6 +2092,12 @@ public Builder mergeFrom( dataCase_ = 7; break; } // case 58 + case 66: + { + input.readMessage(getChipListFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 8; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3526,6 +3645,220 @@ public com.google.apps.card.v1.DateTimePickerOrBuilder getDateTimePickerOrBuilde return dateTimePickerBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.ChipList, + com.google.apps.card.v1.ChipList.Builder, + com.google.apps.card.v1.ChipListOrBuilder> + chipListBuilder_; + + /** + * + * + *
+         * [ChipList][google.apps.card.v1.ChipList] widget.
+         * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + * + * @return Whether the chipList field is set. + */ + @java.lang.Override + public boolean hasChipList() { + return dataCase_ == 8; + } + + /** + * + * + *
+         * [ChipList][google.apps.card.v1.ChipList] widget.
+         * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + * + * @return The chipList. + */ + @java.lang.Override + public com.google.apps.card.v1.ChipList getChipList() { + if (chipListBuilder_ == null) { + if (dataCase_ == 8) { + return (com.google.apps.card.v1.ChipList) data_; + } + return com.google.apps.card.v1.ChipList.getDefaultInstance(); + } else { + if (dataCase_ == 8) { + return chipListBuilder_.getMessage(); + } + return com.google.apps.card.v1.ChipList.getDefaultInstance(); + } + } + + /** + * + * + *
+         * [ChipList][google.apps.card.v1.ChipList] widget.
+         * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + */ + public Builder setChipList(com.google.apps.card.v1.ChipList value) { + if (chipListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + chipListBuilder_.setMessage(value); + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+         * [ChipList][google.apps.card.v1.ChipList] widget.
+         * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + */ + public Builder setChipList(com.google.apps.card.v1.ChipList.Builder builderForValue) { + if (chipListBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + chipListBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+         * [ChipList][google.apps.card.v1.ChipList] widget.
+         * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + */ + public Builder mergeChipList(com.google.apps.card.v1.ChipList value) { + if (chipListBuilder_ == null) { + if (dataCase_ == 8 && data_ != com.google.apps.card.v1.ChipList.getDefaultInstance()) { + data_ = + com.google.apps.card.v1.ChipList.newBuilder( + (com.google.apps.card.v1.ChipList) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 8) { + chipListBuilder_.mergeFrom(value); + } else { + chipListBuilder_.setMessage(value); + } + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+         * [ChipList][google.apps.card.v1.ChipList] widget.
+         * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + */ + public Builder clearChipList() { + if (chipListBuilder_ == null) { + if (dataCase_ == 8) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 8) { + dataCase_ = 0; + data_ = null; + } + chipListBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+         * [ChipList][google.apps.card.v1.ChipList] widget.
+         * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + */ + public com.google.apps.card.v1.ChipList.Builder getChipListBuilder() { + return getChipListFieldBuilder().getBuilder(); + } + + /** + * + * + *
+         * [ChipList][google.apps.card.v1.ChipList] widget.
+         * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + */ + @java.lang.Override + public com.google.apps.card.v1.ChipListOrBuilder getChipListOrBuilder() { + if ((dataCase_ == 8) && (chipListBuilder_ != null)) { + return chipListBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 8) { + return (com.google.apps.card.v1.ChipList) data_; + } + return com.google.apps.card.v1.ChipList.getDefaultInstance(); + } + } + + /** + * + * + *
+         * [ChipList][google.apps.card.v1.ChipList] widget.
+         * 
+ * + * .google.apps.card.v1.ChipList chip_list = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.ChipList, + com.google.apps.card.v1.ChipList.Builder, + com.google.apps.card.v1.ChipListOrBuilder> + getChipListFieldBuilder() { + if (chipListBuilder_ == null) { + if (!(dataCase_ == 8)) { + data_ = com.google.apps.card.v1.ChipList.getDefaultInstance(); + } + chipListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.ChipList, + com.google.apps.card.v1.ChipList.Builder, + com.google.apps.card.v1.ChipListOrBuilder>( + (com.google.apps.card.v1.ChipList) data_, getParentForChildren(), isClean()); + data_ = null; + } + dataCase_ = 8; + onChanged(); + return chipListBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4004,10 +4337,8 @@ protected Builder newBuilderForType( *
      * A column.
      *
-     * [Google Workspace Add-ons and Chat
-     * apps](https://developers.google.com/workspace/extend):
-     * Columns for Google Workspace Add-ons are in
-     * Developer Preview.
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend)
      * 
* * Protobuf type {@code google.apps.card.v1.Columns.Column} @@ -5297,13 +5628,16 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * On Android devices, the second column wraps if the screen width is * less than or equal to 320 dp. * - * To include more than 2 columns, or to use rows, use the + * To include more than two columns, or to use rows, use the * [`Grid`][google.apps.card.v1.Grid] widget. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): - * Columns for Google Workspace Add-ons are in - * Developer Preview. + * The add-on UIs that support columns include: + * + * * The dialog displayed when users open the add-on from an email draft. + * * The dialog displayed when users open the add-on from the + * **Add attachment** menu in a Google Calendar event. * * * Protobuf type {@code google.apps.card.v1.Columns} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DateTimePicker.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DateTimePicker.java index f4be8edcbf..d31bf14514 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DateTimePicker.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DateTimePicker.java @@ -23,8 +23,11 @@ * * *
- * Lets users input a date, a time, or both a date and a time. For an example in
- * Google Chat apps, see [Let a user pick a date and
+ * Lets users input a date, a time, or both a date and a time.
+ * Supports form submission validation. When `Action.all_widgets_are_required`
+ * is set to `true` or this widget is specified in `Action.required_widgets`,
+ * the submission action is blocked unless a value is selected. For an example
+ * in Google Chat apps, see [Let a user pick a date and
  * time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time).
  *
  * Users can input text or use the picker to select dates and times. If users
@@ -32,7 +35,7 @@
  * to input the information correctly.
  *
  * [Google Workspace
- * Add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ * add-ons and Chat apps](https://developers.google.com/workspace/extend):
  * 
* * Protobuf type {@code google.apps.card.v1.DateTimePicker} @@ -82,7 +85,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * The format for the date and time in the `DateTimePicker` widget. * Determines whether users can input a date, a time, or both a date and time. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -404,8 +407,8 @@ public com.google.apps.card.v1.DateTimePicker.DateTimePickerType getType() { * * *
-   * The default value displayed in the widget, in milliseconds since [Unix
-   * epoch time](https://en.wikipedia.org/wiki/Unix_time).
+   * Optional. The default value displayed in the widget, in milliseconds since
+   * [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
    *
    * Specify the value based on the type of picker (`DateTimePickerType`):
    *
@@ -417,7 +420,33 @@ public com.google.apps.card.v1.DateTimePicker.DateTimePickerType getType() {
    *   `43200000` (or `12 * 60 * 60 * 1000`).
    * 
* - * int64 value_ms_epoch = 4; + * optional int64 value_ms_epoch = 4; + * + * @return Whether the valueMsEpoch field is set. + */ + @java.lang.Override + public boolean hasValueMsEpoch() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The default value displayed in the widget, in milliseconds since
+   * [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
+   *
+   * Specify the value based on the type of picker (`DateTimePickerType`):
+   *
+   * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to
+   *   represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`.
+   * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent
+   *   January 1, 2023, use `1672531200000`.
+   * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use
+   *   `43200000` (or `12 * 60 * 60 * 1000`).
+   * 
+ * + * optional int64 value_ms_epoch = 4; * * @return The valueMsEpoch. */ @@ -464,7 +493,7 @@ public int getTimezoneOffsetDate() { */ @java.lang.Override public boolean hasOnChangeAction() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** @@ -527,13 +556,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.apps.card.v1.DateTimePicker.DateTimePickerType.DATE_AND_TIME.getNumber()) { output.writeEnum(3, type_); } - if (valueMsEpoch_ != 0L) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(4, valueMsEpoch_); } if (timezoneOffsetDate_ != 0) { output.writeInt32(5, timezoneOffsetDate_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(6, getOnChangeAction()); } getUnknownFields().writeTo(output); @@ -555,13 +584,13 @@ public int getSerializedSize() { != com.google.apps.card.v1.DateTimePicker.DateTimePickerType.DATE_AND_TIME.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); } - if (valueMsEpoch_ != 0L) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, valueMsEpoch_); } if (timezoneOffsetDate_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, timezoneOffsetDate_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOnChangeAction()); } size += getUnknownFields().getSerializedSize(); @@ -582,7 +611,10 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getLabel().equals(other.getLabel())) return false; if (type_ != other.type_) return false; - if (getValueMsEpoch() != other.getValueMsEpoch()) return false; + if (hasValueMsEpoch() != other.hasValueMsEpoch()) return false; + if (hasValueMsEpoch()) { + if (getValueMsEpoch() != other.getValueMsEpoch()) return false; + } if (getTimezoneOffsetDate() != other.getTimezoneOffsetDate()) return false; if (hasOnChangeAction() != other.hasOnChangeAction()) return false; if (hasOnChangeAction()) { @@ -605,8 +637,10 @@ public int hashCode() { hash = (53 * hash) + getLabel().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; - hash = (37 * hash) + VALUE_MS_EPOCH_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getValueMsEpoch()); + if (hasValueMsEpoch()) { + hash = (37 * hash) + VALUE_MS_EPOCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getValueMsEpoch()); + } hash = (37 * hash) + TIMEZONE_OFFSET_DATE_FIELD_NUMBER; hash = (53 * hash) + getTimezoneOffsetDate(); if (hasOnChangeAction()) { @@ -718,8 +752,11 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Lets users input a date, a time, or both a date and a time. For an example in
-   * Google Chat apps, see [Let a user pick a date and
+   * Lets users input a date, a time, or both a date and a time.
+   * Supports form submission validation. When `Action.all_widgets_are_required`
+   * is set to `true` or this widget is specified in `Action.required_widgets`,
+   * the submission action is blocked unless a value is selected. For an example
+   * in Google Chat apps, see [Let a user pick a date and
    * time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time).
    *
    * Users can input text or use the picker to select dates and times. If users
@@ -727,7 +764,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    * to input the information correctly.
    *
    * [Google Workspace
-   * Add-ons and Chat apps](https://developers.google.com/workspace/extend):
+   * add-ons and Chat apps](https://developers.google.com/workspace/extend):
    * 
* * Protobuf type {@code google.apps.card.v1.DateTimePicker} @@ -826,17 +863,18 @@ private void buildPartial0(com.google.apps.card.v1.DateTimePicker result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.type_ = type_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000008) != 0)) { result.valueMsEpoch_ = valueMsEpoch_; + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000010) != 0)) { result.timezoneOffsetDate_ = timezoneOffsetDate_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000020) != 0)) { result.onChangeAction_ = onChangeActionBuilder_ == null ? onChangeAction_ : onChangeActionBuilder_.build(); - to_bitField0_ |= 0x00000001; + to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @@ -899,7 +937,7 @@ public Builder mergeFrom(com.google.apps.card.v1.DateTimePicker other) { if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } - if (other.getValueMsEpoch() != 0L) { + if (other.hasValueMsEpoch()) { setValueMsEpoch(other.getValueMsEpoch()); } if (other.getTimezoneOffsetDate() != 0) { @@ -1339,8 +1377,34 @@ public Builder clearType() { * * *
-     * The default value displayed in the widget, in milliseconds since [Unix
-     * epoch time](https://en.wikipedia.org/wiki/Unix_time).
+     * Optional. The default value displayed in the widget, in milliseconds since
+     * [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
+     *
+     * Specify the value based on the type of picker (`DateTimePickerType`):
+     *
+     * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to
+     *   represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`.
+     * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent
+     *   January 1, 2023, use `1672531200000`.
+     * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use
+     *   `43200000` (or `12 * 60 * 60 * 1000`).
+     * 
+ * + * optional int64 value_ms_epoch = 4; + * + * @return Whether the valueMsEpoch field is set. + */ + @java.lang.Override + public boolean hasValueMsEpoch() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. The default value displayed in the widget, in milliseconds since
+     * [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
      *
      * Specify the value based on the type of picker (`DateTimePickerType`):
      *
@@ -1352,7 +1416,7 @@ public Builder clearType() {
      *   `43200000` (or `12 * 60 * 60 * 1000`).
      * 
* - * int64 value_ms_epoch = 4; + * optional int64 value_ms_epoch = 4; * * @return The valueMsEpoch. */ @@ -1365,8 +1429,8 @@ public long getValueMsEpoch() { * * *
-     * The default value displayed in the widget, in milliseconds since [Unix
-     * epoch time](https://en.wikipedia.org/wiki/Unix_time).
+     * Optional. The default value displayed in the widget, in milliseconds since
+     * [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
      *
      * Specify the value based on the type of picker (`DateTimePickerType`):
      *
@@ -1378,7 +1442,7 @@ public long getValueMsEpoch() {
      *   `43200000` (or `12 * 60 * 60 * 1000`).
      * 
* - * int64 value_ms_epoch = 4; + * optional int64 value_ms_epoch = 4; * * @param value The valueMsEpoch to set. * @return This builder for chaining. @@ -1395,8 +1459,8 @@ public Builder setValueMsEpoch(long value) { * * *
-     * The default value displayed in the widget, in milliseconds since [Unix
-     * epoch time](https://en.wikipedia.org/wiki/Unix_time).
+     * Optional. The default value displayed in the widget, in milliseconds since
+     * [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
      *
      * Specify the value based on the type of picker (`DateTimePickerType`):
      *
@@ -1408,7 +1472,7 @@ public Builder setValueMsEpoch(long value) {
      *   `43200000` (or `12 * 60 * 60 * 1000`).
      * 
* - * int64 value_ms_epoch = 4; + * optional int64 value_ms_epoch = 4; * * @return This builder for chaining. */ diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DateTimePickerOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DateTimePickerOrBuilder.java index d8314ee701..ed1ba5fa41 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DateTimePickerOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DateTimePickerOrBuilder.java @@ -116,8 +116,8 @@ public interface DateTimePickerOrBuilder * * *
-   * The default value displayed in the widget, in milliseconds since [Unix
-   * epoch time](https://en.wikipedia.org/wiki/Unix_time).
+   * Optional. The default value displayed in the widget, in milliseconds since
+   * [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
    *
    * Specify the value based on the type of picker (`DateTimePickerType`):
    *
@@ -129,7 +129,30 @@ public interface DateTimePickerOrBuilder
    *   `43200000` (or `12 * 60 * 60 * 1000`).
    * 
* - * int64 value_ms_epoch = 4; + * optional int64 value_ms_epoch = 4; + * + * @return Whether the valueMsEpoch field is set. + */ + boolean hasValueMsEpoch(); + + /** + * + * + *
+   * Optional. The default value displayed in the widget, in milliseconds since
+   * [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
+   *
+   * Specify the value based on the type of picker (`DateTimePickerType`):
+   *
+   * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to
+   *   represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`.
+   * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent
+   *   January 1, 2023, use `1672531200000`.
+   * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use
+   *   `43200000` (or `12 * 60 * 60 * 1000`).
+   * 
+ * + * optional int64 value_ms_epoch = 4; * * @return The valueMsEpoch. */ diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DecoratedText.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DecoratedText.java index 70b1ca3f4b..74f771058f 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DecoratedText.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DecoratedText.java @@ -29,7 +29,7 @@ * Google Chat apps, see [Display text with decorative * text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -47,6 +47,7 @@ private DecoratedText(com.google.protobuf.GeneratedMessageV3.Builder builder) } private DecoratedText() { + startIconVerticalAlignment_ = 0; topLabel_ = ""; text_ = ""; bottomLabel_ = ""; @@ -201,7 +202,7 @@ public interface SwitchControlOrBuilder *
      * How the switch appears in the user interface.
      *
-     * [Google Workspace Add-ons
+     * [Google Workspace add-ons
      * and Chat apps](https://developers.google.com/workspace/extend):
      * 
* @@ -217,7 +218,7 @@ public interface SwitchControlOrBuilder *
      * How the switch appears in the user interface.
      *
-     * [Google Workspace Add-ons
+     * [Google Workspace add-ons
      * and Chat apps](https://developers.google.com/workspace/extend):
      * 
* @@ -234,7 +235,7 @@ public interface SwitchControlOrBuilder *
    * Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
    *
-   * [Google Workspace Add-ons and Chat
+   * [Google Workspace add-ons and Chat
    * apps](https://developers.google.com/workspace/extend):
    *
    * Only supported in the `decoratedText` widget.
@@ -286,7 +287,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      * 
      * How the switch appears in the user interface.
      *
-     * [Google Workspace Add-ons
+     * [Google Workspace add-ons
      * and Chat apps](https://developers.google.com/workspace/extend):
      * 
* @@ -647,7 +648,7 @@ public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() { *
      * How the switch appears in the user interface.
      *
-     * [Google Workspace Add-ons
+     * [Google Workspace add-ons
      * and Chat apps](https://developers.google.com/workspace/extend):
      * 
* @@ -666,7 +667,7 @@ public int getControlTypeValue() { *
      * How the switch appears in the user interface.
      *
-     * [Google Workspace Add-ons
+     * [Google Workspace add-ons
      * and Chat apps](https://developers.google.com/workspace/extend):
      * 
* @@ -894,7 +895,7 @@ protected Builder newBuilderForType( *
      * Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
      *
-     * [Google Workspace Add-ons and Chat
+     * [Google Workspace add-ons and Chat
      * apps](https://developers.google.com/workspace/extend):
      *
      * Only supported in the `decoratedText` widget.
@@ -1670,7 +1671,7 @@ public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() {
        * 
        * How the switch appears in the user interface.
        *
-       * [Google Workspace Add-ons
+       * [Google Workspace add-ons
        * and Chat apps](https://developers.google.com/workspace/extend):
        * 
* @@ -1689,7 +1690,7 @@ public int getControlTypeValue() { *
        * How the switch appears in the user interface.
        *
-       * [Google Workspace Add-ons
+       * [Google Workspace add-ons
        * and Chat apps](https://developers.google.com/workspace/extend):
        * 
* @@ -1711,7 +1712,7 @@ public Builder setControlTypeValue(int value) { *
        * How the switch appears in the user interface.
        *
-       * [Google Workspace Add-ons
+       * [Google Workspace add-ons
        * and Chat apps](https://developers.google.com/workspace/extend):
        * 
* @@ -1734,7 +1735,7 @@ public com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType getContro *
        * How the switch appears in the user interface.
        *
-       * [Google Workspace Add-ons
+       * [Google Workspace add-ons
        * and Chat apps](https://developers.google.com/workspace/extend):
        * 
* @@ -1760,7 +1761,7 @@ public Builder setControlType( *
        * How the switch appears in the user interface.
        *
-       * [Google Workspace Add-ons
+       * [Google Workspace add-ons
        * and Chat apps](https://developers.google.com/workspace/extend):
        * 
* @@ -1906,7 +1907,7 @@ public ControlCase getControlCase() { * .google.apps.card.v1.Icon icon = 1 [deprecated = true]; * * @deprecated google.apps.card.v1.DecoratedText.icon is deprecated. See - * google/apps/card/v1/card.proto;l=796 + * google/apps/card/v1/card.proto;l=915 * @return Whether the icon field is set. */ @java.lang.Override @@ -1925,7 +1926,7 @@ public boolean hasIcon() { * .google.apps.card.v1.Icon icon = 1 [deprecated = true]; * * @deprecated google.apps.card.v1.DecoratedText.icon is deprecated. See - * google/apps/card/v1/card.proto;l=796 + * google/apps/card/v1/card.proto;l=915 * @return The icon. */ @java.lang.Override @@ -1998,6 +1999,49 @@ public com.google.apps.card.v1.IconOrBuilder getStartIconOrBuilder() { return startIcon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : startIcon_; } + public static final int START_ICON_VERTICAL_ALIGNMENT_FIELD_NUMBER = 13; + private int startIconVerticalAlignment_ = 0; + + /** + * + * + *
+   * Optional. Vertical alignment of the start icon. If not set, the icon
+   * will be vertically centered.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.Widget.VerticalAlignment start_icon_vertical_alignment = 13; + * + * @return The enum numeric value on the wire for startIconVerticalAlignment. + */ + @java.lang.Override + public int getStartIconVerticalAlignmentValue() { + return startIconVerticalAlignment_; + } + + /** + * + * + *
+   * Optional. Vertical alignment of the start icon. If not set, the icon
+   * will be vertically centered.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.Widget.VerticalAlignment start_icon_vertical_alignment = 13; + * + * @return The startIconVerticalAlignment. + */ + @java.lang.Override + public com.google.apps.card.v1.Widget.VerticalAlignment getStartIconVerticalAlignment() { + com.google.apps.card.v1.Widget.VerticalAlignment result = + com.google.apps.card.v1.Widget.VerticalAlignment.forNumber(startIconVerticalAlignment_); + return result == null ? com.google.apps.card.v1.Widget.VerticalAlignment.UNRECOGNIZED : result; + } + public static final int TOP_LABEL_FIELD_NUMBER = 3; @SuppressWarnings("serial") @@ -2051,6 +2095,68 @@ public com.google.protobuf.ByteString getTopLabelBytes() { } } + public static final int TOP_LABEL_TEXT_FIELD_NUMBER = 17; + private com.google.apps.card.v1.TextParagraph topLabelText_; + + /** + * + * + *
+   * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+   * more complex formatting than `top_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + * + * @return Whether the topLabelText field is set. + */ + @java.lang.Override + public boolean hasTopLabelText() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+   * more complex formatting than `top_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + * + * @return The topLabelText. + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraph getTopLabelText() { + return topLabelText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : topLabelText_; + } + + /** + * + * + *
+   * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+   * more complex formatting than `top_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraphOrBuilder getTopLabelTextOrBuilder() { + return topLabelText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : topLabelText_; + } + public static final int TEXT_FIELD_NUMBER = 4; @SuppressWarnings("serial") @@ -2069,7 +2175,7 @@ public com.google.protobuf.ByteString getTopLabelBytes() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). *
* * string text = 4; @@ -2102,7 +2208,7 @@ public java.lang.String getText() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). *
* * string text = 4; @@ -2122,6 +2228,68 @@ public com.google.protobuf.ByteString getTextBytes() { } } + public static final int CONTENT_TEXT_FIELD_NUMBER = 18; + private com.google.apps.card.v1.TextParagraph contentText_; + + /** + * + * + *
+   * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+   * than `text`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + * + * @return Whether the contentText field is set. + */ + @java.lang.Override + public boolean hasContentText() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+   * than `text`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + * + * @return The contentText. + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraph getContentText() { + return contentText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : contentText_; + } + + /** + * + * + *
+   * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+   * than `text`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraphOrBuilder getContentTextOrBuilder() { + return contentText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : contentText_; + } + public static final int WRAP_TEXT_FIELD_NUMBER = 5; private boolean wrapText_ = false; @@ -2197,6 +2365,68 @@ public com.google.protobuf.ByteString getBottomLabelBytes() { } } + public static final int BOTTOM_LABEL_TEXT_FIELD_NUMBER = 19; + private com.google.apps.card.v1.TextParagraph bottomLabelText_; + + /** + * + * + *
+   * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+   * more complex formatting than `bottom_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + * + * @return Whether the bottomLabelText field is set. + */ + @java.lang.Override + public boolean hasBottomLabelText() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+   * more complex formatting than `bottom_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + * + * @return The bottomLabelText. + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraph getBottomLabelText() { + return bottomLabelText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : bottomLabelText_; + } + + /** + * + * + *
+   * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+   * more complex formatting than `bottom_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraphOrBuilder getBottomLabelTextOrBuilder() { + return bottomLabelText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : bottomLabelText_; + } + public static final int ON_CLICK_FIELD_NUMBER = 7; private com.google.apps.card.v1.OnClick onClick_; @@ -2213,7 +2443,7 @@ public com.google.protobuf.ByteString getBottomLabelBytes() { */ @java.lang.Override public boolean hasOnClick() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** @@ -2458,7 +2688,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bottomLabel_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, bottomLabel_); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(7, getOnClick()); } if (controlCase_ == 8) { @@ -2473,6 +2703,20 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(12, getStartIcon()); } + if (startIconVerticalAlignment_ + != com.google.apps.card.v1.Widget.VerticalAlignment.VERTICAL_ALIGNMENT_UNSPECIFIED + .getNumber()) { + output.writeEnum(13, startIconVerticalAlignment_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(17, getTopLabelText()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(18, getContentText()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(19, getBottomLabelText()); + } getUnknownFields().writeTo(output); } @@ -2497,7 +2741,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bottomLabel_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, bottomLabel_); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getOnClick()); } if (controlCase_ == 8) { @@ -2518,6 +2762,21 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getStartIcon()); } + if (startIconVerticalAlignment_ + != com.google.apps.card.v1.Widget.VerticalAlignment.VERTICAL_ALIGNMENT_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(13, startIconVerticalAlignment_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getTopLabelText()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getContentText()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getBottomLabelText()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2541,10 +2800,23 @@ public boolean equals(final java.lang.Object obj) { if (hasStartIcon()) { if (!getStartIcon().equals(other.getStartIcon())) return false; } + if (startIconVerticalAlignment_ != other.startIconVerticalAlignment_) return false; if (!getTopLabel().equals(other.getTopLabel())) return false; + if (hasTopLabelText() != other.hasTopLabelText()) return false; + if (hasTopLabelText()) { + if (!getTopLabelText().equals(other.getTopLabelText())) return false; + } if (!getText().equals(other.getText())) return false; + if (hasContentText() != other.hasContentText()) return false; + if (hasContentText()) { + if (!getContentText().equals(other.getContentText())) return false; + } if (getWrapText() != other.getWrapText()) return false; if (!getBottomLabel().equals(other.getBottomLabel())) return false; + if (hasBottomLabelText() != other.hasBottomLabelText()) return false; + if (hasBottomLabelText()) { + if (!getBottomLabelText().equals(other.getBottomLabelText())) return false; + } if (hasOnClick() != other.hasOnClick()) return false; if (hasOnClick()) { if (!getOnClick().equals(other.getOnClick())) return false; @@ -2582,14 +2854,28 @@ public int hashCode() { hash = (37 * hash) + START_ICON_FIELD_NUMBER; hash = (53 * hash) + getStartIcon().hashCode(); } + hash = (37 * hash) + START_ICON_VERTICAL_ALIGNMENT_FIELD_NUMBER; + hash = (53 * hash) + startIconVerticalAlignment_; hash = (37 * hash) + TOP_LABEL_FIELD_NUMBER; hash = (53 * hash) + getTopLabel().hashCode(); + if (hasTopLabelText()) { + hash = (37 * hash) + TOP_LABEL_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getTopLabelText().hashCode(); + } hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); + if (hasContentText()) { + hash = (37 * hash) + CONTENT_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getContentText().hashCode(); + } hash = (37 * hash) + WRAP_TEXT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWrapText()); hash = (37 * hash) + BOTTOM_LABEL_FIELD_NUMBER; hash = (53 * hash) + getBottomLabel().hashCode(); + if (hasBottomLabelText()) { + hash = (37 * hash) + BOTTOM_LABEL_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getBottomLabelText().hashCode(); + } if (hasOnClick()) { hash = (37 * hash) + ON_CLICK_FIELD_NUMBER; hash = (53 * hash) + getOnClick().hashCode(); @@ -2720,7 +3006,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * Google Chat apps, see [Display text with decorative * text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -2759,6 +3045,9 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getIconFieldBuilder(); getStartIconFieldBuilder(); + getTopLabelTextFieldBuilder(); + getContentTextFieldBuilder(); + getBottomLabelTextFieldBuilder(); getOnClickFieldBuilder(); } } @@ -2777,10 +3066,26 @@ public Builder clear() { startIconBuilder_.dispose(); startIconBuilder_ = null; } + startIconVerticalAlignment_ = 0; topLabel_ = ""; + topLabelText_ = null; + if (topLabelTextBuilder_ != null) { + topLabelTextBuilder_.dispose(); + topLabelTextBuilder_ = null; + } text_ = ""; + contentText_ = null; + if (contentTextBuilder_ != null) { + contentTextBuilder_.dispose(); + contentTextBuilder_ = null; + } wrapText_ = false; bottomLabel_ = ""; + bottomLabelText_ = null; + if (bottomLabelTextBuilder_ != null) { + bottomLabelTextBuilder_.dispose(); + bottomLabelTextBuilder_ = null; + } onClick_ = null; if (onClickBuilder_ != null) { onClickBuilder_.dispose(); @@ -2844,20 +3149,38 @@ private void buildPartial0(com.google.apps.card.v1.DecoratedText result) { to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { - result.topLabel_ = topLabel_; + result.startIconVerticalAlignment_ = startIconVerticalAlignment_; } if (((from_bitField0_ & 0x00000008) != 0)) { - result.text_ = text_; + result.topLabel_ = topLabel_; } if (((from_bitField0_ & 0x00000010) != 0)) { - result.wrapText_ = wrapText_; + result.topLabelText_ = + topLabelTextBuilder_ == null ? topLabelText_ : topLabelTextBuilder_.build(); + to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000020) != 0)) { - result.bottomLabel_ = bottomLabel_; + result.text_ = text_; } if (((from_bitField0_ & 0x00000040) != 0)) { + result.contentText_ = + contentTextBuilder_ == null ? contentText_ : contentTextBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.wrapText_ = wrapText_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.bottomLabel_ = bottomLabel_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.bottomLabelText_ = + bottomLabelTextBuilder_ == null ? bottomLabelText_ : bottomLabelTextBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000400) != 0)) { result.onClick_ = onClickBuilder_ == null ? onClick_ : onClickBuilder_.build(); - to_bitField0_ |= 0x00000004; + to_bitField0_ |= 0x00000020; } result.bitField0_ |= to_bitField0_; } @@ -2927,24 +3250,36 @@ public Builder mergeFrom(com.google.apps.card.v1.DecoratedText other) { if (other.hasStartIcon()) { mergeStartIcon(other.getStartIcon()); } + if (other.startIconVerticalAlignment_ != 0) { + setStartIconVerticalAlignmentValue(other.getStartIconVerticalAlignmentValue()); + } if (!other.getTopLabel().isEmpty()) { topLabel_ = other.topLabel_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } + if (other.hasTopLabelText()) { + mergeTopLabelText(other.getTopLabelText()); + } if (!other.getText().isEmpty()) { text_ = other.text_; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); } + if (other.hasContentText()) { + mergeContentText(other.getContentText()); + } if (other.getWrapText() != false) { setWrapText(other.getWrapText()); } if (!other.getBottomLabel().isEmpty()) { bottomLabel_ = other.bottomLabel_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000100; onChanged(); } + if (other.hasBottomLabelText()) { + mergeBottomLabelText(other.getBottomLabelText()); + } if (other.hasOnClick()) { mergeOnClick(other.getOnClick()); } @@ -3004,31 +3339,31 @@ public Builder mergeFrom( case 26: { topLabel_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 26 case 34: { text_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; break; } // case 34 case 40: { wrapText_ = input.readBool(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000080; break; } // case 40 case 50: { bottomLabel_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000100; break; } // case 50 case 58: { input.readMessage(getOnClickFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000400; break; } // case 58 case 66: @@ -3055,6 +3390,30 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 98 + case 104: + { + startIconVerticalAlignment_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 104 + case 138: + { + input.readMessage(getTopLabelTextFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 138 + case 146: + { + input.readMessage(getContentTextFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 146 + case 154: + { + input.readMessage(getBottomLabelTextFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 154 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3105,7 +3464,7 @@ public Builder clearControl() { * .google.apps.card.v1.Icon icon = 1 [deprecated = true]; * * @deprecated google.apps.card.v1.DecoratedText.icon is deprecated. See - * google/apps/card/v1/card.proto;l=796 + * google/apps/card/v1/card.proto;l=915 * @return Whether the icon field is set. */ @java.lang.Deprecated @@ -3123,7 +3482,7 @@ public boolean hasIcon() { * .google.apps.card.v1.Icon icon = 1 [deprecated = true]; * * @deprecated google.apps.card.v1.DecoratedText.icon is deprecated. See - * google/apps/card/v1/card.proto;l=796 + * google/apps/card/v1/card.proto;l=915 * @return The icon. */ @java.lang.Deprecated @@ -3480,72 +3839,98 @@ public com.google.apps.card.v1.IconOrBuilder getStartIconOrBuilder() { return startIconBuilder_; } - private java.lang.Object topLabel_ = ""; + private int startIconVerticalAlignment_ = 0; /** * * *
-     * The text that appears above `text`. Always truncates.
+     * Optional. Vertical alignment of the start icon. If not set, the icon
+     * will be vertically centered.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
      * 
* - * string top_label = 3; + * .google.apps.card.v1.Widget.VerticalAlignment start_icon_vertical_alignment = 13; + * * - * @return The topLabel. + * @return The enum numeric value on the wire for startIconVerticalAlignment. */ - public java.lang.String getTopLabel() { - java.lang.Object ref = topLabel_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topLabel_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public int getStartIconVerticalAlignmentValue() { + return startIconVerticalAlignment_; } /** * * *
-     * The text that appears above `text`. Always truncates.
+     * Optional. Vertical alignment of the start icon. If not set, the icon
+     * will be vertically centered.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
      * 
* - * string top_label = 3; + * .google.apps.card.v1.Widget.VerticalAlignment start_icon_vertical_alignment = 13; + * * - * @return The bytes for topLabel. + * @param value The enum numeric value on the wire for startIconVerticalAlignment to set. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getTopLabelBytes() { - java.lang.Object ref = topLabel_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - topLabel_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder setStartIconVerticalAlignmentValue(int value) { + startIconVerticalAlignment_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } /** * * *
-     * The text that appears above `text`. Always truncates.
+     * Optional. Vertical alignment of the start icon. If not set, the icon
+     * will be vertically centered.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
      * 
* - * string top_label = 3; + * .google.apps.card.v1.Widget.VerticalAlignment start_icon_vertical_alignment = 13; + * * - * @param value The topLabel to set. + * @return The startIconVerticalAlignment. + */ + @java.lang.Override + public com.google.apps.card.v1.Widget.VerticalAlignment getStartIconVerticalAlignment() { + com.google.apps.card.v1.Widget.VerticalAlignment result = + com.google.apps.card.v1.Widget.VerticalAlignment.forNumber(startIconVerticalAlignment_); + return result == null + ? com.google.apps.card.v1.Widget.VerticalAlignment.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Vertical alignment of the start icon. If not set, the icon
+     * will be vertically centered.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.Widget.VerticalAlignment start_icon_vertical_alignment = 13; + * + * + * @param value The startIconVerticalAlignment to set. * @return This builder for chaining. */ - public Builder setTopLabel(java.lang.String value) { + public Builder setStartIconVerticalAlignment( + com.google.apps.card.v1.Widget.VerticalAlignment value) { if (value == null) { throw new NullPointerException(); } - topLabel_ = value; bitField0_ |= 0x00000004; + startIconVerticalAlignment_ = value.getNumber(); onChanged(); return this; } @@ -3554,16 +3939,108 @@ public Builder setTopLabel(java.lang.String value) { * * *
-     * The text that appears above `text`. Always truncates.
+     * Optional. Vertical alignment of the start icon. If not set, the icon
+     * will be vertically centered.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
      * 
* - * string top_label = 3; + * .google.apps.card.v1.Widget.VerticalAlignment start_icon_vertical_alignment = 13; + * * * @return This builder for chaining. */ - public Builder clearTopLabel() { - topLabel_ = getDefaultInstance().getTopLabel(); + public Builder clearStartIconVerticalAlignment() { bitField0_ = (bitField0_ & ~0x00000004); + startIconVerticalAlignment_ = 0; + onChanged(); + return this; + } + + private java.lang.Object topLabel_ = ""; + + /** + * + * + *
+     * The text that appears above `text`. Always truncates.
+     * 
+ * + * string top_label = 3; + * + * @return The topLabel. + */ + public java.lang.String getTopLabel() { + java.lang.Object ref = topLabel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topLabel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The text that appears above `text`. Always truncates.
+     * 
+ * + * string top_label = 3; + * + * @return The bytes for topLabel. + */ + public com.google.protobuf.ByteString getTopLabelBytes() { + java.lang.Object ref = topLabel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + topLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The text that appears above `text`. Always truncates.
+     * 
+ * + * string top_label = 3; + * + * @param value The topLabel to set. + * @return This builder for chaining. + */ + public Builder setTopLabel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + topLabel_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The text that appears above `text`. Always truncates.
+     * 
+ * + * string top_label = 3; + * + * @return This builder for chaining. + */ + public Builder clearTopLabel() { + topLabel_ = getDefaultInstance().getTopLabel(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -3586,11 +4063,232 @@ public Builder setTopLabelBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); topLabel_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } + private com.google.apps.card.v1.TextParagraph topLabelText_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder> + topLabelTextBuilder_; + + /** + * + * + *
+     * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+     * more complex formatting than `top_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + * + * @return Whether the topLabelText field is set. + */ + public boolean hasTopLabelText() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+     * more complex formatting than `top_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + * + * @return The topLabelText. + */ + public com.google.apps.card.v1.TextParagraph getTopLabelText() { + if (topLabelTextBuilder_ == null) { + return topLabelText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : topLabelText_; + } else { + return topLabelTextBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+     * more complex formatting than `top_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + */ + public Builder setTopLabelText(com.google.apps.card.v1.TextParagraph value) { + if (topLabelTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topLabelText_ = value; + } else { + topLabelTextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+     * more complex formatting than `top_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + */ + public Builder setTopLabelText(com.google.apps.card.v1.TextParagraph.Builder builderForValue) { + if (topLabelTextBuilder_ == null) { + topLabelText_ = builderForValue.build(); + } else { + topLabelTextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+     * more complex formatting than `top_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + */ + public Builder mergeTopLabelText(com.google.apps.card.v1.TextParagraph value) { + if (topLabelTextBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && topLabelText_ != null + && topLabelText_ != com.google.apps.card.v1.TextParagraph.getDefaultInstance()) { + getTopLabelTextBuilder().mergeFrom(value); + } else { + topLabelText_ = value; + } + } else { + topLabelTextBuilder_.mergeFrom(value); + } + if (topLabelText_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+     * more complex formatting than `top_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + */ + public Builder clearTopLabelText() { + bitField0_ = (bitField0_ & ~0x00000010); + topLabelText_ = null; + if (topLabelTextBuilder_ != null) { + topLabelTextBuilder_.dispose(); + topLabelTextBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+     * more complex formatting than `top_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + */ + public com.google.apps.card.v1.TextParagraph.Builder getTopLabelTextBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getTopLabelTextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+     * more complex formatting than `top_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + */ + public com.google.apps.card.v1.TextParagraphOrBuilder getTopLabelTextOrBuilder() { + if (topLabelTextBuilder_ != null) { + return topLabelTextBuilder_.getMessageOrBuilder(); + } else { + return topLabelText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : topLabelText_; + } + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+     * more complex formatting than `top_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder> + getTopLabelTextFieldBuilder() { + if (topLabelTextBuilder_ == null) { + topLabelTextBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder>( + getTopLabelText(), getParentForChildren(), isClean()); + topLabelText_ = null; + } + return topLabelTextBuilder_; + } + private java.lang.Object text_ = ""; /** @@ -3606,7 +4304,7 @@ public Builder setTopLabelBytes(com.google.protobuf.ByteString value) { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string text = 4; @@ -3638,7 +4336,7 @@ public java.lang.String getText() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string text = 4; @@ -3670,7 +4368,7 @@ public com.google.protobuf.ByteString getTextBytes() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string text = 4; @@ -3683,7 +4381,7 @@ public Builder setText(java.lang.String value) { throw new NullPointerException(); } text_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -3701,7 +4399,7 @@ public Builder setText(java.lang.String value) { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string text = 4; @@ -3710,7 +4408,7 @@ public Builder setText(java.lang.String value) { */ public Builder clearText() { text_ = getDefaultInstance().getText(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -3728,7 +4426,7 @@ public Builder clearText() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string text = 4; @@ -3742,11 +4440,232 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); text_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.apps.card.v1.TextParagraph contentText_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder> + contentTextBuilder_; + + /** + * + * + *
+     * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+     * than `text`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + * + * @return Whether the contentText field is set. + */ + public boolean hasContentText() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+     * than `text`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + * + * @return The contentText. + */ + public com.google.apps.card.v1.TextParagraph getContentText() { + if (contentTextBuilder_ == null) { + return contentText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : contentText_; + } else { + return contentTextBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+     * than `text`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + */ + public Builder setContentText(com.google.apps.card.v1.TextParagraph value) { + if (contentTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contentText_ = value; + } else { + contentTextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+     * than `text`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + */ + public Builder setContentText(com.google.apps.card.v1.TextParagraph.Builder builderForValue) { + if (contentTextBuilder_ == null) { + contentText_ = builderForValue.build(); + } else { + contentTextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; onChanged(); return this; } + /** + * + * + *
+     * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+     * than `text`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + */ + public Builder mergeContentText(com.google.apps.card.v1.TextParagraph value) { + if (contentTextBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && contentText_ != null + && contentText_ != com.google.apps.card.v1.TextParagraph.getDefaultInstance()) { + getContentTextBuilder().mergeFrom(value); + } else { + contentText_ = value; + } + } else { + contentTextBuilder_.mergeFrom(value); + } + if (contentText_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+     * than `text`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + */ + public Builder clearContentText() { + bitField0_ = (bitField0_ & ~0x00000040); + contentText_ = null; + if (contentTextBuilder_ != null) { + contentTextBuilder_.dispose(); + contentTextBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+     * than `text`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + */ + public com.google.apps.card.v1.TextParagraph.Builder getContentTextBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getContentTextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+     * than `text`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + */ + public com.google.apps.card.v1.TextParagraphOrBuilder getContentTextOrBuilder() { + if (contentTextBuilder_ != null) { + return contentTextBuilder_.getMessageOrBuilder(); + } else { + return contentText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : contentText_; + } + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+     * than `text`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder> + getContentTextFieldBuilder() { + if (contentTextBuilder_ == null) { + contentTextBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder>( + getContentText(), getParentForChildren(), isClean()); + contentText_ = null; + } + return contentTextBuilder_; + } + private boolean wrapText_; /** @@ -3786,7 +4705,7 @@ public boolean getWrapText() { public Builder setWrapText(boolean value) { wrapText_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3806,7 +4725,7 @@ public Builder setWrapText(boolean value) { * @return This builder for chaining. */ public Builder clearWrapText() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000080); wrapText_ = false; onChanged(); return this; @@ -3877,7 +4796,7 @@ public Builder setBottomLabel(java.lang.String value) { throw new NullPointerException(); } bottomLabel_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3895,7 +4814,7 @@ public Builder setBottomLabel(java.lang.String value) { */ public Builder clearBottomLabel() { bottomLabel_ = getDefaultInstance().getBottomLabel(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -3918,11 +4837,233 @@ public Builder setBottomLabelBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); bottomLabel_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000100; onChanged(); return this; } + private com.google.apps.card.v1.TextParagraph bottomLabelText_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder> + bottomLabelTextBuilder_; + + /** + * + * + *
+     * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+     * more complex formatting than `bottom_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + * + * @return Whether the bottomLabelText field is set. + */ + public boolean hasBottomLabelText() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+     * more complex formatting than `bottom_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + * + * @return The bottomLabelText. + */ + public com.google.apps.card.v1.TextParagraph getBottomLabelText() { + if (bottomLabelTextBuilder_ == null) { + return bottomLabelText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : bottomLabelText_; + } else { + return bottomLabelTextBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+     * more complex formatting than `bottom_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + */ + public Builder setBottomLabelText(com.google.apps.card.v1.TextParagraph value) { + if (bottomLabelTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bottomLabelText_ = value; + } else { + bottomLabelTextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+     * more complex formatting than `bottom_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + */ + public Builder setBottomLabelText( + com.google.apps.card.v1.TextParagraph.Builder builderForValue) { + if (bottomLabelTextBuilder_ == null) { + bottomLabelText_ = builderForValue.build(); + } else { + bottomLabelTextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+     * more complex formatting than `bottom_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + */ + public Builder mergeBottomLabelText(com.google.apps.card.v1.TextParagraph value) { + if (bottomLabelTextBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && bottomLabelText_ != null + && bottomLabelText_ != com.google.apps.card.v1.TextParagraph.getDefaultInstance()) { + getBottomLabelTextBuilder().mergeFrom(value); + } else { + bottomLabelText_ = value; + } + } else { + bottomLabelTextBuilder_.mergeFrom(value); + } + if (bottomLabelText_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+     * more complex formatting than `bottom_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + */ + public Builder clearBottomLabelText() { + bitField0_ = (bitField0_ & ~0x00000200); + bottomLabelText_ = null; + if (bottomLabelTextBuilder_ != null) { + bottomLabelTextBuilder_.dispose(); + bottomLabelTextBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+     * more complex formatting than `bottom_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + */ + public com.google.apps.card.v1.TextParagraph.Builder getBottomLabelTextBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getBottomLabelTextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+     * more complex formatting than `bottom_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + */ + public com.google.apps.card.v1.TextParagraphOrBuilder getBottomLabelTextOrBuilder() { + if (bottomLabelTextBuilder_ != null) { + return bottomLabelTextBuilder_.getMessageOrBuilder(); + } else { + return bottomLabelText_ == null + ? com.google.apps.card.v1.TextParagraph.getDefaultInstance() + : bottomLabelText_; + } + } + + /** + * + * + *
+     * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+     * more complex formatting than `bottom_label`.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder> + getBottomLabelTextFieldBuilder() { + if (bottomLabelTextBuilder_ == null) { + bottomLabelTextBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.TextParagraph, + com.google.apps.card.v1.TextParagraph.Builder, + com.google.apps.card.v1.TextParagraphOrBuilder>( + getBottomLabelText(), getParentForChildren(), isClean()); + bottomLabelText_ = null; + } + return bottomLabelTextBuilder_; + } + private com.google.apps.card.v1.OnClick onClick_; private com.google.protobuf.SingleFieldBuilderV3< com.google.apps.card.v1.OnClick, @@ -3942,7 +5083,7 @@ public Builder setBottomLabelBytes(com.google.protobuf.ByteString value) { * @return Whether the onClick field is set. */ public boolean hasOnClick() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** @@ -3982,7 +5123,7 @@ public Builder setOnClick(com.google.apps.card.v1.OnClick value) { } else { onClickBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4002,7 +5143,7 @@ public Builder setOnClick(com.google.apps.card.v1.OnClick.Builder builderForValu } else { onClickBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4018,7 +5159,7 @@ public Builder setOnClick(com.google.apps.card.v1.OnClick.Builder builderForValu */ public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) { if (onClickBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000400) != 0) && onClick_ != null && onClick_ != com.google.apps.card.v1.OnClick.getDefaultInstance()) { getOnClickBuilder().mergeFrom(value); @@ -4029,7 +5170,7 @@ public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) { onClickBuilder_.mergeFrom(value); } if (onClick_ != null) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000400; onChanged(); } return this; @@ -4045,7 +5186,7 @@ public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) { * .google.apps.card.v1.OnClick on_click = 7; */ public Builder clearOnClick() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000400); onClick_ = null; if (onClickBuilder_ != null) { onClickBuilder_.dispose(); @@ -4065,7 +5206,7 @@ public Builder clearOnClick() { * .google.apps.card.v1.OnClick on_click = 7; */ public com.google.apps.card.v1.OnClick.Builder getOnClickBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000400; onChanged(); return getOnClickFieldBuilder().getBuilder(); } diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DecoratedTextOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DecoratedTextOrBuilder.java index 6435888db1..b8b384859a 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DecoratedTextOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/DecoratedTextOrBuilder.java @@ -34,7 +34,7 @@ public interface DecoratedTextOrBuilder * .google.apps.card.v1.Icon icon = 1 [deprecated = true]; * * @deprecated google.apps.card.v1.DecoratedText.icon is deprecated. See - * google/apps/card/v1/card.proto;l=796 + * google/apps/card/v1/card.proto;l=915 * @return Whether the icon field is set. */ @java.lang.Deprecated @@ -50,7 +50,7 @@ public interface DecoratedTextOrBuilder * .google.apps.card.v1.Icon icon = 1 [deprecated = true]; * * @deprecated google.apps.card.v1.DecoratedText.icon is deprecated. See - * google/apps/card/v1/card.proto;l=796 + * google/apps/card/v1/card.proto;l=915 * @return The icon. */ @java.lang.Deprecated @@ -105,6 +105,38 @@ public interface DecoratedTextOrBuilder */ com.google.apps.card.v1.IconOrBuilder getStartIconOrBuilder(); + /** + * + * + *
+   * Optional. Vertical alignment of the start icon. If not set, the icon
+   * will be vertically centered.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.Widget.VerticalAlignment start_icon_vertical_alignment = 13; + * + * @return The enum numeric value on the wire for startIconVerticalAlignment. + */ + int getStartIconVerticalAlignmentValue(); + + /** + * + * + *
+   * Optional. Vertical alignment of the start icon. If not set, the icon
+   * will be vertically centered.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.Widget.VerticalAlignment start_icon_vertical_alignment = 13; + * + * @return The startIconVerticalAlignment. + */ + com.google.apps.card.v1.Widget.VerticalAlignment getStartIconVerticalAlignment(); + /** * * @@ -131,6 +163,52 @@ public interface DecoratedTextOrBuilder */ com.google.protobuf.ByteString getTopLabelBytes(); + /** + * + * + *
+   * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+   * more complex formatting than `top_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + * + * @return Whether the topLabelText field is set. + */ + boolean hasTopLabelText(); + + /** + * + * + *
+   * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+   * more complex formatting than `top_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + * + * @return The topLabelText. + */ + com.google.apps.card.v1.TextParagraph getTopLabelText(); + + /** + * + * + *
+   * `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
+   * more complex formatting than `top_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph top_label_text = 17; + */ + com.google.apps.card.v1.TextParagraphOrBuilder getTopLabelTextOrBuilder(); + /** * * @@ -144,7 +222,7 @@ public interface DecoratedTextOrBuilder * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string text = 4; @@ -166,7 +244,7 @@ public interface DecoratedTextOrBuilder * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * * string text = 4; @@ -175,6 +253,52 @@ public interface DecoratedTextOrBuilder */ com.google.protobuf.ByteString getTextBytes(); + /** + * + * + *
+   * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+   * than `text`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + * + * @return Whether the contentText field is set. + */ + boolean hasContentText(); + + /** + * + * + *
+   * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+   * than `text`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + * + * @return The contentText. + */ + com.google.apps.card.v1.TextParagraph getContentText(); + + /** + * + * + *
+   * `TextParagraph` equivalent of `text`. Allows for more complex formatting
+   * than `text`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph content_text = 18; + */ + com.google.apps.card.v1.TextParagraphOrBuilder getContentTextOrBuilder(); + /** * * @@ -217,6 +341,52 @@ public interface DecoratedTextOrBuilder */ com.google.protobuf.ByteString getBottomLabelBytes(); + /** + * + * + *
+   * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+   * more complex formatting than `bottom_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + * + * @return Whether the bottomLabelText field is set. + */ + boolean hasBottomLabelText(); + + /** + * + * + *
+   * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+   * more complex formatting than `bottom_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + * + * @return The bottomLabelText. + */ + com.google.apps.card.v1.TextParagraph getBottomLabelText(); + + /** + * + * + *
+   * `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
+   * more complex formatting than `bottom_label`.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph bottom_label_text = 19; + */ + com.google.apps.card.v1.TextParagraphOrBuilder getBottomLabelTextOrBuilder(); + /** * * diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Divider.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Divider.java index c4284c0670..29a0061e03 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Divider.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Divider.java @@ -28,7 +28,7 @@ * [Add a horizontal divider between * widgets](https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a divider: @@ -230,7 +230,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * [Add a horizontal divider between * widgets](https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a divider: diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Grid.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Grid.java index 41d85ec1f9..036de6de1b 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Grid.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Grid.java @@ -34,7 +34,7 @@ * 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns * has 6 rows. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -265,7 +265,7 @@ public interface GridItemOrBuilder * Represents an item in a grid layout. Items can contain text, an image, or * both text and an image. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -316,7 +316,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
      * Represents the various layout options available for a grid item.
      *
-     * [Google Workspace Add-ons and Chat
+     * [Google Workspace add-ons and Chat
      * apps](https://developers.google.com/workspace/extend):
      * 
* @@ -936,7 +936,7 @@ protected Builder newBuilderForType( * Represents an item in a grid layout. Items can contain text, an image, or * both text and an image. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -2363,7 +2363,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns * has 6 rows. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Icon.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Icon.java index 39c3eadd16..6b5aa976c4 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Icon.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Icon.java @@ -33,7 +33,7 @@ * [custom](https://developers.google.com/workspace/chat/format-messages#customicons) * icons. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -751,7 +751,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * [custom](https://developers.google.com/workspace/chat/format-messages#customicons) * icons. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Image.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Image.java index 285a66ac5a..6160560d90 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Image.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Image.java @@ -27,7 +27,7 @@ * example, see [Add an * image](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -425,7 +425,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * example, see [Add an * image](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image). * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ImageComponent.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ImageComponent.java index 52fce47e8a..c459e84a13 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ImageComponent.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ImageComponent.java @@ -25,7 +25,7 @@ *
  * Represents an image.
  *
- * [Google Workspace Add-ons and Chat
+ * [Google Workspace add-ons and Chat
  * apps](https://developers.google.com/workspace/extend):
  * 
* @@ -483,7 +483,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Represents an image.
    *
-   * [Google Workspace Add-ons and Chat
+   * [Google Workspace add-ons and Chat
    * apps](https://developers.google.com/workspace/extend):
    * 
* diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ImageCropStyle.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ImageCropStyle.java index 275693142b..23474816ba 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ImageCropStyle.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ImageCropStyle.java @@ -25,7 +25,7 @@ *
  * Represents the crop style applied to an image.
  *
- * [Google Workspace Add-ons and
+ * [Google Workspace add-ons and
  * Chat apps](https://developers.google.com/workspace/extend):
  *
  * For example, here's how to apply a 16:9 aspect ratio:
@@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * 
    * Represents the crop style applied to an image.
    *
-   * [Google Workspace Add-ons
+   * [Google Workspace add-ons
    * and Chat apps](https://developers.google.com/workspace/extend):
    * 
* @@ -535,7 +535,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Represents the crop style applied to an image.
    *
-   * [Google Workspace Add-ons and
+   * [Google Workspace add-ons and
    * Chat apps](https://developers.google.com/workspace/extend):
    *
    * For example, here's how to apply a 16:9 aspect ratio:
diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OnClick.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OnClick.java
index ded7d85091..55e7fc1f61 100644
--- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OnClick.java
+++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OnClick.java
@@ -26,7 +26,7 @@
  * Represents how to respond when users click an interactive element on
  * a card, such as a button.
  *
- * [Google Workspace Add-ons and Chat
+ * [Google Workspace add-ons and Chat
  * apps](https://developers.google.com/workspace/extend):
  * 
* @@ -77,6 +77,7 @@ public enum DataCase OPEN_LINK(2), OPEN_DYNAMIC_LINK_ACTION(3), CARD(4), + OVERFLOW_MENU(8), DATA_NOT_SET(0); private final int value; @@ -104,6 +105,8 @@ public static DataCase forNumber(int value) { return OPEN_DYNAMIC_LINK_ACTION; case 4: return CARD; + case 8: + return OVERFLOW_MENU; case 0: return DATA_NOT_SET; default: @@ -240,7 +243,7 @@ public com.google.apps.card.v1.OpenLinkOrBuilder getOpenLinkOrBuilder() { * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): *
* * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -262,7 +265,7 @@ public boolean hasOpenDynamicLinkAction() { * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -287,7 +290,7 @@ public com.google.apps.card.v1.Action getOpenDynamicLinkAction() { * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -309,7 +312,7 @@ public com.google.apps.card.v1.ActionOrBuilder getOpenDynamicLinkActionOrBuilder * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -328,7 +331,7 @@ public boolean hasCard() { * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -350,7 +353,7 @@ public com.google.apps.card.v1.Card getCard() { * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -363,6 +366,60 @@ public com.google.apps.card.v1.CardOrBuilder getCardOrBuilder() { return com.google.apps.card.v1.Card.getDefaultInstance(); } + public static final int OVERFLOW_MENU_FIELD_NUMBER = 8; + + /** + * + * + *
+   * If specified, this `onClick` opens an overflow menu.
+   * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + * + * @return Whether the overflowMenu field is set. + */ + @java.lang.Override + public boolean hasOverflowMenu() { + return dataCase_ == 8; + } + + /** + * + * + *
+   * If specified, this `onClick` opens an overflow menu.
+   * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + * + * @return The overflowMenu. + */ + @java.lang.Override + public com.google.apps.card.v1.OverflowMenu getOverflowMenu() { + if (dataCase_ == 8) { + return (com.google.apps.card.v1.OverflowMenu) data_; + } + return com.google.apps.card.v1.OverflowMenu.getDefaultInstance(); + } + + /** + * + * + *
+   * If specified, this `onClick` opens an overflow menu.
+   * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + */ + @java.lang.Override + public com.google.apps.card.v1.OverflowMenuOrBuilder getOverflowMenuOrBuilder() { + if (dataCase_ == 8) { + return (com.google.apps.card.v1.OverflowMenu) data_; + } + return com.google.apps.card.v1.OverflowMenu.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -389,6 +446,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dataCase_ == 4) { output.writeMessage(4, (com.google.apps.card.v1.Card) data_); } + if (dataCase_ == 8) { + output.writeMessage(8, (com.google.apps.card.v1.OverflowMenu) data_); + } getUnknownFields().writeTo(output); } @@ -418,6 +478,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 4, (com.google.apps.card.v1.Card) data_); } + if (dataCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.apps.card.v1.OverflowMenu) data_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -447,6 +512,9 @@ public boolean equals(final java.lang.Object obj) { case 4: if (!getCard().equals(other.getCard())) return false; break; + case 8: + if (!getOverflowMenu().equals(other.getOverflowMenu())) return false; + break; case 0: default: } @@ -478,6 +546,10 @@ public int hashCode() { hash = (37 * hash) + CARD_FIELD_NUMBER; hash = (53 * hash) + getCard().hashCode(); break; + case 8: + hash = (37 * hash) + OVERFLOW_MENU_FIELD_NUMBER; + hash = (53 * hash) + getOverflowMenu().hashCode(); + break; case 0: default: } @@ -588,7 +660,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * Represents how to respond when users click an interactive element on * a card, such as a button. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -635,6 +707,9 @@ public Builder clear() { if (cardBuilder_ != null) { cardBuilder_.clear(); } + if (overflowMenuBuilder_ != null) { + overflowMenuBuilder_.clear(); + } dataCase_ = 0; data_ = null; return this; @@ -690,6 +765,9 @@ private void buildPartialOneofs(com.google.apps.card.v1.OnClick result) { if (dataCase_ == 4 && cardBuilder_ != null) { result.data_ = cardBuilder_.build(); } + if (dataCase_ == 8 && overflowMenuBuilder_ != null) { + result.data_ = overflowMenuBuilder_.build(); + } } @java.lang.Override @@ -758,6 +836,11 @@ public Builder mergeFrom(com.google.apps.card.v1.OnClick other) { mergeCard(other.getCard()); break; } + case OVERFLOW_MENU: + { + mergeOverflowMenu(other.getOverflowMenu()); + break; + } case DATA_NOT_SET: { break; @@ -814,6 +897,12 @@ public Builder mergeFrom( dataCase_ = 4; break; } // case 34 + case 66: + { + input.readMessage(getOverflowMenuFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 8; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1289,7 +1378,7 @@ public com.google.apps.card.v1.OpenLinkOrBuilder getOpenLinkOrBuilder() { * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -1311,7 +1400,7 @@ public boolean hasOpenDynamicLinkAction() { * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -1343,7 +1432,7 @@ public com.google.apps.card.v1.Action getOpenDynamicLinkAction() { * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -1372,7 +1461,7 @@ public Builder setOpenDynamicLinkAction(com.google.apps.card.v1.Action value) { * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -1399,7 +1488,7 @@ public Builder setOpenDynamicLinkAction( * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -1436,7 +1525,7 @@ public Builder mergeOpenDynamicLinkAction(com.google.apps.card.v1.Action value) * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -1468,7 +1557,7 @@ public Builder clearOpenDynamicLinkAction() { * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -1487,7 +1576,7 @@ public com.google.apps.card.v1.Action.Builder getOpenDynamicLinkActionBuilder() * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -1514,7 +1603,7 @@ public com.google.apps.card.v1.ActionOrBuilder getOpenDynamicLinkActionOrBuilder * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -1554,7 +1643,7 @@ public com.google.apps.card.v1.ActionOrBuilder getOpenDynamicLinkActionOrBuilder * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -1573,7 +1662,7 @@ public boolean hasCard() { * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -1602,7 +1691,7 @@ public com.google.apps.card.v1.Card getCard() { * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -1628,7 +1717,7 @@ public Builder setCard(com.google.apps.card.v1.Card value) { * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -1651,7 +1740,7 @@ public Builder setCard(com.google.apps.card.v1.Card.Builder builderForValue) { * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -1685,7 +1774,7 @@ public Builder mergeCard(com.google.apps.card.v1.Card value) { * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -1714,7 +1803,7 @@ public Builder clearCard() { * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -1730,7 +1819,7 @@ public com.google.apps.card.v1.Card.Builder getCardBuilder() { * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -1754,7 +1843,7 @@ public com.google.apps.card.v1.CardOrBuilder getCardOrBuilder() { * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -1781,6 +1870,220 @@ public com.google.apps.card.v1.CardOrBuilder getCardOrBuilder() { return cardBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.OverflowMenu, + com.google.apps.card.v1.OverflowMenu.Builder, + com.google.apps.card.v1.OverflowMenuOrBuilder> + overflowMenuBuilder_; + + /** + * + * + *
+     * If specified, this `onClick` opens an overflow menu.
+     * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + * + * @return Whether the overflowMenu field is set. + */ + @java.lang.Override + public boolean hasOverflowMenu() { + return dataCase_ == 8; + } + + /** + * + * + *
+     * If specified, this `onClick` opens an overflow menu.
+     * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + * + * @return The overflowMenu. + */ + @java.lang.Override + public com.google.apps.card.v1.OverflowMenu getOverflowMenu() { + if (overflowMenuBuilder_ == null) { + if (dataCase_ == 8) { + return (com.google.apps.card.v1.OverflowMenu) data_; + } + return com.google.apps.card.v1.OverflowMenu.getDefaultInstance(); + } else { + if (dataCase_ == 8) { + return overflowMenuBuilder_.getMessage(); + } + return com.google.apps.card.v1.OverflowMenu.getDefaultInstance(); + } + } + + /** + * + * + *
+     * If specified, this `onClick` opens an overflow menu.
+     * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + */ + public Builder setOverflowMenu(com.google.apps.card.v1.OverflowMenu value) { + if (overflowMenuBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + overflowMenuBuilder_.setMessage(value); + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+     * If specified, this `onClick` opens an overflow menu.
+     * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + */ + public Builder setOverflowMenu(com.google.apps.card.v1.OverflowMenu.Builder builderForValue) { + if (overflowMenuBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + overflowMenuBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+     * If specified, this `onClick` opens an overflow menu.
+     * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + */ + public Builder mergeOverflowMenu(com.google.apps.card.v1.OverflowMenu value) { + if (overflowMenuBuilder_ == null) { + if (dataCase_ == 8 && data_ != com.google.apps.card.v1.OverflowMenu.getDefaultInstance()) { + data_ = + com.google.apps.card.v1.OverflowMenu.newBuilder( + (com.google.apps.card.v1.OverflowMenu) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 8) { + overflowMenuBuilder_.mergeFrom(value); + } else { + overflowMenuBuilder_.setMessage(value); + } + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+     * If specified, this `onClick` opens an overflow menu.
+     * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + */ + public Builder clearOverflowMenu() { + if (overflowMenuBuilder_ == null) { + if (dataCase_ == 8) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 8) { + dataCase_ = 0; + data_ = null; + } + overflowMenuBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * If specified, this `onClick` opens an overflow menu.
+     * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + */ + public com.google.apps.card.v1.OverflowMenu.Builder getOverflowMenuBuilder() { + return getOverflowMenuFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * If specified, this `onClick` opens an overflow menu.
+     * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + */ + @java.lang.Override + public com.google.apps.card.v1.OverflowMenuOrBuilder getOverflowMenuOrBuilder() { + if ((dataCase_ == 8) && (overflowMenuBuilder_ != null)) { + return overflowMenuBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 8) { + return (com.google.apps.card.v1.OverflowMenu) data_; + } + return com.google.apps.card.v1.OverflowMenu.getDefaultInstance(); + } + } + + /** + * + * + *
+     * If specified, this `onClick` opens an overflow menu.
+     * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.OverflowMenu, + com.google.apps.card.v1.OverflowMenu.Builder, + com.google.apps.card.v1.OverflowMenuOrBuilder> + getOverflowMenuFieldBuilder() { + if (overflowMenuBuilder_ == null) { + if (!(dataCase_ == 8)) { + data_ = com.google.apps.card.v1.OverflowMenu.getDefaultInstance(); + } + overflowMenuBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.OverflowMenu, + com.google.apps.card.v1.OverflowMenu.Builder, + com.google.apps.card.v1.OverflowMenuOrBuilder>( + (com.google.apps.card.v1.OverflowMenu) data_, getParentForChildren(), isClean()); + data_ = null; + } + dataCase_ = 8; + onChanged(); + return overflowMenuBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OnClickOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OnClickOrBuilder.java index fcef683097..0064a41501 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OnClickOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OnClickOrBuilder.java @@ -108,7 +108,7 @@ public interface OnClickOrBuilder * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -127,7 +127,7 @@ public interface OnClickOrBuilder * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -146,7 +146,7 @@ public interface OnClickOrBuilder * web client to do before the open link action response comes back. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action open_dynamic_link_action = 3; @@ -160,7 +160,7 @@ public interface OnClickOrBuilder * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -176,7 +176,7 @@ public interface OnClickOrBuilder * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; @@ -192,12 +192,49 @@ public interface OnClickOrBuilder * A new card is pushed to the card stack after clicking if specified. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Card card = 4; */ com.google.apps.card.v1.CardOrBuilder getCardOrBuilder(); + /** + * + * + *
+   * If specified, this `onClick` opens an overflow menu.
+   * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + * + * @return Whether the overflowMenu field is set. + */ + boolean hasOverflowMenu(); + + /** + * + * + *
+   * If specified, this `onClick` opens an overflow menu.
+   * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + * + * @return The overflowMenu. + */ + com.google.apps.card.v1.OverflowMenu getOverflowMenu(); + + /** + * + * + *
+   * If specified, this `onClick` opens an overflow menu.
+   * 
+ * + * .google.apps.card.v1.OverflowMenu overflow_menu = 8; + */ + com.google.apps.card.v1.OverflowMenuOrBuilder getOverflowMenuOrBuilder(); + com.google.apps.card.v1.OnClick.DataCase getDataCase(); } diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OpenLink.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OpenLink.java index a773ec69ae..f43a06ba30 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OpenLink.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OpenLink.java @@ -25,7 +25,7 @@ *
  * Represents an `onClick` event that opens a hyperlink.
  *
- * [Google Workspace Add-ons and Chat
+ * [Google Workspace add-ons and Chat
  * apps](https://developers.google.com/workspace/extend):
  * 
* @@ -79,7 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * client doesn't support it. `FULL_SIZE` is supported by all clients. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * Protobuf enum {@code google.apps.card.v1.OpenLink.OpenAs} @@ -226,7 +226,7 @@ private OpenAs(int value) { * can't support both values, `OnClose` takes precedence. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * Protobuf enum {@code google.apps.card.v1.OpenLink.OnClose} @@ -431,7 +431,7 @@ public com.google.protobuf.ByteString getUrlBytes() { * How to open a link. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OpenAs open_as = 2; @@ -450,7 +450,7 @@ public int getOpenAsValue() { * How to open a link. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OpenAs open_as = 2; @@ -475,7 +475,7 @@ public com.google.apps.card.v1.OpenLink.OpenAs getOpenAs() { * until the window closes. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OnClose on_close = 3; @@ -495,7 +495,7 @@ public int getOnCloseValue() { * until the window closes. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OnClose on_close = 3; @@ -691,7 +691,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Represents an `onClick` event that opens a hyperlink.
    *
-   * [Google Workspace Add-ons and Chat
+   * [Google Workspace add-ons and Chat
    * apps](https://developers.google.com/workspace/extend):
    * 
* @@ -1015,7 +1015,7 @@ public Builder setUrlBytes(com.google.protobuf.ByteString value) { * How to open a link. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OpenAs open_as = 2; @@ -1034,7 +1034,7 @@ public int getOpenAsValue() { * How to open a link. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OpenAs open_as = 2; @@ -1056,7 +1056,7 @@ public Builder setOpenAsValue(int value) { * How to open a link. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OpenAs open_as = 2; @@ -1077,7 +1077,7 @@ public com.google.apps.card.v1.OpenLink.OpenAs getOpenAs() { * How to open a link. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OpenAs open_as = 2; @@ -1102,7 +1102,7 @@ public Builder setOpenAs(com.google.apps.card.v1.OpenLink.OpenAs value) { * How to open a link. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OpenAs open_as = 2; @@ -1126,7 +1126,7 @@ public Builder clearOpenAs() { * until the window closes. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OnClose on_close = 3; @@ -1146,7 +1146,7 @@ public int getOnCloseValue() { * until the window closes. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OnClose on_close = 3; @@ -1169,7 +1169,7 @@ public Builder setOnCloseValue(int value) { * until the window closes. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OnClose on_close = 3; @@ -1191,7 +1191,7 @@ public com.google.apps.card.v1.OpenLink.OnClose getOnClose() { * until the window closes. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OnClose on_close = 3; @@ -1217,7 +1217,7 @@ public Builder setOnClose(com.google.apps.card.v1.OpenLink.OnClose value) { * until the window closes. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OnClose on_close = 3; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OpenLinkOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OpenLinkOrBuilder.java index 346da7fffd..cafa441c8e 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OpenLinkOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OpenLinkOrBuilder.java @@ -57,7 +57,7 @@ public interface OpenLinkOrBuilder * How to open a link. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OpenAs open_as = 2; @@ -73,7 +73,7 @@ public interface OpenLinkOrBuilder * How to open a link. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OpenAs open_as = 2; @@ -90,7 +90,7 @@ public interface OpenLinkOrBuilder * until the window closes. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OnClose on_close = 3; @@ -107,7 +107,7 @@ public interface OpenLinkOrBuilder * until the window closes. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.OpenLink.OnClose on_close = 3; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OverflowMenu.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OverflowMenu.java new file mode 100644 index 0000000000..d494c817a4 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OverflowMenu.java @@ -0,0 +1,2417 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +/** + * + * + *
+ * A widget that presents a pop-up menu with one or more actions that users can
+ * invoke. For example, showing non-primary actions in a card. You can use this
+ * widget when actions don't fit in the available space. To use, specify this
+ * widget in the `OnClick` action of widgets that support it. For example, in a
+ * `Button`.
+ *
+ * [Google Workspace add-ons and Chat
+ * apps](https://developers.google.com/workspace/extend):
+ * 
+ * + * Protobuf type {@code google.apps.card.v1.OverflowMenu} + */ +public final class OverflowMenu extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.OverflowMenu) + OverflowMenuOrBuilder { + private static final long serialVersionUID = 0L; + + // Use OverflowMenu.newBuilder() to construct. + private OverflowMenu(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OverflowMenu() { + items_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OverflowMenu(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_OverflowMenu_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_OverflowMenu_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.OverflowMenu.class, + com.google.apps.card.v1.OverflowMenu.Builder.class); + } + + public interface OverflowMenuItemOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.OverflowMenu.OverflowMenuItem) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The icon displayed in front of the text.
+     * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + * + * @return Whether the startIcon field is set. + */ + boolean hasStartIcon(); + + /** + * + * + *
+     * The icon displayed in front of the text.
+     * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + * + * @return The startIcon. + */ + com.google.apps.card.v1.Icon getStartIcon(); + + /** + * + * + *
+     * The icon displayed in front of the text.
+     * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + */ + com.google.apps.card.v1.IconOrBuilder getStartIconOrBuilder(); + + /** + * + * + *
+     * Required. The text that identifies or describes the item to users.
+     * 
+ * + * string text = 2; + * + * @return The text. + */ + java.lang.String getText(); + + /** + * + * + *
+     * Required. The text that identifies or describes the item to users.
+     * 
+ * + * string text = 2; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+     * Required. The action invoked when a menu option is selected.
+     * This `OnClick` cannot contain an `OverflowMenu`, any specified
+     * `OverflowMenu` is dropped and the menu item disabled.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @return Whether the onClick field is set. + */ + boolean hasOnClick(); + + /** + * + * + *
+     * Required. The action invoked when a menu option is selected.
+     * This `OnClick` cannot contain an `OverflowMenu`, any specified
+     * `OverflowMenu` is dropped and the menu item disabled.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @return The onClick. + */ + com.google.apps.card.v1.OnClick getOnClick(); + + /** + * + * + *
+     * Required. The action invoked when a menu option is selected.
+     * This `OnClick` cannot contain an `OverflowMenu`, any specified
+     * `OverflowMenu` is dropped and the menu item disabled.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder(); + + /** + * + * + *
+     * Whether the menu option is disabled.
+     * Defaults to false.
+     * 
+ * + * bool disabled = 4; + * + * @return The disabled. + */ + boolean getDisabled(); + } + + /** + * + * + *
+   * An option that users can invoke in an overflow menu.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.OverflowMenu.OverflowMenuItem} + */ + public static final class OverflowMenuItem extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.OverflowMenu.OverflowMenuItem) + OverflowMenuItemOrBuilder { + private static final long serialVersionUID = 0L; + + // Use OverflowMenuItem.newBuilder() to construct. + private OverflowMenuItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OverflowMenuItem() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OverflowMenuItem(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_OverflowMenu_OverflowMenuItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_OverflowMenu_OverflowMenuItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.class, + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.Builder.class); + } + + private int bitField0_; + public static final int START_ICON_FIELD_NUMBER = 1; + private com.google.apps.card.v1.Icon startIcon_; + + /** + * + * + *
+     * The icon displayed in front of the text.
+     * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + * + * @return Whether the startIcon field is set. + */ + @java.lang.Override + public boolean hasStartIcon() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The icon displayed in front of the text.
+     * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + * + * @return The startIcon. + */ + @java.lang.Override + public com.google.apps.card.v1.Icon getStartIcon() { + return startIcon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : startIcon_; + } + + /** + * + * + *
+     * The icon displayed in front of the text.
+     * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + */ + @java.lang.Override + public com.google.apps.card.v1.IconOrBuilder getStartIconOrBuilder() { + return startIcon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : startIcon_; + } + + public static final int TEXT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + + /** + * + * + *
+     * Required. The text that identifies or describes the item to users.
+     * 
+ * + * string text = 2; + * + * @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; + } + } + + /** + * + * + *
+     * Required. The text that identifies or describes the item to users.
+     * 
+ * + * string text = 2; + * + * @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 ON_CLICK_FIELD_NUMBER = 3; + private com.google.apps.card.v1.OnClick onClick_; + + /** + * + * + *
+     * Required. The action invoked when a menu option is selected.
+     * This `OnClick` cannot contain an `OverflowMenu`, any specified
+     * `OverflowMenu` is dropped and the menu item disabled.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @return Whether the onClick field is set. + */ + @java.lang.Override + public boolean hasOnClick() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The action invoked when a menu option is selected.
+     * This `OnClick` cannot contain an `OverflowMenu`, any specified
+     * `OverflowMenu` is dropped and the menu item disabled.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @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 invoked when a menu option is selected.
+     * This `OnClick` cannot contain an `OverflowMenu`, any specified
+     * `OverflowMenu` is dropped and the menu item disabled.
+     * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + @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 = 4; + private boolean disabled_ = false; + + /** + * + * + *
+     * Whether the menu option is disabled.
+     * Defaults to false.
+     * 
+ * + * bool disabled = 4; + * + * @return The disabled. + */ + @java.lang.Override + public boolean getDisabled() { + return disabled_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getOnClick()); + } + if (disabled_ != false) { + output.writeBool(4, disabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOnClick()); + } + if (disabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, disabled_); + } + 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.OverflowMenu.OverflowMenuItem)) { + return super.equals(obj); + } + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem other = + (com.google.apps.card.v1.OverflowMenu.OverflowMenuItem) obj; + + if (hasStartIcon() != other.hasStartIcon()) return false; + if (hasStartIcon()) { + if (!getStartIcon().equals(other.getStartIcon())) return false; + } + if (!getText().equals(other.getText())) return false; + if (hasOnClick() != other.hasOnClick()) return false; + if (hasOnClick()) { + if (!getOnClick().equals(other.getOnClick())) return false; + } + if (getDisabled() != other.getDisabled()) 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(); + if (hasStartIcon()) { + hash = (37 * hash) + START_ICON_FIELD_NUMBER; + hash = (53 * hash) + getStartIcon().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.OverflowMenu.OverflowMenuItem parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.OverflowMenu.OverflowMenuItem 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.OverflowMenu.OverflowMenuItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.OverflowMenu.OverflowMenuItem 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.OverflowMenu.OverflowMenuItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.OverflowMenu.OverflowMenuItem 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.OverflowMenu.OverflowMenuItem parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.OverflowMenu.OverflowMenuItem 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.OverflowMenu.OverflowMenuItem parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.OverflowMenu.OverflowMenuItem 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.OverflowMenu.OverflowMenuItem 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.OverflowMenu.OverflowMenuItem 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.OverflowMenu.OverflowMenuItem 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 option that users can invoke in an overflow menu.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * Protobuf type {@code google.apps.card.v1.OverflowMenu.OverflowMenuItem} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.OverflowMenu.OverflowMenuItem) + com.google.apps.card.v1.OverflowMenu.OverflowMenuItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_OverflowMenu_OverflowMenuItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_OverflowMenu_OverflowMenuItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.class, + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.Builder.class); + } + + // Construct using com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartIconFieldBuilder(); + getOnClickFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startIcon_ = null; + if (startIconBuilder_ != null) { + startIconBuilder_.dispose(); + startIconBuilder_ = null; + } + text_ = ""; + onClick_ = null; + if (onClickBuilder_ != null) { + onClickBuilder_.dispose(); + onClickBuilder_ = null; + } + disabled_ = false; + 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_OverflowMenu_OverflowMenuItem_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.OverflowMenu.OverflowMenuItem getDefaultInstanceForType() { + return com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.OverflowMenu.OverflowMenuItem build() { + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.OverflowMenu.OverflowMenuItem buildPartial() { + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem result = + new com.google.apps.card.v1.OverflowMenu.OverflowMenuItem(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.apps.card.v1.OverflowMenu.OverflowMenuItem result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startIcon_ = startIconBuilder_ == null ? startIcon_ : startIconBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.text_ = text_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.onClick_ = onClickBuilder_ == null ? onClick_ : onClickBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.disabled_ = disabled_; + } + 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.OverflowMenu.OverflowMenuItem) { + return mergeFrom((com.google.apps.card.v1.OverflowMenu.OverflowMenuItem) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.OverflowMenu.OverflowMenuItem other) { + if (other == com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.getDefaultInstance()) + return this; + if (other.hasStartIcon()) { + mergeStartIcon(other.getStartIcon()); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasOnClick()) { + mergeOnClick(other.getOnClick()); + } + if (other.getDisabled() != false) { + setDisabled(other.getDisabled()); + } + 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: + { + input.readMessage(getStartIconFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getOnClickFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + disabled_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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 com.google.apps.card.v1.Icon startIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Icon, + com.google.apps.card.v1.Icon.Builder, + com.google.apps.card.v1.IconOrBuilder> + startIconBuilder_; + + /** + * + * + *
+       * The icon displayed in front of the text.
+       * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + * + * @return Whether the startIcon field is set. + */ + public boolean hasStartIcon() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * The icon displayed in front of the text.
+       * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + * + * @return The startIcon. + */ + public com.google.apps.card.v1.Icon getStartIcon() { + if (startIconBuilder_ == null) { + return startIcon_ == null + ? com.google.apps.card.v1.Icon.getDefaultInstance() + : startIcon_; + } else { + return startIconBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * The icon displayed in front of the text.
+       * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + */ + public Builder setStartIcon(com.google.apps.card.v1.Icon value) { + if (startIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startIcon_ = value; + } else { + startIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The icon displayed in front of the text.
+       * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + */ + public Builder setStartIcon(com.google.apps.card.v1.Icon.Builder builderForValue) { + if (startIconBuilder_ == null) { + startIcon_ = builderForValue.build(); + } else { + startIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The icon displayed in front of the text.
+       * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + */ + public Builder mergeStartIcon(com.google.apps.card.v1.Icon value) { + if (startIconBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startIcon_ != null + && startIcon_ != com.google.apps.card.v1.Icon.getDefaultInstance()) { + getStartIconBuilder().mergeFrom(value); + } else { + startIcon_ = value; + } + } else { + startIconBuilder_.mergeFrom(value); + } + if (startIcon_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The icon displayed in front of the text.
+       * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + */ + public Builder clearStartIcon() { + bitField0_ = (bitField0_ & ~0x00000001); + startIcon_ = null; + if (startIconBuilder_ != null) { + startIconBuilder_.dispose(); + startIconBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * The icon displayed in front of the text.
+       * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + */ + public com.google.apps.card.v1.Icon.Builder getStartIconBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartIconFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * The icon displayed in front of the text.
+       * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + */ + public com.google.apps.card.v1.IconOrBuilder getStartIconOrBuilder() { + if (startIconBuilder_ != null) { + return startIconBuilder_.getMessageOrBuilder(); + } else { + return startIcon_ == null + ? com.google.apps.card.v1.Icon.getDefaultInstance() + : startIcon_; + } + } + + /** + * + * + *
+       * The icon displayed in front of the text.
+       * 
+ * + * .google.apps.card.v1.Icon start_icon = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Icon, + com.google.apps.card.v1.Icon.Builder, + com.google.apps.card.v1.IconOrBuilder> + getStartIconFieldBuilder() { + if (startIconBuilder_ == null) { + startIconBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Icon, + com.google.apps.card.v1.Icon.Builder, + com.google.apps.card.v1.IconOrBuilder>( + getStartIcon(), getParentForChildren(), isClean()); + startIcon_ = null; + } + return startIconBuilder_; + } + + private java.lang.Object text_ = ""; + + /** + * + * + *
+       * Required. The text that identifies or describes the item to users.
+       * 
+ * + * string text = 2; + * + * @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; + } + } + + /** + * + * + *
+       * Required. The text that identifies or describes the item to users.
+       * 
+ * + * string text = 2; + * + * @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; + } + } + + /** + * + * + *
+       * Required. The text that identifies or describes the item to users.
+       * 
+ * + * string text = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The text that identifies or describes the item to users.
+       * 
+ * + * string text = 2; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The text that identifies or describes the item to users.
+       * 
+ * + * string text = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + 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 invoked when a menu option is selected.
+       * This `OnClick` cannot contain an `OverflowMenu`, any specified
+       * `OverflowMenu` is dropped and the menu item disabled.
+       * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @return Whether the onClick field is set. + */ + public boolean hasOnClick() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Required. The action invoked when a menu option is selected.
+       * This `OnClick` cannot contain an `OverflowMenu`, any specified
+       * `OverflowMenu` is dropped and the menu item disabled.
+       * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + * + * @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 invoked when a menu option is selected.
+       * This `OnClick` cannot contain an `OverflowMenu`, any specified
+       * `OverflowMenu` is dropped and the menu item disabled.
+       * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + 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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The action invoked when a menu option is selected.
+       * This `OnClick` cannot contain an `OverflowMenu`, any specified
+       * `OverflowMenu` is dropped and the menu item disabled.
+       * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + public Builder setOnClick(com.google.apps.card.v1.OnClick.Builder builderForValue) { + if (onClickBuilder_ == null) { + onClick_ = builderForValue.build(); + } else { + onClickBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The action invoked when a menu option is selected.
+       * This `OnClick` cannot contain an `OverflowMenu`, any specified
+       * `OverflowMenu` is dropped and the menu item disabled.
+       * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) { + if (onClickBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 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_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The action invoked when a menu option is selected.
+       * This `OnClick` cannot contain an `OverflowMenu`, any specified
+       * `OverflowMenu` is dropped and the menu item disabled.
+       * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + public Builder clearOnClick() { + bitField0_ = (bitField0_ & ~0x00000004); + onClick_ = null; + if (onClickBuilder_ != null) { + onClickBuilder_.dispose(); + onClickBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The action invoked when a menu option is selected.
+       * This `OnClick` cannot contain an `OverflowMenu`, any specified
+       * `OverflowMenu` is dropped and the menu item disabled.
+       * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + public com.google.apps.card.v1.OnClick.Builder getOnClickBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOnClickFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. The action invoked when a menu option is selected.
+       * This `OnClick` cannot contain an `OverflowMenu`, any specified
+       * `OverflowMenu` is dropped and the menu item disabled.
+       * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + 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 invoked when a menu option is selected.
+       * This `OnClick` cannot contain an `OverflowMenu`, any specified
+       * `OverflowMenu` is dropped and the menu item disabled.
+       * 
+ * + * .google.apps.card.v1.OnClick on_click = 3; + */ + 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_; + + /** + * + * + *
+       * Whether the menu option is disabled.
+       * Defaults to false.
+       * 
+ * + * bool disabled = 4; + * + * @return The disabled. + */ + @java.lang.Override + public boolean getDisabled() { + return disabled_; + } + + /** + * + * + *
+       * Whether the menu option is disabled.
+       * Defaults to false.
+       * 
+ * + * bool disabled = 4; + * + * @param value The disabled to set. + * @return This builder for chaining. + */ + public Builder setDisabled(boolean value) { + + disabled_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Whether the menu option is disabled.
+       * Defaults to false.
+       * 
+ * + * bool disabled = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisabled() { + bitField0_ = (bitField0_ & ~0x00000008); + disabled_ = false; + 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.OverflowMenu.OverflowMenuItem) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.OverflowMenu.OverflowMenuItem) + private static final com.google.apps.card.v1.OverflowMenu.OverflowMenuItem DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.OverflowMenu.OverflowMenuItem(); + } + + public static com.google.apps.card.v1.OverflowMenu.OverflowMenuItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OverflowMenuItem 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.OverflowMenu.OverflowMenuItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ITEMS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List items_; + + /** + * + * + *
+   * Required. The list of menu options.
+   * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + @java.lang.Override + public java.util.List getItemsList() { + return items_; + } + + /** + * + * + *
+   * Required. The list of menu options.
+   * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + @java.lang.Override + public java.util.List + getItemsOrBuilderList() { + return items_; + } + + /** + * + * + *
+   * Required. The list of menu options.
+   * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + @java.lang.Override + public int getItemsCount() { + return items_.size(); + } + + /** + * + * + *
+   * Required. The list of menu options.
+   * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + @java.lang.Override + public com.google.apps.card.v1.OverflowMenu.OverflowMenuItem getItems(int index) { + return items_.get(index); + } + + /** + * + * + *
+   * Required. The list of menu options.
+   * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + @java.lang.Override + public com.google.apps.card.v1.OverflowMenu.OverflowMenuItemOrBuilder getItemsOrBuilder( + int index) { + return items_.get(index); + } + + 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 { + for (int i = 0; i < items_.size(); i++) { + output.writeMessage(1, items_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < items_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, items_.get(i)); + } + 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.OverflowMenu)) { + return super.equals(obj); + } + com.google.apps.card.v1.OverflowMenu other = (com.google.apps.card.v1.OverflowMenu) obj; + + if (!getItemsList().equals(other.getItemsList())) 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(); + if (getItemsCount() > 0) { + hash = (37 * hash) + ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getItemsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.OverflowMenu parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.OverflowMenu 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.OverflowMenu parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.OverflowMenu 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.OverflowMenu parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.OverflowMenu 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.OverflowMenu parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.OverflowMenu 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.OverflowMenu parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.OverflowMenu 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.OverflowMenu 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.OverflowMenu 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.OverflowMenu 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 widget that presents a pop-up menu with one or more actions that users can
+   * invoke. For example, showing non-primary actions in a card. You can use this
+   * widget when actions don't fit in the available space. To use, specify this
+   * widget in the `OnClick` action of widgets that support it. For example, in a
+   * `Button`.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.OverflowMenu} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.OverflowMenu) + com.google.apps.card.v1.OverflowMenuOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_OverflowMenu_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_OverflowMenu_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.OverflowMenu.class, + com.google.apps.card.v1.OverflowMenu.Builder.class); + } + + // Construct using com.google.apps.card.v1.OverflowMenu.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + } else { + items_ = null; + itemsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + 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_OverflowMenu_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.OverflowMenu getDefaultInstanceForType() { + return com.google.apps.card.v1.OverflowMenu.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.OverflowMenu build() { + com.google.apps.card.v1.OverflowMenu result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.OverflowMenu buildPartial() { + com.google.apps.card.v1.OverflowMenu result = new com.google.apps.card.v1.OverflowMenu(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.apps.card.v1.OverflowMenu result) { + if (itemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + items_ = java.util.Collections.unmodifiableList(items_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.items_ = items_; + } else { + result.items_ = itemsBuilder_.build(); + } + } + + private void buildPartial0(com.google.apps.card.v1.OverflowMenu result) { + int from_bitField0_ = 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.OverflowMenu) { + return mergeFrom((com.google.apps.card.v1.OverflowMenu) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.OverflowMenu other) { + if (other == com.google.apps.card.v1.OverflowMenu.getDefaultInstance()) return this; + if (itemsBuilder_ == null) { + if (!other.items_.isEmpty()) { + if (items_.isEmpty()) { + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureItemsIsMutable(); + items_.addAll(other.items_); + } + onChanged(); + } + } else { + if (!other.items_.isEmpty()) { + if (itemsBuilder_.isEmpty()) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000001); + itemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getItemsFieldBuilder() + : null; + } else { + itemsBuilder_.addAllMessages(other.items_); + } + } + } + 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: + { + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem m = + input.readMessage( + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 10 + 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.util.List items_ = + java.util.Collections.emptyList(); + + private void ensureItemsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + items_ = + new java.util.ArrayList(items_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem, + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.Builder, + com.google.apps.card.v1.OverflowMenu.OverflowMenuItemOrBuilder> + itemsBuilder_; + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public java.util.List getItemsList() { + if (itemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(items_); + } else { + return itemsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public int getItemsCount() { + if (itemsBuilder_ == null) { + return items_.size(); + } else { + return itemsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public com.google.apps.card.v1.OverflowMenu.OverflowMenuItem getItems(int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public Builder setItems( + int index, com.google.apps.card.v1.OverflowMenu.OverflowMenuItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.set(index, value); + onChanged(); + } else { + itemsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public Builder setItems( + int index, com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.set(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public Builder addItems(com.google.apps.card.v1.OverflowMenu.OverflowMenuItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(value); + onChanged(); + } else { + itemsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public Builder addItems( + int index, com.google.apps.card.v1.OverflowMenu.OverflowMenuItem value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(index, value); + onChanged(); + } else { + itemsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public Builder addItems( + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public Builder addItems( + int index, com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public Builder addAllItems( + java.lang.Iterable + values) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, items_); + onChanged(); + } else { + itemsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public Builder clearItems() { + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + itemsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public Builder removeItems(int index) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.remove(index); + onChanged(); + } else { + itemsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.Builder getItemsBuilder( + int index) { + return getItemsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public com.google.apps.card.v1.OverflowMenu.OverflowMenuItemOrBuilder getItemsOrBuilder( + int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public java.util.List + getItemsOrBuilderList() { + if (itemsBuilder_ != null) { + return itemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(items_); + } + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.Builder addItemsBuilder() { + return getItemsFieldBuilder() + .addBuilder(com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.Builder addItemsBuilder( + int index) { + return getItemsFieldBuilder() + .addBuilder( + index, com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The list of menu options.
+     * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + public java.util.List + getItemsBuilderList() { + return getItemsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem, + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.Builder, + com.google.apps.card.v1.OverflowMenu.OverflowMenuItemOrBuilder> + getItemsFieldBuilder() { + if (itemsBuilder_ == null) { + itemsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem, + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem.Builder, + com.google.apps.card.v1.OverflowMenu.OverflowMenuItemOrBuilder>( + items_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + items_ = null; + } + return itemsBuilder_; + } + + @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.OverflowMenu) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.OverflowMenu) + private static final com.google.apps.card.v1.OverflowMenu DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.OverflowMenu(); + } + + public static com.google.apps.card.v1.OverflowMenu getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OverflowMenu 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.OverflowMenu getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OverflowMenuOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OverflowMenuOrBuilder.java new file mode 100644 index 0000000000..1ea666d385 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/OverflowMenuOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +public interface OverflowMenuOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.OverflowMenu) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The list of menu options.
+   * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + java.util.List getItemsList(); + + /** + * + * + *
+   * Required. The list of menu options.
+   * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + com.google.apps.card.v1.OverflowMenu.OverflowMenuItem getItems(int index); + + /** + * + * + *
+   * Required. The list of menu options.
+   * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + int getItemsCount(); + + /** + * + * + *
+   * Required. The list of menu options.
+   * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + java.util.List + getItemsOrBuilderList(); + + /** + * + * + *
+   * Required. The list of menu options.
+   * 
+ * + * repeated .google.apps.card.v1.OverflowMenu.OverflowMenuItem items = 1; + */ + com.google.apps.card.v1.OverflowMenu.OverflowMenuItemOrBuilder getItemsOrBuilder(int index); +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/SelectionInput.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/SelectionInput.java index 9837cfc529..20fc4c3078 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/SelectionInput.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/SelectionInput.java @@ -24,9 +24,12 @@ * *
  * A widget that creates one or more UI items that users can select.
- * For example, a dropdown menu or checkboxes. You can use this widget to
- * collect data that can be predicted or enumerated. For an example in Google
- * Chat apps, see [Add selectable UI
+ * Supports form submission validation for `dropdown` and `multiselect` menus
+ * only. When `Action.all_widgets_are_required` is set to `true` or this widget
+ * is specified in `Action.required_widgets`, the submission action is blocked
+ * unless a value is selected. For example, a dropdown menu or checkboxes. You
+ * can use this widget to collect data that can be predicted or enumerated. For
+ * an example in Google Chat apps, see [Add selectable UI
  * elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements).
  *
  * Chat apps can process the value of items that users select or input. For
@@ -36,7 +39,7 @@
  * To collect undefined or abstract data from users, use
  * the [TextInput][google.apps.card.v1.TextInput] widget.
  *
- * [Google Workspace Add-ons
+ * [Google Workspace add-ons
  * and Chat apps](https://developers.google.com/workspace/extend):
  * 
* @@ -92,7 +95,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Each selection input supports one type of selection. Mixing checkboxes * and switches, for example, isn't supported. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): * * @@ -143,29 +146,27 @@ public enum SelectionType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * A multiselect menu for static or dynamic data. From the menu bar,
-     * users select one or more items. Users can also input values to populate
-     * dynamic data. For example, users can start typing the name of a Google
-     * Chat space and the widget autosuggests the space.
+     * A menu with a text box. Users can type and select one or more items.
+     * For Google Workspace add-ons, you must populate items using a static
+     * array of `SelectionItem` objects.
      *
-     * To populate items for a multiselect menu, you can use one of the
-     * following types of data sources:
+     * For Google Chat apps, you can also populate items using a dynamic data
+     * source and autosuggest items as users type in the menu. For example,
+     * users can start typing the name of a Google Chat space and the widget
+     * autosuggests the space. To dynamically populate items for a multiselect
+     * menu, use one of the following types of data sources:
      *
-     *  * Static data: Items are specified as `SelectionItem` objects in the
-     *    widget. Up to 100 items.
      *  * Google Workspace data: Items are populated using data from Google
      *    Workspace, such as Google Workspace users or Google Chat spaces.
      *  * External data: Items are populated from an external data
      *    source outside of Google Workspace.
      *
-     * For examples of how to implement multiselect menus, see
+     * For examples of how to implement multiselect menus for Chat apps, see
      * [Add a multiselect
      * menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu).
      *
-     * [Google Workspace Add-ons and Chat
+     * [Google Workspace add-ons and Chat
      * apps](https://developers.google.com/workspace/extend):
-     * Multiselect for Google Workspace Add-ons are in
-     * Developer Preview.
      * 
* * MULTI_SELECT = 4; @@ -222,29 +223,27 @@ public enum SelectionType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * A multiselect menu for static or dynamic data. From the menu bar,
-     * users select one or more items. Users can also input values to populate
-     * dynamic data. For example, users can start typing the name of a Google
-     * Chat space and the widget autosuggests the space.
+     * A menu with a text box. Users can type and select one or more items.
+     * For Google Workspace add-ons, you must populate items using a static
+     * array of `SelectionItem` objects.
      *
-     * To populate items for a multiselect menu, you can use one of the
-     * following types of data sources:
+     * For Google Chat apps, you can also populate items using a dynamic data
+     * source and autosuggest items as users type in the menu. For example,
+     * users can start typing the name of a Google Chat space and the widget
+     * autosuggests the space. To dynamically populate items for a multiselect
+     * menu, use one of the following types of data sources:
      *
-     *  * Static data: Items are specified as `SelectionItem` objects in the
-     *    widget. Up to 100 items.
      *  * Google Workspace data: Items are populated using data from Google
      *    Workspace, such as Google Workspace users or Google Chat spaces.
      *  * External data: Items are populated from an external data
      *    source outside of Google Workspace.
      *
-     * For examples of how to implement multiselect menus, see
+     * For examples of how to implement multiselect menus for Chat apps, see
      * [Add a multiselect
      * menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu).
      *
-     * [Google Workspace Add-ons and Chat
+     * [Google Workspace add-ons and Chat
      * apps](https://developers.google.com/workspace/extend):
-     * Multiselect for Google Workspace Add-ons are in
-     * Developer Preview.
      * 
* * MULTI_SELECT = 4; @@ -419,15 +418,13 @@ public interface SelectionItemOrBuilder boolean getSelected(); /** + * string start_icon_uri = 4; * - * - *
-     * For multiselect menus, the URL for the icon displayed next to
-     * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
-     * URL. For example,
-     * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
-     * 
- * + * @return Whether the startIconUri field is set. + */ + boolean hasStartIconUri(); + + /** * string start_icon_uri = 4; * * @return The startIconUri. @@ -435,15 +432,6 @@ public interface SelectionItemOrBuilder java.lang.String getStartIconUri(); /** - * - * - *
-     * For multiselect menus, the URL for the icon displayed next to
-     * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
-     * URL. For example,
-     * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
-     * 
- * * string start_icon_uri = 4; * * @return The bytes for startIconUri. @@ -477,6 +465,8 @@ public interface SelectionItemOrBuilder * @return The bytes for bottomText. */ com.google.protobuf.ByteString getBottomTextBytes(); + + com.google.apps.card.v1.SelectionInput.SelectionItem.StartIconCase getStartIconCase(); } /** @@ -484,9 +474,9 @@ public interface SelectionItemOrBuilder * *
    * An item that users can select in a selection input, such as a checkbox
-   * or switch.
+   * or switch. Supports up to 100 items.
    *
-   * [Google Workspace Add-ons and Chat
+   * [Google Workspace add-ons and Chat
    * apps](https://developers.google.com/workspace/extend):
    * 
* @@ -506,7 +496,6 @@ private SelectionItem(com.google.protobuf.GeneratedMessageV3.Builder builder) private SelectionItem() { text_ = ""; value_ = ""; - startIconUri_ = ""; bottomText_ = ""; } @@ -531,6 +520,53 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.apps.card.v1.SelectionInput.SelectionItem.Builder.class); } + private int startIconCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object startIcon_; + + public enum StartIconCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + START_ICON_URI(4), + STARTICON_NOT_SET(0); + private final int value; + + private StartIconCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StartIconCase valueOf(int value) { + return forNumber(value); + } + + public static StartIconCase forNumber(int value) { + switch (value) { + case 4: + return START_ICON_URI; + case 0: + return STARTICON_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StartIconCase getStartIconCase() { + return StartIconCase.forNumber(startIconCase_); + } + public static final int TEXT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -668,57 +704,53 @@ public boolean getSelected() { public static final int START_ICON_URI_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object startIconUri_ = ""; - /** + * string start_icon_uri = 4; * - * - *
-     * For multiselect menus, the URL for the icon displayed next to
-     * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
-     * URL. For example,
-     * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
-     * 
- * + * @return Whether the startIconUri field is set. + */ + public boolean hasStartIconUri() { + return startIconCase_ == 4; + } + + /** * string start_icon_uri = 4; * * @return The startIconUri. */ - @java.lang.Override public java.lang.String getStartIconUri() { - java.lang.Object ref = startIconUri_; + java.lang.Object ref = ""; + if (startIconCase_ == 4) { + ref = startIcon_; + } 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(); - startIconUri_ = s; + if (startIconCase_ == 4) { + startIcon_ = s; + } return s; } } /** - * - * - *
-     * For multiselect menus, the URL for the icon displayed next to
-     * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
-     * URL. For example,
-     * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
-     * 
- * * string start_icon_uri = 4; * * @return The bytes for startIconUri. */ - @java.lang.Override public com.google.protobuf.ByteString getStartIconUriBytes() { - java.lang.Object ref = startIconUri_; + java.lang.Object ref = ""; + if (startIconCase_ == 4) { + ref = startIcon_; + } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - startIconUri_ = b; + if (startIconCase_ == 4) { + startIcon_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; @@ -803,8 +835,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (selected_ != false) { output.writeBool(3, selected_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startIconUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, startIconUri_); + if (startIconCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, startIcon_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bottomText_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, bottomText_); @@ -827,8 +859,8 @@ public int getSerializedSize() { if (selected_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, selected_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startIconUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, startIconUri_); + if (startIconCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, startIcon_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bottomText_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, bottomText_); @@ -852,8 +884,15 @@ public boolean equals(final java.lang.Object obj) { if (!getText().equals(other.getText())) return false; if (!getValue().equals(other.getValue())) return false; if (getSelected() != other.getSelected()) return false; - if (!getStartIconUri().equals(other.getStartIconUri())) return false; if (!getBottomText().equals(other.getBottomText())) return false; + if (!getStartIconCase().equals(other.getStartIconCase())) return false; + switch (startIconCase_) { + case 4: + if (!getStartIconUri().equals(other.getStartIconUri())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -871,10 +910,16 @@ public int hashCode() { hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + SELECTED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSelected()); - hash = (37 * hash) + START_ICON_URI_FIELD_NUMBER; - hash = (53 * hash) + getStartIconUri().hashCode(); hash = (37 * hash) + BOTTOM_TEXT_FIELD_NUMBER; hash = (53 * hash) + getBottomText().hashCode(); + switch (startIconCase_) { + case 4: + hash = (37 * hash) + START_ICON_URI_FIELD_NUMBER; + hash = (53 * hash) + getStartIconUri().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -983,9 +1028,9 @@ protected Builder newBuilderForType( * *
      * An item that users can select in a selection input, such as a checkbox
-     * or switch.
+     * or switch. Supports up to 100 items.
      *
-     * [Google Workspace Add-ons and Chat
+     * [Google Workspace add-ons and Chat
      * apps](https://developers.google.com/workspace/extend):
      * 
* @@ -1025,8 +1070,9 @@ public Builder clear() { text_ = ""; value_ = ""; selected_ = false; - startIconUri_ = ""; bottomText_ = ""; + startIconCase_ = 0; + startIcon_ = null; return this; } @@ -1057,6 +1103,7 @@ public com.google.apps.card.v1.SelectionInput.SelectionItem buildPartial() { if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -1072,14 +1119,16 @@ private void buildPartial0(com.google.apps.card.v1.SelectionInput.SelectionItem if (((from_bitField0_ & 0x00000004) != 0)) { result.selected_ = selected_; } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.startIconUri_ = startIconUri_; - } if (((from_bitField0_ & 0x00000010) != 0)) { result.bottomText_ = bottomText_; } } + private void buildPartialOneofs(com.google.apps.card.v1.SelectionInput.SelectionItem result) { + result.startIconCase_ = startIconCase_; + result.startIcon_ = this.startIcon_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -1141,16 +1190,24 @@ public Builder mergeFrom(com.google.apps.card.v1.SelectionInput.SelectionItem ot if (other.getSelected() != false) { setSelected(other.getSelected()); } - if (!other.getStartIconUri().isEmpty()) { - startIconUri_ = other.startIconUri_; - bitField0_ |= 0x00000008; - onChanged(); - } if (!other.getBottomText().isEmpty()) { bottomText_ = other.bottomText_; bitField0_ |= 0x00000010; onChanged(); } + switch (other.getStartIconCase()) { + case START_ICON_URI: + { + startIconCase_ = 4; + startIcon_ = other.startIcon_; + onChanged(); + break; + } + case STARTICON_NOT_SET: + { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1197,8 +1254,9 @@ public Builder mergeFrom( } // case 24 case 34: { - startIconUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; + java.lang.String s = input.readStringRequireUtf8(); + startIconCase_ = 4; + startIcon_ = s; break; } // case 34 case 42: @@ -1224,6 +1282,20 @@ public Builder mergeFrom( return this; } + private int startIconCase_ = 0; + private java.lang.Object startIcon_; + + public StartIconCase getStartIconCase() { + return StartIconCase.forNumber(startIconCase_); + } + + public Builder clearStartIcon() { + startIconCase_ = 0; + startIcon_ = null; + onChanged(); + return this; + } + private int bitField0_; private java.lang.Object text_ = ""; @@ -1530,28 +1602,33 @@ public Builder clearSelected() { return this; } - private java.lang.Object startIconUri_ = ""; - /** + * string start_icon_uri = 4; * - * - *
-       * For multiselect menus, the URL for the icon displayed next to
-       * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
-       * URL. For example,
-       * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
-       * 
- * + * @return Whether the startIconUri field is set. + */ + @java.lang.Override + public boolean hasStartIconUri() { + return startIconCase_ == 4; + } + + /** * string start_icon_uri = 4; * * @return The startIconUri. */ + @java.lang.Override public java.lang.String getStartIconUri() { - java.lang.Object ref = startIconUri_; + java.lang.Object ref = ""; + if (startIconCase_ == 4) { + ref = startIcon_; + } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - startIconUri_ = s; + if (startIconCase_ == 4) { + startIcon_ = s; + } return s; } else { return (java.lang.String) ref; @@ -1559,25 +1636,22 @@ public java.lang.String getStartIconUri() { } /** - * - * - *
-       * For multiselect menus, the URL for the icon displayed next to
-       * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
-       * URL. For example,
-       * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
-       * 
- * * string start_icon_uri = 4; * * @return The bytes for startIconUri. */ + @java.lang.Override public com.google.protobuf.ByteString getStartIconUriBytes() { - java.lang.Object ref = startIconUri_; + java.lang.Object ref = ""; + if (startIconCase_ == 4) { + ref = startIcon_; + } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - startIconUri_ = b; + if (startIconCase_ == 4) { + startIcon_ = b; + } return b; } else { return (com.google.protobuf.ByteString) ref; @@ -1585,15 +1659,6 @@ public com.google.protobuf.ByteString getStartIconUriBytes() { } /** - * - * - *
-       * For multiselect menus, the URL for the icon displayed next to
-       * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
-       * URL. For example,
-       * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
-       * 
- * * string start_icon_uri = 4; * * @param value The startIconUri to set. @@ -1603,43 +1668,27 @@ public Builder setStartIconUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - startIconUri_ = value; - bitField0_ |= 0x00000008; + startIconCase_ = 4; + startIcon_ = value; onChanged(); return this; } /** - * - * - *
-       * For multiselect menus, the URL for the icon displayed next to
-       * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
-       * URL. For example,
-       * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
-       * 
- * * string start_icon_uri = 4; * * @return This builder for chaining. */ public Builder clearStartIconUri() { - startIconUri_ = getDefaultInstance().getStartIconUri(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); + if (startIconCase_ == 4) { + startIconCase_ = 0; + startIcon_ = null; + onChanged(); + } return this; } /** - * - * - *
-       * For multiselect menus, the URL for the icon displayed next to
-       * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
-       * URL. For example,
-       * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
-       * 
- * * string start_icon_uri = 4; * * @param value The bytes for startIconUri to set. @@ -1650,8 +1699,8 @@ public Builder setStartIconUriBytes(com.google.protobuf.ByteString value) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - startIconUri_ = value; - bitField0_ |= 0x00000008; + startIconCase_ = 4; + startIcon_ = value; onChanged(); return this; } @@ -2863,7 +2912,8 @@ public MultiSelectDataSourceCase getMultiSelectDataSourceCase() { * * *
-   * The name that identifies the selection input in a form input event.
+   * Required. The name that identifies the selection input in a form input
+   * event.
    *
    * For details about working with form inputs, see [Receive form
    * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -2890,7 +2940,8 @@ public java.lang.String getName() {
    *
    *
    * 
-   * The name that identifies the selection input in a form input event.
+   * Required. The name that identifies the selection input in a form input
+   * event.
    *
    * For details about working with form inputs, see [Receive form
    * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -3179,7 +3230,24 @@ public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() {
    * Minimum value is 1 item. If unspecified, defaults to 3 items.
    * 
* - * int32 multi_select_max_selected_items = 6; + * optional int32 multi_select_max_selected_items = 6; + * + * @return Whether the multiSelectMaxSelectedItems field is set. + */ + @java.lang.Override + public boolean hasMultiSelectMaxSelectedItems() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * For multiselect menus, the maximum number of items that a user can select.
+   * Minimum value is 1 item. If unspecified, defaults to 3 items.
+   * 
+ * + * optional int32 multi_select_max_selected_items = 6; * * @return The multiSelectMaxSelectedItems. */ @@ -3196,11 +3264,15 @@ public int getMultiSelectMaxSelectedItems() { * *
    * For multiselect menus, the number of text characters that a user inputs
-   * before the app queries autocomplete and displays suggested items
-   * in the menu.
+   * before the menu returns suggested selection items.
+   *
+   * If unset, the multiselect menu uses the following default values:
    *
-   * If unspecified, defaults to 0 characters for static data sources and 3
-   * characters for external data sources.
+   * * If the menu uses a static array of `SelectionInput` items, defaults to
+   *   0 characters and immediately populates items from the array.
+   * * If the menu uses a dynamic data source (`multi_select_data_source`),
+   *  defaults to 3 characters before querying the data source to return
+   *  suggested items.
    * 
* * int32 multi_select_min_query_length = 7; @@ -3218,7 +3290,7 @@ public int getMultiSelectMinQueryLength() { * * *
-   * An external data source, such as a relational data base.
+   * An external data source, such as a relational database.
    * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -3234,7 +3306,7 @@ public boolean hasExternalDataSource() { * * *
-   * An external data source, such as a relational data base.
+   * An external data source, such as a relational database.
    * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -3253,7 +3325,7 @@ public com.google.apps.card.v1.Action getExternalDataSource() { * * *
-   * An external data source, such as a relational data base.
+   * An external data source, such as a relational database.
    * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -3350,7 +3422,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getOnChangeAction()); } - if (multiSelectMaxSelectedItems_ != 0) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(6, multiSelectMaxSelectedItems_); } if (multiSelectMinQueryLength_ != 0) { @@ -3387,7 +3459,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOnChangeAction()); } - if (multiSelectMaxSelectedItems_ != 0) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, multiSelectMaxSelectedItems_); } @@ -3428,7 +3500,10 @@ public boolean equals(final java.lang.Object obj) { if (hasOnChangeAction()) { if (!getOnChangeAction().equals(other.getOnChangeAction())) return false; } - if (getMultiSelectMaxSelectedItems() != other.getMultiSelectMaxSelectedItems()) return false; + if (hasMultiSelectMaxSelectedItems() != other.hasMultiSelectMaxSelectedItems()) return false; + if (hasMultiSelectMaxSelectedItems()) { + if (getMultiSelectMaxSelectedItems() != other.getMultiSelectMaxSelectedItems()) return false; + } if (getMultiSelectMinQueryLength() != other.getMultiSelectMinQueryLength()) return false; if (!getMultiSelectDataSourceCase().equals(other.getMultiSelectDataSourceCase())) return false; switch (multiSelectDataSourceCase_) { @@ -3466,8 +3541,10 @@ public int hashCode() { hash = (37 * hash) + ON_CHANGE_ACTION_FIELD_NUMBER; hash = (53 * hash) + getOnChangeAction().hashCode(); } - hash = (37 * hash) + MULTI_SELECT_MAX_SELECTED_ITEMS_FIELD_NUMBER; - hash = (53 * hash) + getMultiSelectMaxSelectedItems(); + if (hasMultiSelectMaxSelectedItems()) { + hash = (37 * hash) + MULTI_SELECT_MAX_SELECTED_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getMultiSelectMaxSelectedItems(); + } hash = (37 * hash) + MULTI_SELECT_MIN_QUERY_LENGTH_FIELD_NUMBER; hash = (53 * hash) + getMultiSelectMinQueryLength(); switch (multiSelectDataSourceCase_) { @@ -3588,9 +3665,12 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * A widget that creates one or more UI items that users can select.
-   * For example, a dropdown menu or checkboxes. You can use this widget to
-   * collect data that can be predicted or enumerated. For an example in Google
-   * Chat apps, see [Add selectable UI
+   * Supports form submission validation for `dropdown` and `multiselect` menus
+   * only. When `Action.all_widgets_are_required` is set to `true` or this widget
+   * is specified in `Action.required_widgets`, the submission action is blocked
+   * unless a value is selected. For example, a dropdown menu or checkboxes. You
+   * can use this widget to collect data that can be predicted or enumerated. For
+   * an example in Google Chat apps, see [Add selectable UI
    * elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements).
    *
    * Chat apps can process the value of items that users select or input. For
@@ -3600,7 +3680,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    * To collect undefined or abstract data from users, use
    * the [TextInput][google.apps.card.v1.TextInput] widget.
    *
-   * [Google Workspace Add-ons
+   * [Google Workspace add-ons
    * and Chat apps](https://developers.google.com/workspace/extend):
    * 
* @@ -3738,6 +3818,7 @@ private void buildPartial0(com.google.apps.card.v1.SelectionInput result) { } if (((from_bitField0_ & 0x00000020) != 0)) { result.multiSelectMaxSelectedItems_ = multiSelectMaxSelectedItems_; + to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000040) != 0)) { result.multiSelectMinQueryLength_ = multiSelectMinQueryLength_; @@ -3844,7 +3925,7 @@ public Builder mergeFrom(com.google.apps.card.v1.SelectionInput other) { if (other.hasOnChangeAction()) { mergeOnChangeAction(other.getOnChangeAction()); } - if (other.getMultiSelectMaxSelectedItems() != 0) { + if (other.hasMultiSelectMaxSelectedItems()) { setMultiSelectMaxSelectedItems(other.getMultiSelectMaxSelectedItems()); } if (other.getMultiSelectMinQueryLength() != 0) { @@ -3995,7 +4076,8 @@ public Builder clearMultiSelectDataSource() { * * *
-     * The name that identifies the selection input in a form input event.
+     * Required. The name that identifies the selection input in a form input
+     * event.
      *
      * For details about working with form inputs, see [Receive form
      * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -4021,7 +4103,8 @@ public java.lang.String getName() {
      *
      *
      * 
-     * The name that identifies the selection input in a form input event.
+     * Required. The name that identifies the selection input in a form input
+     * event.
      *
      * For details about working with form inputs, see [Receive form
      * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -4047,7 +4130,8 @@ public com.google.protobuf.ByteString getNameBytes() {
      *
      *
      * 
-     * The name that identifies the selection input in a form input event.
+     * Required. The name that identifies the selection input in a form input
+     * event.
      *
      * For details about working with form inputs, see [Receive form
      * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -4072,7 +4156,8 @@ public Builder setName(java.lang.String value) {
      *
      *
      * 
-     * The name that identifies the selection input in a form input event.
+     * Required. The name that identifies the selection input in a form input
+     * event.
      *
      * For details about working with form inputs, see [Receive form
      * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -4093,7 +4178,8 @@ public Builder clearName() {
      *
      *
      * 
-     * The name that identifies the selection input in a form input event.
+     * Required. The name that identifies the selection input in a form input
+     * event.
      *
      * For details about working with form inputs, see [Receive form
      * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -4991,7 +5077,24 @@ public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() {
      * Minimum value is 1 item. If unspecified, defaults to 3 items.
      * 
* - * int32 multi_select_max_selected_items = 6; + * optional int32 multi_select_max_selected_items = 6; + * + * @return Whether the multiSelectMaxSelectedItems field is set. + */ + @java.lang.Override + public boolean hasMultiSelectMaxSelectedItems() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * For multiselect menus, the maximum number of items that a user can select.
+     * Minimum value is 1 item. If unspecified, defaults to 3 items.
+     * 
+ * + * optional int32 multi_select_max_selected_items = 6; * * @return The multiSelectMaxSelectedItems. */ @@ -5008,7 +5111,7 @@ public int getMultiSelectMaxSelectedItems() { * Minimum value is 1 item. If unspecified, defaults to 3 items. *
* - * int32 multi_select_max_selected_items = 6; + * optional int32 multi_select_max_selected_items = 6; * * @param value The multiSelectMaxSelectedItems to set. * @return This builder for chaining. @@ -5029,7 +5132,7 @@ public Builder setMultiSelectMaxSelectedItems(int value) { * Minimum value is 1 item. If unspecified, defaults to 3 items. *
* - * int32 multi_select_max_selected_items = 6; + * optional int32 multi_select_max_selected_items = 6; * * @return This builder for chaining. */ @@ -5047,11 +5150,15 @@ public Builder clearMultiSelectMaxSelectedItems() { * *
      * For multiselect menus, the number of text characters that a user inputs
-     * before the app queries autocomplete and displays suggested items
-     * in the menu.
+     * before the menu returns suggested selection items.
+     *
+     * If unset, the multiselect menu uses the following default values:
      *
-     * If unspecified, defaults to 0 characters for static data sources and 3
-     * characters for external data sources.
+     * * If the menu uses a static array of `SelectionInput` items, defaults to
+     *   0 characters and immediately populates items from the array.
+     * * If the menu uses a dynamic data source (`multi_select_data_source`),
+     *  defaults to 3 characters before querying the data source to return
+     *  suggested items.
      * 
* * int32 multi_select_min_query_length = 7; @@ -5068,11 +5175,15 @@ public int getMultiSelectMinQueryLength() { * *
      * For multiselect menus, the number of text characters that a user inputs
-     * before the app queries autocomplete and displays suggested items
-     * in the menu.
+     * before the menu returns suggested selection items.
      *
-     * If unspecified, defaults to 0 characters for static data sources and 3
-     * characters for external data sources.
+     * If unset, the multiselect menu uses the following default values:
+     *
+     * * If the menu uses a static array of `SelectionInput` items, defaults to
+     *   0 characters and immediately populates items from the array.
+     * * If the menu uses a dynamic data source (`multi_select_data_source`),
+     *  defaults to 3 characters before querying the data source to return
+     *  suggested items.
      * 
* * int32 multi_select_min_query_length = 7; @@ -5093,11 +5204,15 @@ public Builder setMultiSelectMinQueryLength(int value) { * *
      * For multiselect menus, the number of text characters that a user inputs
-     * before the app queries autocomplete and displays suggested items
-     * in the menu.
+     * before the menu returns suggested selection items.
+     *
+     * If unset, the multiselect menu uses the following default values:
      *
-     * If unspecified, defaults to 0 characters for static data sources and 3
-     * characters for external data sources.
+     * * If the menu uses a static array of `SelectionInput` items, defaults to
+     *   0 characters and immediately populates items from the array.
+     * * If the menu uses a dynamic data source (`multi_select_data_source`),
+     *  defaults to 3 characters before querying the data source to return
+     *  suggested items.
      * 
* * int32 multi_select_min_query_length = 7; @@ -5121,7 +5236,7 @@ public Builder clearMultiSelectMinQueryLength() { * * *
-     * An external data source, such as a relational data base.
+     * An external data source, such as a relational database.
      * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -5137,7 +5252,7 @@ public boolean hasExternalDataSource() { * * *
-     * An external data source, such as a relational data base.
+     * An external data source, such as a relational database.
      * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -5163,7 +5278,7 @@ public com.google.apps.card.v1.Action getExternalDataSource() { * * *
-     * An external data source, such as a relational data base.
+     * An external data source, such as a relational database.
      * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -5186,7 +5301,7 @@ public Builder setExternalDataSource(com.google.apps.card.v1.Action value) { * * *
-     * An external data source, such as a relational data base.
+     * An external data source, such as a relational database.
      * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -5206,7 +5321,7 @@ public Builder setExternalDataSource(com.google.apps.card.v1.Action.Builder buil * * *
-     * An external data source, such as a relational data base.
+     * An external data source, such as a relational database.
      * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -5239,7 +5354,7 @@ public Builder mergeExternalDataSource(com.google.apps.card.v1.Action value) { * * *
-     * An external data source, such as a relational data base.
+     * An external data source, such as a relational database.
      * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -5265,7 +5380,7 @@ public Builder clearExternalDataSource() { * * *
-     * An external data source, such as a relational data base.
+     * An external data source, such as a relational database.
      * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -5278,7 +5393,7 @@ public com.google.apps.card.v1.Action.Builder getExternalDataSourceBuilder() { * * *
-     * An external data source, such as a relational data base.
+     * An external data source, such as a relational database.
      * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -5299,7 +5414,7 @@ public com.google.apps.card.v1.ActionOrBuilder getExternalDataSourceOrBuilder() * * *
-     * An external data source, such as a relational data base.
+     * An external data source, such as a relational database.
      * 
* * .google.apps.card.v1.Action external_data_source = 8; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/SelectionInputOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/SelectionInputOrBuilder.java index 681393f96a..4f15140eb2 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/SelectionInputOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/SelectionInputOrBuilder.java @@ -28,7 +28,8 @@ public interface SelectionInputOrBuilder * * *
-   * The name that identifies the selection input in a form input event.
+   * Required. The name that identifies the selection input in a form input
+   * event.
    *
    * For details about working with form inputs, see [Receive form
    * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -44,7 +45,8 @@ public interface SelectionInputOrBuilder
    *
    *
    * 
-   * The name that identifies the selection input in a form input event.
+   * Required. The name that identifies the selection input in a form input
+   * event.
    *
    * For details about working with form inputs, see [Receive form
    * data](https://developers.google.com/workspace/chat/read-form-data).
@@ -242,7 +244,21 @@ public interface SelectionInputOrBuilder
    * Minimum value is 1 item. If unspecified, defaults to 3 items.
    * 
* - * int32 multi_select_max_selected_items = 6; + * optional int32 multi_select_max_selected_items = 6; + * + * @return Whether the multiSelectMaxSelectedItems field is set. + */ + boolean hasMultiSelectMaxSelectedItems(); + + /** + * + * + *
+   * For multiselect menus, the maximum number of items that a user can select.
+   * Minimum value is 1 item. If unspecified, defaults to 3 items.
+   * 
+ * + * optional int32 multi_select_max_selected_items = 6; * * @return The multiSelectMaxSelectedItems. */ @@ -253,11 +269,15 @@ public interface SelectionInputOrBuilder * *
    * For multiselect menus, the number of text characters that a user inputs
-   * before the app queries autocomplete and displays suggested items
-   * in the menu.
+   * before the menu returns suggested selection items.
+   *
+   * If unset, the multiselect menu uses the following default values:
    *
-   * If unspecified, defaults to 0 characters for static data sources and 3
-   * characters for external data sources.
+   * * If the menu uses a static array of `SelectionInput` items, defaults to
+   *   0 characters and immediately populates items from the array.
+   * * If the menu uses a dynamic data source (`multi_select_data_source`),
+   *  defaults to 3 characters before querying the data source to return
+   *  suggested items.
    * 
* * int32 multi_select_min_query_length = 7; @@ -270,7 +290,7 @@ public interface SelectionInputOrBuilder * * *
-   * An external data source, such as a relational data base.
+   * An external data source, such as a relational database.
    * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -283,7 +303,7 @@ public interface SelectionInputOrBuilder * * *
-   * An external data source, such as a relational data base.
+   * An external data source, such as a relational database.
    * 
* * .google.apps.card.v1.Action external_data_source = 8; @@ -296,7 +316,7 @@ public interface SelectionInputOrBuilder * * *
-   * An external data source, such as a relational data base.
+   * An external data source, such as a relational database.
    * 
* * .google.apps.card.v1.Action external_data_source = 8; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Suggestions.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Suggestions.java index 2cac0a6797..06990890ef 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Suggestions.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Suggestions.java @@ -40,7 +40,7 @@ * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): *
* * Protobuf type {@code google.apps.card.v1.Suggestions} @@ -137,7 +137,7 @@ public interface SuggestionItemOrBuilder *
    * One suggested value that users can enter in a text input field.
    *
-   * [Google Workspace Add-ons and Chat
+   * [Google Workspace add-ons and Chat
    * apps](https://developers.google.com/workspace/extend):
    * 
* @@ -480,7 +480,7 @@ protected Builder newBuilderForType( *
      * One suggested value that users can enter in a text input field.
      *
-     * [Google Workspace Add-ons and Chat
+     * [Google Workspace add-ons and Chat
      * apps](https://developers.google.com/workspace/extend):
      * 
* @@ -1161,7 +1161,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): *
* * Protobuf type {@code google.apps.card.v1.Suggestions} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextInput.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextInput.java index 7da68d4648..b3c2ddf406 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextInput.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextInput.java @@ -24,8 +24,11 @@ * *
  * A field in which users can enter text. Supports suggestions and on-change
- * actions. For an example in Google Chat apps, see [Add a field in which a user
- * can enter
+ * actions.
+ * Supports form submission validation. When `Action.all_widgets_are_required`
+ * is set to `true` or this widget is specified in `Action.required_widgets`,
+ * the submission action is blocked unless a value is entered. For an example in
+ * Google Chat apps, see [Add a field in which a user can enter
  * text](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text).
  *
  * Chat apps receive and can process the value of entered text during form input
@@ -36,7 +39,7 @@
  * use a text input. To collect defined or enumerated data from users, use the
  * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
  *
- * [Google Workspace Add-ons and Chat
+ * [Google Workspace add-ons and Chat
  * apps](https://developers.google.com/workspace/extend):
  * 
* @@ -92,7 +95,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `initialSuggestions` is specified, `type` is always `SINGLE_LINE`, * even if it's set to `MULTIPLE_LINE`. * - * [Google Workspace Add-ons and Chat + * [Google Workspace add-ons and Chat * apps](https://developers.google.com/workspace/extend): *
* @@ -599,7 +602,7 @@ public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() { * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): *
* * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -632,7 +635,7 @@ public boolean hasInitialSuggestions() { * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -667,7 +670,7 @@ public com.google.apps.card.v1.Suggestions getInitialSuggestions() { * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -696,7 +699,7 @@ public com.google.apps.card.v1.SuggestionsOrBuilder getInitialSuggestionsOrBuild * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -722,7 +725,7 @@ public boolean hasAutoCompleteAction() { * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -750,7 +753,7 @@ public com.google.apps.card.v1.Action getAutoCompleteAction() { * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -762,6 +765,68 @@ public com.google.apps.card.v1.ActionOrBuilder getAutoCompleteActionOrBuilder() : autoCompleteAction_; } + public static final int VALIDATION_FIELD_NUMBER = 11; + private com.google.apps.card.v1.Validation validation_; + + /** + * + * + *
+   * Specify the input format validation necessary for this text field.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * .google.apps.card.v1.Validation validation = 11; + * + * @return Whether the validation field is set. + */ + @java.lang.Override + public boolean hasValidation() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Specify the input format validation necessary for this text field.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * .google.apps.card.v1.Validation validation = 11; + * + * @return The validation. + */ + @java.lang.Override + public com.google.apps.card.v1.Validation getValidation() { + return validation_ == null + ? com.google.apps.card.v1.Validation.getDefaultInstance() + : validation_; + } + + /** + * + * + *
+   * Specify the input format validation necessary for this text field.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * .google.apps.card.v1.Validation validation = 11; + */ + @java.lang.Override + public com.google.apps.card.v1.ValidationOrBuilder getValidationOrBuilder() { + return validation_ == null + ? com.google.apps.card.v1.Validation.getDefaultInstance() + : validation_; + } + public static final int PLACEHOLDER_TEXT_FIELD_NUMBER = 12; @SuppressWarnings("serial") @@ -861,6 +926,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(8, getAutoCompleteAction()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(11, getValidation()); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(placeholderText_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 12, placeholderText_); } @@ -897,6 +965,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getAutoCompleteAction()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getValidation()); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(placeholderText_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, placeholderText_); } @@ -932,6 +1003,10 @@ public boolean equals(final java.lang.Object obj) { if (hasAutoCompleteAction()) { if (!getAutoCompleteAction().equals(other.getAutoCompleteAction())) return false; } + if (hasValidation() != other.hasValidation()) return false; + if (hasValidation()) { + if (!getValidation().equals(other.getValidation())) return false; + } if (!getPlaceholderText().equals(other.getPlaceholderText())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -966,6 +1041,10 @@ public int hashCode() { hash = (37 * hash) + AUTO_COMPLETE_ACTION_FIELD_NUMBER; hash = (53 * hash) + getAutoCompleteAction().hashCode(); } + if (hasValidation()) { + hash = (37 * hash) + VALIDATION_FIELD_NUMBER; + hash = (53 * hash) + getValidation().hashCode(); + } hash = (37 * hash) + PLACEHOLDER_TEXT_FIELD_NUMBER; hash = (53 * hash) + getPlaceholderText().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -1073,8 +1152,11 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * A field in which users can enter text. Supports suggestions and on-change
-   * actions. For an example in Google Chat apps, see [Add a field in which a user
-   * can enter
+   * actions.
+   * Supports form submission validation. When `Action.all_widgets_are_required`
+   * is set to `true` or this widget is specified in `Action.required_widgets`,
+   * the submission action is blocked unless a value is entered. For an example in
+   * Google Chat apps, see [Add a field in which a user can enter
    * text](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text).
    *
    * Chat apps receive and can process the value of entered text during form input
@@ -1085,7 +1167,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    * use a text input. To collect defined or enumerated data from users, use the
    * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
    *
-   * [Google Workspace Add-ons and Chat
+   * [Google Workspace add-ons and Chat
    * apps](https://developers.google.com/workspace/extend):
    * 
* @@ -1125,6 +1207,7 @@ private void maybeForceBuilderInitialization() { getOnChangeActionFieldBuilder(); getInitialSuggestionsFieldBuilder(); getAutoCompleteActionFieldBuilder(); + getValidationFieldBuilder(); } } @@ -1152,6 +1235,11 @@ public Builder clear() { autoCompleteActionBuilder_.dispose(); autoCompleteActionBuilder_ = null; } + validation_ = null; + if (validationBuilder_ != null) { + validationBuilder_.dispose(); + validationBuilder_ = null; + } placeholderText_ = ""; return this; } @@ -1224,6 +1312,10 @@ private void buildPartial0(com.google.apps.card.v1.TextInput result) { to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000100) != 0)) { + result.validation_ = validationBuilder_ == null ? validation_ : validationBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { result.placeholderText_ = placeholderText_; } result.bitField0_ |= to_bitField0_; @@ -1306,9 +1398,12 @@ public Builder mergeFrom(com.google.apps.card.v1.TextInput other) { if (other.hasAutoCompleteAction()) { mergeAutoCompleteAction(other.getAutoCompleteAction()); } + if (other.hasValidation()) { + mergeValidation(other.getValidation()); + } if (!other.getPlaceholderText().isEmpty()) { placeholderText_ = other.placeholderText_; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -1387,10 +1482,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000080; break; } // case 66 + case 90: + { + input.readMessage(getValidationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 90 case 98: { placeholderText_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 98 default: @@ -2298,7 +2399,7 @@ public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() { * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -2330,7 +2431,7 @@ public boolean hasInitialSuggestions() { * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -2368,7 +2469,7 @@ public com.google.apps.card.v1.Suggestions getInitialSuggestions() { * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -2408,7 +2509,7 @@ public Builder setInitialSuggestions(com.google.apps.card.v1.Suggestions value) * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -2446,7 +2547,7 @@ public Builder setInitialSuggestions( * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -2491,7 +2592,7 @@ public Builder mergeInitialSuggestions(com.google.apps.card.v1.Suggestions value * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -2528,7 +2629,7 @@ public Builder clearInitialSuggestions() { * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -2560,7 +2661,7 @@ public com.google.apps.card.v1.Suggestions.Builder getInitialSuggestionsBuilder( * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -2596,7 +2697,7 @@ public com.google.apps.card.v1.SuggestionsOrBuilder getInitialSuggestionsOrBuild * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -2639,7 +2740,7 @@ public com.google.apps.card.v1.SuggestionsOrBuilder getInitialSuggestionsOrBuild * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -2664,7 +2765,7 @@ public boolean hasAutoCompleteAction() { * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -2695,7 +2796,7 @@ public com.google.apps.card.v1.Action getAutoCompleteAction() { * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -2728,7 +2829,7 @@ public Builder setAutoCompleteAction(com.google.apps.card.v1.Action value) { * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -2758,7 +2859,7 @@ public Builder setAutoCompleteAction(com.google.apps.card.v1.Action.Builder buil * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -2796,7 +2897,7 @@ public Builder mergeAutoCompleteAction(com.google.apps.card.v1.Action value) { * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -2826,7 +2927,7 @@ public Builder clearAutoCompleteAction() { * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -2851,7 +2952,7 @@ public com.google.apps.card.v1.Action.Builder getAutoCompleteActionBuilder() { * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -2880,7 +2981,7 @@ public com.google.apps.card.v1.ActionOrBuilder getAutoCompleteActionOrBuilder() * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -2902,6 +3003,227 @@ public com.google.apps.card.v1.ActionOrBuilder getAutoCompleteActionOrBuilder() return autoCompleteActionBuilder_; } + private com.google.apps.card.v1.Validation validation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Validation, + com.google.apps.card.v1.Validation.Builder, + com.google.apps.card.v1.ValidationOrBuilder> + validationBuilder_; + + /** + * + * + *
+     * Specify the input format validation necessary for this text field.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation validation = 11; + * + * @return Whether the validation field is set. + */ + public boolean hasValidation() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Specify the input format validation necessary for this text field.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation validation = 11; + * + * @return The validation. + */ + public com.google.apps.card.v1.Validation getValidation() { + if (validationBuilder_ == null) { + return validation_ == null + ? com.google.apps.card.v1.Validation.getDefaultInstance() + : validation_; + } else { + return validationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Specify the input format validation necessary for this text field.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation validation = 11; + */ + public Builder setValidation(com.google.apps.card.v1.Validation value) { + if (validationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + validation_ = value; + } else { + validationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specify the input format validation necessary for this text field.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation validation = 11; + */ + public Builder setValidation(com.google.apps.card.v1.Validation.Builder builderForValue) { + if (validationBuilder_ == null) { + validation_ = builderForValue.build(); + } else { + validationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specify the input format validation necessary for this text field.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation validation = 11; + */ + public Builder mergeValidation(com.google.apps.card.v1.Validation value) { + if (validationBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && validation_ != null + && validation_ != com.google.apps.card.v1.Validation.getDefaultInstance()) { + getValidationBuilder().mergeFrom(value); + } else { + validation_ = value; + } + } else { + validationBuilder_.mergeFrom(value); + } + if (validation_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Specify the input format validation necessary for this text field.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation validation = 11; + */ + public Builder clearValidation() { + bitField0_ = (bitField0_ & ~0x00000100); + validation_ = null; + if (validationBuilder_ != null) { + validationBuilder_.dispose(); + validationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Specify the input format validation necessary for this text field.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation validation = 11; + */ + public com.google.apps.card.v1.Validation.Builder getValidationBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getValidationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Specify the input format validation necessary for this text field.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation validation = 11; + */ + public com.google.apps.card.v1.ValidationOrBuilder getValidationOrBuilder() { + if (validationBuilder_ != null) { + return validationBuilder_.getMessageOrBuilder(); + } else { + return validation_ == null + ? com.google.apps.card.v1.Validation.getDefaultInstance() + : validation_; + } + } + + /** + * + * + *
+     * Specify the input format validation necessary for this text field.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation validation = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Validation, + com.google.apps.card.v1.Validation.Builder, + com.google.apps.card.v1.ValidationOrBuilder> + getValidationFieldBuilder() { + if (validationBuilder_ == null) { + validationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Validation, + com.google.apps.card.v1.Validation.Builder, + com.google.apps.card.v1.ValidationOrBuilder>( + getValidation(), getParentForChildren(), isClean()); + validation_ = null; + } + return validationBuilder_; + } + private java.lang.Object placeholderText_ = ""; /** @@ -2979,7 +3301,7 @@ public Builder setPlaceholderText(java.lang.String value) { throw new NullPointerException(); } placeholderText_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3001,7 +3323,7 @@ public Builder setPlaceholderText(java.lang.String value) { */ public Builder clearPlaceholderText() { placeholderText_ = getDefaultInstance().getPlaceholderText(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } @@ -3028,7 +3350,7 @@ public Builder setPlaceholderTextBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); placeholderText_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextInputOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextInputOrBuilder.java index 905030c2d7..3388bd5fce 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextInputOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextInputOrBuilder.java @@ -259,7 +259,7 @@ public interface TextInputOrBuilder * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -289,7 +289,7 @@ public interface TextInputOrBuilder * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -319,7 +319,7 @@ public interface TextInputOrBuilder * to `MULTIPLE_LINE`. * * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * add-ons and Chat apps](https://developers.google.com/workspace/extend): * * * .google.apps.card.v1.Suggestions initial_suggestions = 7; @@ -340,7 +340,7 @@ public interface TextInputOrBuilder * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -363,7 +363,7 @@ public interface TextInputOrBuilder * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; @@ -386,13 +386,59 @@ public interface TextInputOrBuilder * a custom function. * * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): + * add-ons](https://developers.google.com/workspace/add-ons): * * * .google.apps.card.v1.Action auto_complete_action = 8; */ com.google.apps.card.v1.ActionOrBuilder getAutoCompleteActionOrBuilder(); + /** + * + * + *
+   * Specify the input format validation necessary for this text field.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * .google.apps.card.v1.Validation validation = 11; + * + * @return Whether the validation field is set. + */ + boolean hasValidation(); + + /** + * + * + *
+   * Specify the input format validation necessary for this text field.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * .google.apps.card.v1.Validation validation = 11; + * + * @return The validation. + */ + com.google.apps.card.v1.Validation getValidation(); + + /** + * + * + *
+   * Specify the input format validation necessary for this text field.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * .google.apps.card.v1.Validation validation = 11; + */ + com.google.apps.card.v1.ValidationOrBuilder getValidationOrBuilder(); + /** * * diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextParagraph.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextParagraph.java index 1b3efb0acf..311bb99794 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextParagraph.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextParagraph.java @@ -33,9 +33,9 @@ * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * @@ -54,6 +54,7 @@ private TextParagraph(com.google.protobuf.GeneratedMessageV3.Builder builder) private TextParagraph() { text_ = ""; + textSyntax_ = 0; } @java.lang.Override @@ -77,6 +78,167 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.apps.card.v1.TextParagraph.Builder.class); } + /** + * + * + *
+   * Syntax to use for formatting text.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * Protobuf enum {@code google.apps.card.v1.TextParagraph.TextSyntax} + */ + public enum TextSyntax implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The text is rendered as HTML if unspecified.
+     * 
+ * + * TEXT_SYNTAX_UNSPECIFIED = 0; + */ + TEXT_SYNTAX_UNSPECIFIED(0), + /** + * + * + *
+     * The text is rendered as HTML. This is the default value.
+     * 
+ * + * HTML = 1; + */ + HTML(1), + /** + * + * + *
+     * The text is rendered as Markdown.
+     * 
+ * + * MARKDOWN = 2; + */ + MARKDOWN(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The text is rendered as HTML if unspecified.
+     * 
+ * + * TEXT_SYNTAX_UNSPECIFIED = 0; + */ + public static final int TEXT_SYNTAX_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The text is rendered as HTML. This is the default value.
+     * 
+ * + * HTML = 1; + */ + public static final int HTML_VALUE = 1; + + /** + * + * + *
+     * The text is rendered as Markdown.
+     * 
+ * + * MARKDOWN = 2; + */ + public static final int MARKDOWN_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 TextSyntax 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 TextSyntax forNumber(int value) { + switch (value) { + case 0: + return TEXT_SYNTAX_UNSPECIFIED; + case 1: + return HTML; + case 2: + return MARKDOWN; + 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 TextSyntax findValueByNumber(int number) { + return TextSyntax.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.TextParagraph.getDescriptor().getEnumTypes().get(0); + } + + private static final TextSyntax[] VALUES = values(); + + public static TextSyntax 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 TextSyntax(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.apps.card.v1.TextParagraph.TextSyntax) + } + public static final int TEXT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -130,6 +292,73 @@ public com.google.protobuf.ByteString getTextBytes() { } } + public static final int MAX_LINES_FIELD_NUMBER = 2; + private int maxLines_ = 0; + + /** + * + * + *
+   * The maximum number of lines of text that are displayed in the widget. If
+   * the text exceeds the specified maximum number of lines, the excess
+   * content is concealed behind a **show more** button. If the text is equal or
+   * shorter than the specified maximum number of lines, a **show more** button
+   * isn't displayed.
+   *
+   * The default value is 0, in which case
+   * all context is displayed. Negative values are ignored.
+   * 
+ * + * int32 max_lines = 2; + * + * @return The maxLines. + */ + @java.lang.Override + public int getMaxLines() { + return maxLines_; + } + + public static final int TEXT_SYNTAX_FIELD_NUMBER = 4; + private int textSyntax_ = 0; + + /** + * + * + *
+   * The syntax of the text. If not set, the text is rendered as HTML.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4; + * + * @return The enum numeric value on the wire for textSyntax. + */ + @java.lang.Override + public int getTextSyntaxValue() { + return textSyntax_; + } + + /** + * + * + *
+   * The syntax of the text. If not set, the text is rendered as HTML.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4; + * + * @return The textSyntax. + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraph.TextSyntax getTextSyntax() { + com.google.apps.card.v1.TextParagraph.TextSyntax result = + com.google.apps.card.v1.TextParagraph.TextSyntax.forNumber(textSyntax_); + return result == null ? com.google.apps.card.v1.TextParagraph.TextSyntax.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -147,6 +376,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); } + if (maxLines_ != 0) { + output.writeInt32(2, maxLines_); + } + if (textSyntax_ + != com.google.apps.card.v1.TextParagraph.TextSyntax.TEXT_SYNTAX_UNSPECIFIED.getNumber()) { + output.writeEnum(4, textSyntax_); + } getUnknownFields().writeTo(output); } @@ -159,6 +395,13 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); } + if (maxLines_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxLines_); + } + if (textSyntax_ + != com.google.apps.card.v1.TextParagraph.TextSyntax.TEXT_SYNTAX_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, textSyntax_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -175,6 +418,8 @@ public boolean equals(final java.lang.Object obj) { com.google.apps.card.v1.TextParagraph other = (com.google.apps.card.v1.TextParagraph) obj; if (!getText().equals(other.getText())) return false; + if (getMaxLines() != other.getMaxLines()) return false; + if (textSyntax_ != other.textSyntax_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -188,6 +433,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + MAX_LINES_FIELD_NUMBER; + hash = (53 * hash) + getMaxLines(); + hash = (37 * hash) + TEXT_SYNTAX_FIELD_NUMBER; + hash = (53 * hash) + textSyntax_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -302,9 +551,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * @@ -341,6 +590,8 @@ public Builder clear() { super.clear(); bitField0_ = 0; text_ = ""; + maxLines_ = 0; + textSyntax_ = 0; return this; } @@ -380,6 +631,12 @@ private void buildPartial0(com.google.apps.card.v1.TextParagraph result) { if (((from_bitField0_ & 0x00000001) != 0)) { result.text_ = text_; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxLines_ = maxLines_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.textSyntax_ = textSyntax_; + } } @java.lang.Override @@ -432,6 +689,12 @@ public Builder mergeFrom(com.google.apps.card.v1.TextParagraph other) { bitField0_ |= 0x00000001; onChanged(); } + if (other.getMaxLines() != 0) { + setMaxLines(other.getMaxLines()); + } + if (other.textSyntax_ != 0) { + setTextSyntaxValue(other.getTextSyntaxValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -464,6 +727,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 16: + { + maxLines_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 32: + { + textSyntax_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -594,6 +869,190 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { return this; } + private int maxLines_; + + /** + * + * + *
+     * The maximum number of lines of text that are displayed in the widget. If
+     * the text exceeds the specified maximum number of lines, the excess
+     * content is concealed behind a **show more** button. If the text is equal or
+     * shorter than the specified maximum number of lines, a **show more** button
+     * isn't displayed.
+     *
+     * The default value is 0, in which case
+     * all context is displayed. Negative values are ignored.
+     * 
+ * + * int32 max_lines = 2; + * + * @return The maxLines. + */ + @java.lang.Override + public int getMaxLines() { + return maxLines_; + } + + /** + * + * + *
+     * The maximum number of lines of text that are displayed in the widget. If
+     * the text exceeds the specified maximum number of lines, the excess
+     * content is concealed behind a **show more** button. If the text is equal or
+     * shorter than the specified maximum number of lines, a **show more** button
+     * isn't displayed.
+     *
+     * The default value is 0, in which case
+     * all context is displayed. Negative values are ignored.
+     * 
+ * + * int32 max_lines = 2; + * + * @param value The maxLines to set. + * @return This builder for chaining. + */ + public Builder setMaxLines(int value) { + + maxLines_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The maximum number of lines of text that are displayed in the widget. If
+     * the text exceeds the specified maximum number of lines, the excess
+     * content is concealed behind a **show more** button. If the text is equal or
+     * shorter than the specified maximum number of lines, a **show more** button
+     * isn't displayed.
+     *
+     * The default value is 0, in which case
+     * all context is displayed. Negative values are ignored.
+     * 
+ * + * int32 max_lines = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxLines() { + bitField0_ = (bitField0_ & ~0x00000002); + maxLines_ = 0; + onChanged(); + return this; + } + + private int textSyntax_ = 0; + + /** + * + * + *
+     * The syntax of the text. If not set, the text is rendered as HTML.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4; + * + * @return The enum numeric value on the wire for textSyntax. + */ + @java.lang.Override + public int getTextSyntaxValue() { + return textSyntax_; + } + + /** + * + * + *
+     * The syntax of the text. If not set, the text is rendered as HTML.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4; + * + * @param value The enum numeric value on the wire for textSyntax to set. + * @return This builder for chaining. + */ + public Builder setTextSyntaxValue(int value) { + textSyntax_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The syntax of the text. If not set, the text is rendered as HTML.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4; + * + * @return The textSyntax. + */ + @java.lang.Override + public com.google.apps.card.v1.TextParagraph.TextSyntax getTextSyntax() { + com.google.apps.card.v1.TextParagraph.TextSyntax result = + com.google.apps.card.v1.TextParagraph.TextSyntax.forNumber(textSyntax_); + return result == null + ? com.google.apps.card.v1.TextParagraph.TextSyntax.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The syntax of the text. If not set, the text is rendered as HTML.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4; + * + * @param value The textSyntax to set. + * @return This builder for chaining. + */ + public Builder setTextSyntax(com.google.apps.card.v1.TextParagraph.TextSyntax value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + textSyntax_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The syntax of the text. If not set, the text is rendered as HTML.
+     *
+     * [Google Chat apps](https://developers.google.com/workspace/chat):
+     * 
+ * + * .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4; + * + * @return This builder for chaining. + */ + public Builder clearTextSyntax() { + bitField0_ = (bitField0_ & ~0x00000004); + textSyntax_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextParagraphOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextParagraphOrBuilder.java index 0780410359..2fcc657d74 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextParagraphOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/TextParagraphOrBuilder.java @@ -49,4 +49,54 @@ public interface TextParagraphOrBuilder * @return The bytes for text. */ com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+   * The maximum number of lines of text that are displayed in the widget. If
+   * the text exceeds the specified maximum number of lines, the excess
+   * content is concealed behind a **show more** button. If the text is equal or
+   * shorter than the specified maximum number of lines, a **show more** button
+   * isn't displayed.
+   *
+   * The default value is 0, in which case
+   * all context is displayed. Negative values are ignored.
+   * 
+ * + * int32 max_lines = 2; + * + * @return The maxLines. + */ + int getMaxLines(); + + /** + * + * + *
+   * The syntax of the text. If not set, the text is rendered as HTML.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4; + * + * @return The enum numeric value on the wire for textSyntax. + */ + int getTextSyntaxValue(); + + /** + * + * + *
+   * The syntax of the text. If not set, the text is rendered as HTML.
+   *
+   * [Google Chat apps](https://developers.google.com/workspace/chat):
+   * 
+ * + * .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4; + * + * @return The textSyntax. + */ + com.google.apps.card.v1.TextParagraph.TextSyntax getTextSyntax(); } diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Validation.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Validation.java new file mode 100644 index 0000000000..8461105d05 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Validation.java @@ -0,0 +1,966 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +/** + * + * + *
+ * Represents the necessary data for validating the widget it's attached to.
+ *
+ * [Google Workspace add-ons and Chat
+ * apps](https://developers.google.com/workspace/extend):
+ * 
+ * + * Protobuf type {@code google.apps.card.v1.Validation} + */ +public final class Validation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.apps.card.v1.Validation) + ValidationOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Validation.newBuilder() to construct. + private Validation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Validation() { + inputType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Validation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Validation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Validation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Validation.class, + com.google.apps.card.v1.Validation.Builder.class); + } + + /** + * + * + *
+   * The type of the input widget.
+   * 
+ * + * Protobuf enum {@code google.apps.card.v1.Validation.InputType} + */ + public enum InputType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Do not use.
+     * 
+ * + * INPUT_TYPE_UNSPECIFIED = 0; + */ + INPUT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Regular text that accepts all characters.
+     * 
+ * + * TEXT = 1; + */ + TEXT(1), + /** + * + * + *
+     * An integer value.
+     * 
+ * + * INTEGER = 2; + */ + INTEGER(2), + /** + * + * + *
+     * A float value.
+     * 
+ * + * FLOAT = 3; + */ + FLOAT(3), + /** + * + * + *
+     * An email address.
+     * 
+ * + * EMAIL = 4; + */ + EMAIL(4), + /** + * + * + *
+     * A emoji selected from system-provided emoji picker.
+     * 
+ * + * EMOJI_PICKER = 5; + */ + EMOJI_PICKER(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Do not use.
+     * 
+ * + * INPUT_TYPE_UNSPECIFIED = 0; + */ + public static final int INPUT_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Regular text that accepts all characters.
+     * 
+ * + * TEXT = 1; + */ + public static final int TEXT_VALUE = 1; + + /** + * + * + *
+     * An integer value.
+     * 
+ * + * INTEGER = 2; + */ + public static final int INTEGER_VALUE = 2; + + /** + * + * + *
+     * A float value.
+     * 
+ * + * FLOAT = 3; + */ + public static final int FLOAT_VALUE = 3; + + /** + * + * + *
+     * An email address.
+     * 
+ * + * EMAIL = 4; + */ + public static final int EMAIL_VALUE = 4; + + /** + * + * + *
+     * A emoji selected from system-provided emoji picker.
+     * 
+ * + * EMOJI_PICKER = 5; + */ + public static final int EMOJI_PICKER_VALUE = 5; + + 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 InputType 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 InputType forNumber(int value) { + switch (value) { + case 0: + return INPUT_TYPE_UNSPECIFIED; + case 1: + return TEXT; + case 2: + return INTEGER; + case 3: + return FLOAT; + case 4: + return EMAIL; + case 5: + return EMOJI_PICKER; + 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 InputType findValueByNumber(int number) { + return InputType.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.Validation.getDescriptor().getEnumTypes().get(0); + } + + private static final InputType[] VALUES = values(); + + public static InputType 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 InputType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Validation.InputType) + } + + public static final int CHARACTER_LIMIT_FIELD_NUMBER = 1; + private int characterLimit_ = 0; + + /** + * + * + *
+   * Specify the character limit for text input widgets.  Note that this is
+   * only used for text input and is ignored for other widgets.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * int32 character_limit = 1; + * + * @return The characterLimit. + */ + @java.lang.Override + public int getCharacterLimit() { + return characterLimit_; + } + + public static final int INPUT_TYPE_FIELD_NUMBER = 2; + private int inputType_ = 0; + + /** + * + * + *
+   * Specify the type of the input widgets.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * .google.apps.card.v1.Validation.InputType input_type = 2; + * + * @return The enum numeric value on the wire for inputType. + */ + @java.lang.Override + public int getInputTypeValue() { + return inputType_; + } + + /** + * + * + *
+   * Specify the type of the input widgets.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * .google.apps.card.v1.Validation.InputType input_type = 2; + * + * @return The inputType. + */ + @java.lang.Override + public com.google.apps.card.v1.Validation.InputType getInputType() { + com.google.apps.card.v1.Validation.InputType result = + com.google.apps.card.v1.Validation.InputType.forNumber(inputType_); + return result == null ? com.google.apps.card.v1.Validation.InputType.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 (characterLimit_ != 0) { + output.writeInt32(1, characterLimit_); + } + if (inputType_ + != com.google.apps.card.v1.Validation.InputType.INPUT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, inputType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (characterLimit_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, characterLimit_); + } + if (inputType_ + != com.google.apps.card.v1.Validation.InputType.INPUT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, inputType_); + } + 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.Validation)) { + return super.equals(obj); + } + com.google.apps.card.v1.Validation other = (com.google.apps.card.v1.Validation) obj; + + if (getCharacterLimit() != other.getCharacterLimit()) return false; + if (inputType_ != other.inputType_) 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) + CHARACTER_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getCharacterLimit(); + hash = (37 * hash) + INPUT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + inputType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.apps.card.v1.Validation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Validation 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.Validation parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Validation 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.Validation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.apps.card.v1.Validation 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.Validation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Validation 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.Validation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.apps.card.v1.Validation 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.Validation 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.Validation 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.Validation 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; + } + + /** + * + * + *
+   * Represents the necessary data for validating the widget it's attached to.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * Protobuf type {@code google.apps.card.v1.Validation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Validation) + com.google.apps.card.v1.ValidationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Validation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.apps.card.v1.CardProto + .internal_static_google_apps_card_v1_Validation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.apps.card.v1.Validation.class, + com.google.apps.card.v1.Validation.Builder.class); + } + + // Construct using com.google.apps.card.v1.Validation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + characterLimit_ = 0; + inputType_ = 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_Validation_descriptor; + } + + @java.lang.Override + public com.google.apps.card.v1.Validation getDefaultInstanceForType() { + return com.google.apps.card.v1.Validation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.apps.card.v1.Validation build() { + com.google.apps.card.v1.Validation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.apps.card.v1.Validation buildPartial() { + com.google.apps.card.v1.Validation result = new com.google.apps.card.v1.Validation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.apps.card.v1.Validation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.characterLimit_ = characterLimit_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.inputType_ = inputType_; + } + } + + @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.Validation) { + return mergeFrom((com.google.apps.card.v1.Validation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.apps.card.v1.Validation other) { + if (other == com.google.apps.card.v1.Validation.getDefaultInstance()) return this; + if (other.getCharacterLimit() != 0) { + setCharacterLimit(other.getCharacterLimit()); + } + if (other.inputType_ != 0) { + setInputTypeValue(other.getInputTypeValue()); + } + 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: + { + characterLimit_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + inputType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 characterLimit_; + + /** + * + * + *
+     * Specify the character limit for text input widgets.  Note that this is
+     * only used for text input and is ignored for other widgets.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * int32 character_limit = 1; + * + * @return The characterLimit. + */ + @java.lang.Override + public int getCharacterLimit() { + return characterLimit_; + } + + /** + * + * + *
+     * Specify the character limit for text input widgets.  Note that this is
+     * only used for text input and is ignored for other widgets.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * int32 character_limit = 1; + * + * @param value The characterLimit to set. + * @return This builder for chaining. + */ + public Builder setCharacterLimit(int value) { + + characterLimit_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specify the character limit for text input widgets.  Note that this is
+     * only used for text input and is ignored for other widgets.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * int32 character_limit = 1; + * + * @return This builder for chaining. + */ + public Builder clearCharacterLimit() { + bitField0_ = (bitField0_ & ~0x00000001); + characterLimit_ = 0; + onChanged(); + return this; + } + + private int inputType_ = 0; + + /** + * + * + *
+     * Specify the type of the input widgets.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation.InputType input_type = 2; + * + * @return The enum numeric value on the wire for inputType. + */ + @java.lang.Override + public int getInputTypeValue() { + return inputType_; + } + + /** + * + * + *
+     * Specify the type of the input widgets.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation.InputType input_type = 2; + * + * @param value The enum numeric value on the wire for inputType to set. + * @return This builder for chaining. + */ + public Builder setInputTypeValue(int value) { + inputType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specify the type of the input widgets.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation.InputType input_type = 2; + * + * @return The inputType. + */ + @java.lang.Override + public com.google.apps.card.v1.Validation.InputType getInputType() { + com.google.apps.card.v1.Validation.InputType result = + com.google.apps.card.v1.Validation.InputType.forNumber(inputType_); + return result == null ? com.google.apps.card.v1.Validation.InputType.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Specify the type of the input widgets.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation.InputType input_type = 2; + * + * @param value The inputType to set. + * @return This builder for chaining. + */ + public Builder setInputType(com.google.apps.card.v1.Validation.InputType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + inputType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Specify the type of the input widgets.
+     *
+     * [Google Workspace add-ons and Chat
+     * apps](https://developers.google.com/workspace/extend):
+     * 
+ * + * .google.apps.card.v1.Validation.InputType input_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearInputType() { + bitField0_ = (bitField0_ & ~0x00000002); + inputType_ = 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.Validation) + } + + // @@protoc_insertion_point(class_scope:google.apps.card.v1.Validation) + private static final com.google.apps.card.v1.Validation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.apps.card.v1.Validation(); + } + + public static com.google.apps.card.v1.Validation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Validation 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.Validation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ValidationOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ValidationOrBuilder.java new file mode 100644 index 0000000000..12c1f60f08 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/ValidationOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2025 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.8 +package com.google.apps.card.v1; + +public interface ValidationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Validation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Specify the character limit for text input widgets.  Note that this is
+   * only used for text input and is ignored for other widgets.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * int32 character_limit = 1; + * + * @return The characterLimit. + */ + int getCharacterLimit(); + + /** + * + * + *
+   * Specify the type of the input widgets.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * .google.apps.card.v1.Validation.InputType input_type = 2; + * + * @return The enum numeric value on the wire for inputType. + */ + int getInputTypeValue(); + + /** + * + * + *
+   * Specify the type of the input widgets.
+   *
+   * [Google Workspace add-ons and Chat
+   * apps](https://developers.google.com/workspace/extend):
+   * 
+ * + * .google.apps.card.v1.Validation.InputType input_type = 2; + * + * @return The inputType. + */ + com.google.apps.card.v1.Validation.InputType getInputType(); +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Widget.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Widget.java index a4057e9742..df9bd98e03 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Widget.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/Widget.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * The shape used to crop the image.
    *
-   * [Google Workspace Add-ons and Chat
+   * [Google Workspace add-ons and Chat
    * apps](https://developers.google.com/workspace/extend):
    * 
* @@ -403,6 +403,191 @@ private HorizontalAlignment(int value) { // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Widget.HorizontalAlignment) } + /** + * + * + *
+   * Represents vertical alignment attribute.
+   * 
+ * + * Protobuf enum {@code google.apps.card.v1.Widget.VerticalAlignment} + */ + public enum VerticalAlignment implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type. Do not use.
+     * 
+ * + * VERTICAL_ALIGNMENT_UNSPECIFIED = 0; + */ + VERTICAL_ALIGNMENT_UNSPECIFIED(0), + /** + * + * + *
+     * Alignment to the top position.
+     * 
+ * + * TOP = 1; + */ + TOP(1), + /** + * + * + *
+     * Alignment to the middle position.
+     * 
+ * + * MIDDLE = 2; + */ + MIDDLE(2), + /** + * + * + *
+     * Alignment to the bottom position.
+     * 
+ * + * BOTTOM = 3; + */ + BOTTOM(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type. Do not use.
+     * 
+ * + * VERTICAL_ALIGNMENT_UNSPECIFIED = 0; + */ + public static final int VERTICAL_ALIGNMENT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Alignment to the top position.
+     * 
+ * + * TOP = 1; + */ + public static final int TOP_VALUE = 1; + + /** + * + * + *
+     * Alignment to the middle position.
+     * 
+ * + * MIDDLE = 2; + */ + public static final int MIDDLE_VALUE = 2; + + /** + * + * + *
+     * Alignment to the bottom position.
+     * 
+ * + * BOTTOM = 3; + */ + public static final int BOTTOM_VALUE = 3; + + 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 VerticalAlignment 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 VerticalAlignment forNumber(int value) { + switch (value) { + case 0: + return VERTICAL_ALIGNMENT_UNSPECIFIED; + case 1: + return TOP; + case 2: + return MIDDLE; + case 3: + return BOTTOM; + 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 VerticalAlignment findValueByNumber(int number) { + return VerticalAlignment.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.Widget.getDescriptor().getEnumTypes().get(2); + } + + private static final VerticalAlignment[] VALUES = values(); + + public static VerticalAlignment 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 VerticalAlignment(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Widget.VerticalAlignment) + } + private int dataCase_ = 0; @SuppressWarnings("serial") @@ -422,6 +607,8 @@ public enum DataCase DIVIDER(9), GRID(10), COLUMNS(11), + CAROUSEL(13), + CHIP_LIST(14), DATA_NOT_SET(0); private final int value; @@ -461,6 +648,10 @@ public static DataCase forNumber(int value) { return GRID; case 11: return COLUMNS; + case 13: + return CAROUSEL; + case 14: + return CHIP_LIST; case 0: return DATA_NOT_SET; default: @@ -490,7 +681,7 @@ public DataCase getDataCase() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -520,7 +711,7 @@ public boolean hasTextParagraph() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -553,7 +744,7 @@ public com.google.apps.card.v1.TextParagraph getTextParagraph() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -785,7 +976,6 @@ public com.google.apps.card.v1.DecoratedTextOrBuilder getDecoratedTextOrBuilder( * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -832,7 +1022,6 @@ public boolean hasButtonList() { * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -882,7 +1071,6 @@ public com.google.apps.card.v1.ButtonList getButtonList() { * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -1244,7 +1432,7 @@ public com.google.apps.card.v1.SelectionInputOrBuilder getSelectionInputOrBuilde * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -1273,7 +1461,7 @@ public boolean hasDateTimePicker() { * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -1305,7 +1493,7 @@ public com.google.apps.card.v1.DateTimePicker getDateTimePicker() { * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -1405,7 +1593,7 @@ public com.google.apps.card.v1.DividerOrBuilder getDividerOrBuilder() { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -1463,7 +1651,7 @@ public boolean hasGrid() { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -1524,7 +1712,7 @@ public com.google.apps.card.v1.Grid getGrid() { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -1734,107 +1922,353 @@ public com.google.apps.card.v1.ColumnsOrBuilder getColumnsOrBuilder() { return com.google.apps.card.v1.Columns.getDefaultInstance(); } - public static final int HORIZONTAL_ALIGNMENT_FIELD_NUMBER = 8; - private int horizontalAlignment_ = 0; + public static final int CAROUSEL_FIELD_NUMBER = 13; /** * * *
-   * Specifies whether widgets align to the left, right, or center of a column.
+   * A carousel contains a collection of nested widgets.
+   * For example, this is a JSON representation of a carousel that contains
+   * two text paragraphs.
+   *
+   * ```
+   * {
+   *   "widgets": [
+   *     {
+   *       "textParagraph": {
+   *         "text": "First text paragraph in the carousel."
+   *       }
+   *     },
+   *     {
+   *       "textParagraph": {
+   *         "text": "Second text paragraph in the carousel."
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
    * 
* - * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; + * .google.apps.card.v1.Carousel carousel = 13; * - * @return The enum numeric value on the wire for horizontalAlignment. + * @return Whether the carousel field is set. */ @java.lang.Override - public int getHorizontalAlignmentValue() { - return horizontalAlignment_; + public boolean hasCarousel() { + return dataCase_ == 13; } /** * * *
-   * Specifies whether widgets align to the left, right, or center of a column.
+   * A carousel contains a collection of nested widgets.
+   * For example, this is a JSON representation of a carousel that contains
+   * two text paragraphs.
+   *
+   * ```
+   * {
+   *   "widgets": [
+   *     {
+   *       "textParagraph": {
+   *         "text": "First text paragraph in the carousel."
+   *       }
+   *     },
+   *     {
+   *       "textParagraph": {
+   *         "text": "Second text paragraph in the carousel."
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
    * 
* - * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; + * .google.apps.card.v1.Carousel carousel = 13; * - * @return The horizontalAlignment. + * @return The carousel. */ @java.lang.Override - public com.google.apps.card.v1.Widget.HorizontalAlignment getHorizontalAlignment() { - com.google.apps.card.v1.Widget.HorizontalAlignment result = - com.google.apps.card.v1.Widget.HorizontalAlignment.forNumber(horizontalAlignment_); - return result == null - ? com.google.apps.card.v1.Widget.HorizontalAlignment.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; + public com.google.apps.card.v1.Carousel getCarousel() { + if (dataCase_ == 13) { + return (com.google.apps.card.v1.Carousel) data_; + } + return com.google.apps.card.v1.Carousel.getDefaultInstance(); } + /** + * + * + *
+   * A carousel contains a collection of nested widgets.
+   * For example, this is a JSON representation of a carousel that contains
+   * two text paragraphs.
+   *
+   * ```
+   * {
+   *   "widgets": [
+   *     {
+   *       "textParagraph": {
+   *         "text": "First text paragraph in the carousel."
+   *       }
+   *     },
+   *     {
+   *       "textParagraph": {
+   *         "text": "Second text paragraph in the carousel."
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + */ @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (dataCase_ == 1) { - output.writeMessage(1, (com.google.apps.card.v1.TextParagraph) data_); - } - if (dataCase_ == 2) { - output.writeMessage(2, (com.google.apps.card.v1.Image) data_); - } - if (dataCase_ == 3) { - output.writeMessage(3, (com.google.apps.card.v1.DecoratedText) data_); - } - if (dataCase_ == 4) { - output.writeMessage(4, (com.google.apps.card.v1.ButtonList) data_); - } - if (dataCase_ == 5) { - output.writeMessage(5, (com.google.apps.card.v1.TextInput) data_); - } - if (dataCase_ == 6) { - output.writeMessage(6, (com.google.apps.card.v1.SelectionInput) data_); - } - if (dataCase_ == 7) { - output.writeMessage(7, (com.google.apps.card.v1.DateTimePicker) data_); - } - if (horizontalAlignment_ - != com.google.apps.card.v1.Widget.HorizontalAlignment.HORIZONTAL_ALIGNMENT_UNSPECIFIED - .getNumber()) { - output.writeEnum(8, horizontalAlignment_); - } - if (dataCase_ == 9) { - output.writeMessage(9, (com.google.apps.card.v1.Divider) data_); + public com.google.apps.card.v1.CarouselOrBuilder getCarouselOrBuilder() { + if (dataCase_ == 13) { + return (com.google.apps.card.v1.Carousel) data_; } - if (dataCase_ == 10) { - output.writeMessage(10, (com.google.apps.card.v1.Grid) data_); - } - if (dataCase_ == 11) { - output.writeMessage(11, (com.google.apps.card.v1.Columns) data_); - } - getUnknownFields().writeTo(output); + return com.google.apps.card.v1.Carousel.getDefaultInstance(); } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static final int CHIP_LIST_FIELD_NUMBER = 14; - size = 0; - if (dataCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.apps.card.v1.TextParagraph) data_); + /** + * + * + *
+   * A list of chips.
+   *
+   * For example, the following JSON creates two chips. The first
+   * is a text chip and the second is an icon chip that opens a
+   * link:
+   * ```
+   * "chipList": {
+   *   "chips": [
+   *     {
+   *       "text": "Edit",
+   *       "disabled": true,
+   *     },
+   *     {
+   *       "icon": {
+   *         "knownIcon": "INVITE",
+   *         "altText": "check calendar"
+   *       },
+   *       "onClick": {
+   *         "openLink": {
+   *           "url": "https://example.com/calendar"
+   *         }
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + * + * @return Whether the chipList field is set. + */ + @java.lang.Override + public boolean hasChipList() { + return dataCase_ == 14; + } + + /** + * + * + *
+   * A list of chips.
+   *
+   * For example, the following JSON creates two chips. The first
+   * is a text chip and the second is an icon chip that opens a
+   * link:
+   * ```
+   * "chipList": {
+   *   "chips": [
+   *     {
+   *       "text": "Edit",
+   *       "disabled": true,
+   *     },
+   *     {
+   *       "icon": {
+   *         "knownIcon": "INVITE",
+   *         "altText": "check calendar"
+   *       },
+   *       "onClick": {
+   *         "openLink": {
+   *           "url": "https://example.com/calendar"
+   *         }
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + * + * @return The chipList. + */ + @java.lang.Override + public com.google.apps.card.v1.ChipList getChipList() { + if (dataCase_ == 14) { + return (com.google.apps.card.v1.ChipList) data_; + } + return com.google.apps.card.v1.ChipList.getDefaultInstance(); + } + + /** + * + * + *
+   * A list of chips.
+   *
+   * For example, the following JSON creates two chips. The first
+   * is a text chip and the second is an icon chip that opens a
+   * link:
+   * ```
+   * "chipList": {
+   *   "chips": [
+   *     {
+   *       "text": "Edit",
+   *       "disabled": true,
+   *     },
+   *     {
+   *       "icon": {
+   *         "knownIcon": "INVITE",
+   *         "altText": "check calendar"
+   *       },
+   *       "onClick": {
+   *         "openLink": {
+   *           "url": "https://example.com/calendar"
+   *         }
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + */ + @java.lang.Override + public com.google.apps.card.v1.ChipListOrBuilder getChipListOrBuilder() { + if (dataCase_ == 14) { + return (com.google.apps.card.v1.ChipList) data_; + } + return com.google.apps.card.v1.ChipList.getDefaultInstance(); + } + + public static final int HORIZONTAL_ALIGNMENT_FIELD_NUMBER = 8; + private int horizontalAlignment_ = 0; + + /** + * + * + *
+   * Specifies whether widgets align to the left, right, or center of a column.
+   * 
+ * + * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; + * + * @return The enum numeric value on the wire for horizontalAlignment. + */ + @java.lang.Override + public int getHorizontalAlignmentValue() { + return horizontalAlignment_; + } + + /** + * + * + *
+   * Specifies whether widgets align to the left, right, or center of a column.
+   * 
+ * + * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; + * + * @return The horizontalAlignment. + */ + @java.lang.Override + public com.google.apps.card.v1.Widget.HorizontalAlignment getHorizontalAlignment() { + com.google.apps.card.v1.Widget.HorizontalAlignment result = + com.google.apps.card.v1.Widget.HorizontalAlignment.forNumber(horizontalAlignment_); + return result == null + ? com.google.apps.card.v1.Widget.HorizontalAlignment.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 (dataCase_ == 1) { + output.writeMessage(1, (com.google.apps.card.v1.TextParagraph) data_); + } + if (dataCase_ == 2) { + output.writeMessage(2, (com.google.apps.card.v1.Image) data_); + } + if (dataCase_ == 3) { + output.writeMessage(3, (com.google.apps.card.v1.DecoratedText) data_); + } + if (dataCase_ == 4) { + output.writeMessage(4, (com.google.apps.card.v1.ButtonList) data_); + } + if (dataCase_ == 5) { + output.writeMessage(5, (com.google.apps.card.v1.TextInput) data_); + } + if (dataCase_ == 6) { + output.writeMessage(6, (com.google.apps.card.v1.SelectionInput) data_); + } + if (dataCase_ == 7) { + output.writeMessage(7, (com.google.apps.card.v1.DateTimePicker) data_); + } + if (horizontalAlignment_ + != com.google.apps.card.v1.Widget.HorizontalAlignment.HORIZONTAL_ALIGNMENT_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, horizontalAlignment_); + } + if (dataCase_ == 9) { + output.writeMessage(9, (com.google.apps.card.v1.Divider) data_); + } + if (dataCase_ == 10) { + output.writeMessage(10, (com.google.apps.card.v1.Grid) data_); + } + if (dataCase_ == 11) { + output.writeMessage(11, (com.google.apps.card.v1.Columns) data_); + } + if (dataCase_ == 13) { + output.writeMessage(13, (com.google.apps.card.v1.Carousel) data_); + } + if (dataCase_ == 14) { + output.writeMessage(14, (com.google.apps.card.v1.ChipList) data_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.apps.card.v1.TextParagraph) data_); } if (dataCase_ == 2) { size += @@ -1886,6 +2320,16 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 11, (com.google.apps.card.v1.Columns) data_); } + if (dataCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.apps.card.v1.Carousel) data_); + } + if (dataCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.apps.card.v1.ChipList) data_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1934,6 +2378,12 @@ public boolean equals(final java.lang.Object obj) { case 11: if (!getColumns().equals(other.getColumns())) return false; break; + case 13: + if (!getCarousel().equals(other.getCarousel())) return false; + break; + case 14: + if (!getChipList().equals(other.getChipList())) return false; + break; case 0: default: } @@ -1991,6 +2441,14 @@ public int hashCode() { hash = (37 * hash) + COLUMNS_FIELD_NUMBER; hash = (53 * hash) + getColumns().hashCode(); break; + case 13: + hash = (37 * hash) + CAROUSEL_FIELD_NUMBER; + hash = (53 * hash) + getCarousel().hashCode(); + break; + case 14: + hash = (37 * hash) + CHIP_LIST_FIELD_NUMBER; + hash = (53 * hash) + getChipList().hashCode(); + break; case 0: default: } @@ -2165,6 +2623,12 @@ public Builder clear() { if (columnsBuilder_ != null) { columnsBuilder_.clear(); } + if (carouselBuilder_ != null) { + carouselBuilder_.clear(); + } + if (chipListBuilder_ != null) { + chipListBuilder_.clear(); + } horizontalAlignment_ = 0; dataCase_ = 0; data_ = null; @@ -2204,7 +2668,7 @@ public com.google.apps.card.v1.Widget buildPartial() { private void buildPartial0(com.google.apps.card.v1.Widget result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.horizontalAlignment_ = horizontalAlignment_; } } @@ -2242,6 +2706,12 @@ private void buildPartialOneofs(com.google.apps.card.v1.Widget result) { if (dataCase_ == 11 && columnsBuilder_ != null) { result.data_ = columnsBuilder_.build(); } + if (dataCase_ == 13 && carouselBuilder_ != null) { + result.data_ = carouselBuilder_.build(); + } + if (dataCase_ == 14 && chipListBuilder_ != null) { + result.data_ = chipListBuilder_.build(); + } } @java.lang.Override @@ -2343,6 +2813,16 @@ public Builder mergeFrom(com.google.apps.card.v1.Widget other) { mergeColumns(other.getColumns()); break; } + case CAROUSEL: + { + mergeCarousel(other.getCarousel()); + break; + } + case CHIP_LIST: + { + mergeChipList(other.getChipList()); + break; + } case DATA_NOT_SET: { break; @@ -2419,7 +2899,7 @@ public Builder mergeFrom( case 64: { horizontalAlignment_ = input.readEnum(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; break; } // case 64 case 74: @@ -2440,6 +2920,18 @@ public Builder mergeFrom( dataCase_ = 11; break; } // case 90 + case 106: + { + input.readMessage(getCarouselFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage(getChipListFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 14; + break; + } // case 114 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2490,7 +2982,7 @@ public Builder clearData() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -2520,7 +3012,7 @@ public boolean hasTextParagraph() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -2560,7 +3052,7 @@ public com.google.apps.card.v1.TextParagraph getTextParagraph() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -2597,7 +3089,7 @@ public Builder setTextParagraph(com.google.apps.card.v1.TextParagraph value) { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -2631,7 +3123,7 @@ public Builder setTextParagraph(com.google.apps.card.v1.TextParagraph.Builder bu * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -2677,7 +3169,7 @@ public Builder mergeTextParagraph(com.google.apps.card.v1.TextParagraph value) { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -2717,7 +3209,7 @@ public Builder clearTextParagraph() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -2744,7 +3236,7 @@ public com.google.apps.card.v1.TextParagraph.Builder getTextParagraphBuilder() { * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -2779,7 +3271,7 @@ public com.google.apps.card.v1.TextParagraphOrBuilder getTextParagraphOrBuilder( * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -3516,7 +4008,6 @@ public com.google.apps.card.v1.DecoratedTextOrBuilder getDecoratedTextOrBuilder( * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -3563,7 +4054,6 @@ public boolean hasButtonList() { * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -3620,7 +4110,6 @@ public com.google.apps.card.v1.ButtonList getButtonList() { * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -3674,7 +4163,6 @@ public Builder setButtonList(com.google.apps.card.v1.ButtonList value) { * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -3725,7 +4213,6 @@ public Builder setButtonList(com.google.apps.card.v1.ButtonList.Builder builderF * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -3788,7 +4275,6 @@ public Builder mergeButtonList(com.google.apps.card.v1.ButtonList value) { * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -3845,7 +4331,6 @@ public Builder clearButtonList() { * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -3889,7 +4374,6 @@ public com.google.apps.card.v1.ButtonList.Builder getButtonListBuilder() { * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -3941,7 +4425,6 @@ public com.google.apps.card.v1.ButtonListOrBuilder getButtonListOrBuilder() { * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -5057,7 +5540,7 @@ public com.google.apps.card.v1.SelectionInputOrBuilder getSelectionInputOrBuilde * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -5086,7 +5569,7 @@ public boolean hasDateTimePicker() { * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -5125,7 +5608,7 @@ public com.google.apps.card.v1.DateTimePicker getDateTimePicker() { * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -5161,7 +5644,7 @@ public Builder setDateTimePicker(com.google.apps.card.v1.DateTimePicker value) { * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -5195,7 +5678,7 @@ public Builder setDateTimePicker( * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -5241,7 +5724,7 @@ public Builder mergeDateTimePicker(com.google.apps.card.v1.DateTimePicker value) * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -5280,7 +5763,7 @@ public Builder clearDateTimePicker() { * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -5306,7 +5789,7 @@ public com.google.apps.card.v1.DateTimePicker.Builder getDateTimePickerBuilder() * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -5340,7 +5823,7 @@ public com.google.apps.card.v1.DateTimePickerOrBuilder getDateTimePickerOrBuilde * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -5653,7 +6136,7 @@ public com.google.apps.card.v1.DividerOrBuilder getDividerOrBuilder() { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -5711,7 +6194,7 @@ public boolean hasGrid() { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -5779,7 +6262,7 @@ public com.google.apps.card.v1.Grid getGrid() { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -5844,7 +6327,7 @@ public Builder setGrid(com.google.apps.card.v1.Grid value) { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -5906,7 +6389,7 @@ public Builder setGrid(com.google.apps.card.v1.Grid.Builder builderForValue) { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -5979,7 +6462,7 @@ public Builder mergeGrid(com.google.apps.card.v1.Grid value) { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -6047,7 +6530,7 @@ public Builder clearGrid() { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -6102,7 +6585,7 @@ public com.google.apps.card.v1.Grid.Builder getGridBuilder() { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -6165,7 +6648,7 @@ public com.google.apps.card.v1.GridOrBuilder getGridOrBuilder() { * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -6764,6 +7247,828 @@ public com.google.apps.card.v1.ColumnsOrBuilder getColumnsOrBuilder() { return columnsBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Carousel, + com.google.apps.card.v1.Carousel.Builder, + com.google.apps.card.v1.CarouselOrBuilder> + carouselBuilder_; + + /** + * + * + *
+     * A carousel contains a collection of nested widgets.
+     * For example, this is a JSON representation of a carousel that contains
+     * two text paragraphs.
+     *
+     * ```
+     * {
+     *   "widgets": [
+     *     {
+     *       "textParagraph": {
+     *         "text": "First text paragraph in the carousel."
+     *       }
+     *     },
+     *     {
+     *       "textParagraph": {
+     *         "text": "Second text paragraph in the carousel."
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + * + * @return Whether the carousel field is set. + */ + @java.lang.Override + public boolean hasCarousel() { + return dataCase_ == 13; + } + + /** + * + * + *
+     * A carousel contains a collection of nested widgets.
+     * For example, this is a JSON representation of a carousel that contains
+     * two text paragraphs.
+     *
+     * ```
+     * {
+     *   "widgets": [
+     *     {
+     *       "textParagraph": {
+     *         "text": "First text paragraph in the carousel."
+     *       }
+     *     },
+     *     {
+     *       "textParagraph": {
+     *         "text": "Second text paragraph in the carousel."
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + * + * @return The carousel. + */ + @java.lang.Override + public com.google.apps.card.v1.Carousel getCarousel() { + if (carouselBuilder_ == null) { + if (dataCase_ == 13) { + return (com.google.apps.card.v1.Carousel) data_; + } + return com.google.apps.card.v1.Carousel.getDefaultInstance(); + } else { + if (dataCase_ == 13) { + return carouselBuilder_.getMessage(); + } + return com.google.apps.card.v1.Carousel.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A carousel contains a collection of nested widgets.
+     * For example, this is a JSON representation of a carousel that contains
+     * two text paragraphs.
+     *
+     * ```
+     * {
+     *   "widgets": [
+     *     {
+     *       "textParagraph": {
+     *         "text": "First text paragraph in the carousel."
+     *       }
+     *     },
+     *     {
+     *       "textParagraph": {
+     *         "text": "Second text paragraph in the carousel."
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + */ + public Builder setCarousel(com.google.apps.card.v1.Carousel value) { + if (carouselBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + carouselBuilder_.setMessage(value); + } + dataCase_ = 13; + return this; + } + + /** + * + * + *
+     * A carousel contains a collection of nested widgets.
+     * For example, this is a JSON representation of a carousel that contains
+     * two text paragraphs.
+     *
+     * ```
+     * {
+     *   "widgets": [
+     *     {
+     *       "textParagraph": {
+     *         "text": "First text paragraph in the carousel."
+     *       }
+     *     },
+     *     {
+     *       "textParagraph": {
+     *         "text": "Second text paragraph in the carousel."
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + */ + public Builder setCarousel(com.google.apps.card.v1.Carousel.Builder builderForValue) { + if (carouselBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + carouselBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 13; + return this; + } + + /** + * + * + *
+     * A carousel contains a collection of nested widgets.
+     * For example, this is a JSON representation of a carousel that contains
+     * two text paragraphs.
+     *
+     * ```
+     * {
+     *   "widgets": [
+     *     {
+     *       "textParagraph": {
+     *         "text": "First text paragraph in the carousel."
+     *       }
+     *     },
+     *     {
+     *       "textParagraph": {
+     *         "text": "Second text paragraph in the carousel."
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + */ + public Builder mergeCarousel(com.google.apps.card.v1.Carousel value) { + if (carouselBuilder_ == null) { + if (dataCase_ == 13 && data_ != com.google.apps.card.v1.Carousel.getDefaultInstance()) { + data_ = + com.google.apps.card.v1.Carousel.newBuilder((com.google.apps.card.v1.Carousel) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 13) { + carouselBuilder_.mergeFrom(value); + } else { + carouselBuilder_.setMessage(value); + } + } + dataCase_ = 13; + return this; + } + + /** + * + * + *
+     * A carousel contains a collection of nested widgets.
+     * For example, this is a JSON representation of a carousel that contains
+     * two text paragraphs.
+     *
+     * ```
+     * {
+     *   "widgets": [
+     *     {
+     *       "textParagraph": {
+     *         "text": "First text paragraph in the carousel."
+     *       }
+     *     },
+     *     {
+     *       "textParagraph": {
+     *         "text": "Second text paragraph in the carousel."
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + */ + public Builder clearCarousel() { + if (carouselBuilder_ == null) { + if (dataCase_ == 13) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 13) { + dataCase_ = 0; + data_ = null; + } + carouselBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A carousel contains a collection of nested widgets.
+     * For example, this is a JSON representation of a carousel that contains
+     * two text paragraphs.
+     *
+     * ```
+     * {
+     *   "widgets": [
+     *     {
+     *       "textParagraph": {
+     *         "text": "First text paragraph in the carousel."
+     *       }
+     *     },
+     *     {
+     *       "textParagraph": {
+     *         "text": "Second text paragraph in the carousel."
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + */ + public com.google.apps.card.v1.Carousel.Builder getCarouselBuilder() { + return getCarouselFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A carousel contains a collection of nested widgets.
+     * For example, this is a JSON representation of a carousel that contains
+     * two text paragraphs.
+     *
+     * ```
+     * {
+     *   "widgets": [
+     *     {
+     *       "textParagraph": {
+     *         "text": "First text paragraph in the carousel."
+     *       }
+     *     },
+     *     {
+     *       "textParagraph": {
+     *         "text": "Second text paragraph in the carousel."
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + */ + @java.lang.Override + public com.google.apps.card.v1.CarouselOrBuilder getCarouselOrBuilder() { + if ((dataCase_ == 13) && (carouselBuilder_ != null)) { + return carouselBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 13) { + return (com.google.apps.card.v1.Carousel) data_; + } + return com.google.apps.card.v1.Carousel.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A carousel contains a collection of nested widgets.
+     * For example, this is a JSON representation of a carousel that contains
+     * two text paragraphs.
+     *
+     * ```
+     * {
+     *   "widgets": [
+     *     {
+     *       "textParagraph": {
+     *         "text": "First text paragraph in the carousel."
+     *       }
+     *     },
+     *     {
+     *       "textParagraph": {
+     *         "text": "Second text paragraph in the carousel."
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Carousel, + com.google.apps.card.v1.Carousel.Builder, + com.google.apps.card.v1.CarouselOrBuilder> + getCarouselFieldBuilder() { + if (carouselBuilder_ == null) { + if (!(dataCase_ == 13)) { + data_ = com.google.apps.card.v1.Carousel.getDefaultInstance(); + } + carouselBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.Carousel, + com.google.apps.card.v1.Carousel.Builder, + com.google.apps.card.v1.CarouselOrBuilder>( + (com.google.apps.card.v1.Carousel) data_, getParentForChildren(), isClean()); + data_ = null; + } + dataCase_ = 13; + onChanged(); + return carouselBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.ChipList, + com.google.apps.card.v1.ChipList.Builder, + com.google.apps.card.v1.ChipListOrBuilder> + chipListBuilder_; + + /** + * + * + *
+     * A list of chips.
+     *
+     * For example, the following JSON creates two chips. The first
+     * is a text chip and the second is an icon chip that opens a
+     * link:
+     * ```
+     * "chipList": {
+     *   "chips": [
+     *     {
+     *       "text": "Edit",
+     *       "disabled": true,
+     *     },
+     *     {
+     *       "icon": {
+     *         "knownIcon": "INVITE",
+     *         "altText": "check calendar"
+     *       },
+     *       "onClick": {
+     *         "openLink": {
+     *           "url": "https://example.com/calendar"
+     *         }
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + * + * @return Whether the chipList field is set. + */ + @java.lang.Override + public boolean hasChipList() { + return dataCase_ == 14; + } + + /** + * + * + *
+     * A list of chips.
+     *
+     * For example, the following JSON creates two chips. The first
+     * is a text chip and the second is an icon chip that opens a
+     * link:
+     * ```
+     * "chipList": {
+     *   "chips": [
+     *     {
+     *       "text": "Edit",
+     *       "disabled": true,
+     *     },
+     *     {
+     *       "icon": {
+     *         "knownIcon": "INVITE",
+     *         "altText": "check calendar"
+     *       },
+     *       "onClick": {
+     *         "openLink": {
+     *           "url": "https://example.com/calendar"
+     *         }
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + * + * @return The chipList. + */ + @java.lang.Override + public com.google.apps.card.v1.ChipList getChipList() { + if (chipListBuilder_ == null) { + if (dataCase_ == 14) { + return (com.google.apps.card.v1.ChipList) data_; + } + return com.google.apps.card.v1.ChipList.getDefaultInstance(); + } else { + if (dataCase_ == 14) { + return chipListBuilder_.getMessage(); + } + return com.google.apps.card.v1.ChipList.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A list of chips.
+     *
+     * For example, the following JSON creates two chips. The first
+     * is a text chip and the second is an icon chip that opens a
+     * link:
+     * ```
+     * "chipList": {
+     *   "chips": [
+     *     {
+     *       "text": "Edit",
+     *       "disabled": true,
+     *     },
+     *     {
+     *       "icon": {
+     *         "knownIcon": "INVITE",
+     *         "altText": "check calendar"
+     *       },
+     *       "onClick": {
+     *         "openLink": {
+     *           "url": "https://example.com/calendar"
+     *         }
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + */ + public Builder setChipList(com.google.apps.card.v1.ChipList value) { + if (chipListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + chipListBuilder_.setMessage(value); + } + dataCase_ = 14; + return this; + } + + /** + * + * + *
+     * A list of chips.
+     *
+     * For example, the following JSON creates two chips. The first
+     * is a text chip and the second is an icon chip that opens a
+     * link:
+     * ```
+     * "chipList": {
+     *   "chips": [
+     *     {
+     *       "text": "Edit",
+     *       "disabled": true,
+     *     },
+     *     {
+     *       "icon": {
+     *         "knownIcon": "INVITE",
+     *         "altText": "check calendar"
+     *       },
+     *       "onClick": {
+     *         "openLink": {
+     *           "url": "https://example.com/calendar"
+     *         }
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + */ + public Builder setChipList(com.google.apps.card.v1.ChipList.Builder builderForValue) { + if (chipListBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + chipListBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 14; + return this; + } + + /** + * + * + *
+     * A list of chips.
+     *
+     * For example, the following JSON creates two chips. The first
+     * is a text chip and the second is an icon chip that opens a
+     * link:
+     * ```
+     * "chipList": {
+     *   "chips": [
+     *     {
+     *       "text": "Edit",
+     *       "disabled": true,
+     *     },
+     *     {
+     *       "icon": {
+     *         "knownIcon": "INVITE",
+     *         "altText": "check calendar"
+     *       },
+     *       "onClick": {
+     *         "openLink": {
+     *           "url": "https://example.com/calendar"
+     *         }
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + */ + public Builder mergeChipList(com.google.apps.card.v1.ChipList value) { + if (chipListBuilder_ == null) { + if (dataCase_ == 14 && data_ != com.google.apps.card.v1.ChipList.getDefaultInstance()) { + data_ = + com.google.apps.card.v1.ChipList.newBuilder((com.google.apps.card.v1.ChipList) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 14) { + chipListBuilder_.mergeFrom(value); + } else { + chipListBuilder_.setMessage(value); + } + } + dataCase_ = 14; + return this; + } + + /** + * + * + *
+     * A list of chips.
+     *
+     * For example, the following JSON creates two chips. The first
+     * is a text chip and the second is an icon chip that opens a
+     * link:
+     * ```
+     * "chipList": {
+     *   "chips": [
+     *     {
+     *       "text": "Edit",
+     *       "disabled": true,
+     *     },
+     *     {
+     *       "icon": {
+     *         "knownIcon": "INVITE",
+     *         "altText": "check calendar"
+     *       },
+     *       "onClick": {
+     *         "openLink": {
+     *           "url": "https://example.com/calendar"
+     *         }
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + */ + public Builder clearChipList() { + if (chipListBuilder_ == null) { + if (dataCase_ == 14) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 14) { + dataCase_ = 0; + data_ = null; + } + chipListBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of chips.
+     *
+     * For example, the following JSON creates two chips. The first
+     * is a text chip and the second is an icon chip that opens a
+     * link:
+     * ```
+     * "chipList": {
+     *   "chips": [
+     *     {
+     *       "text": "Edit",
+     *       "disabled": true,
+     *     },
+     *     {
+     *       "icon": {
+     *         "knownIcon": "INVITE",
+     *         "altText": "check calendar"
+     *       },
+     *       "onClick": {
+     *         "openLink": {
+     *           "url": "https://example.com/calendar"
+     *         }
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + */ + public com.google.apps.card.v1.ChipList.Builder getChipListBuilder() { + return getChipListFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A list of chips.
+     *
+     * For example, the following JSON creates two chips. The first
+     * is a text chip and the second is an icon chip that opens a
+     * link:
+     * ```
+     * "chipList": {
+     *   "chips": [
+     *     {
+     *       "text": "Edit",
+     *       "disabled": true,
+     *     },
+     *     {
+     *       "icon": {
+     *         "knownIcon": "INVITE",
+     *         "altText": "check calendar"
+     *       },
+     *       "onClick": {
+     *         "openLink": {
+     *           "url": "https://example.com/calendar"
+     *         }
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + */ + @java.lang.Override + public com.google.apps.card.v1.ChipListOrBuilder getChipListOrBuilder() { + if ((dataCase_ == 14) && (chipListBuilder_ != null)) { + return chipListBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 14) { + return (com.google.apps.card.v1.ChipList) data_; + } + return com.google.apps.card.v1.ChipList.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A list of chips.
+     *
+     * For example, the following JSON creates two chips. The first
+     * is a text chip and the second is an icon chip that opens a
+     * link:
+     * ```
+     * "chipList": {
+     *   "chips": [
+     *     {
+     *       "text": "Edit",
+     *       "disabled": true,
+     *     },
+     *     {
+     *       "icon": {
+     *         "knownIcon": "INVITE",
+     *         "altText": "check calendar"
+     *       },
+     *       "onClick": {
+     *         "openLink": {
+     *           "url": "https://example.com/calendar"
+     *         }
+     *       }
+     *     }
+     *   ]
+     * }
+     * ```
+     * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.ChipList, + com.google.apps.card.v1.ChipList.Builder, + com.google.apps.card.v1.ChipListOrBuilder> + getChipListFieldBuilder() { + if (chipListBuilder_ == null) { + if (!(dataCase_ == 14)) { + data_ = com.google.apps.card.v1.ChipList.getDefaultInstance(); + } + chipListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.apps.card.v1.ChipList, + com.google.apps.card.v1.ChipList.Builder, + com.google.apps.card.v1.ChipListOrBuilder>( + (com.google.apps.card.v1.ChipList) data_, getParentForChildren(), isClean()); + data_ = null; + } + dataCase_ = 14; + onChanged(); + return chipListBuilder_; + } + private int horizontalAlignment_ = 0; /** @@ -6796,7 +8101,7 @@ public int getHorizontalAlignmentValue() { */ public Builder setHorizontalAlignmentValue(int value) { horizontalAlignment_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -6838,7 +8143,7 @@ public Builder setHorizontalAlignment( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; horizontalAlignment_ = value.getNumber(); onChanged(); return this; @@ -6856,7 +8161,7 @@ public Builder setHorizontalAlignment( * @return This builder for chaining. */ public Builder clearHorizontalAlignment() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00001000); horizontalAlignment_ = 0; onChanged(); return this; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/WidgetOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/WidgetOrBuilder.java index 2d625c0797..18570d6208 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/WidgetOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/apps/card/v1/WidgetOrBuilder.java @@ -35,7 +35,7 @@ public interface WidgetOrBuilder * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -62,7 +62,7 @@ public interface WidgetOrBuilder * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -89,7 +89,7 @@ public interface WidgetOrBuilder * and * [Formatting * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). * * For example, the following JSON creates a bolded text: * ``` @@ -279,7 +279,6 @@ public interface WidgetOrBuilder * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -323,7 +322,6 @@ public interface WidgetOrBuilder * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -367,7 +365,6 @@ public interface WidgetOrBuilder * "red": 0, * "green": 0, * "blue": 1, - * "alpha": 1 * }, * "disabled": true, * }, @@ -687,7 +684,7 @@ public interface WidgetOrBuilder * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -713,7 +710,7 @@ public interface WidgetOrBuilder * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -739,7 +736,7 @@ public interface WidgetOrBuilder * "name": "appointment_time", * "label": "Book your appointment at:", * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" + * "valueMsEpoch": 796435200000 * } * ``` * @@ -814,7 +811,7 @@ public interface WidgetOrBuilder * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -869,7 +866,7 @@ public interface WidgetOrBuilder * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -924,7 +921,7 @@ public interface WidgetOrBuilder * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 * items and 2 columns has 6 rows. * - * [Google Workspace Add-ons and + * [Google Workspace add-ons and * Chat apps](https://developers.google.com/workspace/extend): * * For example, the following JSON creates a 2 column grid with a single @@ -1111,6 +1108,212 @@ public interface WidgetOrBuilder */ com.google.apps.card.v1.ColumnsOrBuilder getColumnsOrBuilder(); + /** + * + * + *
+   * A carousel contains a collection of nested widgets.
+   * For example, this is a JSON representation of a carousel that contains
+   * two text paragraphs.
+   *
+   * ```
+   * {
+   *   "widgets": [
+   *     {
+   *       "textParagraph": {
+   *         "text": "First text paragraph in the carousel."
+   *       }
+   *     },
+   *     {
+   *       "textParagraph": {
+   *         "text": "Second text paragraph in the carousel."
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + * + * @return Whether the carousel field is set. + */ + boolean hasCarousel(); + + /** + * + * + *
+   * A carousel contains a collection of nested widgets.
+   * For example, this is a JSON representation of a carousel that contains
+   * two text paragraphs.
+   *
+   * ```
+   * {
+   *   "widgets": [
+   *     {
+   *       "textParagraph": {
+   *         "text": "First text paragraph in the carousel."
+   *       }
+   *     },
+   *     {
+   *       "textParagraph": {
+   *         "text": "Second text paragraph in the carousel."
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + * + * @return The carousel. + */ + com.google.apps.card.v1.Carousel getCarousel(); + + /** + * + * + *
+   * A carousel contains a collection of nested widgets.
+   * For example, this is a JSON representation of a carousel that contains
+   * two text paragraphs.
+   *
+   * ```
+   * {
+   *   "widgets": [
+   *     {
+   *       "textParagraph": {
+   *         "text": "First text paragraph in the carousel."
+   *       }
+   *     },
+   *     {
+   *       "textParagraph": {
+   *         "text": "Second text paragraph in the carousel."
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.apps.card.v1.Carousel carousel = 13; + */ + com.google.apps.card.v1.CarouselOrBuilder getCarouselOrBuilder(); + + /** + * + * + *
+   * A list of chips.
+   *
+   * For example, the following JSON creates two chips. The first
+   * is a text chip and the second is an icon chip that opens a
+   * link:
+   * ```
+   * "chipList": {
+   *   "chips": [
+   *     {
+   *       "text": "Edit",
+   *       "disabled": true,
+   *     },
+   *     {
+   *       "icon": {
+   *         "knownIcon": "INVITE",
+   *         "altText": "check calendar"
+   *       },
+   *       "onClick": {
+   *         "openLink": {
+   *           "url": "https://example.com/calendar"
+   *         }
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + * + * @return Whether the chipList field is set. + */ + boolean hasChipList(); + + /** + * + * + *
+   * A list of chips.
+   *
+   * For example, the following JSON creates two chips. The first
+   * is a text chip and the second is an icon chip that opens a
+   * link:
+   * ```
+   * "chipList": {
+   *   "chips": [
+   *     {
+   *       "text": "Edit",
+   *       "disabled": true,
+   *     },
+   *     {
+   *       "icon": {
+   *         "knownIcon": "INVITE",
+   *         "altText": "check calendar"
+   *       },
+   *       "onClick": {
+   *         "openLink": {
+   *           "url": "https://example.com/calendar"
+   *         }
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + * + * @return The chipList. + */ + com.google.apps.card.v1.ChipList getChipList(); + + /** + * + * + *
+   * A list of chips.
+   *
+   * For example, the following JSON creates two chips. The first
+   * is a text chip and the second is an icon chip that opens a
+   * link:
+   * ```
+   * "chipList": {
+   *   "chips": [
+   *     {
+   *       "text": "Edit",
+   *       "disabled": true,
+   *     },
+   *     {
+   *       "icon": {
+   *         "knownIcon": "INVITE",
+   *         "altText": "check calendar"
+   *       },
+   *       "onClick": {
+   *         "openLink": {
+   *           "url": "https://example.com/calendar"
+   *         }
+   *       }
+   *     }
+   *   ]
+   * }
+   * ```
+   * 
+ * + * .google.apps.card.v1.ChipList chip_list = 14; + */ + com.google.apps.card.v1.ChipListOrBuilder getChipListOrBuilder(); + /** * * diff --git a/java-common-protos/proto-google-common-protos/src/main/proto/google/apps/card/v1/card.proto b/java-common-protos/proto-google-common-protos/src/main/proto/google/apps/card/v1/card.proto index cbeda8e6e7..f70c68c291 100644 --- a/java-common-protos/proto-google-common-protos/src/main/proto/google/apps/card/v1/card.proto +++ b/java-common-protos/proto-google-common-protos/src/main/proto/google/apps/card/v1/card.proto @@ -27,7 +27,7 @@ option php_namespace = "Google\\Apps\\Card\\V1"; option ruby_package = "Google::Apps::Card::V1"; // A card interface displayed in a Google Chat message or Google Workspace -// Add-on. +// add-on. // // Cards support a defined layout, interactive UI elements like buttons, and // rich media like images. Use cards to present detailed information, @@ -40,9 +40,13 @@ option ruby_package = "Google::Apps::Card::V1"; // // * For Google Chat apps, see [Design the components of a card or // dialog](https://developers.google.com/workspace/chat/design-components-card-dialog). -// * For Google Workspace Add-ons, see [Card-based +// * For Google Workspace add-ons, see [Card-based // interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards). // +// Note: You can add up to 100 widgets per card. Any widgets beyond this +// limit are ignored. This limit applies to both card messages and dialogs +// in Google Chat apps, and to cards in Google Workspace add-ons. +// // **Example: Card message for a Google Chat app** // // ![Example contact @@ -134,7 +138,7 @@ message Card { // Represents a card header. For an example in Google Chat apps, see [Add a // header](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header). // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message CardHeader { // Required. The title of the card header. @@ -149,7 +153,7 @@ message Card { // The shape used to crop the image. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): Widget.ImageType image_type = 3; @@ -163,7 +167,7 @@ message Card { // A section contains a collection of widgets that are rendered // vertically in the order that they're specified. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message Section { // Text that appears at the top of a section. @@ -174,7 +178,7 @@ message Card { // and // [Formatting // text in Google Workspace - // Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + // add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). string header = 1; // All the widgets in the section. @@ -200,21 +204,27 @@ message Card { // by default. The `uncollapsibleWidgetsCount` is taken into account only // when `collapsible` is `true`. int32 uncollapsible_widgets_count = 6; + + // Optional. Define the expand and collapse button of the section. + // This button will be shown only if the section is collapsible. + // If this field isn't set, the default button is used. + CollapseControl collapse_control = 8; } // The divider style of a card. Currently only used for dividers betweens card // sections. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum DividerStyle { // Don't use. Unspecified. DIVIDER_STYLE_UNSPECIFIED = 0; - // Default option. Render a solid divider between sections. + // Default option. Render a solid divider. SOLID_DIVIDER = 1; - // If set, no divider is rendered between sections. + // If set, no divider is rendered. This style completely removes the divider + // from the layout. The result is equivalent to not adding a divider at all. NO_DIVIDER = 2; } @@ -223,7 +233,7 @@ message Card { // invoice, or open the invoice in a browser. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): message CardAction { // The label that displays as the action menu item. string action_label = 1; @@ -232,6 +242,22 @@ message Card { OnClick on_click = 2; } + // A list of widgets that can be displayed in a containing layout, such + // as a `CarouselCard`. + // [Google Chat apps](https://developers.google.com/workspace/chat): + message NestedWidget { + oneof data { + // A text paragraph widget. + TextParagraph text_paragraph = 1; + + // A button list widget. + ButtonList button_list = 3; + + // An image widget. + Image image = 10; + } + } + // A persistent (sticky) footer that that appears at the bottom of the card. // // Setting `fixedFooter` without specifying a `primaryButton` or a @@ -244,7 +270,7 @@ message Card { // For an example in Google Chat apps, see [Add a persistent // footer](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer). // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message CardFixedFooter { // The primary button of the fixed footer. The button must be a text button @@ -257,11 +283,11 @@ message Card { Button secondary_button = 2; } - // In Google Workspace Add-ons, + // In Google Workspace add-ons, // determines how a card is displayed. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): enum DisplayStyle { // Don't use. Unspecified. DISPLAY_STYLE_UNSPECIFIED = 0; @@ -287,13 +313,13 @@ message Card { // card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). repeated Section sections = 2; - // The divider style between sections. + // The divider style between the header, sections and footer. DividerStyle section_divider_style = 9; // The card's actions. Actions are added to the card's toolbar menu. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): // // For example, the following JSON constructs a card action menu with // `Settings` and `Send Feedback` options: @@ -330,7 +356,7 @@ message Card { // Name of the card. Used as a card identifier in card navigation. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): string name = 4; // The fixed footer shown at the bottom of this card. @@ -342,15 +368,15 @@ message Card { // [card // messages](https://developers.google.com/workspace/chat/create-messages#create). // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): CardFixedFooter fixed_footer = 5; - // In Google Workspace Add-ons, sets the display properties of the + // In Google Workspace add-ons, sets the display properties of the // `peekCardHeader`. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): DisplayStyle display_style = 6; // When displaying contextual content, the peek card header acts as a @@ -358,7 +384,7 @@ message Card { // cards and the contextual cards. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): CardHeader peek_card_header = 7; } @@ -369,7 +395,7 @@ message Card { message Widget { // The shape used to crop the image. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum ImageType { // Default value. Applies a square mask to the image. For example, a 4x3 @@ -402,6 +428,21 @@ message Widget { END = 3; } + // Represents vertical alignment attribute. + enum VerticalAlignment { + // Unspecified type. Do not use. + VERTICAL_ALIGNMENT_UNSPECIFIED = 0; + + // Alignment to the top position. + TOP = 1; + + // Alignment to the middle position. + MIDDLE = 2; + + // Alignment to the bottom position. + BOTTOM = 3; + } + // A widget can only have one of the following items. You can use multiple // widget fields to display more items. oneof data { @@ -412,7 +453,7 @@ message Widget { // and // [Formatting // text in Google Workspace - // Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + // add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). // // For example, the following JSON creates a bolded text: // ``` @@ -470,7 +511,6 @@ message Widget { // "red": 0, // "green": 0, // "blue": 1, - // "alpha": 1 // }, // "disabled": true, // }, @@ -576,7 +616,7 @@ message Widget { // "name": "appointment_time", // "label": "Book your appointment at:", // "type": "DATE_AND_TIME", - // "valueMsEpoch": "796435200000" + // "valueMsEpoch": 796435200000 // } // ``` DateTimePicker date_time_picker = 7; @@ -597,7 +637,7 @@ message Widget { // of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 // items and 2 columns has 6 rows. // - // [Google Workspace Add-ons and + // [Google Workspace add-ons and // Chat apps](https://developers.google.com/workspace/extend): // // For example, the following JSON creates a 2 column grid with a single @@ -673,6 +713,56 @@ message Widget { // } // ``` Columns columns = 11; + + // A carousel contains a collection of nested widgets. + // For example, this is a JSON representation of a carousel that contains + // two text paragraphs. + // + // ``` + // { + // "widgets": [ + // { + // "textParagraph": { + // "text": "First text paragraph in the carousel." + // } + // }, + // { + // "textParagraph": { + // "text": "Second text paragraph in the carousel." + // } + // } + // ] + // } + // ``` + Carousel carousel = 13; + + // A list of chips. + // + // For example, the following JSON creates two chips. The first + // is a text chip and the second is an icon chip that opens a + // link: + // ``` + // "chipList": { + // "chips": [ + // { + // "text": "Edit", + // "disabled": true, + // }, + // { + // "icon": { + // "knownIcon": "INVITE", + // "altText": "check calendar" + // }, + // "onClick": { + // "openLink": { + // "url": "https://example.com/calendar" + // } + // } + // } + // ] + // } + // ``` + ChipList chip_list = 14; } // Specifies whether widgets align to the left, right, or center of a column. @@ -689,20 +779,49 @@ message Widget { // and // [Formatting // text in Google Workspace -// Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). +// add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). // -// [Google Workspace Add-ons and +// [Google Workspace add-ons and // Chat apps](https://developers.google.com/workspace/extend): message TextParagraph { + // Syntax to use for formatting text. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + enum TextSyntax { + // The text is rendered as HTML if unspecified. + TEXT_SYNTAX_UNSPECIFIED = 0; + + // The text is rendered as HTML. This is the default value. + HTML = 1; + + // The text is rendered as Markdown. + MARKDOWN = 2; + } + // The text that's shown in the widget. string text = 1; + + // The maximum number of lines of text that are displayed in the widget. If + // the text exceeds the specified maximum number of lines, the excess + // content is concealed behind a **show more** button. If the text is equal or + // shorter than the specified maximum number of lines, a **show more** button + // isn't displayed. + // + // The default value is 0, in which case + // all context is displayed. Negative values are ignored. + int32 max_lines = 2; + + // The syntax of the text. If not set, the text is rendered as HTML. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + TextSyntax text_syntax = 4; } // An image that is specified by a URL and can have an `onClick` action. For an // example, see [Add an // image](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image). // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message Image { // The HTTPS URL that hosts the image. @@ -726,7 +845,7 @@ message Image { // [Add a horizontal divider between // widgets](https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets). // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): // // For example, the following JSON creates a divider: @@ -742,19 +861,19 @@ message Divider {} // Google Chat apps, see [Display text with decorative // text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements). // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message DecoratedText { // Either a toggle-style switch or a checkbox inside a `decoratedText` widget. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): // // Only supported in the `decoratedText` widget. message SwitchControl { // How the switch appears in the user interface. // - // [Google Workspace Add-ons + // [Google Workspace add-ons // and Chat apps](https://developers.google.com/workspace/extend): enum ControlType { // A toggle-style switch. @@ -788,7 +907,7 @@ message DecoratedText { // How the switch appears in the user interface. // - // [Google Workspace Add-ons + // [Google Workspace add-ons // and Chat apps](https://developers.google.com/workspace/extend): ControlType control_type = 5; } @@ -799,9 +918,21 @@ message DecoratedText { // The icon displayed in front of the text. Icon start_icon = 12; + // Optional. Vertical alignment of the start icon. If not set, the icon + // will be vertically centered. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + Widget.VerticalAlignment start_icon_vertical_alignment = 13; + // The text that appears above `text`. Always truncates. string top_label = 3; + // `TextParagraph` equivalent of `top_label`. Always truncates. Allows for + // more complex formatting than `top_label`. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + TextParagraph top_label_text = 17; + // Required. The primary text. // // Supports simple formatting. For more information @@ -811,9 +942,15 @@ message DecoratedText { // and // [Formatting // text in Google Workspace - // Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + // add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). string text = 4; + // `TextParagraph` equivalent of `text`. Allows for more complex formatting + // than `text`. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + TextParagraph content_text = 18; + // The wrap text setting. If `true`, the text wraps and displays on // multiple lines. Otherwise, the text is truncated. // @@ -823,6 +960,12 @@ message DecoratedText { // The text that appears below `text`. Always wraps. string bottom_label = 6; + // `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for + // more complex formatting than `bottom_label`. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + TextParagraph bottom_label_text = 19; + // This action is triggered when users click `topLabel` or `bottomLabel`. OnClick on_click = 7; @@ -848,8 +991,11 @@ message DecoratedText { } // A field in which users can enter text. Supports suggestions and on-change -// actions. For an example in Google Chat apps, see [Add a field in which a user -// can enter +// actions. +// Supports form submission validation. When `Action.all_widgets_are_required` +// is set to `true` or this widget is specified in `Action.required_widgets`, +// the submission action is blocked unless a value is entered. For an example in +// Google Chat apps, see [Add a field in which a user can enter // text](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text). // // Chat apps receive and can process the value of entered text during form input @@ -860,7 +1006,7 @@ message DecoratedText { // use a text input. To collect defined or enumerated data from users, use the // [SelectionInput][google.apps.card.v1.SelectionInput] widget. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message TextInput { // How a text input field appears in the user interface. For example, @@ -868,7 +1014,7 @@ message TextInput { // `initialSuggestions` is specified, `type` is always `SINGLE_LINE`, // even if it's set to `MULTIPLE_LINE`. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum Type { // The text input field has a fixed height of one line. @@ -934,7 +1080,7 @@ message TextInput { // to `MULTIPLE_LINE`. // // [Google Workspace - // Add-ons and Chat apps](https://developers.google.com/workspace/extend): + // add-ons and Chat apps](https://developers.google.com/workspace/extend): Suggestions initial_suggestions = 7; // Optional. Specify what action to take when the text input field provides @@ -947,9 +1093,15 @@ message TextInput { // a custom function. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): Action auto_complete_action = 8; + // Specify the input format validation necessary for this text field. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + Validation validation = 11; + // Text that appears in the text input field when the field is empty. // Use this text to prompt users to enter a value. For example, `Enter a // number from 0 to 100`. @@ -975,11 +1127,11 @@ message TextInput { // to `MULTIPLE_LINE`. // // [Google Workspace -// Add-ons and Chat apps](https://developers.google.com/workspace/extend): +// add-ons and Chat apps](https://developers.google.com/workspace/extend): message Suggestions { // One suggested value that users can enter in a text input field. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message SuggestionItem { oneof content { @@ -999,7 +1151,7 @@ message Suggestions { // [Add a // button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button). // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message ButtonList { // An array of buttons. @@ -1007,9 +1159,12 @@ message ButtonList { } // A widget that creates one or more UI items that users can select. -// For example, a dropdown menu or checkboxes. You can use this widget to -// collect data that can be predicted or enumerated. For an example in Google -// Chat apps, see [Add selectable UI +// Supports form submission validation for `dropdown` and `multiselect` menus +// only. When `Action.all_widgets_are_required` is set to `true` or this widget +// is specified in `Action.required_widgets`, the submission action is blocked +// unless a value is selected. For example, a dropdown menu or checkboxes. You +// can use this widget to collect data that can be predicted or enumerated. For +// an example in Google Chat apps, see [Add selectable UI // elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements). // // Chat apps can process the value of items that users select or input. For @@ -1019,7 +1174,7 @@ message ButtonList { // To collect undefined or abstract data from users, use // the [TextInput][google.apps.card.v1.TextInput] widget. // -// [Google Workspace Add-ons +// [Google Workspace add-ons // and Chat apps](https://developers.google.com/workspace/extend): message SelectionInput { // The format for the items that users can select. Different options support @@ -1029,7 +1184,7 @@ message SelectionInput { // Each selection input supports one type of selection. Mixing checkboxes // and switches, for example, isn't supported. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum SelectionType { // A set of checkboxes. Users can select one or more checkboxes. @@ -1044,36 +1199,34 @@ message SelectionInput { // A dropdown menu. Users can select one item from the menu. DROPDOWN = 3; - // A multiselect menu for static or dynamic data. From the menu bar, - // users select one or more items. Users can also input values to populate - // dynamic data. For example, users can start typing the name of a Google - // Chat space and the widget autosuggests the space. + // A menu with a text box. Users can type and select one or more items. + // For Google Workspace add-ons, you must populate items using a static + // array of `SelectionItem` objects. // - // To populate items for a multiselect menu, you can use one of the - // following types of data sources: + // For Google Chat apps, you can also populate items using a dynamic data + // source and autosuggest items as users type in the menu. For example, + // users can start typing the name of a Google Chat space and the widget + // autosuggests the space. To dynamically populate items for a multiselect + // menu, use one of the following types of data sources: // - // * Static data: Items are specified as `SelectionItem` objects in the - // widget. Up to 100 items. // * Google Workspace data: Items are populated using data from Google // Workspace, such as Google Workspace users or Google Chat spaces. // * External data: Items are populated from an external data // source outside of Google Workspace. // - // For examples of how to implement multiselect menus, see + // For examples of how to implement multiselect menus for Chat apps, see // [Add a multiselect // menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu). // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): - // Multiselect for Google Workspace Add-ons are in - // Developer Preview. MULTI_SELECT = 4; } // An item that users can select in a selection input, such as a checkbox - // or switch. + // or switch. Supports up to 100 items. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message SelectionItem { // The text that identifies or describes the item to users. @@ -1095,7 +1248,9 @@ message SelectionInput { // the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` // URL. For example, // `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. - string start_icon_uri = 4; + oneof start_icon { + string start_icon_uri = 4; + } // For multiselect menus, a text description or label that's // displayed below the item's `text` field. @@ -1131,7 +1286,8 @@ message SelectionInput { } } - // The name that identifies the selection input in a form input event. + // Required. The name that identifies the selection input in a form input + // event. // // For details about working with form inputs, see [Receive form // data](https://developers.google.com/workspace/chat/read-form-data). @@ -1164,22 +1320,26 @@ message SelectionInput { // For multiselect menus, the maximum number of items that a user can select. // Minimum value is 1 item. If unspecified, defaults to 3 items. - int32 multi_select_max_selected_items = 6; + optional int32 multi_select_max_selected_items = 6; // For multiselect menus, the number of text characters that a user inputs - // before the app queries autocomplete and displays suggested items - // in the menu. + // before the menu returns suggested selection items. + // + // If unset, the multiselect menu uses the following default values: // - // If unspecified, defaults to 0 characters for static data sources and 3 - // characters for external data sources. + // * If the menu uses a static array of `SelectionInput` items, defaults to + // 0 characters and immediately populates items from the array. + // * If the menu uses a dynamic data source (`multi_select_data_source`), + // defaults to 3 characters before querying the data source to return + // suggested items. int32 multi_select_min_query_length = 7; - // For a multiselect menu, the data source that populates + // For a multiselect menu, a data source that dynamically populates // selection items. // // [Google Chat apps](https://developers.google.com/workspace/chat): oneof multi_select_data_source { - // An external data source, such as a relational data base. + // An external data source, such as a relational database. Action external_data_source = 8; // A data source from Google Workspace. @@ -1187,8 +1347,11 @@ message SelectionInput { } } -// Lets users input a date, a time, or both a date and a time. For an example in -// Google Chat apps, see [Let a user pick a date and +// Lets users input a date, a time, or both a date and a time. +// Supports form submission validation. When `Action.all_widgets_are_required` +// is set to `true` or this widget is specified in `Action.required_widgets`, +// the submission action is blocked unless a value is selected. For an example +// in Google Chat apps, see [Let a user pick a date and // time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time). // // Users can input text or use the picker to select dates and times. If users @@ -1196,12 +1359,12 @@ message SelectionInput { // to input the information correctly. // // [Google Workspace -// Add-ons and Chat apps](https://developers.google.com/workspace/extend): +// add-ons and Chat apps](https://developers.google.com/workspace/extend): message DateTimePicker { // The format for the date and time in the `DateTimePicker` widget. // Determines whether users can input a date, a time, or both a date and time. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum DateTimePickerType { // Users input a date and time. @@ -1228,8 +1391,8 @@ message DateTimePicker { // Whether the widget supports inputting a date, a time, or the date and time. DateTimePickerType type = 3; - // The default value displayed in the widget, in milliseconds since [Unix - // epoch time](https://en.wikipedia.org/wiki/Unix_time). + // Optional. The default value displayed in the widget, in milliseconds since + // [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time). // // Specify the value based on the type of picker (`DateTimePickerType`): // @@ -1239,7 +1402,7 @@ message DateTimePicker { // January 1, 2023, use `1672531200000`. // * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use // `43200000` (or `12 * 60 * 60 * 1000`). - int64 value_ms_epoch = 4; + optional int64 value_ms_epoch = 4; // The number representing the time zone offset from UTC, in minutes. // If set, the `value_ms_epoch` is displayed in the specified time zone. @@ -1251,6 +1414,40 @@ message DateTimePicker { Action on_change_action = 6; } +// A widget that presents a pop-up menu with one or more actions that users can +// invoke. For example, showing non-primary actions in a card. You can use this +// widget when actions don't fit in the available space. To use, specify this +// widget in the `OnClick` action of widgets that support it. For example, in a +// `Button`. +// +// [Google Workspace add-ons and Chat +// apps](https://developers.google.com/workspace/extend): +message OverflowMenu { + // An option that users can invoke in an overflow menu. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + message OverflowMenuItem { + // The icon displayed in front of the text. + Icon start_icon = 1; + + // Required. The text that identifies or describes the item to users. + string text = 2; + + // Required. The action invoked when a menu option is selected. + // This `OnClick` cannot contain an `OverflowMenu`, any specified + // `OverflowMenu` is dropped and the menu item disabled. + OnClick on_click = 3; + + // Whether the menu option is disabled. + // Defaults to false. + bool disabled = 4; + } + + // Required. The list of menu options. + repeated OverflowMenuItem items = 1; +} + // A text, icon, or text and icon button that users can click. For an example in // Google Chat apps, see // [Add a @@ -1262,47 +1459,68 @@ message DateTimePicker { // `onClick` action. // // [Google Workspace -// Add-ons and Chat apps](https://developers.google.com/workspace/extend): +// add-ons and Chat apps](https://developers.google.com/workspace/extend): message Button { + // Optional. The + // [type](https://m3.material.io/components/all-buttons#9134ac95-678e-49ae-a50a-e71948011b05) + // of a button. If `color` field is set, the `type` is forced to `FILLED`. + // + // [Google Chat apps](https://developers.google.com/workspace/chat): + enum Type { + // Don't use. Unspecified. + TYPE_UNSPECIFIED = 0; + + // Outlined buttons are medium-emphasis buttons. They usually contain + // actions that are important, but aren’t the primary action in a Chat app + // or an add-on. + OUTLINED = 1; + + // A filled button has a container with a solid color. It has the most + // visual impact and is recommended for the important and primary action in + // a Chat app or an add-on. + FILLED = 2; + + // A filled tonal button is an alternative middle ground between filled and + // outlined buttons. They’re useful in contexts where a lower-priority + // button requires slightly more emphasis than an outline button would give. + FILLED_TONAL = 3; + + // A button does not have an invisible container in its default state. It is + // often used for the lowest priority actions, especially when presenting + // multiple options. + BORDERLESS = 4; + } + // The text displayed inside the button. string text = 1; - // The icon image. If both `icon` and `text` are set, then the icon appears - // before the text. + // An icon displayed inside the button. If both `icon` and `text` are set, + // then the icon appears before the text. Icon icon = 2; - // 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. + // Optional. The color of the button. If set, the button `type` is set to + // `FILLED` and the color of `text` and `icon` fields are set to a + // contrasting color for readability. For example, if the button color is + // set to blue, any text or icons in the button are set to white. // - // 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. + // To set the button color, specify a value for the `red`, `green`, and `blue` + // fields. + // The value must be a float number between 0 and 1 based on the RGB color + // value, where `0` (0/255) represents the absence of color and `1` (255/255) + // represents the maximum intensity of the color. // - // For example, the following color represents a half transparent red: + // For example, the following sets the color to red at its maximum intensity: // // ``` // "color": { // "red": 1, // "green": 0, // "blue": 0, - // "alpha": 0.5 // } // ``` + // + // The `alpha` field is unavailable for button color. If specified, this field + // is ignored. google.type.Color color = 3; // Required. The action to perform when a user clicks the button, such as @@ -1320,6 +1538,11 @@ message Button { // browser tab and navigates to the Google Chat developer documentation at // https://developers.google.com/workspace/chat". string alt_text = 6; + + // Optional. The type of a button. If unset, button type defaults to + // `OUTLINED`. If the `color` field is set, the button type is forced to + // `FILLED` and any value set for this field is ignored. + Type type = 7; } // An icon displayed in a widget on a card. For an example in Google Chat apps, @@ -1332,7 +1555,7 @@ message Button { // [custom](https://developers.google.com/workspace/chat/format-messages#customicons) // icons. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message Icon { // The icon displayed in the widget on the card. @@ -1445,7 +1668,7 @@ message MaterialIcon { // Represents the crop style applied to an image. // -// [Google Workspace Add-ons and +// [Google Workspace add-ons and // Chat apps](https://developers.google.com/workspace/extend): // // For example, here's how to apply a 16:9 aspect ratio: @@ -1459,7 +1682,7 @@ message MaterialIcon { message ImageCropStyle { // Represents the crop style applied to an image. // - // [Google Workspace Add-ons + // [Google Workspace add-ons // and Chat apps](https://developers.google.com/workspace/extend): enum ImageCropType { // Don't use. Unspecified. @@ -1498,21 +1721,21 @@ message ImageCropStyle { // The style options for the border of a card or widget, including the border // type and color. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message BorderStyle { // Represents the border types applied to widgets. // - // [Google Workspace Add-ons + // [Google Workspace add-ons // and Chat apps](https://developers.google.com/workspace/extend): enum BorderType { // Don't use. Unspecified. BORDER_TYPE_UNSPECIFIED = 0; - // Default value. No border. + // No border. NO_BORDER = 1; - // Outline. + // Default value. Outline. STROKE = 2; } @@ -1520,6 +1743,25 @@ message BorderStyle { BorderType type = 1; // The colors to use when the type is `BORDER_TYPE_STROKE`. + // + // To set the stroke color, specify a value for the `red`, `green`, and `blue` + // fields. + // The value must be a float number between 0 and 1 based on the RGB color + // value, where `0` (0/255) represents the absence of color and `1` (255/255) + // represents the maximum intensity of the color. + // + // For example, the following sets the color to red at its maximum intensity: + // + // ``` + // "color": { + // "red": 1, + // "green": 0, + // "blue": 0, + // } + // ``` + // + // The `alpha` field is unavailable for stroke color. If specified, this field + // is ignored. google.type.Color stroke_color = 2; // The corner radius for the border. @@ -1528,7 +1770,7 @@ message BorderStyle { // Represents an image. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message ImageComponent { // The image URL. @@ -1555,7 +1797,7 @@ message ImageComponent { // 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns // has 6 rows. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): // // For example, the following JSON creates a 2 column grid with a single @@ -1595,12 +1837,12 @@ message Grid { // Represents an item in a grid layout. Items can contain text, an image, or // both text and an image. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message GridItem { // Represents the various layout options available for a grid item. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum GridItemLayout { // Don't use. Unspecified. @@ -1673,29 +1915,28 @@ message Grid { // * On Android devices, the second column wraps if the screen width is // less than or equal to 320 dp. // -// To include more than 2 columns, or to use rows, use the +// To include more than two columns, or to use rows, use the // [`Grid`][google.apps.card.v1.Grid] widget. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): -// Columns for Google Workspace Add-ons are in -// Developer Preview. +// The add-on UIs that support columns include: +// +// * The dialog displayed when users open the add-on from an email draft. +// * The dialog displayed when users open the add-on from the +// **Add attachment** menu in a Google Calendar event. message Columns { // A column. // - // [Google Workspace Add-ons and Chat - // apps](https://developers.google.com/workspace/extend): - // Columns for Google Workspace Add-ons are in - // Developer Preview. + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend) message Column { // Specifies how a column fills the width of the card. The width of each // column depends on both the `HorizontalSizeStyle` and the width of the // widgets within the column. // - // [Google Workspace Add-ons and Chat - // apps](https://developers.google.com/workspace/extend): - // Columns for Google Workspace Add-ons are in - // Developer Preview. + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend) enum HorizontalSizeStyle { // Don't use. Unspecified. HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0; @@ -1713,10 +1954,8 @@ message Columns { // Specifies whether widgets align to the top, bottom, or center of a // column. // - // [Google Workspace Add-ons and Chat - // apps](https://developers.google.com/workspace/extend): - // Columns for Google Workspace Add-ons are in - // Developer Preview. + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend) enum VerticalAlignment { // Don't use. Unspecified. VERTICAL_ALIGNMENT_UNSPECIFIED = 0; @@ -1733,10 +1972,8 @@ message Columns { // The supported widgets that you can include in a column. // - // [Google Workspace Add-ons and Chat - // apps](https://developers.google.com/workspace/extend): - // Columns for Google Workspace Add-ons are in - // Developer Preview. + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend) message Widgets { oneof data { // [TextParagraph][google.apps.card.v1.TextParagraph] widget. @@ -1759,6 +1996,9 @@ message Columns { // [DateTimePicker][google.apps.card.v1.DateTimePicker] widget. DateTimePicker date_time_picker = 7; + + // [ChipList][google.apps.card.v1.ChipList] widget. + ChipList chip_list = 8; } } @@ -1782,10 +2022,89 @@ message Columns { repeated Column column_items = 2; } +// A carousel, also known as a slider, rotates and displays a list of widgets in +// a slideshow format, with buttons navigating to the previous or next widget. +// +// For example, this is a JSON representation of a carousel that contains three +// text paragraph widgets. +// +// ``` +// { +// "carouselCards": [ +// { +// "widgets": [ +// { +// "textParagraph": { +// "text": "First text paragraph in carousel", +// } +// } +// ] +// }, +// { +// "widgets": [ +// { +// "textParagraph": { +// "text": "Second text paragraph in carousel", +// } +// } +// ] +// }, +// { +// "widgets": [ +// { +// "textParagraph": { +// "text": "Third text paragraph in carousel", +// } +// } +// ] +// } +// ] +// } +// ``` +// +// [Google Chat apps](https://developers.google.com/workspace/chat): +message Carousel { + // A card that can be displayed as a carousel item. + // [Google Chat apps](https://developers.google.com/workspace/chat): + message CarouselCard { + // A list of widgets displayed in the carousel card. The widgets are + // displayed in the order that they are specified. + repeated Card.NestedWidget widgets = 1; + + // A list of widgets displayed at the bottom of the carousel card. The + // widgets are displayed in the order that they are specified. + repeated Card.NestedWidget footer_widgets = 2; + } + + // A list of cards included in the carousel. + repeated CarouselCard carousel_cards = 4; +} + +// Represent an expand and collapse control. +// +// [Google Workspace add-ons and Chat +// apps](https://developers.google.com/workspace/extend): +message CollapseControl { + // The horizontal alignment of the expand and collapse button. + Widget.HorizontalAlignment horizontal_alignment = 1; + + // Optional. Define a customizable button to expand the section. + // Both expand_button and collapse_button field must be set. Only one + // field set will not take into effect. + // If this field isn't set, the default button is used. + Button expand_button = 2; + + // Optional. Define a customizable button to collapse the section. + // Both expand_button and collapse_button field must be set. Only one + // field set will not take into effect. + // If this field isn't set, the default button is used. + Button collapse_button = 3; +} + // Represents how to respond when users click an interactive element on // a card, such as a button. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message OnClick { oneof data { @@ -1801,20 +2120,23 @@ message OnClick { // web client to do before the open link action response comes back. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): Action open_dynamic_link_action = 3; // A new card is pushed to the card stack after clicking if specified. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): Card card = 4; + + // If specified, this `onClick` opens an overflow menu. + OverflowMenu overflow_menu = 8; } } // Represents an `onClick` event that opens a hyperlink. // -// [Google Workspace Add-ons and Chat +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message OpenLink { // When an `OnClick` action opens a link, then the client can either open it @@ -1824,7 +2146,7 @@ message OpenLink { // client doesn't support it. `FULL_SIZE` is supported by all clients. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): enum OpenAs { // The link opens as a full-size window (if that's the frame used by the // client). @@ -1843,7 +2165,7 @@ message OpenLink { // can't support both values, `OnClose` takes precedence. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): enum OnClose { // Default value. The card doesn't reload; nothing happens. NOTHING = 0; @@ -1863,14 +2185,14 @@ message OpenLink { // How to open a link. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): OpenAs open_as = 2; // Whether the client forgets about a link after opening it, or observes it // until the window closes. // // [Google Workspace - // Add-ons](https://developers.google.com/workspace/add-ons): + // add-ons](https://developers.google.com/workspace/add-ons): OnClose on_close = 3; } @@ -1878,7 +2200,7 @@ message OpenLink { // 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 +// [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message Action { // List of string parameters to supply when the action method is invoked. @@ -1889,7 +2211,7 @@ message Action { // To learn more, see // [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject). // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): message ActionParameter { // The name of the parameter for the action script. @@ -1902,7 +2224,7 @@ message Action { // Specifies the loading indicator that the action displays while // making the call to the action. // - // [Google Workspace Add-ons and Chat + // [Google Workspace add-ons and Chat // apps](https://developers.google.com/workspace/extend): enum LoadIndicator { // Displays a spinner to indicate that content is loading. @@ -1946,7 +2268,7 @@ message Action { } // A custom function to invoke when the containing element is - // clicked or othrwise activated. + // clicked or otherwise activated. // // For example usage, see [Read form // data](https://developers.google.com/workspace/chat/read-form-data). @@ -1997,4 +2319,121 @@ message Action { // // [Google Chat apps](https://developers.google.com/workspace/chat): Interaction interaction = 5; + + // Optional. Fill this list with the names of widgets that this Action + // needs for a valid submission. + // + // If the widgets listed here don't have a value when this Action is invoked, + // the form submission is aborted. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + repeated string required_widgets = 6; + + // Optional. If this is true, then all widgets are considered required by + // this action. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + bool all_widgets_are_required = 7; +} + +// Represents the necessary data for validating the widget it's attached to. +// +// [Google Workspace add-ons and Chat +// apps](https://developers.google.com/workspace/extend): +message Validation { + // The type of the input widget. + enum InputType { + // Unspecified type. Do not use. + INPUT_TYPE_UNSPECIFIED = 0; + + // Regular text that accepts all characters. + TEXT = 1; + + // An integer value. + INTEGER = 2; + + // A float value. + FLOAT = 3; + + // An email address. + EMAIL = 4; + + // A emoji selected from system-provided emoji picker. + EMOJI_PICKER = 5; + } + + // Specify the character limit for text input widgets. Note that this is + // only used for text input and is ignored for other widgets. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + int32 character_limit = 1; + + // Specify the type of the input widgets. + // + // [Google Workspace add-ons and Chat + // apps](https://developers.google.com/workspace/extend): + InputType input_type = 2; +} + +// A list of chips layed out horizontally, which can either scroll horizontally +// or wrap to the next line. +// +// [Google Workspace add-ons and Chat +// apps](https://developers.google.com/workspace/extend): +message ChipList { + // The chip list layout. + enum Layout { + // Don't use. Unspecified. + LAYOUT_UNSPECIFIED = 0; + + // Default value. The chip list wraps to the next line if there isn't enough + // horizontal space. + WRAPPED = 1; + + // The chips scroll horizontally if they don't fit in the available space. + HORIZONTAL_SCROLLABLE = 2; + } + + // Specified chip list layout. + Layout layout = 1; + + // An array of chips. + repeated Chip chips = 2; +} + +// A text, icon, or text and icon chip that users can click. +// +// [Google Workspace add-ons and Chat +// apps](https://developers.google.com/workspace/extend): +message Chip { + // The icon image. If both `icon` and `text` are set, then the icon appears + // before the text. + Icon icon = 1; + + // The text displayed inside the chip. + string label = 2; + + // Optional. The action to perform when a user clicks the chip, such as + // opening a hyperlink or running a custom function. + OnClick on_click = 3; + + // Whether the chip is in an active state and responds to user actions. + // Defaults to `true`. + // Deprecated. Use `disabled` instead. + bool enabled = 4 [deprecated = true]; + + // Whether the chip is in an inactive state and ignores user actions. + // Defaults to `false`. + bool disabled = 6; + + // The alternative text that's used for accessibility. + // + // Set descriptive text that lets users know what the chip does. For + // example, if a chip opens a hyperlink, write: "Opens a new + // browser tab and navigates to the Google Chat developer documentation at + // https://developers.google.com/workspace/chat". + string alt_text = 5; }