- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Button)
- com.google.apps.card.v1.ButtonOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Button_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Button_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Button.class, com.google.apps.card.v1.Button.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Button.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getIconFieldBuilder();
- getColorFieldBuilder();
- getOnClickFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- text_ = "";
- icon_ = null;
- if (iconBuilder_ != null) {
- iconBuilder_.dispose();
- iconBuilder_ = null;
- }
- color_ = null;
- if (colorBuilder_ != null) {
- colorBuilder_.dispose();
- colorBuilder_ = null;
- }
- onClick_ = null;
- if (onClickBuilder_ != null) {
- onClickBuilder_.dispose();
- onClickBuilder_ = null;
- }
- disabled_ = false;
- altText_ = "";
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Button_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Button getDefaultInstanceForType() {
- return com.google.apps.card.v1.Button.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Button build() {
- com.google.apps.card.v1.Button result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Button buildPartial() {
- com.google.apps.card.v1.Button result = new com.google.apps.card.v1.Button(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.Button result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.text_ = text_;
- }
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.icon_ = iconBuilder_ == null ? icon_ : iconBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.color_ = colorBuilder_ == null ? color_ : colorBuilder_.build();
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.onClick_ = onClickBuilder_ == null ? onClick_ : onClickBuilder_.build();
- to_bitField0_ |= 0x00000004;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.disabled_ = disabled_;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.altText_ = altText_;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- @java.lang.Override
- public Builder clone() {
- return super.clone();
- }
-
- @java.lang.Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
- return super.setField(field, value);
- }
-
- @java.lang.Override
- public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
-
- @java.lang.Override
- public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
-
- @java.lang.Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
- return super.setRepeatedField(field, index, value);
- }
-
- @java.lang.Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
- return super.addRepeatedField(field, value);
- }
-
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.apps.card.v1.Button) {
- return mergeFrom((com.google.apps.card.v1.Button) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Button other) {
- if (other == com.google.apps.card.v1.Button.getDefaultInstance()) return this;
- if (!other.getText().isEmpty()) {
- text_ = other.text_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (other.hasIcon()) {
- mergeIcon(other.getIcon());
- }
- if (other.hasColor()) {
- mergeColor(other.getColor());
- }
- if (other.hasOnClick()) {
- mergeOnClick(other.getOnClick());
- }
- if (other.getDisabled() != false) {
- setDisabled(other.getDisabled());
- }
- if (!other.getAltText().isEmpty()) {
- altText_ = other.altText_;
- bitField0_ |= 0x00000020;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- text_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- input.readMessage(getIconFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 26:
- {
- input.readMessage(getColorFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000004;
- break;
- } // case 26
- case 34:
- {
- input.readMessage(getOnClickFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000008;
- break;
- } // case 34
- case 40:
- {
- disabled_ = input.readBool();
- bitField0_ |= 0x00000010;
- break;
- } // case 40
- case 50:
- {
- altText_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000020;
- break;
- } // case 50
- default:
- {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object text_ = "";
- /**
- *
- *
- *
- * The text displayed inside the button.
- *
- *
- * string text = 1;
- *
- * @return The text.
- */
- public java.lang.String getText() {
- java.lang.Object ref = text_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- text_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The text displayed inside the button.
- *
- *
- * string text = 1;
- *
- * @return The bytes for text.
- */
- public com.google.protobuf.ByteString getTextBytes() {
- java.lang.Object ref = text_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- text_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The text displayed inside the button.
- *
- *
- * string text = 1;
- *
- * @param value The text to set.
- * @return This builder for chaining.
- */
- public Builder setText(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- text_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The text displayed inside the button.
- *
- *
- * string text = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearText() {
- text_ = getDefaultInstance().getText();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The text displayed inside the button.
- *
- *
- * string text = 1;
- *
- * @param value The bytes for text to set.
- * @return This builder for chaining.
- */
- public Builder setTextBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- text_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private com.google.apps.card.v1.Icon icon_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Icon,
- com.google.apps.card.v1.Icon.Builder,
- com.google.apps.card.v1.IconOrBuilder>
- iconBuilder_;
- /**
- *
- *
- *
- * The icon image. If both `icon` and `text` are set, then the icon appears
- * before the text.
- *
- *
- * .google.apps.card.v1.Icon icon = 2;
- *
- * @return Whether the icon field is set.
- */
- public boolean hasIcon() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *
- *
- * The icon image. If both `icon` and `text` are set, then the icon appears
- * before the text.
- *
- *
- * .google.apps.card.v1.Icon icon = 2;
- *
- * @return The icon.
- */
- public com.google.apps.card.v1.Icon getIcon() {
- if (iconBuilder_ == null) {
- return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_;
- } else {
- return iconBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * The icon image. If both `icon` and `text` are set, then the icon appears
- * before the text.
- *
- *
- * .google.apps.card.v1.Icon icon = 2;
- */
- public Builder setIcon(com.google.apps.card.v1.Icon value) {
- if (iconBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- icon_ = value;
- } else {
- iconBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The icon image. If both `icon` and `text` are set, then the icon appears
- * before the text.
- *
- *
- * .google.apps.card.v1.Icon icon = 2;
- */
- public Builder setIcon(com.google.apps.card.v1.Icon.Builder builderForValue) {
- if (iconBuilder_ == null) {
- icon_ = builderForValue.build();
- } else {
- iconBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The icon image. If both `icon` and `text` are set, then the icon appears
- * before the text.
- *
- *
- * .google.apps.card.v1.Icon icon = 2;
- */
- public Builder mergeIcon(com.google.apps.card.v1.Icon value) {
- if (iconBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0)
- && icon_ != null
- && icon_ != com.google.apps.card.v1.Icon.getDefaultInstance()) {
- getIconBuilder().mergeFrom(value);
- } else {
- icon_ = value;
- }
- } else {
- iconBuilder_.mergeFrom(value);
- }
- if (icon_ != null) {
- bitField0_ |= 0x00000002;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * The icon image. If both `icon` and `text` are set, then the icon appears
- * before the text.
- *
- *
- * .google.apps.card.v1.Icon icon = 2;
- */
- public Builder clearIcon() {
- bitField0_ = (bitField0_ & ~0x00000002);
- icon_ = null;
- if (iconBuilder_ != null) {
- iconBuilder_.dispose();
- iconBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The icon image. If both `icon` and `text` are set, then the icon appears
- * before the text.
- *
- *
- * .google.apps.card.v1.Icon icon = 2;
- */
- public com.google.apps.card.v1.Icon.Builder getIconBuilder() {
- bitField0_ |= 0x00000002;
- onChanged();
- return getIconFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The icon image. If both `icon` and `text` are set, then the icon appears
- * before the text.
- *
- *
- * .google.apps.card.v1.Icon icon = 2;
- */
- public com.google.apps.card.v1.IconOrBuilder getIconOrBuilder() {
- if (iconBuilder_ != null) {
- return iconBuilder_.getMessageOrBuilder();
- } else {
- return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_;
- }
- }
- /**
- *
- *
- *
- * The icon image. If both `icon` and `text` are set, then the icon appears
- * before the text.
- *
- *
- * .google.apps.card.v1.Icon icon = 2;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Icon,
- com.google.apps.card.v1.Icon.Builder,
- com.google.apps.card.v1.IconOrBuilder>
- getIconFieldBuilder() {
- if (iconBuilder_ == null) {
- iconBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Icon,
- com.google.apps.card.v1.Icon.Builder,
- com.google.apps.card.v1.IconOrBuilder>(
- getIcon(), getParentForChildren(), isClean());
- icon_ = null;
- }
- return iconBuilder_;
- }
-
- private com.google.type.Color color_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>
- colorBuilder_;
- /**
- *
- *
- *
- * If set, the button is filled with a solid background color and the font
- * color changes to maintain contrast with the background color. For example,
- * setting a blue background likely results in white text.
- *
- * If unset, the image background is white and the font color is blue.
- *
- * For red, green, and blue, the value of each field is a `float` number that
- * you can express in either of two ways: as a number between 0 and 255
- * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
- * the absence of a color and 1 or 255/255 represent the full presence of that
- * color on the RGB scale.
- *
- * Optionally set `alpha`, which sets a level of transparency using this
- * equation:
- *
- * ```
- * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- *
- * @return Whether the color field is set.
- */
- public boolean hasColor() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- *
- *
- * If set, the button is filled with a solid background color and the font
- * color changes to maintain contrast with the background color. For example,
- * setting a blue background likely results in white text.
- *
- * If unset, the image background is white and the font color is blue.
- *
- * For red, green, and blue, the value of each field is a `float` number that
- * you can express in either of two ways: as a number between 0 and 255
- * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
- * the absence of a color and 1 or 255/255 represent the full presence of that
- * color on the RGB scale.
- *
- * Optionally set `alpha`, which sets a level of transparency using this
- * equation:
- *
- * ```
- * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- *
- * @return The color.
- */
- public com.google.type.Color getColor() {
- if (colorBuilder_ == null) {
- return color_ == null ? com.google.type.Color.getDefaultInstance() : color_;
- } else {
- return colorBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * If set, the button is filled with a solid background color and the font
- * color changes to maintain contrast with the background color. For example,
- * setting a blue background likely results in white text.
- *
- * If unset, the image background is white and the font color is blue.
- *
- * For red, green, and blue, the value of each field is a `float` number that
- * you can express in either of two ways: as a number between 0 and 255
- * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
- * the absence of a color and 1 or 255/255 represent the full presence of that
- * color on the RGB scale.
- *
- * Optionally set `alpha`, which sets a level of transparency using this
- * equation:
- *
- * ```
- * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- */
- public Builder setColor(com.google.type.Color value) {
- if (colorBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- color_ = value;
- } else {
- colorBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * If set, the button is filled with a solid background color and the font
- * color changes to maintain contrast with the background color. For example,
- * setting a blue background likely results in white text.
- *
- * If unset, the image background is white and the font color is blue.
- *
- * For red, green, and blue, the value of each field is a `float` number that
- * you can express in either of two ways: as a number between 0 and 255
- * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
- * the absence of a color and 1 or 255/255 represent the full presence of that
- * color on the RGB scale.
- *
- * Optionally set `alpha`, which sets a level of transparency using this
- * equation:
- *
- * ```
- * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- */
- public Builder setColor(com.google.type.Color.Builder builderForValue) {
- if (colorBuilder_ == null) {
- color_ = builderForValue.build();
- } else {
- colorBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * If set, the button is filled with a solid background color and the font
- * color changes to maintain contrast with the background color. For example,
- * setting a blue background likely results in white text.
- *
- * If unset, the image background is white and the font color is blue.
- *
- * For red, green, and blue, the value of each field is a `float` number that
- * you can express in either of two ways: as a number between 0 and 255
- * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
- * the absence of a color and 1 or 255/255 represent the full presence of that
- * color on the RGB scale.
- *
- * Optionally set `alpha`, which sets a level of transparency using this
- * equation:
- *
- * ```
- * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- */
- public Builder mergeColor(com.google.type.Color value) {
- if (colorBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0)
- && color_ != null
- && color_ != com.google.type.Color.getDefaultInstance()) {
- getColorBuilder().mergeFrom(value);
- } else {
- color_ = value;
- }
- } else {
- colorBuilder_.mergeFrom(value);
- }
- if (color_ != null) {
- bitField0_ |= 0x00000004;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * If set, the button is filled with a solid background color and the font
- * color changes to maintain contrast with the background color. For example,
- * setting a blue background likely results in white text.
- *
- * If unset, the image background is white and the font color is blue.
- *
- * For red, green, and blue, the value of each field is a `float` number that
- * you can express in either of two ways: as a number between 0 and 255
- * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
- * the absence of a color and 1 or 255/255 represent the full presence of that
- * color on the RGB scale.
- *
- * Optionally set `alpha`, which sets a level of transparency using this
- * equation:
- *
- * ```
- * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- */
- public Builder clearColor() {
- bitField0_ = (bitField0_ & ~0x00000004);
- color_ = null;
- if (colorBuilder_ != null) {
- colorBuilder_.dispose();
- colorBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * If set, the button is filled with a solid background color and the font
- * color changes to maintain contrast with the background color. For example,
- * setting a blue background likely results in white text.
- *
- * If unset, the image background is white and the font color is blue.
- *
- * For red, green, and blue, the value of each field is a `float` number that
- * you can express in either of two ways: as a number between 0 and 255
- * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
- * the absence of a color and 1 or 255/255 represent the full presence of that
- * color on the RGB scale.
- *
- * Optionally set `alpha`, which sets a level of transparency using this
- * equation:
- *
- * ```
- * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- */
- public com.google.type.Color.Builder getColorBuilder() {
- bitField0_ |= 0x00000004;
- onChanged();
- return getColorFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * If set, the button is filled with a solid background color and the font
- * color changes to maintain contrast with the background color. For example,
- * setting a blue background likely results in white text.
- *
- * If unset, the image background is white and the font color is blue.
- *
- * For red, green, and blue, the value of each field is a `float` number that
- * you can express in either of two ways: as a number between 0 and 255
- * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
- * the absence of a color and 1 or 255/255 represent the full presence of that
- * color on the RGB scale.
- *
- * Optionally set `alpha`, which sets a level of transparency using this
- * equation:
- *
- * ```
- * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- */
- public com.google.type.ColorOrBuilder getColorOrBuilder() {
- if (colorBuilder_ != null) {
- return colorBuilder_.getMessageOrBuilder();
- } else {
- return color_ == null ? com.google.type.Color.getDefaultInstance() : color_;
- }
- }
- /**
- *
- *
- *
- * If set, the button is filled with a solid background color and the font
- * color changes to maintain contrast with the background color. For example,
- * setting a blue background likely results in white text.
- *
- * If unset, the image background is white and the font color is blue.
- *
- * For red, green, and blue, the value of each field is a `float` number that
- * you can express in either of two ways: as a number between 0 and 255
- * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
- * the absence of a color and 1 or 255/255 represent the full presence of that
- * color on the RGB scale.
- *
- * Optionally set `alpha`, which sets a level of transparency using this
- * equation:
- *
- * ```
- * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>
- getColorFieldBuilder() {
- if (colorBuilder_ == null) {
- colorBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.type.Color,
- com.google.type.Color.Builder,
- com.google.type.ColorOrBuilder>(getColor(), getParentForChildren(), isClean());
- color_ = null;
- }
- return colorBuilder_;
- }
-
- private com.google.apps.card.v1.OnClick onClick_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.OnClick,
- com.google.apps.card.v1.OnClick.Builder,
- com.google.apps.card.v1.OnClickOrBuilder>
- onClickBuilder_;
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- *
- * @return Whether the onClick field is set.
- */
- public boolean hasOnClick() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- *
- * @return The onClick.
- */
- public com.google.apps.card.v1.OnClick getOnClick() {
- if (onClickBuilder_ == null) {
- return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_;
- } else {
- return onClickBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- */
- public Builder setOnClick(com.google.apps.card.v1.OnClick value) {
- if (onClickBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- onClick_ = value;
- } else {
- onClickBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- */
- public Builder setOnClick(com.google.apps.card.v1.OnClick.Builder builderForValue) {
- if (onClickBuilder_ == null) {
- onClick_ = builderForValue.build();
- } else {
- onClickBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- */
- public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) {
- if (onClickBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0)
- && onClick_ != null
- && onClick_ != com.google.apps.card.v1.OnClick.getDefaultInstance()) {
- getOnClickBuilder().mergeFrom(value);
- } else {
- onClick_ = value;
- }
- } else {
- onClickBuilder_.mergeFrom(value);
- }
- if (onClick_ != null) {
- bitField0_ |= 0x00000008;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- */
- public Builder clearOnClick() {
- bitField0_ = (bitField0_ & ~0x00000008);
- onClick_ = null;
- if (onClickBuilder_ != null) {
- onClickBuilder_.dispose();
- onClickBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- */
- public com.google.apps.card.v1.OnClick.Builder getOnClickBuilder() {
- bitField0_ |= 0x00000008;
- onChanged();
- return getOnClickFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- */
- public com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder() {
- if (onClickBuilder_ != null) {
- return onClickBuilder_.getMessageOrBuilder();
- } else {
- return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_;
- }
- }
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.OnClick,
- com.google.apps.card.v1.OnClick.Builder,
- com.google.apps.card.v1.OnClickOrBuilder>
- getOnClickFieldBuilder() {
- if (onClickBuilder_ == null) {
- onClickBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.OnClick,
- com.google.apps.card.v1.OnClick.Builder,
- com.google.apps.card.v1.OnClickOrBuilder>(
- getOnClick(), getParentForChildren(), isClean());
- onClick_ = null;
- }
- return onClickBuilder_;
- }
-
- private boolean disabled_;
- /**
- *
- *
- *
- * If `true`, the button is displayed in an inactive state and doesn't respond
- * to user actions.
- *
- *
- * bool disabled = 5;
- *
- * @return The disabled.
- */
- @java.lang.Override
- public boolean getDisabled() {
- return disabled_;
- }
- /**
- *
- *
- *
- * If `true`, the button is displayed in an inactive state and doesn't respond
- * to user actions.
- *
- *
- * bool disabled = 5;
- *
- * @param value The disabled to set.
- * @return This builder for chaining.
- */
- public Builder setDisabled(boolean value) {
-
- disabled_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * If `true`, the button is displayed in an inactive state and doesn't respond
- * to user actions.
- *
- *
- * bool disabled = 5;
- *
- * @return This builder for chaining.
- */
- public Builder clearDisabled() {
- bitField0_ = (bitField0_ & ~0x00000010);
- disabled_ = false;
- onChanged();
- return this;
- }
-
- private java.lang.Object altText_ = "";
- /**
- *
- *
- *
- * The alternative text that's used for accessibility.
- *
- * Set descriptive text that lets users know what the button does. For
- * example, if a button opens a hyperlink, you might write: "Opens a new
- * browser tab and navigates to the Google Chat developer documentation at
- * https://developers.google.com/chat".
- *
- *
- * string alt_text = 6;
- *
- * @return The altText.
- */
- public java.lang.String getAltText() {
- java.lang.Object ref = altText_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- altText_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The alternative text that's used for accessibility.
- *
- * Set descriptive text that lets users know what the button does. For
- * example, if a button opens a hyperlink, you might write: "Opens a new
- * browser tab and navigates to the Google Chat developer documentation at
- * https://developers.google.com/chat".
- *
- *
- * string alt_text = 6;
- *
- * @return The bytes for altText.
- */
- public com.google.protobuf.ByteString getAltTextBytes() {
- java.lang.Object ref = altText_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- altText_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The alternative text that's used for accessibility.
- *
- * Set descriptive text that lets users know what the button does. For
- * example, if a button opens a hyperlink, you might write: "Opens a new
- * browser tab and navigates to the Google Chat developer documentation at
- * https://developers.google.com/chat".
- *
- *
- * string alt_text = 6;
- *
- * @param value The altText to set.
- * @return This builder for chaining.
- */
- public Builder setAltText(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- altText_ = value;
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The alternative text that's used for accessibility.
- *
- * Set descriptive text that lets users know what the button does. For
- * example, if a button opens a hyperlink, you might write: "Opens a new
- * browser tab and navigates to the Google Chat developer documentation at
- * https://developers.google.com/chat".
- *
- *
- * string alt_text = 6;
- *
- * @return This builder for chaining.
- */
- public Builder clearAltText() {
- altText_ = getDefaultInstance().getAltText();
- bitField0_ = (bitField0_ & ~0x00000020);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The alternative text that's used for accessibility.
- *
- * Set descriptive text that lets users know what the button does. For
- * example, if a button opens a hyperlink, you might write: "Opens a new
- * browser tab and navigates to the Google Chat developer documentation at
- * https://developers.google.com/chat".
- *
- *
- * string alt_text = 6;
- *
- * @param value The bytes for altText to set.
- * @return This builder for chaining.
- */
- public Builder setAltTextBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- altText_ = value;
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @java.lang.Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
- // @@protoc_insertion_point(builder_scope:google.apps.card.v1.Button)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Button)
- private static final com.google.apps.card.v1.Button DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Button();
- }
-
- public static com.google.apps.card.v1.Button getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Button 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.Button getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonList.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonList.java
deleted file mode 100644
index 5a9a84137b38..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonList.java
+++ /dev/null
@@ -1,937 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * A list of buttons layed out horizontally. For an example in
- * Google Chat apps, see
- * [Button list](https://developers.google.com/chat/ui/widgets/button-list).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.ButtonList}
- */
-public final class ButtonList extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.ButtonList)
- ButtonListOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use ButtonList.newBuilder() to construct.
- private ButtonList(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private ButtonList() {
- buttons_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new ButtonList();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ButtonList_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ButtonList_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.ButtonList.class,
- com.google.apps.card.v1.ButtonList.Builder.class);
- }
-
- public static final int BUTTONS_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private java.util.List buttons_;
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- @java.lang.Override
- public java.util.List getButtonsList() {
- return buttons_;
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- @java.lang.Override
- public java.util.List extends com.google.apps.card.v1.ButtonOrBuilder>
- getButtonsOrBuilderList() {
- return buttons_;
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- @java.lang.Override
- public int getButtonsCount() {
- return buttons_.size();
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Button getButtons(int index) {
- return buttons_.get(index);
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ButtonOrBuilder getButtonsOrBuilder(int index) {
- return buttons_.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 < buttons_.size(); i++) {
- output.writeMessage(1, buttons_.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 < buttons_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, buttons_.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.ButtonList)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.ButtonList other = (com.google.apps.card.v1.ButtonList) obj;
-
- if (!getButtonsList().equals(other.getButtonsList())) 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 (getButtonsCount() > 0) {
- hash = (37 * hash) + BUTTONS_FIELD_NUMBER;
- hash = (53 * hash) + getButtonsList().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.ButtonList parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.ButtonList 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.ButtonList parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.ButtonList 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.ButtonList parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.ButtonList 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.ButtonList parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.ButtonList 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.ButtonList parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.ButtonList 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.ButtonList 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.ButtonList 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.ButtonList 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 buttons layed out horizontally. For an example in
- * Google Chat apps, see
- * [Button list](https://developers.google.com/chat/ui/widgets/button-list).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.ButtonList}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.ButtonList)
- com.google.apps.card.v1.ButtonListOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ButtonList_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ButtonList_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.ButtonList.class,
- com.google.apps.card.v1.ButtonList.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.ButtonList.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- if (buttonsBuilder_ == null) {
- buttons_ = java.util.Collections.emptyList();
- } else {
- buttons_ = null;
- buttonsBuilder_.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_ButtonList_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.ButtonList getDefaultInstanceForType() {
- return com.google.apps.card.v1.ButtonList.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.ButtonList build() {
- com.google.apps.card.v1.ButtonList result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.ButtonList buildPartial() {
- com.google.apps.card.v1.ButtonList result = new com.google.apps.card.v1.ButtonList(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.apps.card.v1.ButtonList result) {
- if (buttonsBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
- buttons_ = java.util.Collections.unmodifiableList(buttons_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.buttons_ = buttons_;
- } else {
- result.buttons_ = buttonsBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.apps.card.v1.ButtonList 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.ButtonList) {
- return mergeFrom((com.google.apps.card.v1.ButtonList) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.ButtonList other) {
- if (other == com.google.apps.card.v1.ButtonList.getDefaultInstance()) return this;
- if (buttonsBuilder_ == null) {
- if (!other.buttons_.isEmpty()) {
- if (buttons_.isEmpty()) {
- buttons_ = other.buttons_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureButtonsIsMutable();
- buttons_.addAll(other.buttons_);
- }
- onChanged();
- }
- } else {
- if (!other.buttons_.isEmpty()) {
- if (buttonsBuilder_.isEmpty()) {
- buttonsBuilder_.dispose();
- buttonsBuilder_ = null;
- buttons_ = other.buttons_;
- bitField0_ = (bitField0_ & ~0x00000001);
- buttonsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
- ? getButtonsFieldBuilder()
- : null;
- } else {
- buttonsBuilder_.addAllMessages(other.buttons_);
- }
- }
- }
- 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.Button m =
- input.readMessage(com.google.apps.card.v1.Button.parser(), extensionRegistry);
- if (buttonsBuilder_ == null) {
- ensureButtonsIsMutable();
- buttons_.add(m);
- } else {
- buttonsBuilder_.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 buttons_ =
- java.util.Collections.emptyList();
-
- private void ensureButtonsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- buttons_ = new java.util.ArrayList(buttons_);
- bitField0_ |= 0x00000001;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>
- buttonsBuilder_;
-
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public java.util.List getButtonsList() {
- if (buttonsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(buttons_);
- } else {
- return buttonsBuilder_.getMessageList();
- }
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public int getButtonsCount() {
- if (buttonsBuilder_ == null) {
- return buttons_.size();
- } else {
- return buttonsBuilder_.getCount();
- }
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public com.google.apps.card.v1.Button getButtons(int index) {
- if (buttonsBuilder_ == null) {
- return buttons_.get(index);
- } else {
- return buttonsBuilder_.getMessage(index);
- }
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public Builder setButtons(int index, com.google.apps.card.v1.Button value) {
- if (buttonsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureButtonsIsMutable();
- buttons_.set(index, value);
- onChanged();
- } else {
- buttonsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public Builder setButtons(int index, com.google.apps.card.v1.Button.Builder builderForValue) {
- if (buttonsBuilder_ == null) {
- ensureButtonsIsMutable();
- buttons_.set(index, builderForValue.build());
- onChanged();
- } else {
- buttonsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public Builder addButtons(com.google.apps.card.v1.Button value) {
- if (buttonsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureButtonsIsMutable();
- buttons_.add(value);
- onChanged();
- } else {
- buttonsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public Builder addButtons(int index, com.google.apps.card.v1.Button value) {
- if (buttonsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureButtonsIsMutable();
- buttons_.add(index, value);
- onChanged();
- } else {
- buttonsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public Builder addButtons(com.google.apps.card.v1.Button.Builder builderForValue) {
- if (buttonsBuilder_ == null) {
- ensureButtonsIsMutable();
- buttons_.add(builderForValue.build());
- onChanged();
- } else {
- buttonsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public Builder addButtons(int index, com.google.apps.card.v1.Button.Builder builderForValue) {
- if (buttonsBuilder_ == null) {
- ensureButtonsIsMutable();
- buttons_.add(index, builderForValue.build());
- onChanged();
- } else {
- buttonsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public Builder addAllButtons(
- java.lang.Iterable extends com.google.apps.card.v1.Button> values) {
- if (buttonsBuilder_ == null) {
- ensureButtonsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, buttons_);
- onChanged();
- } else {
- buttonsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public Builder clearButtons() {
- if (buttonsBuilder_ == null) {
- buttons_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- buttonsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public Builder removeButtons(int index) {
- if (buttonsBuilder_ == null) {
- ensureButtonsIsMutable();
- buttons_.remove(index);
- onChanged();
- } else {
- buttonsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public com.google.apps.card.v1.Button.Builder getButtonsBuilder(int index) {
- return getButtonsFieldBuilder().getBuilder(index);
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public com.google.apps.card.v1.ButtonOrBuilder getButtonsOrBuilder(int index) {
- if (buttonsBuilder_ == null) {
- return buttons_.get(index);
- } else {
- return buttonsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public java.util.List extends com.google.apps.card.v1.ButtonOrBuilder>
- getButtonsOrBuilderList() {
- if (buttonsBuilder_ != null) {
- return buttonsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(buttons_);
- }
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public com.google.apps.card.v1.Button.Builder addButtonsBuilder() {
- return getButtonsFieldBuilder()
- .addBuilder(com.google.apps.card.v1.Button.getDefaultInstance());
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public com.google.apps.card.v1.Button.Builder addButtonsBuilder(int index) {
- return getButtonsFieldBuilder()
- .addBuilder(index, com.google.apps.card.v1.Button.getDefaultInstance());
- }
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- public java.util.List getButtonsBuilderList() {
- return getButtonsFieldBuilder().getBuilderList();
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>
- getButtonsFieldBuilder() {
- if (buttonsBuilder_ == null) {
- buttonsBuilder_ =
- new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>(
- buttons_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
- buttons_ = null;
- }
- return buttonsBuilder_;
- }
-
- @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.ButtonList)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.ButtonList)
- private static final com.google.apps.card.v1.ButtonList DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.ButtonList();
- }
-
- public static com.google.apps.card.v1.ButtonList getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public ButtonList 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.ButtonList getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonListOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonListOrBuilder.java
deleted file mode 100644
index 320805a2df77..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonListOrBuilder.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface ButtonListOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.ButtonList)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- java.util.List getButtonsList();
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- com.google.apps.card.v1.Button getButtons(int index);
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- int getButtonsCount();
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- java.util.List extends com.google.apps.card.v1.ButtonOrBuilder> getButtonsOrBuilderList();
- /**
- *
- *
- *
- * An array of buttons.
- *
- *
- * repeated .google.apps.card.v1.Button buttons = 1;
- */
- com.google.apps.card.v1.ButtonOrBuilder getButtonsOrBuilder(int index);
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonOrBuilder.java
deleted file mode 100644
index b1bf4ed96b18..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ButtonOrBuilder.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface ButtonOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Button)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The text displayed inside the button.
- *
- *
- * string text = 1;
- *
- * @return The text.
- */
- java.lang.String getText();
- /**
- *
- *
- *
- * The text displayed inside the button.
- *
- *
- * string text = 1;
- *
- * @return The bytes for text.
- */
- com.google.protobuf.ByteString getTextBytes();
-
- /**
- *
- *
- *
- * The icon image. If both `icon` and `text` are set, then the icon appears
- * before the text.
- *
- *
- * .google.apps.card.v1.Icon icon = 2;
- *
- * @return Whether the icon field is set.
- */
- 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 = 2;
- *
- * @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 = 2;
- */
- 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.
- *
- * For red, green, and blue, the value of each field is a `float` number that
- * you can express in either of two ways: as a number between 0 and 255
- * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
- * the absence of a color and 1 or 255/255 represent the full presence of that
- * color on the RGB scale.
- *
- * Optionally set `alpha`, which sets a level of transparency using this
- * equation:
- *
- * ```
- * pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- *
- * @return Whether the color field is set.
- */
- 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)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- *
- * @return The color.
- */
- 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)
- * ```
- *
- * For `alpha`, a value of `1` corresponds with a solid color, and a value of
- * `0` corresponds with a completely transparent color.
- *
- * For example, the following color represents a half transparent red:
- *
- * ```
- * "color": {
- * "red": 1,
- * "green": 0,
- * "blue": 0,
- * "alpha": 0.5
- * }
- * ```
- *
- *
- * .google.type.Color color = 3;
- */
- com.google.type.ColorOrBuilder getColorOrBuilder();
-
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- *
- * @return Whether the onClick field is set.
- */
- boolean hasOnClick();
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- *
- * @return The onClick.
- */
- com.google.apps.card.v1.OnClick getOnClick();
- /**
- *
- *
- *
- * Required. The action to perform when a user clicks the button, such as
- * opening a hyperlink or running a custom function.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 4;
- */
- com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder();
-
- /**
- *
- *
- *
- * If `true`, the button is displayed in an inactive state and doesn't respond
- * to user actions.
- *
- *
- * bool disabled = 5;
- *
- * @return The disabled.
- */
- boolean getDisabled();
-
- /**
- *
- *
- *
- * The alternative text that's used for accessibility.
- *
- * Set descriptive text that lets users know what the button does. For
- * example, if a button opens a hyperlink, you might write: "Opens a new
- * browser tab and navigates to the Google Chat developer documentation at
- * https://developers.google.com/chat".
- *
- *
- * string alt_text = 6;
- *
- * @return The altText.
- */
- java.lang.String getAltText();
- /**
- *
- *
- *
- * The alternative text that's used for accessibility.
- *
- * Set descriptive text that lets users know what the button does. For
- * example, if a button opens a hyperlink, you might write: "Opens a new
- * browser tab and navigates to the Google Chat developer documentation at
- * https://developers.google.com/chat".
- *
- *
- * string alt_text = 6;
- *
- * @return The bytes for altText.
- */
- com.google.protobuf.ByteString getAltTextBytes();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Card.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Card.java
deleted file mode 100644
index 677139ad5e15..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Card.java
+++ /dev/null
@@ -1,9492 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * A card interface displayed in a Google Chat message or Google Workspace
- * Add-on.
- *
- * Cards support a defined layout, interactive UI elements like buttons, and
- * rich media like images. Use cards to present detailed information,
- * gather information from users, and guide users to take a next step.
- *
- * [Card builder](https://addons.gsuite.google.com/uikit/builder)
- *
- * To learn how
- * to build cards, see the following documentation:
- *
- * * For Google Chat apps, see [Design dynamic, interactive, and consistent UIs
- * with cards](https://developers.google.com/chat/ui).
- * * For Google Workspace Add-ons, see [Card-based
- * interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards).
- *
- * **Example: Card message for a Google Chat app**
- *
- * 
- *
- * To create the sample card message in Google Chat, use the following JSON:
- *
- * ```
- * {
- * "cardsV2": [
- * {
- * "cardId": "unique-card-id",
- * "card": {
- * "header": {
- * "title": "Sasha",
- * "subtitle": "Software Engineer",
- * "imageUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png",
- * "imageType": "CIRCLE",
- * "imageAltText": "Avatar for Sasha",
- * },
- * "sections": [
- * {
- * "header": "Contact Info",
- * "collapsible": true,
- * "uncollapsibleWidgetsCount": 1,
- * "widgets": [
- * {
- * "decoratedText": {
- * "startIcon": {
- * "knownIcon": "EMAIL",
- * },
- * "text": "sasha@example.com",
- * }
- * },
- * {
- * "decoratedText": {
- * "startIcon": {
- * "knownIcon": "PERSON",
- * },
- * "text": "<font color=\"#80e27e\">Online</font>",
- * },
- * },
- * {
- * "decoratedText": {
- * "startIcon": {
- * "knownIcon": "PHONE",
- * },
- * "text": "+1 (555) 555-1234",
- * }
- * },
- * {
- * "buttonList": {
- * "buttons": [
- * {
- * "text": "Share",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/share",
- * }
- * }
- * },
- * {
- * "text": "Edit",
- * "onClick": {
- * "action": {
- * "function": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "EDIT",
- * }
- * ],
- * }
- * }
- * },
- * ],
- * }
- * },
- * ],
- * },
- * ],
- * },
- * }
- * ],
- * }
- * ```
- *
- *
- * Protobuf type {@code google.apps.card.v1.Card}
- */
-public final class Card extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Card)
- CardOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Card.newBuilder() to construct.
- private Card(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Card() {
- sections_ = java.util.Collections.emptyList();
- sectionDividerStyle_ = 0;
- cardActions_ = java.util.Collections.emptyList();
- name_ = "";
- displayStyle_ = 0;
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new Card();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Card_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_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Card.class, com.google.apps.card.v1.Card.Builder.class);
- }
-
- /**
- *
- *
- *
- * The divider style of a card. Currently only used for dividers betweens card
- * sections.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.Card.DividerStyle}
- */
- public enum DividerStyle implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * DIVIDER_STYLE_UNSPECIFIED = 0;
- */
- DIVIDER_STYLE_UNSPECIFIED(0),
- /**
- *
- *
- *
- * Default option. Render a solid divider between sections.
- *
- *
- * SOLID_DIVIDER = 1;
- */
- SOLID_DIVIDER(1),
- /**
- *
- *
- *
- * If set, no divider is rendered between sections.
- *
- *
- * NO_DIVIDER = 2;
- */
- NO_DIVIDER(2),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * DIVIDER_STYLE_UNSPECIFIED = 0;
- */
- public static final int DIVIDER_STYLE_UNSPECIFIED_VALUE = 0;
- /**
- *
- *
- *
- * Default option. Render a solid divider between sections.
- *
- *
- * SOLID_DIVIDER = 1;
- */
- public static final int SOLID_DIVIDER_VALUE = 1;
- /**
- *
- *
- *
- * If set, no divider is rendered between sections.
- *
- *
- * NO_DIVIDER = 2;
- */
- public static final int NO_DIVIDER_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 DividerStyle 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 DividerStyle forNumber(int value) {
- switch (value) {
- case 0:
- return DIVIDER_STYLE_UNSPECIFIED;
- case 1:
- return SOLID_DIVIDER;
- case 2:
- return NO_DIVIDER;
- 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 DividerStyle findValueByNumber(int number) {
- return DividerStyle.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.Card.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final DividerStyle[] VALUES = values();
-
- public static DividerStyle 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 DividerStyle(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Card.DividerStyle)
- }
-
- /**
- *
- *
- *
- * In Google Workspace Add-ons,
- * determines how a card is displayed.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.Card.DisplayStyle}
- */
- public enum DisplayStyle implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * DISPLAY_STYLE_UNSPECIFIED = 0;
- */
- DISPLAY_STYLE_UNSPECIFIED(0),
- /**
- *
- *
- *
- * The header of the card appears at the bottom of the
- * sidebar, partially covering the current top card of the stack. Clicking
- * the header pops the card into the card stack. If the card has no header,
- * a generated header is used instead.
- *
- *
- * PEEK = 1;
- */
- PEEK(1),
- /**
- *
- *
- *
- * Default value. The card is shown by replacing the view of the top card in
- * the card stack.
- *
- *
- * REPLACE = 2;
- */
- REPLACE(2),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * DISPLAY_STYLE_UNSPECIFIED = 0;
- */
- public static final int DISPLAY_STYLE_UNSPECIFIED_VALUE = 0;
- /**
- *
- *
- *
- * The header of the card appears at the bottom of the
- * sidebar, partially covering the current top card of the stack. Clicking
- * the header pops the card into the card stack. If the card has no header,
- * a generated header is used instead.
- *
- *
- * PEEK = 1;
- */
- public static final int PEEK_VALUE = 1;
- /**
- *
- *
- *
- * Default value. The card is shown by replacing the view of the top card in
- * the card stack.
- *
- *
- * REPLACE = 2;
- */
- public static final int REPLACE_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 DisplayStyle 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 DisplayStyle forNumber(int value) {
- switch (value) {
- case 0:
- return DISPLAY_STYLE_UNSPECIFIED;
- case 1:
- return PEEK;
- case 2:
- return REPLACE;
- 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 DisplayStyle findValueByNumber(int number) {
- return DisplayStyle.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.Card.getDescriptor().getEnumTypes().get(1);
- }
-
- private static final DisplayStyle[] VALUES = values();
-
- public static DisplayStyle 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 DisplayStyle(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Card.DisplayStyle)
- }
-
- public interface CardHeaderOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Card.CardHeader)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * Required. The title of the card header.
- * The header has a fixed height: if both a
- * title and subtitle are specified, each takes up one line. If only the
- * title is specified, it takes up both lines.
- *
- *
- * string title = 1;
- *
- * @return The title.
- */
- java.lang.String getTitle();
- /**
- *
- *
- *
- * Required. The title of the card header.
- * The header has a fixed height: if both a
- * title and subtitle are specified, each takes up one line. If only the
- * title is specified, it takes up both lines.
- *
- *
- * string title = 1;
- *
- * @return The bytes for title.
- */
- com.google.protobuf.ByteString getTitleBytes();
-
- /**
- *
- *
- *
- * The subtitle of the card header. If specified, appears on its own line
- * below the `title`.
- *
- *
- * string subtitle = 2;
- *
- * @return The subtitle.
- */
- java.lang.String getSubtitle();
- /**
- *
- *
- *
- * The subtitle of the card header. If specified, appears on its own line
- * below the `title`.
- *
- *
- * string subtitle = 2;
- *
- * @return The bytes for subtitle.
- */
- com.google.protobuf.ByteString getSubtitleBytes();
-
- /**
- *
- *
- *
- * The shape used to crop the image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 3;
- *
- * @return The enum numeric value on the wire for imageType.
- */
- int getImageTypeValue();
- /**
- *
- *
- *
- * The shape used to crop the image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 3;
- *
- * @return The imageType.
- */
- com.google.apps.card.v1.Widget.ImageType getImageType();
-
- /**
- *
- *
- *
- * The HTTPS URL of the image in the card header.
- *
- *
- * string image_url = 4;
- *
- * @return The imageUrl.
- */
- java.lang.String getImageUrl();
- /**
- *
- *
- *
- * The HTTPS URL of the image in the card header.
- *
- *
- * string image_url = 4;
- *
- * @return The bytes for imageUrl.
- */
- com.google.protobuf.ByteString getImageUrlBytes();
-
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string image_alt_text = 5;
- *
- * @return The imageAltText.
- */
- java.lang.String getImageAltText();
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string image_alt_text = 5;
- *
- * @return The bytes for imageAltText.
- */
- com.google.protobuf.ByteString getImageAltTextBytes();
- }
- /**
- *
- *
- *
- * Represents a card header. For an example in Google Chat apps, see [Card
- * header](https://developers.google.com/chat/ui/widgets/card-header).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Card.CardHeader}
- */
- public static final class CardHeader extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Card.CardHeader)
- CardHeaderOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use CardHeader.newBuilder() to construct.
- private CardHeader(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private CardHeader() {
- title_ = "";
- subtitle_ = "";
- imageType_ = 0;
- imageUrl_ = "";
- imageAltText_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new CardHeader();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Card_CardHeader_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_CardHeader_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Card.CardHeader.class,
- com.google.apps.card.v1.Card.CardHeader.Builder.class);
- }
-
- public static final int TITLE_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object title_ = "";
- /**
- *
- *
- *
- * Required. The title of the card header.
- * The header has a fixed height: if both a
- * title and subtitle are specified, each takes up one line. If only the
- * title is specified, it takes up both lines.
- *
- *
- * string title = 1;
- *
- * @return The title.
- */
- @java.lang.Override
- public java.lang.String getTitle() {
- java.lang.Object ref = title_;
- 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();
- title_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * Required. The title of the card header.
- * The header has a fixed height: if both a
- * title and subtitle are specified, each takes up one line. If only the
- * title is specified, it takes up both lines.
- *
- *
- * string title = 1;
- *
- * @return The bytes for title.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getTitleBytes() {
- java.lang.Object ref = title_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- title_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int SUBTITLE_FIELD_NUMBER = 2;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object subtitle_ = "";
- /**
- *
- *
- *
- * The subtitle of the card header. If specified, appears on its own line
- * below the `title`.
- *
- *
- * string subtitle = 2;
- *
- * @return The subtitle.
- */
- @java.lang.Override
- public java.lang.String getSubtitle() {
- java.lang.Object ref = subtitle_;
- 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();
- subtitle_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The subtitle of the card header. If specified, appears on its own line
- * below the `title`.
- *
- *
- * string subtitle = 2;
- *
- * @return The bytes for subtitle.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getSubtitleBytes() {
- java.lang.Object ref = subtitle_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- subtitle_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int IMAGE_TYPE_FIELD_NUMBER = 3;
- private int imageType_ = 0;
- /**
- *
- *
- *
- * The shape used to crop the image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 3;
- *
- * @return The enum numeric value on the wire for imageType.
- */
- @java.lang.Override
- public int getImageTypeValue() {
- return imageType_;
- }
- /**
- *
- *
- *
- * The shape used to crop the image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 3;
- *
- * @return The imageType.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Widget.ImageType getImageType() {
- com.google.apps.card.v1.Widget.ImageType result =
- com.google.apps.card.v1.Widget.ImageType.forNumber(imageType_);
- return result == null ? com.google.apps.card.v1.Widget.ImageType.UNRECOGNIZED : result;
- }
-
- public static final int IMAGE_URL_FIELD_NUMBER = 4;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object imageUrl_ = "";
- /**
- *
- *
- *
- * The HTTPS URL of the image in the card header.
- *
- *
- * string image_url = 4;
- *
- * @return The imageUrl.
- */
- @java.lang.Override
- public java.lang.String getImageUrl() {
- java.lang.Object ref = imageUrl_;
- 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();
- imageUrl_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The HTTPS URL of the image in the card header.
- *
- *
- * string image_url = 4;
- *
- * @return The bytes for imageUrl.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getImageUrlBytes() {
- java.lang.Object ref = imageUrl_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- imageUrl_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int IMAGE_ALT_TEXT_FIELD_NUMBER = 5;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object imageAltText_ = "";
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string image_alt_text = 5;
- *
- * @return The imageAltText.
- */
- @java.lang.Override
- public java.lang.String getImageAltText() {
- java.lang.Object ref = imageAltText_;
- 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();
- imageAltText_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string image_alt_text = 5;
- *
- * @return The bytes for imageAltText.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getImageAltTextBytes() {
- java.lang.Object ref = imageAltText_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- imageAltText_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subtitle_);
- }
- if (imageType_ != com.google.apps.card.v1.Widget.ImageType.SQUARE.getNumber()) {
- output.writeEnum(3, imageType_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUrl_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, imageUrl_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageAltText_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 5, imageAltText_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subtitle_);
- }
- if (imageType_ != com.google.apps.card.v1.Widget.ImageType.SQUARE.getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, imageType_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUrl_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, imageUrl_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageAltText_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, imageAltText_);
- }
- 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.CardHeader)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Card.CardHeader other = (com.google.apps.card.v1.Card.CardHeader) obj;
-
- if (!getTitle().equals(other.getTitle())) return false;
- if (!getSubtitle().equals(other.getSubtitle())) return false;
- if (imageType_ != other.imageType_) return false;
- if (!getImageUrl().equals(other.getImageUrl())) return false;
- if (!getImageAltText().equals(other.getImageAltText())) 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) + TITLE_FIELD_NUMBER;
- hash = (53 * hash) + getTitle().hashCode();
- hash = (37 * hash) + SUBTITLE_FIELD_NUMBER;
- hash = (53 * hash) + getSubtitle().hashCode();
- hash = (37 * hash) + IMAGE_TYPE_FIELD_NUMBER;
- hash = (53 * hash) + imageType_;
- hash = (37 * hash) + IMAGE_URL_FIELD_NUMBER;
- hash = (53 * hash) + getImageUrl().hashCode();
- hash = (37 * hash) + IMAGE_ALT_TEXT_FIELD_NUMBER;
- hash = (53 * hash) + getImageAltText().hashCode();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Card.CardHeader parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.CardHeader 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.CardHeader parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.CardHeader 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.CardHeader parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.CardHeader 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.CardHeader 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.CardHeader 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.CardHeader 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.CardHeader 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.CardHeader 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.CardHeader 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.CardHeader 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 a card header. For an example in Google Chat apps, see [Card
- * header](https://developers.google.com/chat/ui/widgets/card-header).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Card.CardHeader}
- */
- public static final class Builder
- extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Card.CardHeader)
- com.google.apps.card.v1.Card.CardHeaderOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Card_CardHeader_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_CardHeader_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Card.CardHeader.class,
- com.google.apps.card.v1.Card.CardHeader.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Card.CardHeader.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- title_ = "";
- subtitle_ = "";
- imageType_ = 0;
- imageUrl_ = "";
- imageAltText_ = "";
- 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_CardHeader_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardHeader getDefaultInstanceForType() {
- return com.google.apps.card.v1.Card.CardHeader.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardHeader build() {
- com.google.apps.card.v1.Card.CardHeader result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardHeader buildPartial() {
- com.google.apps.card.v1.Card.CardHeader result =
- new com.google.apps.card.v1.Card.CardHeader(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.Card.CardHeader result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.title_ = title_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.subtitle_ = subtitle_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.imageType_ = imageType_;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.imageUrl_ = imageUrl_;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.imageAltText_ = imageAltText_;
- }
- }
-
- @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.CardHeader) {
- return mergeFrom((com.google.apps.card.v1.Card.CardHeader) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Card.CardHeader other) {
- if (other == com.google.apps.card.v1.Card.CardHeader.getDefaultInstance()) return this;
- if (!other.getTitle().isEmpty()) {
- title_ = other.title_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getSubtitle().isEmpty()) {
- subtitle_ = other.subtitle_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- if (other.imageType_ != 0) {
- setImageTypeValue(other.getImageTypeValue());
- }
- if (!other.getImageUrl().isEmpty()) {
- imageUrl_ = other.imageUrl_;
- bitField0_ |= 0x00000008;
- onChanged();
- }
- if (!other.getImageAltText().isEmpty()) {
- imageAltText_ = other.imageAltText_;
- bitField0_ |= 0x00000010;
- 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:
- {
- title_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- subtitle_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 24:
- {
- imageType_ = input.readEnum();
- bitField0_ |= 0x00000004;
- break;
- } // case 24
- case 34:
- {
- imageUrl_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000008;
- break;
- } // case 34
- case 42:
- {
- imageAltText_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000010;
- break;
- } // case 42
- default:
- {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object title_ = "";
- /**
- *
- *
- *
- * Required. The title of the card header.
- * The header has a fixed height: if both a
- * title and subtitle are specified, each takes up one line. If only the
- * title is specified, it takes up both lines.
- *
- *
- * string title = 1;
- *
- * @return The title.
- */
- public java.lang.String getTitle() {
- java.lang.Object ref = title_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- title_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * Required. The title of the card header.
- * The header has a fixed height: if both a
- * title and subtitle are specified, each takes up one line. If only the
- * title is specified, it takes up both lines.
- *
- *
- * string title = 1;
- *
- * @return The bytes for title.
- */
- public com.google.protobuf.ByteString getTitleBytes() {
- java.lang.Object ref = title_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- title_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * Required. The title of the card header.
- * The header has a fixed height: if both a
- * title and subtitle are specified, each takes up one line. If only the
- * title is specified, it takes up both lines.
- *
- *
- * string title = 1;
- *
- * @param value The title to set.
- * @return This builder for chaining.
- */
- public Builder setTitle(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- title_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The title of the card header.
- * The header has a fixed height: if both a
- * title and subtitle are specified, each takes up one line. If only the
- * title is specified, it takes up both lines.
- *
- *
- * string title = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearTitle() {
- title_ = getDefaultInstance().getTitle();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The title of the card header.
- * The header has a fixed height: if both a
- * title and subtitle are specified, each takes up one line. If only the
- * title is specified, it takes up both lines.
- *
- *
- * string title = 1;
- *
- * @param value The bytes for title to set.
- * @return This builder for chaining.
- */
- public Builder setTitleBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- title_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object subtitle_ = "";
- /**
- *
- *
- *
- * The subtitle of the card header. If specified, appears on its own line
- * below the `title`.
- *
- *
- * string subtitle = 2;
- *
- * @return The subtitle.
- */
- public java.lang.String getSubtitle() {
- java.lang.Object ref = subtitle_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- subtitle_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The subtitle of the card header. If specified, appears on its own line
- * below the `title`.
- *
- *
- * string subtitle = 2;
- *
- * @return The bytes for subtitle.
- */
- public com.google.protobuf.ByteString getSubtitleBytes() {
- java.lang.Object ref = subtitle_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- subtitle_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The subtitle of the card header. If specified, appears on its own line
- * below the `title`.
- *
- *
- * string subtitle = 2;
- *
- * @param value The subtitle to set.
- * @return This builder for chaining.
- */
- public Builder setSubtitle(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- subtitle_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The subtitle of the card header. If specified, appears on its own line
- * below the `title`.
- *
- *
- * string subtitle = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearSubtitle() {
- subtitle_ = getDefaultInstance().getSubtitle();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The subtitle of the card header. If specified, appears on its own line
- * below the `title`.
- *
- *
- * string subtitle = 2;
- *
- * @param value The bytes for subtitle to set.
- * @return This builder for chaining.
- */
- public Builder setSubtitleBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- subtitle_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
-
- private int imageType_ = 0;
- /**
- *
- *
- *
- * The shape used to crop the image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 3;
- *
- * @return The enum numeric value on the wire for imageType.
- */
- @java.lang.Override
- public int getImageTypeValue() {
- return imageType_;
- }
- /**
- *
- *
- *
- * The shape used to crop the image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 3;
- *
- * @param value The enum numeric value on the wire for imageType to set.
- * @return This builder for chaining.
- */
- public Builder setImageTypeValue(int value) {
- imageType_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The shape used to crop the image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 3;
- *
- * @return The imageType.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Widget.ImageType getImageType() {
- com.google.apps.card.v1.Widget.ImageType result =
- com.google.apps.card.v1.Widget.ImageType.forNumber(imageType_);
- return result == null ? com.google.apps.card.v1.Widget.ImageType.UNRECOGNIZED : result;
- }
- /**
- *
- *
- *
- * The shape used to crop the image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 3;
- *
- * @param value The imageType to set.
- * @return This builder for chaining.
- */
- public Builder setImageType(com.google.apps.card.v1.Widget.ImageType value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- imageType_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The shape used to crop the image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 3;
- *
- * @return This builder for chaining.
- */
- public Builder clearImageType() {
- bitField0_ = (bitField0_ & ~0x00000004);
- imageType_ = 0;
- onChanged();
- return this;
- }
-
- private java.lang.Object imageUrl_ = "";
- /**
- *
- *
- *
- * The HTTPS URL of the image in the card header.
- *
- *
- * string image_url = 4;
- *
- * @return The imageUrl.
- */
- public java.lang.String getImageUrl() {
- java.lang.Object ref = imageUrl_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- imageUrl_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The HTTPS URL of the image in the card header.
- *
- *
- * string image_url = 4;
- *
- * @return The bytes for imageUrl.
- */
- public com.google.protobuf.ByteString getImageUrlBytes() {
- java.lang.Object ref = imageUrl_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- imageUrl_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The HTTPS URL of the image in the card header.
- *
- *
- * string image_url = 4;
- *
- * @param value The imageUrl to set.
- * @return This builder for chaining.
- */
- public Builder setImageUrl(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- imageUrl_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The HTTPS URL of the image in the card header.
- *
- *
- * string image_url = 4;
- *
- * @return This builder for chaining.
- */
- public Builder clearImageUrl() {
- imageUrl_ = getDefaultInstance().getImageUrl();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The HTTPS URL of the image in the card header.
- *
- *
- * string image_url = 4;
- *
- * @param value The bytes for imageUrl to set.
- * @return This builder for chaining.
- */
- public Builder setImageUrlBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- imageUrl_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
-
- private java.lang.Object imageAltText_ = "";
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string image_alt_text = 5;
- *
- * @return The imageAltText.
- */
- public java.lang.String getImageAltText() {
- java.lang.Object ref = imageAltText_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- imageAltText_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string image_alt_text = 5;
- *
- * @return The bytes for imageAltText.
- */
- public com.google.protobuf.ByteString getImageAltTextBytes() {
- java.lang.Object ref = imageAltText_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- imageAltText_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string image_alt_text = 5;
- *
- * @param value The imageAltText to set.
- * @return This builder for chaining.
- */
- public Builder setImageAltText(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- imageAltText_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string image_alt_text = 5;
- *
- * @return This builder for chaining.
- */
- public Builder clearImageAltText() {
- imageAltText_ = getDefaultInstance().getImageAltText();
- bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string image_alt_text = 5;
- *
- * @param value The bytes for imageAltText to set.
- * @return This builder for chaining.
- */
- public Builder setImageAltTextBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- imageAltText_ = value;
- bitField0_ |= 0x00000010;
- 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.Card.CardHeader)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Card.CardHeader)
- private static final com.google.apps.card.v1.Card.CardHeader DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Card.CardHeader();
- }
-
- public static com.google.apps.card.v1.Card.CardHeader getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public CardHeader 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.CardHeader getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
- }
-
- public interface SectionOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Card.Section)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * Text that appears at the top of a section.
- * Supports simple HTML formatted text. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string header = 1;
- *
- * @return The header.
- */
- java.lang.String getHeader();
- /**
- *
- *
- *
- * Text that appears at the top of a section.
- * Supports simple HTML formatted text. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string header = 1;
- *
- * @return The bytes for header.
- */
- com.google.protobuf.ByteString getHeaderBytes();
-
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- java.util.List getWidgetsList();
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- com.google.apps.card.v1.Widget getWidgets(int index);
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- int getWidgetsCount();
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- java.util.List extends com.google.apps.card.v1.WidgetOrBuilder> getWidgetsOrBuilderList();
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- com.google.apps.card.v1.WidgetOrBuilder getWidgetsOrBuilder(int index);
-
- /**
- *
- *
- *
- * Indicates whether this section is collapsible.
- *
- * Collapsible sections hide some or all widgets, but users can expand the
- * section to reveal the hidden widgets by clicking **Show more**. Users
- * can hide the widgets again by clicking **Show less**.
- *
- * To determine which widgets are hidden, specify
- * `uncollapsibleWidgetsCount`.
- *
- *
- * bool collapsible = 5;
- *
- * @return The collapsible.
- */
- boolean getCollapsible();
-
- /**
- *
- *
- *
- * The number of uncollapsible widgets which remain visible even when a
- * section is collapsed.
- *
- * For example, when a section
- * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`,
- * the first two widgets are always shown and the last three are collapsed
- * by default. The `uncollapsibleWidgetsCount` is taken into account only
- * when `collapsible` is `true`.
- *
- *
- * int32 uncollapsible_widgets_count = 6;
- *
- * @return The uncollapsibleWidgetsCount.
- */
- int getUncollapsibleWidgetsCount();
- }
- /**
- *
- *
- *
- * A section contains a collection of widgets that are rendered
- * vertically in the order that they're specified.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Card.Section}
- */
- public static final class Section extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Card.Section)
- SectionOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Section.newBuilder() to construct.
- private Section(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Section() {
- header_ = "";
- widgets_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new Section();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Card_Section_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_Section_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Card.Section.class,
- com.google.apps.card.v1.Card.Section.Builder.class);
- }
-
- public static final int HEADER_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object header_ = "";
- /**
- *
- *
- *
- * Text that appears at the top of a section.
- * Supports simple HTML formatted text. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string header = 1;
- *
- * @return The header.
- */
- @java.lang.Override
- public java.lang.String getHeader() {
- java.lang.Object ref = header_;
- 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();
- header_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * Text that appears at the top of a section.
- * Supports simple HTML formatted text. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string header = 1;
- *
- * @return The bytes for header.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getHeaderBytes() {
- java.lang.Object ref = header_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- header_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int WIDGETS_FIELD_NUMBER = 2;
-
- @SuppressWarnings("serial")
- private java.util.List widgets_;
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- @java.lang.Override
- public java.util.List getWidgetsList() {
- return widgets_;
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- @java.lang.Override
- public java.util.List extends com.google.apps.card.v1.WidgetOrBuilder>
- getWidgetsOrBuilderList() {
- return widgets_;
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- @java.lang.Override
- public int getWidgetsCount() {
- return widgets_.size();
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Widget getWidgets(int index) {
- return widgets_.get(index);
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.WidgetOrBuilder getWidgetsOrBuilder(int index) {
- return widgets_.get(index);
- }
-
- public static final int COLLAPSIBLE_FIELD_NUMBER = 5;
- private boolean collapsible_ = false;
- /**
- *
- *
- *
- * Indicates whether this section is collapsible.
- *
- * Collapsible sections hide some or all widgets, but users can expand the
- * section to reveal the hidden widgets by clicking **Show more**. Users
- * can hide the widgets again by clicking **Show less**.
- *
- * To determine which widgets are hidden, specify
- * `uncollapsibleWidgetsCount`.
- *
- *
- * bool collapsible = 5;
- *
- * @return The collapsible.
- */
- @java.lang.Override
- public boolean getCollapsible() {
- return collapsible_;
- }
-
- public static final int UNCOLLAPSIBLE_WIDGETS_COUNT_FIELD_NUMBER = 6;
- private int uncollapsibleWidgetsCount_ = 0;
- /**
- *
- *
- *
- * The number of uncollapsible widgets which remain visible even when a
- * section is collapsed.
- *
- * For example, when a section
- * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`,
- * the first two widgets are always shown and the last three are collapsed
- * by default. The `uncollapsibleWidgetsCount` is taken into account only
- * when `collapsible` is `true`.
- *
- *
- * int32 uncollapsible_widgets_count = 6;
- *
- * @return The uncollapsibleWidgetsCount.
- */
- @java.lang.Override
- public int getUncollapsibleWidgetsCount() {
- return uncollapsibleWidgetsCount_;
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, header_);
- }
- for (int i = 0; i < widgets_.size(); i++) {
- output.writeMessage(2, widgets_.get(i));
- }
- if (collapsible_ != false) {
- output.writeBool(5, collapsible_);
- }
- if (uncollapsibleWidgetsCount_ != 0) {
- output.writeInt32(6, uncollapsibleWidgetsCount_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, header_);
- }
- for (int i = 0; i < widgets_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, widgets_.get(i));
- }
- if (collapsible_ != false) {
- size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, collapsible_);
- }
- if (uncollapsibleWidgetsCount_ != 0) {
- size +=
- com.google.protobuf.CodedOutputStream.computeInt32Size(6, uncollapsibleWidgetsCount_);
- }
- 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.Section)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Card.Section other = (com.google.apps.card.v1.Card.Section) obj;
-
- if (!getHeader().equals(other.getHeader())) return false;
- if (!getWidgetsList().equals(other.getWidgetsList())) return false;
- if (getCollapsible() != other.getCollapsible()) return false;
- if (getUncollapsibleWidgetsCount() != other.getUncollapsibleWidgetsCount()) 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) + HEADER_FIELD_NUMBER;
- hash = (53 * hash) + getHeader().hashCode();
- if (getWidgetsCount() > 0) {
- hash = (37 * hash) + WIDGETS_FIELD_NUMBER;
- hash = (53 * hash) + getWidgetsList().hashCode();
- }
- hash = (37 * hash) + COLLAPSIBLE_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCollapsible());
- hash = (37 * hash) + UNCOLLAPSIBLE_WIDGETS_COUNT_FIELD_NUMBER;
- hash = (53 * hash) + getUncollapsibleWidgetsCount();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Card.Section parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.Section 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.Section parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.Section 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.Section parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.Section 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.Section 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.Section 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.Section 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.Section 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.Section 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.Section 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.Section 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 section contains a collection of widgets that are rendered
- * vertically in the order that they're specified.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Card.Section}
- */
- public static final class Builder
- extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Card.Section)
- com.google.apps.card.v1.Card.SectionOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Card_Section_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_Section_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Card.Section.class,
- com.google.apps.card.v1.Card.Section.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Card.Section.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- header_ = "";
- if (widgetsBuilder_ == null) {
- widgets_ = java.util.Collections.emptyList();
- } else {
- widgets_ = null;
- widgetsBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000002);
- collapsible_ = false;
- uncollapsibleWidgetsCount_ = 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_Card_Section_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.Section getDefaultInstanceForType() {
- return com.google.apps.card.v1.Card.Section.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.Section build() {
- com.google.apps.card.v1.Card.Section result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.Section buildPartial() {
- com.google.apps.card.v1.Card.Section result =
- new com.google.apps.card.v1.Card.Section(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.apps.card.v1.Card.Section result) {
- if (widgetsBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0)) {
- widgets_ = java.util.Collections.unmodifiableList(widgets_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.widgets_ = widgets_;
- } else {
- result.widgets_ = widgetsBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.apps.card.v1.Card.Section result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.header_ = header_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.collapsible_ = collapsible_;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.uncollapsibleWidgetsCount_ = uncollapsibleWidgetsCount_;
- }
- }
-
- @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.Section) {
- return mergeFrom((com.google.apps.card.v1.Card.Section) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Card.Section other) {
- if (other == com.google.apps.card.v1.Card.Section.getDefaultInstance()) return this;
- if (!other.getHeader().isEmpty()) {
- header_ = other.header_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (widgetsBuilder_ == null) {
- if (!other.widgets_.isEmpty()) {
- if (widgets_.isEmpty()) {
- widgets_ = other.widgets_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureWidgetsIsMutable();
- widgets_.addAll(other.widgets_);
- }
- onChanged();
- }
- } else {
- if (!other.widgets_.isEmpty()) {
- if (widgetsBuilder_.isEmpty()) {
- widgetsBuilder_.dispose();
- widgetsBuilder_ = null;
- widgets_ = other.widgets_;
- bitField0_ = (bitField0_ & ~0x00000002);
- widgetsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
- ? getWidgetsFieldBuilder()
- : null;
- } else {
- widgetsBuilder_.addAllMessages(other.widgets_);
- }
- }
- }
- if (other.getCollapsible() != false) {
- setCollapsible(other.getCollapsible());
- }
- if (other.getUncollapsibleWidgetsCount() != 0) {
- setUncollapsibleWidgetsCount(other.getUncollapsibleWidgetsCount());
- }
- 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:
- {
- header_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- com.google.apps.card.v1.Widget m =
- input.readMessage(com.google.apps.card.v1.Widget.parser(), extensionRegistry);
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- widgets_.add(m);
- } else {
- widgetsBuilder_.addMessage(m);
- }
- break;
- } // case 18
- case 40:
- {
- collapsible_ = input.readBool();
- bitField0_ |= 0x00000004;
- break;
- } // case 40
- case 48:
- {
- uncollapsibleWidgetsCount_ = input.readInt32();
- bitField0_ |= 0x00000008;
- 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 java.lang.Object header_ = "";
- /**
- *
- *
- *
- * Text that appears at the top of a section.
- * Supports simple HTML formatted text. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string header = 1;
- *
- * @return The header.
- */
- public java.lang.String getHeader() {
- java.lang.Object ref = header_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- header_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * Text that appears at the top of a section.
- * Supports simple HTML formatted text. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string header = 1;
- *
- * @return The bytes for header.
- */
- public com.google.protobuf.ByteString getHeaderBytes() {
- java.lang.Object ref = header_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- header_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * Text that appears at the top of a section.
- * Supports simple HTML formatted text. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string header = 1;
- *
- * @param value The header to set.
- * @return This builder for chaining.
- */
- public Builder setHeader(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- header_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Text that appears at the top of a section.
- * Supports simple HTML formatted text. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string header = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearHeader() {
- header_ = getDefaultInstance().getHeader();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Text that appears at the top of a section.
- * Supports simple HTML formatted text. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string header = 1;
- *
- * @param value The bytes for header to set.
- * @return This builder for chaining.
- */
- public Builder setHeaderBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- header_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.util.List widgets_ =
- java.util.Collections.emptyList();
-
- private void ensureWidgetsIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- widgets_ = new java.util.ArrayList(widgets_);
- bitField0_ |= 0x00000002;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Widget,
- com.google.apps.card.v1.Widget.Builder,
- com.google.apps.card.v1.WidgetOrBuilder>
- widgetsBuilder_;
-
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public java.util.List getWidgetsList() {
- if (widgetsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(widgets_);
- } else {
- return widgetsBuilder_.getMessageList();
- }
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public int getWidgetsCount() {
- if (widgetsBuilder_ == null) {
- return widgets_.size();
- } else {
- return widgetsBuilder_.getCount();
- }
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public com.google.apps.card.v1.Widget getWidgets(int index) {
- if (widgetsBuilder_ == null) {
- return widgets_.get(index);
- } else {
- return widgetsBuilder_.getMessage(index);
- }
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public Builder setWidgets(int index, com.google.apps.card.v1.Widget value) {
- if (widgetsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWidgetsIsMutable();
- widgets_.set(index, value);
- onChanged();
- } else {
- widgetsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public Builder setWidgets(int index, com.google.apps.card.v1.Widget.Builder builderForValue) {
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- widgets_.set(index, builderForValue.build());
- onChanged();
- } else {
- widgetsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public Builder addWidgets(com.google.apps.card.v1.Widget value) {
- if (widgetsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWidgetsIsMutable();
- widgets_.add(value);
- onChanged();
- } else {
- widgetsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public Builder addWidgets(int index, com.google.apps.card.v1.Widget value) {
- if (widgetsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWidgetsIsMutable();
- widgets_.add(index, value);
- onChanged();
- } else {
- widgetsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public Builder addWidgets(com.google.apps.card.v1.Widget.Builder builderForValue) {
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- widgets_.add(builderForValue.build());
- onChanged();
- } else {
- widgetsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public Builder addWidgets(int index, com.google.apps.card.v1.Widget.Builder builderForValue) {
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- widgets_.add(index, builderForValue.build());
- onChanged();
- } else {
- widgetsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public Builder addAllWidgets(
- java.lang.Iterable extends com.google.apps.card.v1.Widget> values) {
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, widgets_);
- onChanged();
- } else {
- widgetsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public Builder clearWidgets() {
- if (widgetsBuilder_ == null) {
- widgets_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- } else {
- widgetsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public Builder removeWidgets(int index) {
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- widgets_.remove(index);
- onChanged();
- } else {
- widgetsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public com.google.apps.card.v1.Widget.Builder getWidgetsBuilder(int index) {
- return getWidgetsFieldBuilder().getBuilder(index);
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public com.google.apps.card.v1.WidgetOrBuilder getWidgetsOrBuilder(int index) {
- if (widgetsBuilder_ == null) {
- return widgets_.get(index);
- } else {
- return widgetsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public java.util.List extends com.google.apps.card.v1.WidgetOrBuilder>
- getWidgetsOrBuilderList() {
- if (widgetsBuilder_ != null) {
- return widgetsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(widgets_);
- }
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public com.google.apps.card.v1.Widget.Builder addWidgetsBuilder() {
- return getWidgetsFieldBuilder()
- .addBuilder(com.google.apps.card.v1.Widget.getDefaultInstance());
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public com.google.apps.card.v1.Widget.Builder addWidgetsBuilder(int index) {
- return getWidgetsFieldBuilder()
- .addBuilder(index, com.google.apps.card.v1.Widget.getDefaultInstance());
- }
- /**
- *
- *
- *
- * All the widgets in the section.
- * Must contain at least one widget.
- *
- *
- * repeated .google.apps.card.v1.Widget widgets = 2;
- */
- public java.util.List getWidgetsBuilderList() {
- return getWidgetsFieldBuilder().getBuilderList();
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Widget,
- com.google.apps.card.v1.Widget.Builder,
- com.google.apps.card.v1.WidgetOrBuilder>
- getWidgetsFieldBuilder() {
- if (widgetsBuilder_ == null) {
- widgetsBuilder_ =
- new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Widget,
- com.google.apps.card.v1.Widget.Builder,
- com.google.apps.card.v1.WidgetOrBuilder>(
- widgets_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
- widgets_ = null;
- }
- return widgetsBuilder_;
- }
-
- private boolean collapsible_;
- /**
- *
- *
- *
- * Indicates whether this section is collapsible.
- *
- * Collapsible sections hide some or all widgets, but users can expand the
- * section to reveal the hidden widgets by clicking **Show more**. Users
- * can hide the widgets again by clicking **Show less**.
- *
- * To determine which widgets are hidden, specify
- * `uncollapsibleWidgetsCount`.
- *
- *
- * bool collapsible = 5;
- *
- * @return The collapsible.
- */
- @java.lang.Override
- public boolean getCollapsible() {
- return collapsible_;
- }
- /**
- *
- *
- *
- * Indicates whether this section is collapsible.
- *
- * Collapsible sections hide some or all widgets, but users can expand the
- * section to reveal the hidden widgets by clicking **Show more**. Users
- * can hide the widgets again by clicking **Show less**.
- *
- * To determine which widgets are hidden, specify
- * `uncollapsibleWidgetsCount`.
- *
- *
- * bool collapsible = 5;
- *
- * @param value The collapsible to set.
- * @return This builder for chaining.
- */
- public Builder setCollapsible(boolean value) {
-
- collapsible_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Indicates whether this section is collapsible.
- *
- * Collapsible sections hide some or all widgets, but users can expand the
- * section to reveal the hidden widgets by clicking **Show more**. Users
- * can hide the widgets again by clicking **Show less**.
- *
- * To determine which widgets are hidden, specify
- * `uncollapsibleWidgetsCount`.
- *
- *
- * bool collapsible = 5;
- *
- * @return This builder for chaining.
- */
- public Builder clearCollapsible() {
- bitField0_ = (bitField0_ & ~0x00000004);
- collapsible_ = false;
- onChanged();
- return this;
- }
-
- private int uncollapsibleWidgetsCount_;
- /**
- *
- *
- *
- * The number of uncollapsible widgets which remain visible even when a
- * section is collapsed.
- *
- * For example, when a section
- * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`,
- * the first two widgets are always shown and the last three are collapsed
- * by default. The `uncollapsibleWidgetsCount` is taken into account only
- * when `collapsible` is `true`.
- *
- *
- * int32 uncollapsible_widgets_count = 6;
- *
- * @return The uncollapsibleWidgetsCount.
- */
- @java.lang.Override
- public int getUncollapsibleWidgetsCount() {
- return uncollapsibleWidgetsCount_;
- }
- /**
- *
- *
- *
- * The number of uncollapsible widgets which remain visible even when a
- * section is collapsed.
- *
- * For example, when a section
- * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`,
- * the first two widgets are always shown and the last three are collapsed
- * by default. The `uncollapsibleWidgetsCount` is taken into account only
- * when `collapsible` is `true`.
- *
- *
- * int32 uncollapsible_widgets_count = 6;
- *
- * @param value The uncollapsibleWidgetsCount to set.
- * @return This builder for chaining.
- */
- public Builder setUncollapsibleWidgetsCount(int value) {
-
- uncollapsibleWidgetsCount_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The number of uncollapsible widgets which remain visible even when a
- * section is collapsed.
- *
- * For example, when a section
- * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`,
- * the first two widgets are always shown and the last three are collapsed
- * by default. The `uncollapsibleWidgetsCount` is taken into account only
- * when `collapsible` is `true`.
- *
- *
- * int32 uncollapsible_widgets_count = 6;
- *
- * @return This builder for chaining.
- */
- public Builder clearUncollapsibleWidgetsCount() {
- bitField0_ = (bitField0_ & ~0x00000008);
- uncollapsibleWidgetsCount_ = 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.Card.Section)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Card.Section)
- private static final com.google.apps.card.v1.Card.Section DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Card.Section();
- }
-
- public static com.google.apps.card.v1.Card.Section getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Section 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.Section getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
- }
-
- public interface CardActionOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Card.CardAction)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The label that displays as the action menu item.
- *
- *
- * string action_label = 1;
- *
- * @return The actionLabel.
- */
- java.lang.String getActionLabel();
- /**
- *
- *
- *
- * The label that displays as the action menu item.
- *
- *
- * string action_label = 1;
- *
- * @return The bytes for actionLabel.
- */
- com.google.protobuf.ByteString getActionLabelBytes();
-
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @return Whether the onClick field is set.
- */
- boolean hasOnClick();
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @return The onClick.
- */
- com.google.apps.card.v1.OnClick getOnClick();
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder();
- }
- /**
- *
- *
- *
- * A card action is the action associated with the card. For example,
- * an invoice card might include actions such as delete invoice, email
- * invoice, or open the invoice in a browser.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Card.CardAction}
- */
- public static final class CardAction extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Card.CardAction)
- CardActionOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use CardAction.newBuilder() to construct.
- private CardAction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private CardAction() {
- actionLabel_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new CardAction();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Card_CardAction_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_CardAction_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Card.CardAction.class,
- com.google.apps.card.v1.Card.CardAction.Builder.class);
- }
-
- private int bitField0_;
- public static final int ACTION_LABEL_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object actionLabel_ = "";
- /**
- *
- *
- *
- * The label that displays as the action menu item.
- *
- *
- * string action_label = 1;
- *
- * @return The actionLabel.
- */
- @java.lang.Override
- public java.lang.String getActionLabel() {
- java.lang.Object ref = actionLabel_;
- 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();
- actionLabel_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The label that displays as the action menu item.
- *
- *
- * string action_label = 1;
- *
- * @return The bytes for actionLabel.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getActionLabelBytes() {
- java.lang.Object ref = actionLabel_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- actionLabel_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ON_CLICK_FIELD_NUMBER = 2;
- private com.google.apps.card.v1.OnClick onClick_;
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @return Whether the onClick field is set.
- */
- @java.lang.Override
- public boolean hasOnClick() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @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_;
- }
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder() {
- return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_;
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionLabel_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, actionLabel_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(2, getOnClick());
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionLabel_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, actionLabel_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOnClick());
- }
- 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.CardAction)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Card.CardAction other = (com.google.apps.card.v1.Card.CardAction) obj;
-
- if (!getActionLabel().equals(other.getActionLabel())) return false;
- if (hasOnClick() != other.hasOnClick()) return false;
- if (hasOnClick()) {
- if (!getOnClick().equals(other.getOnClick())) 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) + ACTION_LABEL_FIELD_NUMBER;
- hash = (53 * hash) + getActionLabel().hashCode();
- if (hasOnClick()) {
- hash = (37 * hash) + ON_CLICK_FIELD_NUMBER;
- hash = (53 * hash) + getOnClick().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Card.CardAction parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.CardAction 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.CardAction parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.CardAction 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.CardAction parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.CardAction 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.CardAction 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.CardAction 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.CardAction 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.CardAction 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.CardAction 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.CardAction 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.CardAction 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 action is the action associated with the card. For example,
- * an invoice card might include actions such as delete invoice, email
- * invoice, or open the invoice in a browser.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Card.CardAction}
- */
- public static final class Builder
- extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Card.CardAction)
- com.google.apps.card.v1.Card.CardActionOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Card_CardAction_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_CardAction_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Card.CardAction.class,
- com.google.apps.card.v1.Card.CardAction.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Card.CardAction.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getOnClickFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- actionLabel_ = "";
- onClick_ = null;
- if (onClickBuilder_ != null) {
- onClickBuilder_.dispose();
- onClickBuilder_ = 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_CardAction_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardAction getDefaultInstanceForType() {
- return com.google.apps.card.v1.Card.CardAction.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardAction build() {
- com.google.apps.card.v1.Card.CardAction result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardAction buildPartial() {
- com.google.apps.card.v1.Card.CardAction result =
- new com.google.apps.card.v1.Card.CardAction(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.Card.CardAction result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.actionLabel_ = actionLabel_;
- }
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.onClick_ = onClickBuilder_ == null ? onClick_ : onClickBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- 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.Card.CardAction) {
- return mergeFrom((com.google.apps.card.v1.Card.CardAction) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Card.CardAction other) {
- if (other == com.google.apps.card.v1.Card.CardAction.getDefaultInstance()) return this;
- if (!other.getActionLabel().isEmpty()) {
- actionLabel_ = other.actionLabel_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (other.hasOnClick()) {
- mergeOnClick(other.getOnClick());
- }
- 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:
- {
- actionLabel_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- input.readMessage(getOnClickFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- default:
- {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object actionLabel_ = "";
- /**
- *
- *
- *
- * The label that displays as the action menu item.
- *
- *
- * string action_label = 1;
- *
- * @return The actionLabel.
- */
- public java.lang.String getActionLabel() {
- java.lang.Object ref = actionLabel_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- actionLabel_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The label that displays as the action menu item.
- *
- *
- * string action_label = 1;
- *
- * @return The bytes for actionLabel.
- */
- public com.google.protobuf.ByteString getActionLabelBytes() {
- java.lang.Object ref = actionLabel_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- actionLabel_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The label that displays as the action menu item.
- *
- *
- * string action_label = 1;
- *
- * @param value The actionLabel to set.
- * @return This builder for chaining.
- */
- public Builder setActionLabel(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- actionLabel_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The label that displays as the action menu item.
- *
- *
- * string action_label = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearActionLabel() {
- actionLabel_ = getDefaultInstance().getActionLabel();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The label that displays as the action menu item.
- *
- *
- * string action_label = 1;
- *
- * @param value The bytes for actionLabel to set.
- * @return This builder for chaining.
- */
- public Builder setActionLabelBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- actionLabel_ = value;
- bitField0_ |= 0x00000001;
- 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_;
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @return Whether the onClick field is set.
- */
- public boolean hasOnClick() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @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();
- }
- }
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- 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_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- public Builder setOnClick(com.google.apps.card.v1.OnClick.Builder builderForValue) {
- if (onClickBuilder_ == null) {
- onClick_ = builderForValue.build();
- } else {
- onClickBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) {
- if (onClickBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 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_ |= 0x00000002;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- public Builder clearOnClick() {
- bitField0_ = (bitField0_ & ~0x00000002);
- onClick_ = null;
- if (onClickBuilder_ != null) {
- onClickBuilder_.dispose();
- onClickBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- public com.google.apps.card.v1.OnClick.Builder getOnClickBuilder() {
- bitField0_ |= 0x00000002;
- onChanged();
- return getOnClickFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- 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_;
- }
- }
- /**
- *
- *
- *
- * The `onClick` action for this action item.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- 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_;
- }
-
- @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.CardAction)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Card.CardAction)
- private static final com.google.apps.card.v1.Card.CardAction DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Card.CardAction();
- }
-
- public static com.google.apps.card.v1.Card.CardAction getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public CardAction 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.CardAction 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- * For an example in Google Chat apps, see [Card
- * footer](https://developers.google.com/chat/ui/widgets/card-fixed-footer).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Card.CardFixedFooter}
- */
- public static final class CardFixedFooter extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Card.CardFixedFooter)
- CardFixedFooterOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use CardFixedFooter.newBuilder() to construct.
- private CardFixedFooter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private CardFixedFooter() {}
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new CardFixedFooter();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Card_CardFixedFooter_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_CardFixedFooter_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Card.CardFixedFooter.class,
- com.google.apps.card.v1.Card.CardFixedFooter.Builder.class);
- }
-
- private int bitField0_;
- public static final int PRIMARY_BUTTON_FIELD_NUMBER = 1;
- private com.google.apps.card.v1.Button primaryButton_;
- /**
- *
- *
- *
- * 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.
- */
- @java.lang.Override
- public boolean hasPrimaryButton() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * 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.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Button getPrimaryButton() {
- return primaryButton_ == null
- ? com.google.apps.card.v1.Button.getDefaultInstance()
- : primaryButton_;
- }
- /**
- *
- *
- *
- * 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;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ButtonOrBuilder getPrimaryButtonOrBuilder() {
- return primaryButton_ == null
- ? com.google.apps.card.v1.Button.getDefaultInstance()
- : primaryButton_;
- }
-
- public static final int SECONDARY_BUTTON_FIELD_NUMBER = 2;
- private com.google.apps.card.v1.Button secondaryButton_;
- /**
- *
- *
- *
- * 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.
- */
- @java.lang.Override
- public boolean hasSecondaryButton() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *
- *
- * 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.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Button getSecondaryButton() {
- return secondaryButton_ == null
- ? com.google.apps.card.v1.Button.getDefaultInstance()
- : secondaryButton_;
- }
- /**
- *
- *
- *
- * 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;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ButtonOrBuilder getSecondaryButtonOrBuilder() {
- return secondaryButton_ == null
- ? com.google.apps.card.v1.Button.getDefaultInstance()
- : secondaryButton_;
- }
-
- 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, getPrimaryButton());
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeMessage(2, getSecondaryButton());
- }
- 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, getPrimaryButton());
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSecondaryButton());
- }
- 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.CardFixedFooter)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Card.CardFixedFooter other =
- (com.google.apps.card.v1.Card.CardFixedFooter) obj;
-
- if (hasPrimaryButton() != other.hasPrimaryButton()) return false;
- if (hasPrimaryButton()) {
- if (!getPrimaryButton().equals(other.getPrimaryButton())) return false;
- }
- if (hasSecondaryButton() != other.hasSecondaryButton()) return false;
- if (hasSecondaryButton()) {
- if (!getSecondaryButton().equals(other.getSecondaryButton())) 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 (hasPrimaryButton()) {
- hash = (37 * hash) + PRIMARY_BUTTON_FIELD_NUMBER;
- hash = (53 * hash) + getPrimaryButton().hashCode();
- }
- if (hasSecondaryButton()) {
- hash = (37 * hash) + SECONDARY_BUTTON_FIELD_NUMBER;
- hash = (53 * hash) + getSecondaryButton().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Card.CardFixedFooter parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.CardFixedFooter 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.CardFixedFooter parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.CardFixedFooter 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.CardFixedFooter parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card.CardFixedFooter 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.CardFixedFooter 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.CardFixedFooter 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.CardFixedFooter 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.CardFixedFooter 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.CardFixedFooter 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.CardFixedFooter 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.CardFixedFooter 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 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- * For an example in Google Chat apps, see [Card
- * footer](https://developers.google.com/chat/ui/widgets/card-fixed-footer).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Card.CardFixedFooter}
- */
- public static final class Builder
- extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Card.CardFixedFooter)
- com.google.apps.card.v1.Card.CardFixedFooterOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Card_CardFixedFooter_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_CardFixedFooter_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Card.CardFixedFooter.class,
- com.google.apps.card.v1.Card.CardFixedFooter.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Card.CardFixedFooter.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getPrimaryButtonFieldBuilder();
- getSecondaryButtonFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- primaryButton_ = null;
- if (primaryButtonBuilder_ != null) {
- primaryButtonBuilder_.dispose();
- primaryButtonBuilder_ = null;
- }
- secondaryButton_ = null;
- if (secondaryButtonBuilder_ != null) {
- secondaryButtonBuilder_.dispose();
- secondaryButtonBuilder_ = 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_CardFixedFooter_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardFixedFooter getDefaultInstanceForType() {
- return com.google.apps.card.v1.Card.CardFixedFooter.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardFixedFooter build() {
- com.google.apps.card.v1.Card.CardFixedFooter result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardFixedFooter buildPartial() {
- com.google.apps.card.v1.Card.CardFixedFooter result =
- new com.google.apps.card.v1.Card.CardFixedFooter(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.Card.CardFixedFooter result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.primaryButton_ =
- primaryButtonBuilder_ == null ? primaryButton_ : primaryButtonBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.secondaryButton_ =
- secondaryButtonBuilder_ == null ? secondaryButton_ : secondaryButtonBuilder_.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.Card.CardFixedFooter) {
- return mergeFrom((com.google.apps.card.v1.Card.CardFixedFooter) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Card.CardFixedFooter other) {
- if (other == com.google.apps.card.v1.Card.CardFixedFooter.getDefaultInstance()) return this;
- if (other.hasPrimaryButton()) {
- mergePrimaryButton(other.getPrimaryButton());
- }
- if (other.hasSecondaryButton()) {
- mergeSecondaryButton(other.getSecondaryButton());
- }
- 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(getPrimaryButtonFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- input.readMessage(
- getSecondaryButtonFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- default:
- {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
-
- private int bitField0_;
-
- private com.google.apps.card.v1.Button primaryButton_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>
- primaryButtonBuilder_;
- /**
- *
- *
- *
- * 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.
- */
- public boolean hasPrimaryButton() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * 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.
- */
- public com.google.apps.card.v1.Button getPrimaryButton() {
- if (primaryButtonBuilder_ == null) {
- return primaryButton_ == null
- ? com.google.apps.card.v1.Button.getDefaultInstance()
- : primaryButton_;
- } else {
- return primaryButtonBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * 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;
- */
- public Builder setPrimaryButton(com.google.apps.card.v1.Button value) {
- if (primaryButtonBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- primaryButton_ = value;
- } else {
- primaryButtonBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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;
- */
- public Builder setPrimaryButton(com.google.apps.card.v1.Button.Builder builderForValue) {
- if (primaryButtonBuilder_ == null) {
- primaryButton_ = builderForValue.build();
- } else {
- primaryButtonBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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;
- */
- public Builder mergePrimaryButton(com.google.apps.card.v1.Button value) {
- if (primaryButtonBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)
- && primaryButton_ != null
- && primaryButton_ != com.google.apps.card.v1.Button.getDefaultInstance()) {
- getPrimaryButtonBuilder().mergeFrom(value);
- } else {
- primaryButton_ = value;
- }
- } else {
- primaryButtonBuilder_.mergeFrom(value);
- }
- if (primaryButton_ != null) {
- bitField0_ |= 0x00000001;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * 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;
- */
- public Builder clearPrimaryButton() {
- bitField0_ = (bitField0_ & ~0x00000001);
- primaryButton_ = null;
- if (primaryButtonBuilder_ != null) {
- primaryButtonBuilder_.dispose();
- primaryButtonBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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;
- */
- public com.google.apps.card.v1.Button.Builder getPrimaryButtonBuilder() {
- bitField0_ |= 0x00000001;
- onChanged();
- return getPrimaryButtonFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * 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;
- */
- public com.google.apps.card.v1.ButtonOrBuilder getPrimaryButtonOrBuilder() {
- if (primaryButtonBuilder_ != null) {
- return primaryButtonBuilder_.getMessageOrBuilder();
- } else {
- return primaryButton_ == null
- ? com.google.apps.card.v1.Button.getDefaultInstance()
- : primaryButton_;
- }
- }
- /**
- *
- *
- *
- * 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;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>
- getPrimaryButtonFieldBuilder() {
- if (primaryButtonBuilder_ == null) {
- primaryButtonBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>(
- getPrimaryButton(), getParentForChildren(), isClean());
- primaryButton_ = null;
- }
- return primaryButtonBuilder_;
- }
-
- private com.google.apps.card.v1.Button secondaryButton_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>
- secondaryButtonBuilder_;
- /**
- *
- *
- *
- * 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.
- */
- public boolean hasSecondaryButton() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *
- *
- * 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.
- */
- public com.google.apps.card.v1.Button getSecondaryButton() {
- if (secondaryButtonBuilder_ == null) {
- return secondaryButton_ == null
- ? com.google.apps.card.v1.Button.getDefaultInstance()
- : secondaryButton_;
- } else {
- return secondaryButtonBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * 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;
- */
- public Builder setSecondaryButton(com.google.apps.card.v1.Button value) {
- if (secondaryButtonBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- secondaryButton_ = value;
- } else {
- secondaryButtonBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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;
- */
- public Builder setSecondaryButton(com.google.apps.card.v1.Button.Builder builderForValue) {
- if (secondaryButtonBuilder_ == null) {
- secondaryButton_ = builderForValue.build();
- } else {
- secondaryButtonBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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;
- */
- public Builder mergeSecondaryButton(com.google.apps.card.v1.Button value) {
- if (secondaryButtonBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0)
- && secondaryButton_ != null
- && secondaryButton_ != com.google.apps.card.v1.Button.getDefaultInstance()) {
- getSecondaryButtonBuilder().mergeFrom(value);
- } else {
- secondaryButton_ = value;
- }
- } else {
- secondaryButtonBuilder_.mergeFrom(value);
- }
- if (secondaryButton_ != null) {
- bitField0_ |= 0x00000002;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * 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;
- */
- public Builder clearSecondaryButton() {
- bitField0_ = (bitField0_ & ~0x00000002);
- secondaryButton_ = null;
- if (secondaryButtonBuilder_ != null) {
- secondaryButtonBuilder_.dispose();
- secondaryButtonBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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;
- */
- public com.google.apps.card.v1.Button.Builder getSecondaryButtonBuilder() {
- bitField0_ |= 0x00000002;
- onChanged();
- return getSecondaryButtonFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * 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;
- */
- public com.google.apps.card.v1.ButtonOrBuilder getSecondaryButtonOrBuilder() {
- if (secondaryButtonBuilder_ != null) {
- return secondaryButtonBuilder_.getMessageOrBuilder();
- } else {
- return secondaryButton_ == null
- ? com.google.apps.card.v1.Button.getDefaultInstance()
- : secondaryButton_;
- }
- }
- /**
- *
- *
- *
- * 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;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>
- getSecondaryButtonFieldBuilder() {
- if (secondaryButtonBuilder_ == null) {
- secondaryButtonBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>(
- getSecondaryButton(), getParentForChildren(), isClean());
- secondaryButton_ = null;
- }
- return secondaryButtonBuilder_;
- }
-
- @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.CardFixedFooter)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Card.CardFixedFooter)
- private static final com.google.apps.card.v1.Card.CardFixedFooter DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Card.CardFixedFooter();
- }
-
- public static com.google.apps.card.v1.Card.CardFixedFooter getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public CardFixedFooter 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.CardFixedFooter getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
- }
-
- private int bitField0_;
- public static final int HEADER_FIELD_NUMBER = 1;
- private com.google.apps.card.v1.Card.CardHeader header_;
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- *
- * @return Whether the header field is set.
- */
- @java.lang.Override
- public boolean hasHeader() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- *
- * @return The header.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardHeader getHeader() {
- return header_ == null ? com.google.apps.card.v1.Card.CardHeader.getDefaultInstance() : header_;
- }
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardHeaderOrBuilder getHeaderOrBuilder() {
- return header_ == null ? com.google.apps.card.v1.Card.CardHeader.getDefaultInstance() : header_;
- }
-
- public static final int SECTIONS_FIELD_NUMBER = 2;
-
- @SuppressWarnings("serial")
- private java.util.List sections_;
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- @java.lang.Override
- public java.util.List getSectionsList() {
- return sections_;
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- @java.lang.Override
- public java.util.List extends com.google.apps.card.v1.Card.SectionOrBuilder>
- getSectionsOrBuilderList() {
- return sections_;
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- @java.lang.Override
- public int getSectionsCount() {
- return sections_.size();
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.Section getSections(int index) {
- return sections_.get(index);
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.SectionOrBuilder getSectionsOrBuilder(int index) {
- return sections_.get(index);
- }
-
- public static final int SECTION_DIVIDER_STYLE_FIELD_NUMBER = 9;
- private int sectionDividerStyle_ = 0;
- /**
- *
- *
- *
- * The divider style between sections.
- *
- *
- * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9;
- *
- * @return The enum numeric value on the wire for sectionDividerStyle.
- */
- @java.lang.Override
- public int getSectionDividerStyleValue() {
- return sectionDividerStyle_;
- }
- /**
- *
- *
- *
- * The divider style between sections.
- *
- *
- * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9;
- *
- * @return The sectionDividerStyle.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.DividerStyle getSectionDividerStyle() {
- com.google.apps.card.v1.Card.DividerStyle result =
- com.google.apps.card.v1.Card.DividerStyle.forNumber(sectionDividerStyle_);
- return result == null ? com.google.apps.card.v1.Card.DividerStyle.UNRECOGNIZED : result;
- }
-
- public static final int CARD_ACTIONS_FIELD_NUMBER = 3;
-
- @SuppressWarnings("serial")
- private java.util.List cardActions_;
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- @java.lang.Override
- public java.util.List getCardActionsList() {
- return cardActions_;
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- @java.lang.Override
- public java.util.List extends com.google.apps.card.v1.Card.CardActionOrBuilder>
- getCardActionsOrBuilderList() {
- return cardActions_;
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- @java.lang.Override
- public int getCardActionsCount() {
- return cardActions_.size();
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardAction getCardActions(int index) {
- return cardActions_.get(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):
- *
- * For example, the following JSON constructs a card action menu with
- * `Settings` and `Send Feedback` options:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardActionOrBuilder getCardActionsOrBuilder(int index) {
- return cardActions_.get(index);
- }
-
- public static final int NAME_FIELD_NUMBER = 4;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object name_ = "";
- /**
- *
- *
- *
- * Name of the card. Used as a card identifier in card navigation.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * string name = 4;
- *
- * @return The name.
- */
- @java.lang.Override
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- 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();
- name_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * Name of the card. Used as a card identifier in card navigation.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * string name = 4;
- *
- * @return The bytes for name.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int FIXED_FOOTER_FIELD_NUMBER = 5;
- private com.google.apps.card.v1.Card.CardFixedFooter fixedFooter_;
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- *
- * @return Whether the fixedFooter field is set.
- */
- @java.lang.Override
- public boolean hasFixedFooter() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- *
- * @return The fixedFooter.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardFixedFooter getFixedFooter() {
- return fixedFooter_ == null
- ? com.google.apps.card.v1.Card.CardFixedFooter.getDefaultInstance()
- : fixedFooter_;
- }
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardFixedFooterOrBuilder getFixedFooterOrBuilder() {
- return fixedFooter_ == null
- ? com.google.apps.card.v1.Card.CardFixedFooter.getDefaultInstance()
- : fixedFooter_;
- }
-
- public static final int DISPLAY_STYLE_FIELD_NUMBER = 6;
- private int displayStyle_ = 0;
- /**
- *
- *
- *
- * In Google Workspace Add-ons, sets the display properties of the
- * `peekCardHeader`.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.DisplayStyle display_style = 6;
- *
- * @return The enum numeric value on the wire for displayStyle.
- */
- @java.lang.Override
- public int getDisplayStyleValue() {
- return displayStyle_;
- }
- /**
- *
- *
- *
- * In Google Workspace Add-ons, sets the display properties of the
- * `peekCardHeader`.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.DisplayStyle display_style = 6;
- *
- * @return The displayStyle.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.DisplayStyle getDisplayStyle() {
- com.google.apps.card.v1.Card.DisplayStyle result =
- com.google.apps.card.v1.Card.DisplayStyle.forNumber(displayStyle_);
- return result == null ? com.google.apps.card.v1.Card.DisplayStyle.UNRECOGNIZED : result;
- }
-
- public static final int PEEK_CARD_HEADER_FIELD_NUMBER = 7;
- private com.google.apps.card.v1.Card.CardHeader peekCardHeader_;
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- *
- * @return Whether the peekCardHeader field is set.
- */
- @java.lang.Override
- public boolean hasPeekCardHeader() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- *
- * @return The peekCardHeader.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardHeader getPeekCardHeader() {
- return peekCardHeader_ == null
- ? com.google.apps.card.v1.Card.CardHeader.getDefaultInstance()
- : peekCardHeader_;
- }
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.CardHeaderOrBuilder getPeekCardHeaderOrBuilder() {
- return peekCardHeader_ == null
- ? com.google.apps.card.v1.Card.CardHeader.getDefaultInstance()
- : peekCardHeader_;
- }
-
- 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, getHeader());
- }
- for (int i = 0; i < sections_.size(); i++) {
- output.writeMessage(2, sections_.get(i));
- }
- for (int i = 0; i < cardActions_.size(); i++) {
- output.writeMessage(3, cardActions_.get(i));
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeMessage(5, getFixedFooter());
- }
- if (displayStyle_
- != com.google.apps.card.v1.Card.DisplayStyle.DISPLAY_STYLE_UNSPECIFIED.getNumber()) {
- output.writeEnum(6, displayStyle_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeMessage(7, getPeekCardHeader());
- }
- if (sectionDividerStyle_
- != com.google.apps.card.v1.Card.DividerStyle.DIVIDER_STYLE_UNSPECIFIED.getNumber()) {
- output.writeEnum(9, sectionDividerStyle_);
- }
- 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, getHeader());
- }
- for (int i = 0; i < sections_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, sections_.get(i));
- }
- for (int i = 0; i < cardActions_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, cardActions_.get(i));
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFixedFooter());
- }
- if (displayStyle_
- != com.google.apps.card.v1.Card.DisplayStyle.DISPLAY_STYLE_UNSPECIFIED.getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, displayStyle_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPeekCardHeader());
- }
- if (sectionDividerStyle_
- != com.google.apps.card.v1.Card.DividerStyle.DIVIDER_STYLE_UNSPECIFIED.getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, sectionDividerStyle_);
- }
- 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)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Card other = (com.google.apps.card.v1.Card) obj;
-
- if (hasHeader() != other.hasHeader()) return false;
- if (hasHeader()) {
- if (!getHeader().equals(other.getHeader())) return false;
- }
- if (!getSectionsList().equals(other.getSectionsList())) return false;
- if (sectionDividerStyle_ != other.sectionDividerStyle_) return false;
- if (!getCardActionsList().equals(other.getCardActionsList())) return false;
- if (!getName().equals(other.getName())) return false;
- if (hasFixedFooter() != other.hasFixedFooter()) return false;
- if (hasFixedFooter()) {
- if (!getFixedFooter().equals(other.getFixedFooter())) return false;
- }
- if (displayStyle_ != other.displayStyle_) return false;
- if (hasPeekCardHeader() != other.hasPeekCardHeader()) return false;
- if (hasPeekCardHeader()) {
- if (!getPeekCardHeader().equals(other.getPeekCardHeader())) 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 (hasHeader()) {
- hash = (37 * hash) + HEADER_FIELD_NUMBER;
- hash = (53 * hash) + getHeader().hashCode();
- }
- if (getSectionsCount() > 0) {
- hash = (37 * hash) + SECTIONS_FIELD_NUMBER;
- hash = (53 * hash) + getSectionsList().hashCode();
- }
- hash = (37 * hash) + SECTION_DIVIDER_STYLE_FIELD_NUMBER;
- hash = (53 * hash) + sectionDividerStyle_;
- if (getCardActionsCount() > 0) {
- hash = (37 * hash) + CARD_ACTIONS_FIELD_NUMBER;
- hash = (53 * hash) + getCardActionsList().hashCode();
- }
- hash = (37 * hash) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- if (hasFixedFooter()) {
- hash = (37 * hash) + FIXED_FOOTER_FIELD_NUMBER;
- hash = (53 * hash) + getFixedFooter().hashCode();
- }
- hash = (37 * hash) + DISPLAY_STYLE_FIELD_NUMBER;
- hash = (53 * hash) + displayStyle_;
- if (hasPeekCardHeader()) {
- hash = (37 * hash) + PEEK_CARD_HEADER_FIELD_NUMBER;
- hash = (53 * hash) + getPeekCardHeader().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Card parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card 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 parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card 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 parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Card 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 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 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 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 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 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 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 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 interface displayed in a Google Chat message or Google Workspace
- * Add-on.
- *
- * Cards support a defined layout, interactive UI elements like buttons, and
- * rich media like images. Use cards to present detailed information,
- * gather information from users, and guide users to take a next step.
- *
- * [Card builder](https://addons.gsuite.google.com/uikit/builder)
- *
- * To learn how
- * to build cards, see the following documentation:
- *
- * * For Google Chat apps, see [Design dynamic, interactive, and consistent UIs
- * with cards](https://developers.google.com/chat/ui).
- * * For Google Workspace Add-ons, see [Card-based
- * interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards).
- *
- * **Example: Card message for a Google Chat app**
- *
- * 
- *
- * To create the sample card message in Google Chat, use the following JSON:
- *
- * ```
- * {
- * "cardsV2": [
- * {
- * "cardId": "unique-card-id",
- * "card": {
- * "header": {
- * "title": "Sasha",
- * "subtitle": "Software Engineer",
- * "imageUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png",
- * "imageType": "CIRCLE",
- * "imageAltText": "Avatar for Sasha",
- * },
- * "sections": [
- * {
- * "header": "Contact Info",
- * "collapsible": true,
- * "uncollapsibleWidgetsCount": 1,
- * "widgets": [
- * {
- * "decoratedText": {
- * "startIcon": {
- * "knownIcon": "EMAIL",
- * },
- * "text": "sasha@example.com",
- * }
- * },
- * {
- * "decoratedText": {
- * "startIcon": {
- * "knownIcon": "PERSON",
- * },
- * "text": "<font color=\"#80e27e\">Online</font>",
- * },
- * },
- * {
- * "decoratedText": {
- * "startIcon": {
- * "knownIcon": "PHONE",
- * },
- * "text": "+1 (555) 555-1234",
- * }
- * },
- * {
- * "buttonList": {
- * "buttons": [
- * {
- * "text": "Share",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/share",
- * }
- * }
- * },
- * {
- * "text": "Edit",
- * "onClick": {
- * "action": {
- * "function": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "EDIT",
- * }
- * ],
- * }
- * }
- * },
- * ],
- * }
- * },
- * ],
- * },
- * ],
- * },
- * }
- * ],
- * }
- * ```
- *
- *
- * Protobuf type {@code google.apps.card.v1.Card}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Card)
- com.google.apps.card.v1.CardOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Card_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_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Card.class, com.google.apps.card.v1.Card.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Card.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getHeaderFieldBuilder();
- getSectionsFieldBuilder();
- getCardActionsFieldBuilder();
- getFixedFooterFieldBuilder();
- getPeekCardHeaderFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- header_ = null;
- if (headerBuilder_ != null) {
- headerBuilder_.dispose();
- headerBuilder_ = null;
- }
- if (sectionsBuilder_ == null) {
- sections_ = java.util.Collections.emptyList();
- } else {
- sections_ = null;
- sectionsBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000002);
- sectionDividerStyle_ = 0;
- if (cardActionsBuilder_ == null) {
- cardActions_ = java.util.Collections.emptyList();
- } else {
- cardActions_ = null;
- cardActionsBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000008);
- name_ = "";
- fixedFooter_ = null;
- if (fixedFooterBuilder_ != null) {
- fixedFooterBuilder_.dispose();
- fixedFooterBuilder_ = null;
- }
- displayStyle_ = 0;
- peekCardHeader_ = null;
- if (peekCardHeaderBuilder_ != null) {
- peekCardHeaderBuilder_.dispose();
- peekCardHeaderBuilder_ = 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_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card getDefaultInstanceForType() {
- return com.google.apps.card.v1.Card.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card build() {
- com.google.apps.card.v1.Card result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Card buildPartial() {
- com.google.apps.card.v1.Card result = new com.google.apps.card.v1.Card(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.apps.card.v1.Card result) {
- if (sectionsBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0)) {
- sections_ = java.util.Collections.unmodifiableList(sections_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.sections_ = sections_;
- } else {
- result.sections_ = sectionsBuilder_.build();
- }
- if (cardActionsBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0)) {
- cardActions_ = java.util.Collections.unmodifiableList(cardActions_);
- bitField0_ = (bitField0_ & ~0x00000008);
- }
- result.cardActions_ = cardActions_;
- } else {
- result.cardActions_ = cardActionsBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.apps.card.v1.Card result) {
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.sectionDividerStyle_ = sectionDividerStyle_;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.name_ = name_;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.fixedFooter_ =
- fixedFooterBuilder_ == null ? fixedFooter_ : fixedFooterBuilder_.build();
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000040) != 0)) {
- result.displayStyle_ = displayStyle_;
- }
- if (((from_bitField0_ & 0x00000080) != 0)) {
- result.peekCardHeader_ =
- peekCardHeaderBuilder_ == null ? peekCardHeader_ : peekCardHeaderBuilder_.build();
- to_bitField0_ |= 0x00000004;
- }
- 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.Card) {
- return mergeFrom((com.google.apps.card.v1.Card) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Card other) {
- if (other == com.google.apps.card.v1.Card.getDefaultInstance()) return this;
- if (other.hasHeader()) {
- mergeHeader(other.getHeader());
- }
- if (sectionsBuilder_ == null) {
- if (!other.sections_.isEmpty()) {
- if (sections_.isEmpty()) {
- sections_ = other.sections_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureSectionsIsMutable();
- sections_.addAll(other.sections_);
- }
- onChanged();
- }
- } else {
- if (!other.sections_.isEmpty()) {
- if (sectionsBuilder_.isEmpty()) {
- sectionsBuilder_.dispose();
- sectionsBuilder_ = null;
- sections_ = other.sections_;
- bitField0_ = (bitField0_ & ~0x00000002);
- sectionsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
- ? getSectionsFieldBuilder()
- : null;
- } else {
- sectionsBuilder_.addAllMessages(other.sections_);
- }
- }
- }
- if (other.sectionDividerStyle_ != 0) {
- setSectionDividerStyleValue(other.getSectionDividerStyleValue());
- }
- if (cardActionsBuilder_ == null) {
- if (!other.cardActions_.isEmpty()) {
- if (cardActions_.isEmpty()) {
- cardActions_ = other.cardActions_;
- bitField0_ = (bitField0_ & ~0x00000008);
- } else {
- ensureCardActionsIsMutable();
- cardActions_.addAll(other.cardActions_);
- }
- onChanged();
- }
- } else {
- if (!other.cardActions_.isEmpty()) {
- if (cardActionsBuilder_.isEmpty()) {
- cardActionsBuilder_.dispose();
- cardActionsBuilder_ = null;
- cardActions_ = other.cardActions_;
- bitField0_ = (bitField0_ & ~0x00000008);
- cardActionsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
- ? getCardActionsFieldBuilder()
- : null;
- } else {
- cardActionsBuilder_.addAllMessages(other.cardActions_);
- }
- }
- }
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- bitField0_ |= 0x00000010;
- onChanged();
- }
- if (other.hasFixedFooter()) {
- mergeFixedFooter(other.getFixedFooter());
- }
- if (other.displayStyle_ != 0) {
- setDisplayStyleValue(other.getDisplayStyleValue());
- }
- if (other.hasPeekCardHeader()) {
- mergePeekCardHeader(other.getPeekCardHeader());
- }
- 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(getHeaderFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- com.google.apps.card.v1.Card.Section m =
- input.readMessage(
- com.google.apps.card.v1.Card.Section.parser(), extensionRegistry);
- if (sectionsBuilder_ == null) {
- ensureSectionsIsMutable();
- sections_.add(m);
- } else {
- sectionsBuilder_.addMessage(m);
- }
- break;
- } // case 18
- case 26:
- {
- com.google.apps.card.v1.Card.CardAction m =
- input.readMessage(
- com.google.apps.card.v1.Card.CardAction.parser(), extensionRegistry);
- if (cardActionsBuilder_ == null) {
- ensureCardActionsIsMutable();
- cardActions_.add(m);
- } else {
- cardActionsBuilder_.addMessage(m);
- }
- break;
- } // case 26
- case 34:
- {
- name_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000010;
- break;
- } // case 34
- case 42:
- {
- input.readMessage(getFixedFooterFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000020;
- break;
- } // case 42
- case 48:
- {
- displayStyle_ = input.readEnum();
- bitField0_ |= 0x00000040;
- break;
- } // case 48
- case 58:
- {
- input.readMessage(getPeekCardHeaderFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000080;
- break;
- } // case 58
- case 72:
- {
- sectionDividerStyle_ = input.readEnum();
- bitField0_ |= 0x00000004;
- break;
- } // case 72
- 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.Card.CardHeader header_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card.CardHeader,
- com.google.apps.card.v1.Card.CardHeader.Builder,
- com.google.apps.card.v1.Card.CardHeaderOrBuilder>
- headerBuilder_;
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- *
- * @return Whether the header field is set.
- */
- public boolean hasHeader() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- *
- * @return The header.
- */
- public com.google.apps.card.v1.Card.CardHeader getHeader() {
- if (headerBuilder_ == null) {
- return header_ == null
- ? com.google.apps.card.v1.Card.CardHeader.getDefaultInstance()
- : header_;
- } else {
- return headerBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- */
- public Builder setHeader(com.google.apps.card.v1.Card.CardHeader value) {
- if (headerBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- header_ = value;
- } else {
- headerBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- */
- public Builder setHeader(com.google.apps.card.v1.Card.CardHeader.Builder builderForValue) {
- if (headerBuilder_ == null) {
- header_ = builderForValue.build();
- } else {
- headerBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- */
- public Builder mergeHeader(com.google.apps.card.v1.Card.CardHeader value) {
- if (headerBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)
- && header_ != null
- && header_ != com.google.apps.card.v1.Card.CardHeader.getDefaultInstance()) {
- getHeaderBuilder().mergeFrom(value);
- } else {
- header_ = value;
- }
- } else {
- headerBuilder_.mergeFrom(value);
- }
- if (header_ != null) {
- bitField0_ |= 0x00000001;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- */
- public Builder clearHeader() {
- bitField0_ = (bitField0_ & ~0x00000001);
- header_ = null;
- if (headerBuilder_ != null) {
- headerBuilder_.dispose();
- headerBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- */
- public com.google.apps.card.v1.Card.CardHeader.Builder getHeaderBuilder() {
- bitField0_ |= 0x00000001;
- onChanged();
- return getHeaderFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- */
- public com.google.apps.card.v1.Card.CardHeaderOrBuilder getHeaderOrBuilder() {
- if (headerBuilder_ != null) {
- return headerBuilder_.getMessageOrBuilder();
- } else {
- return header_ == null
- ? com.google.apps.card.v1.Card.CardHeader.getDefaultInstance()
- : header_;
- }
- }
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card.CardHeader,
- com.google.apps.card.v1.Card.CardHeader.Builder,
- com.google.apps.card.v1.Card.CardHeaderOrBuilder>
- getHeaderFieldBuilder() {
- if (headerBuilder_ == null) {
- headerBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card.CardHeader,
- com.google.apps.card.v1.Card.CardHeader.Builder,
- com.google.apps.card.v1.Card.CardHeaderOrBuilder>(
- getHeader(), getParentForChildren(), isClean());
- header_ = null;
- }
- return headerBuilder_;
- }
-
- private java.util.List sections_ =
- java.util.Collections.emptyList();
-
- private void ensureSectionsIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- sections_ = new java.util.ArrayList(sections_);
- bitField0_ |= 0x00000002;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Card.Section,
- com.google.apps.card.v1.Card.Section.Builder,
- com.google.apps.card.v1.Card.SectionOrBuilder>
- sectionsBuilder_;
-
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public java.util.List getSectionsList() {
- if (sectionsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(sections_);
- } else {
- return sectionsBuilder_.getMessageList();
- }
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public int getSectionsCount() {
- if (sectionsBuilder_ == null) {
- return sections_.size();
- } else {
- return sectionsBuilder_.getCount();
- }
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public com.google.apps.card.v1.Card.Section getSections(int index) {
- if (sectionsBuilder_ == null) {
- return sections_.get(index);
- } else {
- return sectionsBuilder_.getMessage(index);
- }
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public Builder setSections(int index, com.google.apps.card.v1.Card.Section value) {
- if (sectionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureSectionsIsMutable();
- sections_.set(index, value);
- onChanged();
- } else {
- sectionsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public Builder setSections(
- int index, com.google.apps.card.v1.Card.Section.Builder builderForValue) {
- if (sectionsBuilder_ == null) {
- ensureSectionsIsMutable();
- sections_.set(index, builderForValue.build());
- onChanged();
- } else {
- sectionsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public Builder addSections(com.google.apps.card.v1.Card.Section value) {
- if (sectionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureSectionsIsMutable();
- sections_.add(value);
- onChanged();
- } else {
- sectionsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public Builder addSections(int index, com.google.apps.card.v1.Card.Section value) {
- if (sectionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureSectionsIsMutable();
- sections_.add(index, value);
- onChanged();
- } else {
- sectionsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public Builder addSections(com.google.apps.card.v1.Card.Section.Builder builderForValue) {
- if (sectionsBuilder_ == null) {
- ensureSectionsIsMutable();
- sections_.add(builderForValue.build());
- onChanged();
- } else {
- sectionsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public Builder addSections(
- int index, com.google.apps.card.v1.Card.Section.Builder builderForValue) {
- if (sectionsBuilder_ == null) {
- ensureSectionsIsMutable();
- sections_.add(index, builderForValue.build());
- onChanged();
- } else {
- sectionsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public Builder addAllSections(
- java.lang.Iterable extends com.google.apps.card.v1.Card.Section> values) {
- if (sectionsBuilder_ == null) {
- ensureSectionsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sections_);
- onChanged();
- } else {
- sectionsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public Builder clearSections() {
- if (sectionsBuilder_ == null) {
- sections_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- } else {
- sectionsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public Builder removeSections(int index) {
- if (sectionsBuilder_ == null) {
- ensureSectionsIsMutable();
- sections_.remove(index);
- onChanged();
- } else {
- sectionsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public com.google.apps.card.v1.Card.Section.Builder getSectionsBuilder(int index) {
- return getSectionsFieldBuilder().getBuilder(index);
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public com.google.apps.card.v1.Card.SectionOrBuilder getSectionsOrBuilder(int index) {
- if (sectionsBuilder_ == null) {
- return sections_.get(index);
- } else {
- return sectionsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public java.util.List extends com.google.apps.card.v1.Card.SectionOrBuilder>
- getSectionsOrBuilderList() {
- if (sectionsBuilder_ != null) {
- return sectionsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(sections_);
- }
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public com.google.apps.card.v1.Card.Section.Builder addSectionsBuilder() {
- return getSectionsFieldBuilder()
- .addBuilder(com.google.apps.card.v1.Card.Section.getDefaultInstance());
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public com.google.apps.card.v1.Card.Section.Builder addSectionsBuilder(int index) {
- return getSectionsFieldBuilder()
- .addBuilder(index, com.google.apps.card.v1.Card.Section.getDefaultInstance());
- }
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- public java.util.List getSectionsBuilderList() {
- return getSectionsFieldBuilder().getBuilderList();
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Card.Section,
- com.google.apps.card.v1.Card.Section.Builder,
- com.google.apps.card.v1.Card.SectionOrBuilder>
- getSectionsFieldBuilder() {
- if (sectionsBuilder_ == null) {
- sectionsBuilder_ =
- new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Card.Section,
- com.google.apps.card.v1.Card.Section.Builder,
- com.google.apps.card.v1.Card.SectionOrBuilder>(
- sections_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
- sections_ = null;
- }
- return sectionsBuilder_;
- }
-
- private int sectionDividerStyle_ = 0;
- /**
- *
- *
- *
- * The divider style between sections.
- *
- *
- * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9;
- *
- * @return The enum numeric value on the wire for sectionDividerStyle.
- */
- @java.lang.Override
- public int getSectionDividerStyleValue() {
- return sectionDividerStyle_;
- }
- /**
- *
- *
- *
- * The divider style between sections.
- *
- *
- * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9;
- *
- * @param value The enum numeric value on the wire for sectionDividerStyle to set.
- * @return This builder for chaining.
- */
- public Builder setSectionDividerStyleValue(int value) {
- sectionDividerStyle_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The divider style between sections.
- *
- *
- * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9;
- *
- * @return The sectionDividerStyle.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.DividerStyle getSectionDividerStyle() {
- com.google.apps.card.v1.Card.DividerStyle result =
- com.google.apps.card.v1.Card.DividerStyle.forNumber(sectionDividerStyle_);
- return result == null ? com.google.apps.card.v1.Card.DividerStyle.UNRECOGNIZED : result;
- }
- /**
- *
- *
- *
- * The divider style between sections.
- *
- *
- * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9;
- *
- * @param value The sectionDividerStyle to set.
- * @return This builder for chaining.
- */
- public Builder setSectionDividerStyle(com.google.apps.card.v1.Card.DividerStyle value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- sectionDividerStyle_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The divider style between sections.
- *
- *
- * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9;
- *
- * @return This builder for chaining.
- */
- public Builder clearSectionDividerStyle() {
- bitField0_ = (bitField0_ & ~0x00000004);
- sectionDividerStyle_ = 0;
- onChanged();
- return this;
- }
-
- private java.util.List cardActions_ =
- java.util.Collections.emptyList();
-
- private void ensureCardActionsIsMutable() {
- if (!((bitField0_ & 0x00000008) != 0)) {
- cardActions_ =
- new java.util.ArrayList(cardActions_);
- bitField0_ |= 0x00000008;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Card.CardAction,
- com.google.apps.card.v1.Card.CardAction.Builder,
- com.google.apps.card.v1.Card.CardActionOrBuilder>
- cardActionsBuilder_;
-
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public java.util.List getCardActionsList() {
- if (cardActionsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(cardActions_);
- } else {
- return cardActionsBuilder_.getMessageList();
- }
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public int getCardActionsCount() {
- if (cardActionsBuilder_ == null) {
- return cardActions_.size();
- } else {
- return cardActionsBuilder_.getCount();
- }
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public com.google.apps.card.v1.Card.CardAction getCardActions(int index) {
- if (cardActionsBuilder_ == null) {
- return cardActions_.get(index);
- } else {
- return cardActionsBuilder_.getMessage(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):
- *
- * For example, the following JSON constructs a card action menu with
- * `Settings` and `Send Feedback` options:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public Builder setCardActions(int index, com.google.apps.card.v1.Card.CardAction value) {
- if (cardActionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureCardActionsIsMutable();
- cardActions_.set(index, value);
- onChanged();
- } else {
- cardActionsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public Builder setCardActions(
- int index, com.google.apps.card.v1.Card.CardAction.Builder builderForValue) {
- if (cardActionsBuilder_ == null) {
- ensureCardActionsIsMutable();
- cardActions_.set(index, builderForValue.build());
- onChanged();
- } else {
- cardActionsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public Builder addCardActions(com.google.apps.card.v1.Card.CardAction value) {
- if (cardActionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureCardActionsIsMutable();
- cardActions_.add(value);
- onChanged();
- } else {
- cardActionsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public Builder addCardActions(int index, com.google.apps.card.v1.Card.CardAction value) {
- if (cardActionsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureCardActionsIsMutable();
- cardActions_.add(index, value);
- onChanged();
- } else {
- cardActionsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public Builder addCardActions(com.google.apps.card.v1.Card.CardAction.Builder builderForValue) {
- if (cardActionsBuilder_ == null) {
- ensureCardActionsIsMutable();
- cardActions_.add(builderForValue.build());
- onChanged();
- } else {
- cardActionsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public Builder addCardActions(
- int index, com.google.apps.card.v1.Card.CardAction.Builder builderForValue) {
- if (cardActionsBuilder_ == null) {
- ensureCardActionsIsMutable();
- cardActions_.add(index, builderForValue.build());
- onChanged();
- } else {
- cardActionsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public Builder addAllCardActions(
- java.lang.Iterable extends com.google.apps.card.v1.Card.CardAction> values) {
- if (cardActionsBuilder_ == null) {
- ensureCardActionsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cardActions_);
- onChanged();
- } else {
- cardActionsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public Builder clearCardActions() {
- if (cardActionsBuilder_ == null) {
- cardActions_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- } else {
- cardActionsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public Builder removeCardActions(int index) {
- if (cardActionsBuilder_ == null) {
- ensureCardActionsIsMutable();
- cardActions_.remove(index);
- onChanged();
- } else {
- cardActionsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public com.google.apps.card.v1.Card.CardAction.Builder getCardActionsBuilder(int index) {
- return getCardActionsFieldBuilder().getBuilder(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):
- *
- * For example, the following JSON constructs a card action menu with
- * `Settings` and `Send Feedback` options:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public com.google.apps.card.v1.Card.CardActionOrBuilder getCardActionsOrBuilder(int index) {
- if (cardActionsBuilder_ == null) {
- return cardActions_.get(index);
- } else {
- return cardActionsBuilder_.getMessageOrBuilder(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):
- *
- * For example, the following JSON constructs a card action menu with
- * `Settings` and `Send Feedback` options:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public java.util.List extends com.google.apps.card.v1.Card.CardActionOrBuilder>
- getCardActionsOrBuilderList() {
- if (cardActionsBuilder_ != null) {
- return cardActionsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(cardActions_);
- }
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public com.google.apps.card.v1.Card.CardAction.Builder addCardActionsBuilder() {
- return getCardActionsFieldBuilder()
- .addBuilder(com.google.apps.card.v1.Card.CardAction.getDefaultInstance());
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public com.google.apps.card.v1.Card.CardAction.Builder addCardActionsBuilder(int index) {
- return getCardActionsFieldBuilder()
- .addBuilder(index, com.google.apps.card.v1.Card.CardAction.getDefaultInstance());
- }
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- public java.util.List
- getCardActionsBuilderList() {
- return getCardActionsFieldBuilder().getBuilderList();
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Card.CardAction,
- com.google.apps.card.v1.Card.CardAction.Builder,
- com.google.apps.card.v1.Card.CardActionOrBuilder>
- getCardActionsFieldBuilder() {
- if (cardActionsBuilder_ == null) {
- cardActionsBuilder_ =
- new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Card.CardAction,
- com.google.apps.card.v1.Card.CardAction.Builder,
- com.google.apps.card.v1.Card.CardActionOrBuilder>(
- cardActions_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
- cardActions_ = null;
- }
- return cardActionsBuilder_;
- }
-
- private java.lang.Object name_ = "";
- /**
- *
- *
- *
- * Name of the card. Used as a card identifier in card navigation.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * string name = 4;
- *
- * @return The name.
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * Name of the card. Used as a card identifier in card navigation.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * string name = 4;
- *
- * @return The bytes for name.
- */
- public com.google.protobuf.ByteString getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * Name of the card. Used as a card identifier in card navigation.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * string name = 4;
- *
- * @param value The name to set.
- * @return This builder for chaining.
- */
- public Builder setName(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- name_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Name of the card. Used as a card identifier in card navigation.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * string name = 4;
- *
- * @return This builder for chaining.
- */
- public Builder clearName() {
- name_ = getDefaultInstance().getName();
- bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Name of the card. Used as a card identifier in card navigation.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * string name = 4;
- *
- * @param value The bytes for name to set.
- * @return This builder for chaining.
- */
- public Builder setNameBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- name_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
-
- private com.google.apps.card.v1.Card.CardFixedFooter fixedFooter_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card.CardFixedFooter,
- com.google.apps.card.v1.Card.CardFixedFooter.Builder,
- com.google.apps.card.v1.Card.CardFixedFooterOrBuilder>
- fixedFooterBuilder_;
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- *
- * @return Whether the fixedFooter field is set.
- */
- public boolean hasFixedFooter() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- *
- * @return The fixedFooter.
- */
- public com.google.apps.card.v1.Card.CardFixedFooter getFixedFooter() {
- if (fixedFooterBuilder_ == null) {
- return fixedFooter_ == null
- ? com.google.apps.card.v1.Card.CardFixedFooter.getDefaultInstance()
- : fixedFooter_;
- } else {
- return fixedFooterBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- */
- public Builder setFixedFooter(com.google.apps.card.v1.Card.CardFixedFooter value) {
- if (fixedFooterBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- fixedFooter_ = value;
- } else {
- fixedFooterBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- */
- public Builder setFixedFooter(
- com.google.apps.card.v1.Card.CardFixedFooter.Builder builderForValue) {
- if (fixedFooterBuilder_ == null) {
- fixedFooter_ = builderForValue.build();
- } else {
- fixedFooterBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- */
- public Builder mergeFixedFooter(com.google.apps.card.v1.Card.CardFixedFooter value) {
- if (fixedFooterBuilder_ == null) {
- if (((bitField0_ & 0x00000020) != 0)
- && fixedFooter_ != null
- && fixedFooter_ != com.google.apps.card.v1.Card.CardFixedFooter.getDefaultInstance()) {
- getFixedFooterBuilder().mergeFrom(value);
- } else {
- fixedFooter_ = value;
- }
- } else {
- fixedFooterBuilder_.mergeFrom(value);
- }
- if (fixedFooter_ != null) {
- bitField0_ |= 0x00000020;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- */
- public Builder clearFixedFooter() {
- bitField0_ = (bitField0_ & ~0x00000020);
- fixedFooter_ = null;
- if (fixedFooterBuilder_ != null) {
- fixedFooterBuilder_.dispose();
- fixedFooterBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- */
- public com.google.apps.card.v1.Card.CardFixedFooter.Builder getFixedFooterBuilder() {
- bitField0_ |= 0x00000020;
- onChanged();
- return getFixedFooterFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- */
- public com.google.apps.card.v1.Card.CardFixedFooterOrBuilder getFixedFooterOrBuilder() {
- if (fixedFooterBuilder_ != null) {
- return fixedFooterBuilder_.getMessageOrBuilder();
- } else {
- return fixedFooter_ == null
- ? com.google.apps.card.v1.Card.CardFixedFooter.getDefaultInstance()
- : fixedFooter_;
- }
- }
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card.CardFixedFooter,
- com.google.apps.card.v1.Card.CardFixedFooter.Builder,
- com.google.apps.card.v1.Card.CardFixedFooterOrBuilder>
- getFixedFooterFieldBuilder() {
- if (fixedFooterBuilder_ == null) {
- fixedFooterBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card.CardFixedFooter,
- com.google.apps.card.v1.Card.CardFixedFooter.Builder,
- com.google.apps.card.v1.Card.CardFixedFooterOrBuilder>(
- getFixedFooter(), getParentForChildren(), isClean());
- fixedFooter_ = null;
- }
- return fixedFooterBuilder_;
- }
-
- private int displayStyle_ = 0;
- /**
- *
- *
- *
- * In Google Workspace Add-ons, sets the display properties of the
- * `peekCardHeader`.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.DisplayStyle display_style = 6;
- *
- * @return The enum numeric value on the wire for displayStyle.
- */
- @java.lang.Override
- public int getDisplayStyleValue() {
- return displayStyle_;
- }
- /**
- *
- *
- *
- * In Google Workspace Add-ons, sets the display properties of the
- * `peekCardHeader`.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.DisplayStyle display_style = 6;
- *
- * @param value The enum numeric value on the wire for displayStyle to set.
- * @return This builder for chaining.
- */
- public Builder setDisplayStyleValue(int value) {
- displayStyle_ = value;
- bitField0_ |= 0x00000040;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * In Google Workspace Add-ons, sets the display properties of the
- * `peekCardHeader`.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.DisplayStyle display_style = 6;
- *
- * @return The displayStyle.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card.DisplayStyle getDisplayStyle() {
- com.google.apps.card.v1.Card.DisplayStyle result =
- com.google.apps.card.v1.Card.DisplayStyle.forNumber(displayStyle_);
- return result == null ? com.google.apps.card.v1.Card.DisplayStyle.UNRECOGNIZED : result;
- }
- /**
- *
- *
- *
- * In Google Workspace Add-ons, sets the display properties of the
- * `peekCardHeader`.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.DisplayStyle display_style = 6;
- *
- * @param value The displayStyle to set.
- * @return This builder for chaining.
- */
- public Builder setDisplayStyle(com.google.apps.card.v1.Card.DisplayStyle value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000040;
- displayStyle_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * In Google Workspace Add-ons, sets the display properties of the
- * `peekCardHeader`.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.DisplayStyle display_style = 6;
- *
- * @return This builder for chaining.
- */
- public Builder clearDisplayStyle() {
- bitField0_ = (bitField0_ & ~0x00000040);
- displayStyle_ = 0;
- onChanged();
- return this;
- }
-
- private com.google.apps.card.v1.Card.CardHeader peekCardHeader_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card.CardHeader,
- com.google.apps.card.v1.Card.CardHeader.Builder,
- com.google.apps.card.v1.Card.CardHeaderOrBuilder>
- peekCardHeaderBuilder_;
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- *
- * @return Whether the peekCardHeader field is set.
- */
- public boolean hasPeekCardHeader() {
- return ((bitField0_ & 0x00000080) != 0);
- }
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- *
- * @return The peekCardHeader.
- */
- public com.google.apps.card.v1.Card.CardHeader getPeekCardHeader() {
- if (peekCardHeaderBuilder_ == null) {
- return peekCardHeader_ == null
- ? com.google.apps.card.v1.Card.CardHeader.getDefaultInstance()
- : peekCardHeader_;
- } else {
- return peekCardHeaderBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- */
- public Builder setPeekCardHeader(com.google.apps.card.v1.Card.CardHeader value) {
- if (peekCardHeaderBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- peekCardHeader_ = value;
- } else {
- peekCardHeaderBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000080;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- */
- public Builder setPeekCardHeader(
- com.google.apps.card.v1.Card.CardHeader.Builder builderForValue) {
- if (peekCardHeaderBuilder_ == null) {
- peekCardHeader_ = builderForValue.build();
- } else {
- peekCardHeaderBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000080;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- */
- public Builder mergePeekCardHeader(com.google.apps.card.v1.Card.CardHeader value) {
- if (peekCardHeaderBuilder_ == null) {
- if (((bitField0_ & 0x00000080) != 0)
- && peekCardHeader_ != null
- && peekCardHeader_ != com.google.apps.card.v1.Card.CardHeader.getDefaultInstance()) {
- getPeekCardHeaderBuilder().mergeFrom(value);
- } else {
- peekCardHeader_ = value;
- }
- } else {
- peekCardHeaderBuilder_.mergeFrom(value);
- }
- if (peekCardHeader_ != null) {
- bitField0_ |= 0x00000080;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- */
- public Builder clearPeekCardHeader() {
- bitField0_ = (bitField0_ & ~0x00000080);
- peekCardHeader_ = null;
- if (peekCardHeaderBuilder_ != null) {
- peekCardHeaderBuilder_.dispose();
- peekCardHeaderBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- */
- public com.google.apps.card.v1.Card.CardHeader.Builder getPeekCardHeaderBuilder() {
- bitField0_ |= 0x00000080;
- onChanged();
- return getPeekCardHeaderFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- */
- public com.google.apps.card.v1.Card.CardHeaderOrBuilder getPeekCardHeaderOrBuilder() {
- if (peekCardHeaderBuilder_ != null) {
- return peekCardHeaderBuilder_.getMessageOrBuilder();
- } else {
- return peekCardHeader_ == null
- ? com.google.apps.card.v1.Card.CardHeader.getDefaultInstance()
- : peekCardHeader_;
- }
- }
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card.CardHeader,
- com.google.apps.card.v1.Card.CardHeader.Builder,
- com.google.apps.card.v1.Card.CardHeaderOrBuilder>
- getPeekCardHeaderFieldBuilder() {
- if (peekCardHeaderBuilder_ == null) {
- peekCardHeaderBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card.CardHeader,
- com.google.apps.card.v1.Card.CardHeader.Builder,
- com.google.apps.card.v1.Card.CardHeaderOrBuilder>(
- getPeekCardHeader(), getParentForChildren(), isClean());
- peekCardHeader_ = null;
- }
- return peekCardHeaderBuilder_;
- }
-
- @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)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Card)
- private static final com.google.apps.card.v1.Card DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Card();
- }
-
- public static com.google.apps.card.v1.Card getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Card 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 getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/CardOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/CardOrBuilder.java
deleted file mode 100644
index beaad1948014..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/CardOrBuilder.java
+++ /dev/null
@@ -1,557 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface CardOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Card)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- *
- * @return Whether the header field is set.
- */
- boolean hasHeader();
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- *
- * @return The header.
- */
- com.google.apps.card.v1.Card.CardHeader getHeader();
- /**
- *
- *
- *
- * The header of the card. A header usually contains a leading image and a
- * title. Headers always appear at the top of a card.
- *
- *
- * .google.apps.card.v1.Card.CardHeader header = 1;
- */
- com.google.apps.card.v1.Card.CardHeaderOrBuilder getHeaderOrBuilder();
-
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- java.util.List getSectionsList();
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- com.google.apps.card.v1.Card.Section getSections(int index);
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- int getSectionsCount();
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- java.util.List extends com.google.apps.card.v1.Card.SectionOrBuilder>
- getSectionsOrBuilderList();
- /**
- *
- *
- *
- * Contains a collection of widgets. Each section has its own, optional
- * header. Sections are visually separated by a line divider. For an example
- * in Google Chat apps, see [Card
- * section](https://developers.google.com/chat/ui/widgets/card-section).
- *
- *
- * repeated .google.apps.card.v1.Card.Section sections = 2;
- */
- com.google.apps.card.v1.Card.SectionOrBuilder getSectionsOrBuilder(int index);
-
- /**
- *
- *
- *
- * The divider style between sections.
- *
- *
- * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9;
- *
- * @return The enum numeric value on the wire for sectionDividerStyle.
- */
- int getSectionDividerStyleValue();
- /**
- *
- *
- *
- * The divider style between sections.
- *
- *
- * .google.apps.card.v1.Card.DividerStyle section_divider_style = 9;
- *
- * @return The sectionDividerStyle.
- */
- 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):
- *
- * For example, the following JSON constructs a card action menu with
- * `Settings` and `Send Feedback` options:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- java.util.List getCardActionsList();
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- 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):
- *
- * For example, the following JSON constructs a card action menu with
- * `Settings` and `Send Feedback` options:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- 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):
- *
- * For example, the following JSON constructs a card action menu with
- * `Settings` and `Send Feedback` options:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- java.util.List extends com.google.apps.card.v1.Card.CardActionOrBuilder>
- getCardActionsOrBuilderList();
- /**
- *
- *
- *
- * The card's actions. Actions are added to the card's toolbar menu.
- *
- * [Google Workspace
- * 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:
- *
- * ```
- * "card_actions": [
- * {
- * "actionLabel": "Settings",
- * "onClick": {
- * "action": {
- * "functionName": "goToView",
- * "parameters": [
- * {
- * "key": "viewType",
- * "value": "SETTING"
- * }
- * ],
- * "loadIndicator": "LoadIndicator.SPINNER"
- * }
- * }
- * },
- * {
- * "actionLabel": "Send Feedback",
- * "onClick": {
- * "openLink": {
- * "url": "https://example.com/feedback"
- * }
- * }
- * }
- * ]
- * ```
- *
- *
- * repeated .google.apps.card.v1.Card.CardAction card_actions = 3;
- */
- com.google.apps.card.v1.Card.CardActionOrBuilder getCardActionsOrBuilder(int index);
-
- /**
- *
- *
- *
- * Name of the card. Used as a card identifier in card navigation.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * string name = 4;
- *
- * @return The name.
- */
- 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):
- *
- *
- * string name = 4;
- *
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString getNameBytes();
-
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- *
- * @return Whether the fixedFooter field is set.
- */
- boolean hasFixedFooter();
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- *
- * @return The fixedFooter.
- */
- com.google.apps.card.v1.Card.CardFixedFooter getFixedFooter();
- /**
- *
- *
- *
- * The fixed footer shown at the bottom of this 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/chat/how-tos/dialogs), but not
- * [card
- * messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;
- */
- com.google.apps.card.v1.Card.CardFixedFooterOrBuilder getFixedFooterOrBuilder();
-
- /**
- *
- *
- *
- * In Google Workspace Add-ons, sets the display properties of the
- * `peekCardHeader`.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.DisplayStyle display_style = 6;
- *
- * @return The enum numeric value on the wire for displayStyle.
- */
- int getDisplayStyleValue();
- /**
- *
- *
- *
- * In Google Workspace Add-ons, sets the display properties of the
- * `peekCardHeader`.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.DisplayStyle display_style = 6;
- *
- * @return The displayStyle.
- */
- com.google.apps.card.v1.Card.DisplayStyle getDisplayStyle();
-
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- *
- * @return Whether the peekCardHeader field is set.
- */
- boolean hasPeekCardHeader();
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- *
- * @return The peekCardHeader.
- */
- com.google.apps.card.v1.Card.CardHeader getPeekCardHeader();
- /**
- *
- *
- *
- * When displaying contextual content, the peek card header acts as a
- * placeholder so that the user can navigate forward between the homepage
- * cards and the contextual cards.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card.CardHeader peek_card_header = 7;
- */
- com.google.apps.card.v1.Card.CardHeaderOrBuilder getPeekCardHeaderOrBuilder();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/CardProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/CardProto.java
deleted file mode 100644
index cf549e2c70d4..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/CardProto.java
+++ /dev/null
@@ -1,690 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public final class CardProto {
- private CardProto() {}
-
- public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
-
- public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
- }
-
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Card_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Card_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Card_CardHeader_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Card_CardHeader_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Card_Section_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Card_Section_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- 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_CardFixedFooter_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Card_CardFixedFooter_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Widget_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Widget_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_TextParagraph_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_TextParagraph_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Image_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Image_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Divider_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Divider_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_DecoratedText_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_DecoratedText_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_DecoratedText_SwitchControl_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_DecoratedText_SwitchControl_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_TextInput_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_TextInput_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Suggestions_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Suggestions_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Suggestions_SuggestionItem_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Suggestions_SuggestionItem_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_ButtonList_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_ButtonList_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_SelectionInput_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_SelectionInput_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_SelectionInput_SelectionItem_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_SelectionInput_SelectionItem_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_SelectionInput_PlatformDataSource_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_SelectionInput_PlatformDataSource_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- 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_Button_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Button_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Icon_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Icon_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_ImageCropStyle_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_ImageCropStyle_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_BorderStyle_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_BorderStyle_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_ImageComponent_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_ImageComponent_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Grid_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Grid_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Grid_GridItem_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Grid_GridItem_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Columns_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Columns_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Columns_Column_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Columns_Column_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- 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_OnClick_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_OnClick_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_OpenLink_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_OpenLink_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_apps_card_v1_Action_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_apps_card_v1_Action_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- 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;
-
- public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
- return descriptor;
- }
-
- private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
-
- static {
- java.lang.String[] descriptorData = {
- "\n\036google/apps/card/v1/card.proto\022\023google"
- + ".apps.card.v1\032\027google/type/color.proto\"\307"
- + "\010\n\004Card\0224\n\006header\030\001 \001(\0132$.google.apps.ca"
- + "rd.v1.Card.CardHeader\0223\n\010sections\030\002 \003(\0132"
- + "!.google.apps.card.v1.Card.Section\022E\n\025se"
- + "ction_divider_style\030\t \001(\0162&.google.apps."
- + "card.v1.Card.DividerStyle\022:\n\014card_action"
- + "s\030\003 \003(\0132$.google.apps.card.v1.Card.CardA"
- + "ction\022\014\n\004name\030\004 \001(\t\022?\n\014fixed_footer\030\005 \001("
- + "\0132).google.apps.card.v1.Card.CardFixedFo"
- + "oter\022=\n\rdisplay_style\030\006 \001(\0162&.google.app"
- + "s.card.v1.Card.DisplayStyle\022>\n\020peek_card"
- + "_header\030\007 \001(\0132$.google.apps.card.v1.Card"
- + ".CardHeader\032\223\001\n\nCardHeader\022\r\n\005title\030\001 \001("
- + "\t\022\020\n\010subtitle\030\002 \001(\t\0229\n\nimage_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\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\013c"
- + "ollapsible\030\005 \001(\010\022#\n\033uncollapsible_widget"
- + "s_count\030\006 \001(\005\032R\n\nCardAction\022\024\n\014action_la"
- + "bel\030\001 \001(\t\022.\n\010on_click\030\002 \001(\0132\034.google.app"
- + "s.card.v1.OnClick\032}\n\017CardFixedFooter\0223\n\016"
- + "primary_button\030\001 \001(\0132\033.google.apps.card."
- + "v1.Button\0225\n\020secondary_button\030\002 \001(\0132\033.go"
- + "ogle.apps.card.v1.Button\"P\n\014DividerStyle"
- + "\022\035\n\031DIVIDER_STYLE_UNSPECIFIED\020\000\022\021\n\rSOLID"
- + "_DIVIDER\020\001\022\016\n\nNO_DIVIDER\020\002\"D\n\014DisplaySty"
- + "le\022\035\n\031DISPLAY_STYLE_UNSPECIFIED\020\000\022\010\n\004PEE"
- + "K\020\001\022\013\n\007REPLACE\020\002\"\206\006\n\006Widget\022<\n\016text_para"
- + "graph\030\001 \001(\0132\".google.apps.card.v1.TextPa"
- + "ragraphH\000\022+\n\005image\030\002 \001(\0132\032.google.apps.c"
- + "ard.v1.ImageH\000\022<\n\016decorated_text\030\003 \001(\0132\""
- + ".google.apps.card.v1.DecoratedTextH\000\0226\n\013"
- + "button_list\030\004 \001(\0132\037.google.apps.card.v1."
- + "ButtonListH\000\0224\n\ntext_input\030\005 \001(\0132\036.googl"
- + "e.apps.card.v1.TextInputH\000\022>\n\017selection_"
- + "input\030\006 \001(\0132#.google.apps.card.v1.Select"
- + "ionInputH\000\022?\n\020date_time_picker\030\007 \001(\0132#.g"
- + "oogle.apps.card.v1.DateTimePickerH\000\022/\n\007d"
- + "ivider\030\t \001(\0132\034.google.apps.card.v1.Divid"
- + "erH\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.c"
- + "ard.v1.ColumnsH\000\022M\n\024horizontal_alignment"
- + "\030\010 \001(\0162/.google.apps.card.v1.Widget.Hori"
- + "zontalAlignment\"#\n\tImageType\022\n\n\006SQUARE\020\000"
- + "\022\n\n\006CIRCLE\020\001\"[\n\023HorizontalAlignment\022$\n H"
- + "ORIZONTAL_ALIGNMENT_UNSPECIFIED\020\000\022\t\n\005STA"
- + "RT\020\001\022\n\n\006CENTER\020\002\022\007\n\003END\020\003B\006\n\004data\"\035\n\rTex"
- + "tParagraph\022\014\n\004text\030\001 \001(\t\"\\\n\005Image\022\021\n\tima"
- + "ge_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\rDecoratedText\022+\n\004icon\030\001 \001("
- + "\0132\031.google.apps.card.v1.IconB\002\030\001\022-\n\nstar"
- + "t_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\twrap"
- + "_text\030\005 \001(\010\022\024\n\014bottom_label\030\006 \001(\t\022.\n\010on_"
- + "click\030\007 \001(\0132\034.google.apps.card.v1.OnClic"
- + "k\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.SwitchContr"
- + "olH\000\022-\n\010end_icon\030\013 \001(\0132\031.google.apps.car"
- + "d.v1.IconH\000\032\201\002\n\rSwitchControl\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\020"
- + "on_change_action\030\004 \001(\0132\033.google.apps.car"
- + "d.v1.Action\022R\n\014control_type\030\005 \001(\0162<.goog"
- + "le.apps.card.v1.DecoratedText.SwitchCont"
- + "rol.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\007contr"
- + "ol\"\364\002\n\tTextInput\022\014\n\004name\030\001 \001(\t\022\r\n\005label\030"
- + "\002 \001(\t\022\021\n\thint_text\030\003 \001(\t\022\r\n\005value\030\004 \001(\t\022"
- + "1\n\004type\030\005 \001(\0162#.google.apps.card.v1.Text"
- + "Input.Type\0225\n\020on_change_action\030\006 \001(\0132\033.g"
- + "oogle.apps.card.v1.Action\022=\n\023initial_sug"
- + "gestions\030\007 \001(\0132 .google.apps.card.v1.Sug"
- + "gestions\0229\n\024auto_complete_action\030\010 \001(\0132\033"
- + ".google.apps.card.v1.Action\022\030\n\020placehold"
- + "er_text\030\014 \001(\t\"*\n\004Type\022\017\n\013SINGLE_LINE\020\000\022\021"
- + "\n\rMULTIPLE_LINE\020\001\"z\n\013Suggestions\022>\n\005item"
- + "s\030\001 \003(\0132/.google.apps.card.v1.Suggestion"
- + "s.SuggestionItem\032+\n\016SuggestionItem\022\016\n\004te"
- + "xt\030\001 \001(\tH\000B\t\n\007content\":\n\nButtonList\022,\n\007b"
- + "uttons\030\001 \003(\0132\033.google.apps.card.v1.Butto"
- + "n\"\353\006\n\016SelectionInput\022\014\n\004name\030\001 \001(\t\022\r\n\005la"
- + "bel\030\002 \001(\t\022?\n\004type\030\003 \001(\01621.google.apps.ca"
- + "rd.v1.SelectionInput.SelectionType\022@\n\005it"
- + "ems\030\004 \003(\01321.google.apps.card.v1.Selectio"
- + "nInput.SelectionItem\0225\n\020on_change_action"
- + "\030\005 \001(\0132\033.google.apps.card.v1.Action\022\'\n\037m"
- + "ulti_select_max_selected_items\030\006 \001(\005\022%\n\035"
- + "multi_select_min_query_length\030\007 \001(\005\022;\n\024e"
- + "xternal_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.SelectionIn"
- + "put.PlatformDataSourceH\000\032k\n\rSelectionIte"
- + "m\022\014\n\004text\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\020\n\010select"
- + "ed\030\003 \001(\010\022\026\n\016start_icon_uri\030\004 \001(\t\022\023\n\013bott"
- + "om_text\030\005 \001(\t\032\265\001\n\022PlatformDataSource\022e\n\022"
- + "common_data_source\030\001 \001(\0162G.google.apps.c"
- + "ard.v1.SelectionInput.PlatformDataSource"
- + ".CommonDataSourceH\000\")\n\020CommonDataSource\022"
- + "\013\n\007UNKNOWN\020\000\022\010\n\004USER\020\001B\r\n\013data_source\"\\\n"
- + "\rSelectionType\022\r\n\tCHECK_BOX\020\000\022\020\n\014RADIO_B"
- + "UTTON\020\001\022\n\n\006SWITCH\020\002\022\014\n\010DROPDOWN\020\003\022\020\n\014MUL"
- + "TI_SELECT\020\004B\032\n\030multi_select_data_source\""
- + "\247\002\n\016DateTimePicker\022\014\n\004name\030\001 \001(\t\022\r\n\005labe"
- + "l\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\024timezone_offset"
- + "_date\030\005 \001(\005\0225\n\020on_change_action\030\006 \001(\0132\033."
- + "google.apps.card.v1.Action\"E\n\022DateTimePi"
- + "ckerType\022\021\n\rDATE_AND_TIME\020\000\022\r\n\tDATE_ONLY"
- + "\020\001\022\r\n\tTIME_ONLY\020\002\"\266\001\n\006Button\022\014\n\004text\030\001 \001"
- + "(\t\022\'\n\004icon\030\002 \001(\0132\031.google.apps.card.v1.I"
- + "con\022!\n\005color\030\003 \001(\0132\022.google.type.Color\022."
- + "\n\010on_click\030\004 \001(\0132\034.google.apps.card.v1.O"
- + "nClick\022\020\n\010disabled\030\005 \001(\010\022\020\n\010alt_text\030\006 \001"
- + "(\t\"\206\001\n\004Icon\022\024\n\nknown_icon\030\001 \001(\tH\000\022\022\n\010ico"
- + "n_url\030\002 \001(\tH\000\022\020\n\010alt_text\030\003 \001(\t\0229\n\nimage"
- + "_type\030\004 \001(\0162%.google.apps.card.v1.Widget"
- + ".ImageTypeB\007\n\005icons\"\332\001\n\016ImageCropStyle\022?"
- + "\n\004type\030\001 \001(\01621.google.apps.card.v1.Image"
- + "CropStyle.ImageCropType\022\024\n\014aspect_ratio\030"
- + "\002 \001(\001\"q\n\rImageCropType\022\037\n\033IMAGE_CROP_TYP"
- + "E_UNSPECIFIED\020\000\022\n\n\006SQUARE\020\001\022\n\n\006CIRCLE\020\002\022"
- + "\024\n\020RECTANGLE_CUSTOM\020\003\022\021\n\rRECTANGLE_4_3\020\004"
- + "\"\317\001\n\013BorderStyle\0229\n\004type\030\001 \001(\0162+.google."
- + "apps.card.v1.BorderStyle.BorderType\022(\n\014s"
- + "troke_color\030\002 \001(\0132\022.google.type.Color\022\025\n"
- + "\rcorner_radius\030\003 \001(\005\"D\n\nBorderType\022\033\n\027BO"
- + "RDER_TYPE_UNSPECIFIED\020\000\022\r\n\tNO_BORDER\020\001\022\n"
- + "\n\006STROKE\020\002\"\246\001\n\016ImageComponent\022\021\n\timage_u"
- + "ri\030\001 \001(\t\022\020\n\010alt_text\030\002 \001(\t\0227\n\ncrop_style"
- + "\030\003 \001(\0132#.google.apps.card.v1.ImageCropSt"
- + "yle\0226\n\014border_style\030\004 \001(\0132 .google.apps."
- + "card.v1.BorderStyle\"\313\003\n\004Grid\022\r\n\005title\030\001 "
- + "\001(\t\0221\n\005items\030\002 \003(\0132\".google.apps.card.v1"
- + ".Grid.GridItem\0226\n\014border_style\030\003 \001(\0132 .g"
- + "oogle.apps.card.v1.BorderStyle\022\024\n\014column"
- + "_count\030\004 \001(\005\022.\n\010on_click\030\005 \001(\0132\034.google."
- + "apps.card.v1.OnClick\032\202\002\n\010GridItem\022\n\n\002id\030"
- + "\001 \001(\t\0222\n\005image\030\002 \001(\0132#.google.apps.card."
- + "v1.ImageComponent\022\r\n\005title\030\003 \001(\t\022\020\n\010subt"
- + "itle\030\004 \001(\t\022A\n\006layout\030\t \001(\01621.google.apps"
- + ".card.v1.Grid.GridItem.GridItemLayout\"R\n"
- + "\016GridItemLayout\022 \n\034GRID_ITEM_LAYOUT_UNSP"
- + "ECIFIED\020\000\022\016\n\nTEXT_BELOW\020\001\022\016\n\nTEXT_ABOVE\020"
- + "\002\"\375\007\n\007Columns\0229\n\014column_items\030\002 \003(\0132#.go"
- + "ogle.apps.card.v1.Columns.Column\032\266\007\n\006Col"
- + "umn\022V\n\025horizontal_size_style\030\001 \001(\01627.goo"
- + "gle.apps.card.v1.Columns.Column.Horizont"
- + "alSizeStyle\022M\n\024horizontal_alignment\030\002 \001("
- + "\0162/.google.apps.card.v1.Widget.Horizonta"
- + "lAlignment\022Q\n\022vertical_alignment\030\003 \001(\01625"
- + ".google.apps.card.v1.Columns.Column.Vert"
- + "icalAlignment\022<\n\007widgets\030\004 \003(\0132+.google."
- + "apps.card.v1.Columns.Column.Widgets\032\251\003\n\007"
- + "Widgets\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\016de"
- + "corated_text\030\003 \001(\0132\".google.apps.card.v1"
- + ".DecoratedTextH\000\0226\n\013button_list\030\004 \001(\0132\037."
- + "google.apps.card.v1.ButtonListH\000\0224\n\ntext"
- + "_input\030\005 \001(\0132\036.google.apps.card.v1.TextI"
- + "nputH\000\022>\n\017selection_input\030\006 \001(\0132#.google"
- + ".apps.card.v1.SelectionInputH\000\022?\n\020date_t"
- + "ime_picker\030\007 \001(\0132#.google.apps.card.v1.D"
- + "ateTimePickerH\000B\006\n\004data\"n\n\023HorizontalSiz"
- + "eStyle\022%\n!HORIZONTAL_SIZE_STYLE_UNSPECIF"
- + "IED\020\000\022\030\n\024FILL_AVAILABLE_SPACE\020\001\022\026\n\022FILL_"
- + "MINIMUM_SPACE\020\002\"X\n\021VerticalAlignment\022\"\n\036"
- + "VERTICAL_ALIGNMENT_UNSPECIFIED\020\000\022\n\n\006CENT"
- + "ER\020\001\022\007\n\003TOP\020\002\022\n\n\006BOTTOM\020\003\"\340\001\n\007OnClick\022-\n"
- + "\006action\030\001 \001(\0132\033.google.apps.card.v1.Acti"
- + "onH\000\0222\n\topen_link\030\002 \001(\0132\035.google.apps.ca"
- + "rd.v1.OpenLinkH\000\022?\n\030open_dynamic_link_ac"
- + "tion\030\003 \001(\0132\033.google.apps.card.v1.ActionH"
- + "\000\022)\n\004card\030\004 \001(\0132\031.google.apps.card.v1.Ca"
- + "rdH\000B\006\n\004data\"\321\001\n\010OpenLink\022\013\n\003url\030\001 \001(\t\0225"
- + "\n\007open_as\030\002 \001(\0162$.google.apps.card.v1.Op"
- + "enLink.OpenAs\0227\n\010on_close\030\003 \001(\0162%.google"
- + ".apps.card.v1.OpenLink.OnClose\"$\n\006OpenAs"
- + "\022\r\n\tFULL_SIZE\020\000\022\013\n\007OVERLAY\020\001\"\"\n\007OnClose\022"
- + "\013\n\007NOTHING\020\000\022\n\n\006RELOAD\020\001\"\210\003\n\006Action\022\020\n\010f"
- + "unction\030\001 \001(\t\022?\n\nparameters\030\002 \003(\0132+.goog"
- + "le.apps.card.v1.Action.ActionParameter\022A"
- + "\n\016load_indicator\030\003 \001(\0162).google.apps.car"
- + "d.v1.Action.LoadIndicator\022\026\n\016persist_val"
- + "ues\030\004 \001(\010\022<\n\013interaction\030\005 \001(\0162\'.google."
- + "apps.card.v1.Action.Interaction\032-\n\017Actio"
- + "nParameter\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"&"
- + "\n\rLoadIndicator\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\001Z7google.golang.org/"
- + "genproto/googleapis/apps/card/v1;card\252\002\023"
- + "Google.Apps.Card.V1\312\002\023Google\\Apps\\Card\\V"
- + "1\352\002\026Google::Apps::Card::V1b\006proto3"
- };
- descriptor =
- com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
- descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.type.ColorProto.getDescriptor(),
- });
- internal_static_google_apps_card_v1_Card_descriptor = getDescriptor().getMessageTypes().get(0);
- internal_static_google_apps_card_v1_Card_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Card_descriptor,
- new java.lang.String[] {
- "Header",
- "Sections",
- "SectionDividerStyle",
- "CardActions",
- "Name",
- "FixedFooter",
- "DisplayStyle",
- "PeekCardHeader",
- });
- internal_static_google_apps_card_v1_Card_CardHeader_descriptor =
- internal_static_google_apps_card_v1_Card_descriptor.getNestedTypes().get(0);
- internal_static_google_apps_card_v1_Card_CardHeader_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Card_CardHeader_descriptor,
- new java.lang.String[] {
- "Title", "Subtitle", "ImageType", "ImageUrl", "ImageAltText",
- });
- internal_static_google_apps_card_v1_Card_Section_descriptor =
- internal_static_google_apps_card_v1_Card_descriptor.getNestedTypes().get(1);
- internal_static_google_apps_card_v1_Card_Section_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Card_Section_descriptor,
- new java.lang.String[] {
- "Header", "Widgets", "Collapsible", "UncollapsibleWidgetsCount",
- });
- internal_static_google_apps_card_v1_Card_CardAction_descriptor =
- internal_static_google_apps_card_v1_Card_descriptor.getNestedTypes().get(2);
- internal_static_google_apps_card_v1_Card_CardAction_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Card_CardAction_descriptor,
- new java.lang.String[] {
- "ActionLabel", "OnClick",
- });
- internal_static_google_apps_card_v1_Card_CardFixedFooter_descriptor =
- internal_static_google_apps_card_v1_Card_descriptor.getNestedTypes().get(3);
- internal_static_google_apps_card_v1_Card_CardFixedFooter_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Card_CardFixedFooter_descriptor,
- new java.lang.String[] {
- "PrimaryButton", "SecondaryButton",
- });
- internal_static_google_apps_card_v1_Widget_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_google_apps_card_v1_Widget_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Widget_descriptor,
- new java.lang.String[] {
- "TextParagraph",
- "Image",
- "DecoratedText",
- "ButtonList",
- "TextInput",
- "SelectionInput",
- "DateTimePicker",
- "Divider",
- "Grid",
- "Columns",
- "HorizontalAlignment",
- "Data",
- });
- internal_static_google_apps_card_v1_TextParagraph_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_google_apps_card_v1_TextParagraph_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_TextParagraph_descriptor,
- new java.lang.String[] {
- "Text",
- });
- internal_static_google_apps_card_v1_Image_descriptor = getDescriptor().getMessageTypes().get(3);
- internal_static_google_apps_card_v1_Image_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Image_descriptor,
- new java.lang.String[] {
- "ImageUrl", "OnClick", "AltText",
- });
- internal_static_google_apps_card_v1_Divider_descriptor =
- getDescriptor().getMessageTypes().get(4);
- internal_static_google_apps_card_v1_Divider_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Divider_descriptor, new java.lang.String[] {});
- internal_static_google_apps_card_v1_DecoratedText_descriptor =
- getDescriptor().getMessageTypes().get(5);
- internal_static_google_apps_card_v1_DecoratedText_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_DecoratedText_descriptor,
- new java.lang.String[] {
- "Icon",
- "StartIcon",
- "TopLabel",
- "Text",
- "WrapText",
- "BottomLabel",
- "OnClick",
- "Button",
- "SwitchControl",
- "EndIcon",
- "Control",
- });
- internal_static_google_apps_card_v1_DecoratedText_SwitchControl_descriptor =
- internal_static_google_apps_card_v1_DecoratedText_descriptor.getNestedTypes().get(0);
- internal_static_google_apps_card_v1_DecoratedText_SwitchControl_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_DecoratedText_SwitchControl_descriptor,
- new java.lang.String[] {
- "Name", "Value", "Selected", "OnChangeAction", "ControlType",
- });
- internal_static_google_apps_card_v1_TextInput_descriptor =
- getDescriptor().getMessageTypes().get(6);
- internal_static_google_apps_card_v1_TextInput_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_TextInput_descriptor,
- new java.lang.String[] {
- "Name",
- "Label",
- "HintText",
- "Value",
- "Type",
- "OnChangeAction",
- "InitialSuggestions",
- "AutoCompleteAction",
- "PlaceholderText",
- });
- internal_static_google_apps_card_v1_Suggestions_descriptor =
- getDescriptor().getMessageTypes().get(7);
- internal_static_google_apps_card_v1_Suggestions_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Suggestions_descriptor,
- new java.lang.String[] {
- "Items",
- });
- internal_static_google_apps_card_v1_Suggestions_SuggestionItem_descriptor =
- internal_static_google_apps_card_v1_Suggestions_descriptor.getNestedTypes().get(0);
- internal_static_google_apps_card_v1_Suggestions_SuggestionItem_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Suggestions_SuggestionItem_descriptor,
- new java.lang.String[] {
- "Text", "Content",
- });
- internal_static_google_apps_card_v1_ButtonList_descriptor =
- getDescriptor().getMessageTypes().get(8);
- internal_static_google_apps_card_v1_ButtonList_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_ButtonList_descriptor,
- new java.lang.String[] {
- "Buttons",
- });
- internal_static_google_apps_card_v1_SelectionInput_descriptor =
- getDescriptor().getMessageTypes().get(9);
- internal_static_google_apps_card_v1_SelectionInput_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_SelectionInput_descriptor,
- new java.lang.String[] {
- "Name",
- "Label",
- "Type",
- "Items",
- "OnChangeAction",
- "MultiSelectMaxSelectedItems",
- "MultiSelectMinQueryLength",
- "ExternalDataSource",
- "PlatformDataSource",
- "MultiSelectDataSource",
- });
- internal_static_google_apps_card_v1_SelectionInput_SelectionItem_descriptor =
- internal_static_google_apps_card_v1_SelectionInput_descriptor.getNestedTypes().get(0);
- internal_static_google_apps_card_v1_SelectionInput_SelectionItem_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_SelectionInput_SelectionItem_descriptor,
- new java.lang.String[] {
- "Text", "Value", "Selected", "StartIconUri", "BottomText",
- });
- internal_static_google_apps_card_v1_SelectionInput_PlatformDataSource_descriptor =
- internal_static_google_apps_card_v1_SelectionInput_descriptor.getNestedTypes().get(1);
- internal_static_google_apps_card_v1_SelectionInput_PlatformDataSource_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_SelectionInput_PlatformDataSource_descriptor,
- new java.lang.String[] {
- "CommonDataSource", "DataSource",
- });
- internal_static_google_apps_card_v1_DateTimePicker_descriptor =
- getDescriptor().getMessageTypes().get(10);
- internal_static_google_apps_card_v1_DateTimePicker_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_DateTimePicker_descriptor,
- new java.lang.String[] {
- "Name", "Label", "Type", "ValueMsEpoch", "TimezoneOffsetDate", "OnChangeAction",
- });
- internal_static_google_apps_card_v1_Button_descriptor =
- getDescriptor().getMessageTypes().get(11);
- 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",
- });
- internal_static_google_apps_card_v1_Icon_descriptor = getDescriptor().getMessageTypes().get(12);
- internal_static_google_apps_card_v1_Icon_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Icon_descriptor,
- new java.lang.String[] {
- "KnownIcon", "IconUrl", "AltText", "ImageType", "Icons",
- });
- internal_static_google_apps_card_v1_ImageCropStyle_descriptor =
- getDescriptor().getMessageTypes().get(13);
- internal_static_google_apps_card_v1_ImageCropStyle_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_ImageCropStyle_descriptor,
- new java.lang.String[] {
- "Type", "AspectRatio",
- });
- internal_static_google_apps_card_v1_BorderStyle_descriptor =
- getDescriptor().getMessageTypes().get(14);
- internal_static_google_apps_card_v1_BorderStyle_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_BorderStyle_descriptor,
- new java.lang.String[] {
- "Type", "StrokeColor", "CornerRadius",
- });
- internal_static_google_apps_card_v1_ImageComponent_descriptor =
- getDescriptor().getMessageTypes().get(15);
- 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(16);
- internal_static_google_apps_card_v1_Grid_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Grid_descriptor,
- new java.lang.String[] {
- "Title", "Items", "BorderStyle", "ColumnCount", "OnClick",
- });
- internal_static_google_apps_card_v1_Grid_GridItem_descriptor =
- internal_static_google_apps_card_v1_Grid_descriptor.getNestedTypes().get(0);
- internal_static_google_apps_card_v1_Grid_GridItem_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Grid_GridItem_descriptor,
- new java.lang.String[] {
- "Id", "Image", "Title", "Subtitle", "Layout",
- });
- internal_static_google_apps_card_v1_Columns_descriptor =
- getDescriptor().getMessageTypes().get(17);
- internal_static_google_apps_card_v1_Columns_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Columns_descriptor,
- new java.lang.String[] {
- "ColumnItems",
- });
- internal_static_google_apps_card_v1_Columns_Column_descriptor =
- internal_static_google_apps_card_v1_Columns_descriptor.getNestedTypes().get(0);
- internal_static_google_apps_card_v1_Columns_Column_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Columns_Column_descriptor,
- new java.lang.String[] {
- "HorizontalSizeStyle", "HorizontalAlignment", "VerticalAlignment", "Widgets",
- });
- internal_static_google_apps_card_v1_Columns_Column_Widgets_descriptor =
- internal_static_google_apps_card_v1_Columns_Column_descriptor.getNestedTypes().get(0);
- internal_static_google_apps_card_v1_Columns_Column_Widgets_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Columns_Column_Widgets_descriptor,
- new java.lang.String[] {
- "TextParagraph",
- "Image",
- "DecoratedText",
- "ButtonList",
- "TextInput",
- "SelectionInput",
- "DateTimePicker",
- "Data",
- });
- internal_static_google_apps_card_v1_OnClick_descriptor =
- getDescriptor().getMessageTypes().get(18);
- 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",
- });
- internal_static_google_apps_card_v1_OpenLink_descriptor =
- getDescriptor().getMessageTypes().get(19);
- internal_static_google_apps_card_v1_OpenLink_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_OpenLink_descriptor,
- new java.lang.String[] {
- "Url", "OpenAs", "OnClose",
- });
- internal_static_google_apps_card_v1_Action_descriptor =
- getDescriptor().getMessageTypes().get(20);
- 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",
- });
- internal_static_google_apps_card_v1_Action_ActionParameter_descriptor =
- internal_static_google_apps_card_v1_Action_descriptor.getNestedTypes().get(0);
- internal_static_google_apps_card_v1_Action_ActionParameter_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_apps_card_v1_Action_ActionParameter_descriptor,
- new java.lang.String[] {
- "Key", "Value",
- });
- com.google.type.ColorProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Columns.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Columns.java
deleted file mode 100644
index 70e98f8748e2..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Columns.java
+++ /dev/null
@@ -1,5786 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * The `Columns` widget displays up to 2 columns in a card or dialog. You can
- * add widgets to each column; the widgets appear in the order that they are
- * specified. For an example in Google Chat apps, see
- * [Columns](https://developers.google.com/chat/ui/widgets/columns).
- *
- * The height of each column is determined by the taller column. For example, if
- * the first column is taller than the second column, both columns have the
- * height of the first column. Because each column can contain a different
- * number of widgets, you can't define rows or align widgets between the
- * columns.
- *
- * Columns are displayed side-by-side. You can customize the width of each
- * column using the `HorizontalSizeStyle` field. If the user's
- * screen width is too narrow, the second column wraps below the first:
- *
- * * On web, the second column wraps if the screen width is less than or equal
- * to 480 pixels.
- * * On iOS devices, the second column wraps if the screen width is
- * less than or equal to 300 pt.
- * * 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
- * [`Grid`][google.apps.card.v1.Grid] widget.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- * Columns for Google Workspace Add-ons are in
- * [Developer Preview](https://developers.google.com/workspace/preview).
- *
- *
- * Protobuf type {@code google.apps.card.v1.Columns}
- */
-public final class Columns extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Columns)
- ColumnsOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Columns.newBuilder() to construct.
- private Columns(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Columns() {
- columnItems_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new Columns();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Columns_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Columns_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Columns.class, com.google.apps.card.v1.Columns.Builder.class);
- }
-
- public interface ColumnOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Columns.Column)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * Specifies how a column fills the width of the card.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;
- *
- *
- * @return The enum numeric value on the wire for horizontalSizeStyle.
- */
- int getHorizontalSizeStyleValue();
- /**
- *
- *
- *
- * Specifies how a column fills the width of the card.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;
- *
- *
- * @return The horizontalSizeStyle.
- */
- com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle getHorizontalSizeStyle();
-
- /**
- *
- *
- *
- * Specifies whether widgets align to the left, right, or center of a
- * column.
- *
- *
- * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2;
- *
- * @return The enum numeric value on the wire for horizontalAlignment.
- */
- int getHorizontalAlignmentValue();
- /**
- *
- *
- *
- * Specifies whether widgets align to the left, right, or center of a
- * column.
- *
- *
- * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2;
- *
- * @return The horizontalAlignment.
- */
- com.google.apps.card.v1.Widget.HorizontalAlignment getHorizontalAlignment();
-
- /**
- *
- *
- *
- * Specifies whether widgets align to the top, bottom, or center of a
- * column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;
- *
- * @return The enum numeric value on the wire for verticalAlignment.
- */
- int getVerticalAlignmentValue();
- /**
- *
- *
- *
- * Specifies whether widgets align to the top, bottom, or center of a
- * column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;
- *
- * @return The verticalAlignment.
- */
- com.google.apps.card.v1.Columns.Column.VerticalAlignment getVerticalAlignment();
-
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- java.util.List getWidgetsList();
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- com.google.apps.card.v1.Columns.Column.Widgets getWidgets(int index);
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- int getWidgetsCount();
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- java.util.List extends com.google.apps.card.v1.Columns.Column.WidgetsOrBuilder>
- getWidgetsOrBuilderList();
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- com.google.apps.card.v1.Columns.Column.WidgetsOrBuilder getWidgetsOrBuilder(int index);
- }
- /**
- *
- *
- *
- * A column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Columns.Column}
- */
- public static final class Column extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Columns.Column)
- ColumnOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Column.newBuilder() to construct.
- private Column(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Column() {
- horizontalSizeStyle_ = 0;
- horizontalAlignment_ = 0;
- verticalAlignment_ = 0;
- widgets_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new Column();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Columns_Column_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Columns_Column_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Columns.Column.class,
- com.google.apps.card.v1.Columns.Column.Builder.class);
- }
-
- /**
- *
- *
- *
- * 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 Chat apps](https://developers.google.com/chat):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.Columns.Column.HorizontalSizeStyle}
- */
- public enum HorizontalSizeStyle implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0;
- */
- HORIZONTAL_SIZE_STYLE_UNSPECIFIED(0),
- /**
- *
- *
- *
- * Default value. Column fills the available space, up to 70% of the
- * card's width. If both columns are set to `FILL_AVAILABLE_SPACE`, each
- * column fills 50% of the space.
- *
- *
- * FILL_AVAILABLE_SPACE = 1;
- */
- FILL_AVAILABLE_SPACE(1),
- /**
- *
- *
- *
- * Column fills the least amount of space possible and no more than 30% of
- * the card's width.
- *
- *
- * FILL_MINIMUM_SPACE = 2;
- */
- FILL_MINIMUM_SPACE(2),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0;
- */
- public static final int HORIZONTAL_SIZE_STYLE_UNSPECIFIED_VALUE = 0;
- /**
- *
- *
- *
- * Default value. Column fills the available space, up to 70% of the
- * card's width. If both columns are set to `FILL_AVAILABLE_SPACE`, each
- * column fills 50% of the space.
- *
- *
- * FILL_AVAILABLE_SPACE = 1;
- */
- public static final int FILL_AVAILABLE_SPACE_VALUE = 1;
- /**
- *
- *
- *
- * Column fills the least amount of space possible and no more than 30% of
- * the card's width.
- *
- *
- * FILL_MINIMUM_SPACE = 2;
- */
- public static final int FILL_MINIMUM_SPACE_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 HorizontalSizeStyle 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 HorizontalSizeStyle forNumber(int value) {
- switch (value) {
- case 0:
- return HORIZONTAL_SIZE_STYLE_UNSPECIFIED;
- case 1:
- return FILL_AVAILABLE_SPACE;
- case 2:
- return FILL_MINIMUM_SPACE;
- 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 HorizontalSizeStyle findValueByNumber(int number) {
- return HorizontalSizeStyle.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.Columns.Column.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final HorizontalSizeStyle[] VALUES = values();
-
- public static HorizontalSizeStyle 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 HorizontalSizeStyle(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Columns.Column.HorizontalSizeStyle)
- }
-
- /**
- *
- *
- *
- * Specifies whether widgets align to the top, bottom, or center of a
- * column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.Columns.Column.VerticalAlignment}
- */
- public enum VerticalAlignment implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * VERTICAL_ALIGNMENT_UNSPECIFIED = 0;
- */
- VERTICAL_ALIGNMENT_UNSPECIFIED(0),
- /**
- *
- *
- *
- * Default value. Aligns widgets to the center of a column.
- *
- *
- * CENTER = 1;
- */
- CENTER(1),
- /**
- *
- *
- *
- * Aligns widgets to the top of a column.
- *
- *
- * TOP = 2;
- */
- TOP(2),
- /**
- *
- *
- *
- * Aligns widgets to the bottom of a column.
- *
- *
- * BOTTOM = 3;
- */
- BOTTOM(3),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * VERTICAL_ALIGNMENT_UNSPECIFIED = 0;
- */
- public static final int VERTICAL_ALIGNMENT_UNSPECIFIED_VALUE = 0;
- /**
- *
- *
- *
- * Default value. Aligns widgets to the center of a column.
- *
- *
- * CENTER = 1;
- */
- public static final int CENTER_VALUE = 1;
- /**
- *
- *
- *
- * Aligns widgets to the top of a column.
- *
- *
- * TOP = 2;
- */
- public static final int TOP_VALUE = 2;
- /**
- *
- *
- *
- * Aligns widgets to the bottom of a column.
- *
- *
- * 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 CENTER;
- case 2:
- return TOP;
- 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.Columns.Column.getDescriptor().getEnumTypes().get(1);
- }
-
- 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.Columns.Column.VerticalAlignment)
- }
-
- public interface WidgetsOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Columns.Column.Widgets)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] widget.
- *
- *
- * .google.apps.card.v1.TextParagraph text_paragraph = 1;
- *
- * @return Whether the textParagraph field is set.
- */
- boolean hasTextParagraph();
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] widget.
- *
- *
- * .google.apps.card.v1.TextParagraph text_paragraph = 1;
- *
- * @return The textParagraph.
- */
- com.google.apps.card.v1.TextParagraph getTextParagraph();
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] widget.
- *
- *
- * .google.apps.card.v1.TextParagraph text_paragraph = 1;
- */
- com.google.apps.card.v1.TextParagraphOrBuilder getTextParagraphOrBuilder();
-
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- *
- * @return Whether the image field is set.
- */
- boolean hasImage();
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- *
- * @return The image.
- */
- com.google.apps.card.v1.Image getImage();
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- */
- com.google.apps.card.v1.ImageOrBuilder getImageOrBuilder();
-
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- *
- * @return Whether the decoratedText field is set.
- */
- boolean hasDecoratedText();
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- *
- * @return The decoratedText.
- */
- com.google.apps.card.v1.DecoratedText getDecoratedText();
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- */
- com.google.apps.card.v1.DecoratedTextOrBuilder getDecoratedTextOrBuilder();
-
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- *
- * @return Whether the buttonList field is set.
- */
- boolean hasButtonList();
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- *
- * @return The buttonList.
- */
- com.google.apps.card.v1.ButtonList getButtonList();
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- */
- com.google.apps.card.v1.ButtonListOrBuilder getButtonListOrBuilder();
-
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- *
- * @return Whether the textInput field is set.
- */
- boolean hasTextInput();
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- *
- * @return The textInput.
- */
- com.google.apps.card.v1.TextInput getTextInput();
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- */
- com.google.apps.card.v1.TextInputOrBuilder getTextInputOrBuilder();
-
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- *
- * @return Whether the selectionInput field is set.
- */
- boolean hasSelectionInput();
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- *
- * @return The selectionInput.
- */
- com.google.apps.card.v1.SelectionInput getSelectionInput();
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- */
- com.google.apps.card.v1.SelectionInputOrBuilder getSelectionInputOrBuilder();
-
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- *
- * @return Whether the dateTimePicker field is set.
- */
- boolean hasDateTimePicker();
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- *
- * @return The dateTimePicker.
- */
- com.google.apps.card.v1.DateTimePicker getDateTimePicker();
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- */
- com.google.apps.card.v1.DateTimePickerOrBuilder getDateTimePickerOrBuilder();
-
- com.google.apps.card.v1.Columns.Column.Widgets.DataCase getDataCase();
- }
- /**
- *
- *
- *
- * The supported widgets that you can include in a column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Columns.Column.Widgets}
- */
- public static final class Widgets extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Columns.Column.Widgets)
- WidgetsOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Widgets.newBuilder() to construct.
- private Widgets(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Widgets() {}
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new Widgets();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Columns_Column_Widgets_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Columns_Column_Widgets_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Columns.Column.Widgets.class,
- com.google.apps.card.v1.Columns.Column.Widgets.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),
- IMAGE(2),
- DECORATED_TEXT(3),
- BUTTON_LIST(4),
- TEXT_INPUT(5),
- SELECTION_INPUT(6),
- DATE_TIME_PICKER(7),
- 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 2:
- return IMAGE;
- case 3:
- return DECORATED_TEXT;
- case 4:
- return BUTTON_LIST;
- case 5:
- return TEXT_INPUT;
- case 6:
- return SELECTION_INPUT;
- case 7:
- return DATE_TIME_PICKER;
- 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;
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] 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;
- }
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] 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();
- }
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] 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 IMAGE_FIELD_NUMBER = 2;
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- *
- * @return Whether the image field is set.
- */
- @java.lang.Override
- public boolean hasImage() {
- return dataCase_ == 2;
- }
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- *
- * @return The image.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Image getImage() {
- if (dataCase_ == 2) {
- return (com.google.apps.card.v1.Image) data_;
- }
- return com.google.apps.card.v1.Image.getDefaultInstance();
- }
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ImageOrBuilder getImageOrBuilder() {
- if (dataCase_ == 2) {
- return (com.google.apps.card.v1.Image) data_;
- }
- return com.google.apps.card.v1.Image.getDefaultInstance();
- }
-
- public static final int DECORATED_TEXT_FIELD_NUMBER = 3;
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- *
- * @return Whether the decoratedText field is set.
- */
- @java.lang.Override
- public boolean hasDecoratedText() {
- return dataCase_ == 3;
- }
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- *
- * @return The decoratedText.
- */
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText getDecoratedText() {
- if (dataCase_ == 3) {
- return (com.google.apps.card.v1.DecoratedText) data_;
- }
- return com.google.apps.card.v1.DecoratedText.getDefaultInstance();
- }
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- */
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedTextOrBuilder getDecoratedTextOrBuilder() {
- if (dataCase_ == 3) {
- return (com.google.apps.card.v1.DecoratedText) data_;
- }
- return com.google.apps.card.v1.DecoratedText.getDefaultInstance();
- }
-
- public static final int BUTTON_LIST_FIELD_NUMBER = 4;
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- *
- * @return Whether the buttonList field is set.
- */
- @java.lang.Override
- public boolean hasButtonList() {
- return dataCase_ == 4;
- }
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- *
- * @return The buttonList.
- */
- @java.lang.Override
- public com.google.apps.card.v1.ButtonList getButtonList() {
- if (dataCase_ == 4) {
- return (com.google.apps.card.v1.ButtonList) data_;
- }
- return com.google.apps.card.v1.ButtonList.getDefaultInstance();
- }
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ButtonListOrBuilder getButtonListOrBuilder() {
- if (dataCase_ == 4) {
- return (com.google.apps.card.v1.ButtonList) data_;
- }
- return com.google.apps.card.v1.ButtonList.getDefaultInstance();
- }
-
- public static final int TEXT_INPUT_FIELD_NUMBER = 5;
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- *
- * @return Whether the textInput field is set.
- */
- @java.lang.Override
- public boolean hasTextInput() {
- return dataCase_ == 5;
- }
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- *
- * @return The textInput.
- */
- @java.lang.Override
- public com.google.apps.card.v1.TextInput getTextInput() {
- if (dataCase_ == 5) {
- return (com.google.apps.card.v1.TextInput) data_;
- }
- return com.google.apps.card.v1.TextInput.getDefaultInstance();
- }
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- */
- @java.lang.Override
- public com.google.apps.card.v1.TextInputOrBuilder getTextInputOrBuilder() {
- if (dataCase_ == 5) {
- return (com.google.apps.card.v1.TextInput) data_;
- }
- return com.google.apps.card.v1.TextInput.getDefaultInstance();
- }
-
- public static final int SELECTION_INPUT_FIELD_NUMBER = 6;
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- *
- * @return Whether the selectionInput field is set.
- */
- @java.lang.Override
- public boolean hasSelectionInput() {
- return dataCase_ == 6;
- }
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- *
- * @return The selectionInput.
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput getSelectionInput() {
- if (dataCase_ == 6) {
- return (com.google.apps.card.v1.SelectionInput) data_;
- }
- return com.google.apps.card.v1.SelectionInput.getDefaultInstance();
- }
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInputOrBuilder getSelectionInputOrBuilder() {
- if (dataCase_ == 6) {
- return (com.google.apps.card.v1.SelectionInput) data_;
- }
- return com.google.apps.card.v1.SelectionInput.getDefaultInstance();
- }
-
- public static final int DATE_TIME_PICKER_FIELD_NUMBER = 7;
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- *
- * @return Whether the dateTimePicker field is set.
- */
- @java.lang.Override
- public boolean hasDateTimePicker() {
- return dataCase_ == 7;
- }
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- *
- * @return The dateTimePicker.
- */
- @java.lang.Override
- public com.google.apps.card.v1.DateTimePicker getDateTimePicker() {
- if (dataCase_ == 7) {
- return (com.google.apps.card.v1.DateTimePicker) data_;
- }
- return com.google.apps.card.v1.DateTimePicker.getDefaultInstance();
- }
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- */
- @java.lang.Override
- public com.google.apps.card.v1.DateTimePickerOrBuilder getDateTimePickerOrBuilder() {
- if (dataCase_ == 7) {
- return (com.google.apps.card.v1.DateTimePicker) data_;
- }
- return com.google.apps.card.v1.DateTimePicker.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_ == 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_);
- }
- 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 +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 2, (com.google.apps.card.v1.Image) data_);
- }
- if (dataCase_ == 3) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 3, (com.google.apps.card.v1.DecoratedText) data_);
- }
- if (dataCase_ == 4) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 4, (com.google.apps.card.v1.ButtonList) data_);
- }
- if (dataCase_ == 5) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 5, (com.google.apps.card.v1.TextInput) data_);
- }
- if (dataCase_ == 6) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 6, (com.google.apps.card.v1.SelectionInput) data_);
- }
- if (dataCase_ == 7) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 7, (com.google.apps.card.v1.DateTimePicker) 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.Columns.Column.Widgets)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Columns.Column.Widgets other =
- (com.google.apps.card.v1.Columns.Column.Widgets) obj;
-
- if (!getDataCase().equals(other.getDataCase())) return false;
- switch (dataCase_) {
- case 1:
- if (!getTextParagraph().equals(other.getTextParagraph())) return false;
- break;
- case 2:
- if (!getImage().equals(other.getImage())) return false;
- break;
- case 3:
- if (!getDecoratedText().equals(other.getDecoratedText())) return false;
- break;
- case 4:
- if (!getButtonList().equals(other.getButtonList())) return false;
- break;
- case 5:
- if (!getTextInput().equals(other.getTextInput())) return false;
- break;
- case 6:
- if (!getSelectionInput().equals(other.getSelectionInput())) return false;
- break;
- case 7:
- if (!getDateTimePicker().equals(other.getDateTimePicker())) 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 2:
- hash = (37 * hash) + IMAGE_FIELD_NUMBER;
- hash = (53 * hash) + getImage().hashCode();
- break;
- case 3:
- hash = (37 * hash) + DECORATED_TEXT_FIELD_NUMBER;
- hash = (53 * hash) + getDecoratedText().hashCode();
- break;
- case 4:
- hash = (37 * hash) + BUTTON_LIST_FIELD_NUMBER;
- hash = (53 * hash) + getButtonList().hashCode();
- break;
- case 5:
- hash = (37 * hash) + TEXT_INPUT_FIELD_NUMBER;
- hash = (53 * hash) + getTextInput().hashCode();
- break;
- case 6:
- hash = (37 * hash) + SELECTION_INPUT_FIELD_NUMBER;
- hash = (53 * hash) + getSelectionInput().hashCode();
- break;
- case 7:
- hash = (37 * hash) + DATE_TIME_PICKER_FIELD_NUMBER;
- hash = (53 * hash) + getDateTimePicker().hashCode();
- break;
- case 0:
- default:
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Columns.Column.Widgets parseFrom(
- java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Columns.Column.Widgets 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.Columns.Column.Widgets parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Columns.Column.Widgets 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.Columns.Column.Widgets parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Columns.Column.Widgets 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.Columns.Column.Widgets parseFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Columns.Column.Widgets 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.Columns.Column.Widgets parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Columns.Column.Widgets 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.Columns.Column.Widgets 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.Columns.Column.Widgets 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.Columns.Column.Widgets prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
-
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- *
- *
- * The supported widgets that you can include in a column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Columns.Column.Widgets}
- */
- public static final class Builder
- extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Columns.Column.Widgets)
- com.google.apps.card.v1.Columns.Column.WidgetsOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Columns_Column_Widgets_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Columns_Column_Widgets_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Columns.Column.Widgets.class,
- com.google.apps.card.v1.Columns.Column.Widgets.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Columns.Column.Widgets.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 (imageBuilder_ != null) {
- imageBuilder_.clear();
- }
- if (decoratedTextBuilder_ != null) {
- decoratedTextBuilder_.clear();
- }
- if (buttonListBuilder_ != null) {
- buttonListBuilder_.clear();
- }
- if (textInputBuilder_ != null) {
- textInputBuilder_.clear();
- }
- if (selectionInputBuilder_ != null) {
- selectionInputBuilder_.clear();
- }
- if (dateTimePickerBuilder_ != null) {
- dateTimePickerBuilder_.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_Columns_Column_Widgets_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column.Widgets getDefaultInstanceForType() {
- return com.google.apps.card.v1.Columns.Column.Widgets.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column.Widgets build() {
- com.google.apps.card.v1.Columns.Column.Widgets result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column.Widgets buildPartial() {
- com.google.apps.card.v1.Columns.Column.Widgets result =
- new com.google.apps.card.v1.Columns.Column.Widgets(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- buildPartialOneofs(result);
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.Columns.Column.Widgets result) {
- int from_bitField0_ = bitField0_;
- }
-
- private void buildPartialOneofs(com.google.apps.card.v1.Columns.Column.Widgets result) {
- result.dataCase_ = dataCase_;
- result.data_ = this.data_;
- if (dataCase_ == 1 && textParagraphBuilder_ != null) {
- result.data_ = textParagraphBuilder_.build();
- }
- if (dataCase_ == 2 && imageBuilder_ != null) {
- result.data_ = imageBuilder_.build();
- }
- if (dataCase_ == 3 && decoratedTextBuilder_ != null) {
- result.data_ = decoratedTextBuilder_.build();
- }
- if (dataCase_ == 4 && buttonListBuilder_ != null) {
- result.data_ = buttonListBuilder_.build();
- }
- if (dataCase_ == 5 && textInputBuilder_ != null) {
- result.data_ = textInputBuilder_.build();
- }
- if (dataCase_ == 6 && selectionInputBuilder_ != null) {
- result.data_ = selectionInputBuilder_.build();
- }
- if (dataCase_ == 7 && dateTimePickerBuilder_ != null) {
- result.data_ = dateTimePickerBuilder_.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.Columns.Column.Widgets) {
- return mergeFrom((com.google.apps.card.v1.Columns.Column.Widgets) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Columns.Column.Widgets other) {
- if (other == com.google.apps.card.v1.Columns.Column.Widgets.getDefaultInstance())
- return this;
- switch (other.getDataCase()) {
- case TEXT_PARAGRAPH:
- {
- mergeTextParagraph(other.getTextParagraph());
- break;
- }
- case IMAGE:
- {
- mergeImage(other.getImage());
- break;
- }
- case DECORATED_TEXT:
- {
- mergeDecoratedText(other.getDecoratedText());
- break;
- }
- case BUTTON_LIST:
- {
- mergeButtonList(other.getButtonList());
- break;
- }
- case TEXT_INPUT:
- {
- mergeTextInput(other.getTextInput());
- break;
- }
- case SELECTION_INPUT:
- {
- mergeSelectionInput(other.getSelectionInput());
- break;
- }
- case DATE_TIME_PICKER:
- {
- mergeDateTimePicker(other.getDateTimePicker());
- 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 18:
- {
- input.readMessage(getImageFieldBuilder().getBuilder(), extensionRegistry);
- dataCase_ = 2;
- break;
- } // case 18
- case 26:
- {
- input.readMessage(
- getDecoratedTextFieldBuilder().getBuilder(), extensionRegistry);
- dataCase_ = 3;
- break;
- } // case 26
- case 34:
- {
- input.readMessage(getButtonListFieldBuilder().getBuilder(), extensionRegistry);
- dataCase_ = 4;
- break;
- } // case 34
- case 42:
- {
- input.readMessage(getTextInputFieldBuilder().getBuilder(), extensionRegistry);
- dataCase_ = 5;
- break;
- } // case 42
- case 50:
- {
- input.readMessage(
- getSelectionInputFieldBuilder().getBuilder(), extensionRegistry);
- dataCase_ = 6;
- break;
- } // case 50
- case 58:
- {
- input.readMessage(
- getDateTimePickerFieldBuilder().getBuilder(), extensionRegistry);
- dataCase_ = 7;
- break;
- } // case 58
- 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_;
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] 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;
- }
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] 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();
- }
- }
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] 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;
- }
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] 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;
- }
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] 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;
- }
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] 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;
- }
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] widget.
- *
- *
- * .google.apps.card.v1.TextParagraph text_paragraph = 1;
- */
- public com.google.apps.card.v1.TextParagraph.Builder getTextParagraphBuilder() {
- return getTextParagraphFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] 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();
- }
- }
- /**
- *
- *
- *
- * [TextParagraph][google.apps.card.v1.TextParagraph] 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.Image,
- com.google.apps.card.v1.Image.Builder,
- com.google.apps.card.v1.ImageOrBuilder>
- imageBuilder_;
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- *
- * @return Whether the image field is set.
- */
- @java.lang.Override
- public boolean hasImage() {
- return dataCase_ == 2;
- }
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- *
- * @return The image.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Image getImage() {
- if (imageBuilder_ == null) {
- if (dataCase_ == 2) {
- return (com.google.apps.card.v1.Image) data_;
- }
- return com.google.apps.card.v1.Image.getDefaultInstance();
- } else {
- if (dataCase_ == 2) {
- return imageBuilder_.getMessage();
- }
- return com.google.apps.card.v1.Image.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- */
- 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_ = 2;
- return this;
- }
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- */
- public Builder setImage(com.google.apps.card.v1.Image.Builder builderForValue) {
- if (imageBuilder_ == null) {
- data_ = builderForValue.build();
- onChanged();
- } else {
- imageBuilder_.setMessage(builderForValue.build());
- }
- dataCase_ = 2;
- return this;
- }
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- */
- public Builder mergeImage(com.google.apps.card.v1.Image value) {
- if (imageBuilder_ == null) {
- if (dataCase_ == 2 && 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_ == 2) {
- imageBuilder_.mergeFrom(value);
- } else {
- imageBuilder_.setMessage(value);
- }
- }
- dataCase_ = 2;
- return this;
- }
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- */
- public Builder clearImage() {
- if (imageBuilder_ == null) {
- if (dataCase_ == 2) {
- dataCase_ = 0;
- data_ = null;
- onChanged();
- }
- } else {
- if (dataCase_ == 2) {
- dataCase_ = 0;
- data_ = null;
- }
- imageBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- */
- public com.google.apps.card.v1.Image.Builder getImageBuilder() {
- return getImageFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ImageOrBuilder getImageOrBuilder() {
- if ((dataCase_ == 2) && (imageBuilder_ != null)) {
- return imageBuilder_.getMessageOrBuilder();
- } else {
- if (dataCase_ == 2) {
- return (com.google.apps.card.v1.Image) data_;
- }
- return com.google.apps.card.v1.Image.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [Image][google.apps.card.v1.Image] widget.
- *
- *
- * .google.apps.card.v1.Image image = 2;
- */
- 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_ == 2)) {
- 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_ = 2;
- onChanged();
- return imageBuilder_;
- }
-
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.DecoratedText,
- com.google.apps.card.v1.DecoratedText.Builder,
- com.google.apps.card.v1.DecoratedTextOrBuilder>
- decoratedTextBuilder_;
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- *
- * @return Whether the decoratedText field is set.
- */
- @java.lang.Override
- public boolean hasDecoratedText() {
- return dataCase_ == 3;
- }
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- *
- * @return The decoratedText.
- */
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText getDecoratedText() {
- if (decoratedTextBuilder_ == null) {
- if (dataCase_ == 3) {
- return (com.google.apps.card.v1.DecoratedText) data_;
- }
- return com.google.apps.card.v1.DecoratedText.getDefaultInstance();
- } else {
- if (dataCase_ == 3) {
- return decoratedTextBuilder_.getMessage();
- }
- return com.google.apps.card.v1.DecoratedText.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- */
- public Builder setDecoratedText(com.google.apps.card.v1.DecoratedText value) {
- if (decoratedTextBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- data_ = value;
- onChanged();
- } else {
- decoratedTextBuilder_.setMessage(value);
- }
- dataCase_ = 3;
- return this;
- }
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- */
- public Builder setDecoratedText(
- com.google.apps.card.v1.DecoratedText.Builder builderForValue) {
- if (decoratedTextBuilder_ == null) {
- data_ = builderForValue.build();
- onChanged();
- } else {
- decoratedTextBuilder_.setMessage(builderForValue.build());
- }
- dataCase_ = 3;
- return this;
- }
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- */
- public Builder mergeDecoratedText(com.google.apps.card.v1.DecoratedText value) {
- if (decoratedTextBuilder_ == null) {
- if (dataCase_ == 3
- && data_ != com.google.apps.card.v1.DecoratedText.getDefaultInstance()) {
- data_ =
- com.google.apps.card.v1.DecoratedText.newBuilder(
- (com.google.apps.card.v1.DecoratedText) data_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- data_ = value;
- }
- onChanged();
- } else {
- if (dataCase_ == 3) {
- decoratedTextBuilder_.mergeFrom(value);
- } else {
- decoratedTextBuilder_.setMessage(value);
- }
- }
- dataCase_ = 3;
- return this;
- }
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- */
- public Builder clearDecoratedText() {
- if (decoratedTextBuilder_ == null) {
- if (dataCase_ == 3) {
- dataCase_ = 0;
- data_ = null;
- onChanged();
- }
- } else {
- if (dataCase_ == 3) {
- dataCase_ = 0;
- data_ = null;
- }
- decoratedTextBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- */
- public com.google.apps.card.v1.DecoratedText.Builder getDecoratedTextBuilder() {
- return getDecoratedTextFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- */
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedTextOrBuilder getDecoratedTextOrBuilder() {
- if ((dataCase_ == 3) && (decoratedTextBuilder_ != null)) {
- return decoratedTextBuilder_.getMessageOrBuilder();
- } else {
- if (dataCase_ == 3) {
- return (com.google.apps.card.v1.DecoratedText) data_;
- }
- return com.google.apps.card.v1.DecoratedText.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [DecoratedText][google.apps.card.v1.DecoratedText] widget.
- *
- *
- * .google.apps.card.v1.DecoratedText decorated_text = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.DecoratedText,
- com.google.apps.card.v1.DecoratedText.Builder,
- com.google.apps.card.v1.DecoratedTextOrBuilder>
- getDecoratedTextFieldBuilder() {
- if (decoratedTextBuilder_ == null) {
- if (!(dataCase_ == 3)) {
- data_ = com.google.apps.card.v1.DecoratedText.getDefaultInstance();
- }
- decoratedTextBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.DecoratedText,
- com.google.apps.card.v1.DecoratedText.Builder,
- com.google.apps.card.v1.DecoratedTextOrBuilder>(
- (com.google.apps.card.v1.DecoratedText) data_,
- getParentForChildren(),
- isClean());
- data_ = null;
- }
- dataCase_ = 3;
- onChanged();
- return decoratedTextBuilder_;
- }
-
- 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_;
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- *
- * @return Whether the buttonList field is set.
- */
- @java.lang.Override
- public boolean hasButtonList() {
- return dataCase_ == 4;
- }
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- *
- * @return The buttonList.
- */
- @java.lang.Override
- public com.google.apps.card.v1.ButtonList getButtonList() {
- if (buttonListBuilder_ == null) {
- if (dataCase_ == 4) {
- return (com.google.apps.card.v1.ButtonList) data_;
- }
- return com.google.apps.card.v1.ButtonList.getDefaultInstance();
- } else {
- if (dataCase_ == 4) {
- return buttonListBuilder_.getMessage();
- }
- return com.google.apps.card.v1.ButtonList.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- */
- 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_ = 4;
- return this;
- }
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- */
- public Builder setButtonList(com.google.apps.card.v1.ButtonList.Builder builderForValue) {
- if (buttonListBuilder_ == null) {
- data_ = builderForValue.build();
- onChanged();
- } else {
- buttonListBuilder_.setMessage(builderForValue.build());
- }
- dataCase_ = 4;
- return this;
- }
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- */
- public Builder mergeButtonList(com.google.apps.card.v1.ButtonList value) {
- if (buttonListBuilder_ == null) {
- if (dataCase_ == 4
- && 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_ == 4) {
- buttonListBuilder_.mergeFrom(value);
- } else {
- buttonListBuilder_.setMessage(value);
- }
- }
- dataCase_ = 4;
- return this;
- }
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- */
- public Builder clearButtonList() {
- if (buttonListBuilder_ == null) {
- if (dataCase_ == 4) {
- dataCase_ = 0;
- data_ = null;
- onChanged();
- }
- } else {
- if (dataCase_ == 4) {
- dataCase_ = 0;
- data_ = null;
- }
- buttonListBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- */
- public com.google.apps.card.v1.ButtonList.Builder getButtonListBuilder() {
- return getButtonListFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ButtonListOrBuilder getButtonListOrBuilder() {
- if ((dataCase_ == 4) && (buttonListBuilder_ != null)) {
- return buttonListBuilder_.getMessageOrBuilder();
- } else {
- if (dataCase_ == 4) {
- return (com.google.apps.card.v1.ButtonList) data_;
- }
- return com.google.apps.card.v1.ButtonList.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [ButtonList][google.apps.card.v1.ButtonList] widget.
- *
- *
- * .google.apps.card.v1.ButtonList button_list = 4;
- */
- 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_ == 4)) {
- 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_ = 4;
- onChanged();
- return buttonListBuilder_;
- }
-
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.TextInput,
- com.google.apps.card.v1.TextInput.Builder,
- com.google.apps.card.v1.TextInputOrBuilder>
- textInputBuilder_;
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- *
- * @return Whether the textInput field is set.
- */
- @java.lang.Override
- public boolean hasTextInput() {
- return dataCase_ == 5;
- }
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- *
- * @return The textInput.
- */
- @java.lang.Override
- public com.google.apps.card.v1.TextInput getTextInput() {
- if (textInputBuilder_ == null) {
- if (dataCase_ == 5) {
- return (com.google.apps.card.v1.TextInput) data_;
- }
- return com.google.apps.card.v1.TextInput.getDefaultInstance();
- } else {
- if (dataCase_ == 5) {
- return textInputBuilder_.getMessage();
- }
- return com.google.apps.card.v1.TextInput.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- */
- public Builder setTextInput(com.google.apps.card.v1.TextInput value) {
- if (textInputBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- data_ = value;
- onChanged();
- } else {
- textInputBuilder_.setMessage(value);
- }
- dataCase_ = 5;
- return this;
- }
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- */
- public Builder setTextInput(com.google.apps.card.v1.TextInput.Builder builderForValue) {
- if (textInputBuilder_ == null) {
- data_ = builderForValue.build();
- onChanged();
- } else {
- textInputBuilder_.setMessage(builderForValue.build());
- }
- dataCase_ = 5;
- return this;
- }
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- */
- public Builder mergeTextInput(com.google.apps.card.v1.TextInput value) {
- if (textInputBuilder_ == null) {
- if (dataCase_ == 5 && data_ != com.google.apps.card.v1.TextInput.getDefaultInstance()) {
- data_ =
- com.google.apps.card.v1.TextInput.newBuilder(
- (com.google.apps.card.v1.TextInput) data_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- data_ = value;
- }
- onChanged();
- } else {
- if (dataCase_ == 5) {
- textInputBuilder_.mergeFrom(value);
- } else {
- textInputBuilder_.setMessage(value);
- }
- }
- dataCase_ = 5;
- return this;
- }
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- */
- public Builder clearTextInput() {
- if (textInputBuilder_ == null) {
- if (dataCase_ == 5) {
- dataCase_ = 0;
- data_ = null;
- onChanged();
- }
- } else {
- if (dataCase_ == 5) {
- dataCase_ = 0;
- data_ = null;
- }
- textInputBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- */
- public com.google.apps.card.v1.TextInput.Builder getTextInputBuilder() {
- return getTextInputFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- */
- @java.lang.Override
- public com.google.apps.card.v1.TextInputOrBuilder getTextInputOrBuilder() {
- if ((dataCase_ == 5) && (textInputBuilder_ != null)) {
- return textInputBuilder_.getMessageOrBuilder();
- } else {
- if (dataCase_ == 5) {
- return (com.google.apps.card.v1.TextInput) data_;
- }
- return com.google.apps.card.v1.TextInput.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [TextInput][google.apps.card.v1.TextInput] widget.
- *
- *
- * .google.apps.card.v1.TextInput text_input = 5;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.TextInput,
- com.google.apps.card.v1.TextInput.Builder,
- com.google.apps.card.v1.TextInputOrBuilder>
- getTextInputFieldBuilder() {
- if (textInputBuilder_ == null) {
- if (!(dataCase_ == 5)) {
- data_ = com.google.apps.card.v1.TextInput.getDefaultInstance();
- }
- textInputBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.TextInput,
- com.google.apps.card.v1.TextInput.Builder,
- com.google.apps.card.v1.TextInputOrBuilder>(
- (com.google.apps.card.v1.TextInput) data_, getParentForChildren(), isClean());
- data_ = null;
- }
- dataCase_ = 5;
- onChanged();
- return textInputBuilder_;
- }
-
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.SelectionInput,
- com.google.apps.card.v1.SelectionInput.Builder,
- com.google.apps.card.v1.SelectionInputOrBuilder>
- selectionInputBuilder_;
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- *
- * @return Whether the selectionInput field is set.
- */
- @java.lang.Override
- public boolean hasSelectionInput() {
- return dataCase_ == 6;
- }
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- *
- * @return The selectionInput.
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput getSelectionInput() {
- if (selectionInputBuilder_ == null) {
- if (dataCase_ == 6) {
- return (com.google.apps.card.v1.SelectionInput) data_;
- }
- return com.google.apps.card.v1.SelectionInput.getDefaultInstance();
- } else {
- if (dataCase_ == 6) {
- return selectionInputBuilder_.getMessage();
- }
- return com.google.apps.card.v1.SelectionInput.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- */
- public Builder setSelectionInput(com.google.apps.card.v1.SelectionInput value) {
- if (selectionInputBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- data_ = value;
- onChanged();
- } else {
- selectionInputBuilder_.setMessage(value);
- }
- dataCase_ = 6;
- return this;
- }
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- */
- public Builder setSelectionInput(
- com.google.apps.card.v1.SelectionInput.Builder builderForValue) {
- if (selectionInputBuilder_ == null) {
- data_ = builderForValue.build();
- onChanged();
- } else {
- selectionInputBuilder_.setMessage(builderForValue.build());
- }
- dataCase_ = 6;
- return this;
- }
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- */
- public Builder mergeSelectionInput(com.google.apps.card.v1.SelectionInput value) {
- if (selectionInputBuilder_ == null) {
- if (dataCase_ == 6
- && data_ != com.google.apps.card.v1.SelectionInput.getDefaultInstance()) {
- data_ =
- com.google.apps.card.v1.SelectionInput.newBuilder(
- (com.google.apps.card.v1.SelectionInput) data_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- data_ = value;
- }
- onChanged();
- } else {
- if (dataCase_ == 6) {
- selectionInputBuilder_.mergeFrom(value);
- } else {
- selectionInputBuilder_.setMessage(value);
- }
- }
- dataCase_ = 6;
- return this;
- }
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- */
- public Builder clearSelectionInput() {
- if (selectionInputBuilder_ == null) {
- if (dataCase_ == 6) {
- dataCase_ = 0;
- data_ = null;
- onChanged();
- }
- } else {
- if (dataCase_ == 6) {
- dataCase_ = 0;
- data_ = null;
- }
- selectionInputBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- */
- public com.google.apps.card.v1.SelectionInput.Builder getSelectionInputBuilder() {
- return getSelectionInputFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInputOrBuilder getSelectionInputOrBuilder() {
- if ((dataCase_ == 6) && (selectionInputBuilder_ != null)) {
- return selectionInputBuilder_.getMessageOrBuilder();
- } else {
- if (dataCase_ == 6) {
- return (com.google.apps.card.v1.SelectionInput) data_;
- }
- return com.google.apps.card.v1.SelectionInput.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [SelectionInput][google.apps.card.v1.SelectionInput] widget.
- *
- *
- * .google.apps.card.v1.SelectionInput selection_input = 6;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.SelectionInput,
- com.google.apps.card.v1.SelectionInput.Builder,
- com.google.apps.card.v1.SelectionInputOrBuilder>
- getSelectionInputFieldBuilder() {
- if (selectionInputBuilder_ == null) {
- if (!(dataCase_ == 6)) {
- data_ = com.google.apps.card.v1.SelectionInput.getDefaultInstance();
- }
- selectionInputBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.SelectionInput,
- com.google.apps.card.v1.SelectionInput.Builder,
- com.google.apps.card.v1.SelectionInputOrBuilder>(
- (com.google.apps.card.v1.SelectionInput) data_,
- getParentForChildren(),
- isClean());
- data_ = null;
- }
- dataCase_ = 6;
- onChanged();
- return selectionInputBuilder_;
- }
-
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.DateTimePicker,
- com.google.apps.card.v1.DateTimePicker.Builder,
- com.google.apps.card.v1.DateTimePickerOrBuilder>
- dateTimePickerBuilder_;
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- *
- * @return Whether the dateTimePicker field is set.
- */
- @java.lang.Override
- public boolean hasDateTimePicker() {
- return dataCase_ == 7;
- }
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- *
- * @return The dateTimePicker.
- */
- @java.lang.Override
- public com.google.apps.card.v1.DateTimePicker getDateTimePicker() {
- if (dateTimePickerBuilder_ == null) {
- if (dataCase_ == 7) {
- return (com.google.apps.card.v1.DateTimePicker) data_;
- }
- return com.google.apps.card.v1.DateTimePicker.getDefaultInstance();
- } else {
- if (dataCase_ == 7) {
- return dateTimePickerBuilder_.getMessage();
- }
- return com.google.apps.card.v1.DateTimePicker.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- */
- public Builder setDateTimePicker(com.google.apps.card.v1.DateTimePicker value) {
- if (dateTimePickerBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- data_ = value;
- onChanged();
- } else {
- dateTimePickerBuilder_.setMessage(value);
- }
- dataCase_ = 7;
- return this;
- }
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- */
- public Builder setDateTimePicker(
- com.google.apps.card.v1.DateTimePicker.Builder builderForValue) {
- if (dateTimePickerBuilder_ == null) {
- data_ = builderForValue.build();
- onChanged();
- } else {
- dateTimePickerBuilder_.setMessage(builderForValue.build());
- }
- dataCase_ = 7;
- return this;
- }
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- */
- public Builder mergeDateTimePicker(com.google.apps.card.v1.DateTimePicker value) {
- if (dateTimePickerBuilder_ == null) {
- if (dataCase_ == 7
- && data_ != com.google.apps.card.v1.DateTimePicker.getDefaultInstance()) {
- data_ =
- com.google.apps.card.v1.DateTimePicker.newBuilder(
- (com.google.apps.card.v1.DateTimePicker) data_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- data_ = value;
- }
- onChanged();
- } else {
- if (dataCase_ == 7) {
- dateTimePickerBuilder_.mergeFrom(value);
- } else {
- dateTimePickerBuilder_.setMessage(value);
- }
- }
- dataCase_ = 7;
- return this;
- }
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- */
- public Builder clearDateTimePicker() {
- if (dateTimePickerBuilder_ == null) {
- if (dataCase_ == 7) {
- dataCase_ = 0;
- data_ = null;
- onChanged();
- }
- } else {
- if (dataCase_ == 7) {
- dataCase_ = 0;
- data_ = null;
- }
- dateTimePickerBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- */
- public com.google.apps.card.v1.DateTimePicker.Builder getDateTimePickerBuilder() {
- return getDateTimePickerFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- */
- @java.lang.Override
- public com.google.apps.card.v1.DateTimePickerOrBuilder getDateTimePickerOrBuilder() {
- if ((dataCase_ == 7) && (dateTimePickerBuilder_ != null)) {
- return dateTimePickerBuilder_.getMessageOrBuilder();
- } else {
- if (dataCase_ == 7) {
- return (com.google.apps.card.v1.DateTimePicker) data_;
- }
- return com.google.apps.card.v1.DateTimePicker.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
- *
- *
- * .google.apps.card.v1.DateTimePicker date_time_picker = 7;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.DateTimePicker,
- com.google.apps.card.v1.DateTimePicker.Builder,
- com.google.apps.card.v1.DateTimePickerOrBuilder>
- getDateTimePickerFieldBuilder() {
- if (dateTimePickerBuilder_ == null) {
- if (!(dataCase_ == 7)) {
- data_ = com.google.apps.card.v1.DateTimePicker.getDefaultInstance();
- }
- dateTimePickerBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.DateTimePicker,
- com.google.apps.card.v1.DateTimePicker.Builder,
- com.google.apps.card.v1.DateTimePickerOrBuilder>(
- (com.google.apps.card.v1.DateTimePicker) data_,
- getParentForChildren(),
- isClean());
- data_ = null;
- }
- dataCase_ = 7;
- onChanged();
- return dateTimePickerBuilder_;
- }
-
- @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.Columns.Column.Widgets)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Columns.Column.Widgets)
- private static final com.google.apps.card.v1.Columns.Column.Widgets DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Columns.Column.Widgets();
- }
-
- public static com.google.apps.card.v1.Columns.Column.Widgets getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Widgets 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.Columns.Column.Widgets getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
- }
-
- public static final int HORIZONTAL_SIZE_STYLE_FIELD_NUMBER = 1;
- private int horizontalSizeStyle_ = 0;
- /**
- *
- *
- *
- * Specifies how a column fills the width of the card.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;
- *
- *
- * @return The enum numeric value on the wire for horizontalSizeStyle.
- */
- @java.lang.Override
- public int getHorizontalSizeStyleValue() {
- return horizontalSizeStyle_;
- }
- /**
- *
- *
- *
- * Specifies how a column fills the width of the card.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;
- *
- *
- * @return The horizontalSizeStyle.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle getHorizontalSizeStyle() {
- com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle result =
- com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle.forNumber(
- horizontalSizeStyle_);
- return result == null
- ? com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle.UNRECOGNIZED
- : result;
- }
-
- public static final int HORIZONTAL_ALIGNMENT_FIELD_NUMBER = 2;
- 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 = 2;
- *
- * @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 = 2;
- *
- * @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 VERTICAL_ALIGNMENT_FIELD_NUMBER = 3;
- private int verticalAlignment_ = 0;
- /**
- *
- *
- *
- * Specifies whether widgets align to the top, bottom, or center of a
- * column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;
- *
- * @return The enum numeric value on the wire for verticalAlignment.
- */
- @java.lang.Override
- public int getVerticalAlignmentValue() {
- return verticalAlignment_;
- }
- /**
- *
- *
- *
- * Specifies whether widgets align to the top, bottom, or center of a
- * column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;
- *
- * @return The verticalAlignment.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column.VerticalAlignment getVerticalAlignment() {
- com.google.apps.card.v1.Columns.Column.VerticalAlignment result =
- com.google.apps.card.v1.Columns.Column.VerticalAlignment.forNumber(verticalAlignment_);
- return result == null
- ? com.google.apps.card.v1.Columns.Column.VerticalAlignment.UNRECOGNIZED
- : result;
- }
-
- public static final int WIDGETS_FIELD_NUMBER = 4;
-
- @SuppressWarnings("serial")
- private java.util.List widgets_;
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- @java.lang.Override
- public java.util.List getWidgetsList() {
- return widgets_;
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- @java.lang.Override
- public java.util.List extends com.google.apps.card.v1.Columns.Column.WidgetsOrBuilder>
- getWidgetsOrBuilderList() {
- return widgets_;
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- @java.lang.Override
- public int getWidgetsCount() {
- return widgets_.size();
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column.Widgets getWidgets(int index) {
- return widgets_.get(index);
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column.WidgetsOrBuilder getWidgetsOrBuilder(int index) {
- return widgets_.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 (horizontalSizeStyle_
- != com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle
- .HORIZONTAL_SIZE_STYLE_UNSPECIFIED
- .getNumber()) {
- output.writeEnum(1, horizontalSizeStyle_);
- }
- if (horizontalAlignment_
- != com.google.apps.card.v1.Widget.HorizontalAlignment.HORIZONTAL_ALIGNMENT_UNSPECIFIED
- .getNumber()) {
- output.writeEnum(2, horizontalAlignment_);
- }
- if (verticalAlignment_
- != com.google.apps.card.v1.Columns.Column.VerticalAlignment.VERTICAL_ALIGNMENT_UNSPECIFIED
- .getNumber()) {
- output.writeEnum(3, verticalAlignment_);
- }
- for (int i = 0; i < widgets_.size(); i++) {
- output.writeMessage(4, widgets_.get(i));
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (horizontalSizeStyle_
- != com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle
- .HORIZONTAL_SIZE_STYLE_UNSPECIFIED
- .getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, horizontalSizeStyle_);
- }
- if (horizontalAlignment_
- != com.google.apps.card.v1.Widget.HorizontalAlignment.HORIZONTAL_ALIGNMENT_UNSPECIFIED
- .getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, horizontalAlignment_);
- }
- if (verticalAlignment_
- != com.google.apps.card.v1.Columns.Column.VerticalAlignment.VERTICAL_ALIGNMENT_UNSPECIFIED
- .getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, verticalAlignment_);
- }
- for (int i = 0; i < widgets_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, widgets_.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.Columns.Column)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Columns.Column other = (com.google.apps.card.v1.Columns.Column) obj;
-
- if (horizontalSizeStyle_ != other.horizontalSizeStyle_) return false;
- if (horizontalAlignment_ != other.horizontalAlignment_) return false;
- if (verticalAlignment_ != other.verticalAlignment_) return false;
- if (!getWidgetsList().equals(other.getWidgetsList())) 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_SIZE_STYLE_FIELD_NUMBER;
- hash = (53 * hash) + horizontalSizeStyle_;
- hash = (37 * hash) + HORIZONTAL_ALIGNMENT_FIELD_NUMBER;
- hash = (53 * hash) + horizontalAlignment_;
- hash = (37 * hash) + VERTICAL_ALIGNMENT_FIELD_NUMBER;
- hash = (53 * hash) + verticalAlignment_;
- if (getWidgetsCount() > 0) {
- hash = (37 * hash) + WIDGETS_FIELD_NUMBER;
- hash = (53 * hash) + getWidgetsList().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Columns.Column parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Columns.Column 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.Columns.Column parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Columns.Column 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.Columns.Column parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Columns.Column 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.Columns.Column parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Columns.Column 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.Columns.Column parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Columns.Column 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.Columns.Column 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.Columns.Column 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.Columns.Column 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 column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Columns.Column}
- */
- public static final class Builder
- extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Columns.Column)
- com.google.apps.card.v1.Columns.ColumnOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Columns_Column_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Columns_Column_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Columns.Column.class,
- com.google.apps.card.v1.Columns.Column.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Columns.Column.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- horizontalSizeStyle_ = 0;
- horizontalAlignment_ = 0;
- verticalAlignment_ = 0;
- if (widgetsBuilder_ == null) {
- widgets_ = java.util.Collections.emptyList();
- } else {
- widgets_ = null;
- widgetsBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000008);
- 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_Columns_Column_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column getDefaultInstanceForType() {
- return com.google.apps.card.v1.Columns.Column.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column build() {
- com.google.apps.card.v1.Columns.Column result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column buildPartial() {
- com.google.apps.card.v1.Columns.Column result =
- new com.google.apps.card.v1.Columns.Column(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.apps.card.v1.Columns.Column result) {
- if (widgetsBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0)) {
- widgets_ = java.util.Collections.unmodifiableList(widgets_);
- bitField0_ = (bitField0_ & ~0x00000008);
- }
- result.widgets_ = widgets_;
- } else {
- result.widgets_ = widgetsBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.apps.card.v1.Columns.Column result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.horizontalSizeStyle_ = horizontalSizeStyle_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.horizontalAlignment_ = horizontalAlignment_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.verticalAlignment_ = verticalAlignment_;
- }
- }
-
- @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.Columns.Column) {
- return mergeFrom((com.google.apps.card.v1.Columns.Column) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Columns.Column other) {
- if (other == com.google.apps.card.v1.Columns.Column.getDefaultInstance()) return this;
- if (other.horizontalSizeStyle_ != 0) {
- setHorizontalSizeStyleValue(other.getHorizontalSizeStyleValue());
- }
- if (other.horizontalAlignment_ != 0) {
- setHorizontalAlignmentValue(other.getHorizontalAlignmentValue());
- }
- if (other.verticalAlignment_ != 0) {
- setVerticalAlignmentValue(other.getVerticalAlignmentValue());
- }
- if (widgetsBuilder_ == null) {
- if (!other.widgets_.isEmpty()) {
- if (widgets_.isEmpty()) {
- widgets_ = other.widgets_;
- bitField0_ = (bitField0_ & ~0x00000008);
- } else {
- ensureWidgetsIsMutable();
- widgets_.addAll(other.widgets_);
- }
- onChanged();
- }
- } else {
- if (!other.widgets_.isEmpty()) {
- if (widgetsBuilder_.isEmpty()) {
- widgetsBuilder_.dispose();
- widgetsBuilder_ = null;
- widgets_ = other.widgets_;
- bitField0_ = (bitField0_ & ~0x00000008);
- widgetsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
- ? getWidgetsFieldBuilder()
- : null;
- } else {
- widgetsBuilder_.addAllMessages(other.widgets_);
- }
- }
- }
- 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:
- {
- horizontalSizeStyle_ = input.readEnum();
- bitField0_ |= 0x00000001;
- break;
- } // case 8
- case 16:
- {
- horizontalAlignment_ = input.readEnum();
- bitField0_ |= 0x00000002;
- break;
- } // case 16
- case 24:
- {
- verticalAlignment_ = input.readEnum();
- bitField0_ |= 0x00000004;
- break;
- } // case 24
- case 34:
- {
- com.google.apps.card.v1.Columns.Column.Widgets m =
- input.readMessage(
- com.google.apps.card.v1.Columns.Column.Widgets.parser(),
- extensionRegistry);
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- widgets_.add(m);
- } else {
- widgetsBuilder_.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 int horizontalSizeStyle_ = 0;
- /**
- *
- *
- *
- * Specifies how a column fills the width of the card.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;
- *
- *
- * @return The enum numeric value on the wire for horizontalSizeStyle.
- */
- @java.lang.Override
- public int getHorizontalSizeStyleValue() {
- return horizontalSizeStyle_;
- }
- /**
- *
- *
- *
- * Specifies how a column fills the width of the card.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;
- *
- *
- * @param value The enum numeric value on the wire for horizontalSizeStyle to set.
- * @return This builder for chaining.
- */
- public Builder setHorizontalSizeStyleValue(int value) {
- horizontalSizeStyle_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Specifies how a column fills the width of the card.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;
- *
- *
- * @return The horizontalSizeStyle.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle getHorizontalSizeStyle() {
- com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle result =
- com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle.forNumber(
- horizontalSizeStyle_);
- return result == null
- ? com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle.UNRECOGNIZED
- : result;
- }
- /**
- *
- *
- *
- * Specifies how a column fills the width of the card.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;
- *
- *
- * @param value The horizontalSizeStyle to set.
- * @return This builder for chaining.
- */
- public Builder setHorizontalSizeStyle(
- com.google.apps.card.v1.Columns.Column.HorizontalSizeStyle value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- horizontalSizeStyle_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Specifies how a column fills the width of the card.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1;
- *
- *
- * @return This builder for chaining.
- */
- public Builder clearHorizontalSizeStyle() {
- bitField0_ = (bitField0_ & ~0x00000001);
- horizontalSizeStyle_ = 0;
- onChanged();
- return this;
- }
-
- 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 = 2;
- *
- * @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 = 2;
- *
- * @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_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Specifies whether widgets align to the left, right, or center of a
- * column.
- *
- *
- * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2;
- *
- * @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;
- }
- /**
- *
- *
- *
- * Specifies whether widgets align to the left, right, or center of a
- * column.
- *
- *
- * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2;
- *
- * @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_ |= 0x00000002;
- horizontalAlignment_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Specifies whether widgets align to the left, right, or center of a
- * column.
- *
- *
- * .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearHorizontalAlignment() {
- bitField0_ = (bitField0_ & ~0x00000002);
- horizontalAlignment_ = 0;
- onChanged();
- return this;
- }
-
- private int verticalAlignment_ = 0;
- /**
- *
- *
- *
- * Specifies whether widgets align to the top, bottom, or center of a
- * column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;
- *
- * @return The enum numeric value on the wire for verticalAlignment.
- */
- @java.lang.Override
- public int getVerticalAlignmentValue() {
- return verticalAlignment_;
- }
- /**
- *
- *
- *
- * Specifies whether widgets align to the top, bottom, or center of a
- * column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;
- *
- * @param value The enum numeric value on the wire for verticalAlignment to set.
- * @return This builder for chaining.
- */
- public Builder setVerticalAlignmentValue(int value) {
- verticalAlignment_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Specifies whether widgets align to the top, bottom, or center of a
- * column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;
- *
- * @return The verticalAlignment.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column.VerticalAlignment getVerticalAlignment() {
- com.google.apps.card.v1.Columns.Column.VerticalAlignment result =
- com.google.apps.card.v1.Columns.Column.VerticalAlignment.forNumber(verticalAlignment_);
- return result == null
- ? com.google.apps.card.v1.Columns.Column.VerticalAlignment.UNRECOGNIZED
- : result;
- }
- /**
- *
- *
- *
- * Specifies whether widgets align to the top, bottom, or center of a
- * column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;
- *
- * @param value The verticalAlignment to set.
- * @return This builder for chaining.
- */
- public Builder setVerticalAlignment(
- com.google.apps.card.v1.Columns.Column.VerticalAlignment value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- verticalAlignment_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Specifies whether widgets align to the top, bottom, or center of a
- * column.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3;
- *
- * @return This builder for chaining.
- */
- public Builder clearVerticalAlignment() {
- bitField0_ = (bitField0_ & ~0x00000004);
- verticalAlignment_ = 0;
- onChanged();
- return this;
- }
-
- private java.util.List widgets_ =
- java.util.Collections.emptyList();
-
- private void ensureWidgetsIsMutable() {
- if (!((bitField0_ & 0x00000008) != 0)) {
- widgets_ =
- new java.util.ArrayList(widgets_);
- bitField0_ |= 0x00000008;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Columns.Column.Widgets,
- com.google.apps.card.v1.Columns.Column.Widgets.Builder,
- com.google.apps.card.v1.Columns.Column.WidgetsOrBuilder>
- widgetsBuilder_;
-
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public java.util.List getWidgetsList() {
- if (widgetsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(widgets_);
- } else {
- return widgetsBuilder_.getMessageList();
- }
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public int getWidgetsCount() {
- if (widgetsBuilder_ == null) {
- return widgets_.size();
- } else {
- return widgetsBuilder_.getCount();
- }
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public com.google.apps.card.v1.Columns.Column.Widgets getWidgets(int index) {
- if (widgetsBuilder_ == null) {
- return widgets_.get(index);
- } else {
- return widgetsBuilder_.getMessage(index);
- }
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public Builder setWidgets(int index, com.google.apps.card.v1.Columns.Column.Widgets value) {
- if (widgetsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWidgetsIsMutable();
- widgets_.set(index, value);
- onChanged();
- } else {
- widgetsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public Builder setWidgets(
- int index, com.google.apps.card.v1.Columns.Column.Widgets.Builder builderForValue) {
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- widgets_.set(index, builderForValue.build());
- onChanged();
- } else {
- widgetsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public Builder addWidgets(com.google.apps.card.v1.Columns.Column.Widgets value) {
- if (widgetsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWidgetsIsMutable();
- widgets_.add(value);
- onChanged();
- } else {
- widgetsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public Builder addWidgets(int index, com.google.apps.card.v1.Columns.Column.Widgets value) {
- if (widgetsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWidgetsIsMutable();
- widgets_.add(index, value);
- onChanged();
- } else {
- widgetsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public Builder addWidgets(
- com.google.apps.card.v1.Columns.Column.Widgets.Builder builderForValue) {
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- widgets_.add(builderForValue.build());
- onChanged();
- } else {
- widgetsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public Builder addWidgets(
- int index, com.google.apps.card.v1.Columns.Column.Widgets.Builder builderForValue) {
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- widgets_.add(index, builderForValue.build());
- onChanged();
- } else {
- widgetsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public Builder addAllWidgets(
- java.lang.Iterable extends com.google.apps.card.v1.Columns.Column.Widgets> values) {
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, widgets_);
- onChanged();
- } else {
- widgetsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public Builder clearWidgets() {
- if (widgetsBuilder_ == null) {
- widgets_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- } else {
- widgetsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public Builder removeWidgets(int index) {
- if (widgetsBuilder_ == null) {
- ensureWidgetsIsMutable();
- widgets_.remove(index);
- onChanged();
- } else {
- widgetsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public com.google.apps.card.v1.Columns.Column.Widgets.Builder getWidgetsBuilder(int index) {
- return getWidgetsFieldBuilder().getBuilder(index);
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public com.google.apps.card.v1.Columns.Column.WidgetsOrBuilder getWidgetsOrBuilder(
- int index) {
- if (widgetsBuilder_ == null) {
- return widgets_.get(index);
- } else {
- return widgetsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public java.util.List extends com.google.apps.card.v1.Columns.Column.WidgetsOrBuilder>
- getWidgetsOrBuilderList() {
- if (widgetsBuilder_ != null) {
- return widgetsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(widgets_);
- }
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public com.google.apps.card.v1.Columns.Column.Widgets.Builder addWidgetsBuilder() {
- return getWidgetsFieldBuilder()
- .addBuilder(com.google.apps.card.v1.Columns.Column.Widgets.getDefaultInstance());
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public com.google.apps.card.v1.Columns.Column.Widgets.Builder addWidgetsBuilder(int index) {
- return getWidgetsFieldBuilder()
- .addBuilder(index, com.google.apps.card.v1.Columns.Column.Widgets.getDefaultInstance());
- }
- /**
- *
- *
- *
- * An array of widgets included in a column. Widgets appear in the order
- * that they are specified.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4;
- */
- public java.util.List
- getWidgetsBuilderList() {
- return getWidgetsFieldBuilder().getBuilderList();
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Columns.Column.Widgets,
- com.google.apps.card.v1.Columns.Column.Widgets.Builder,
- com.google.apps.card.v1.Columns.Column.WidgetsOrBuilder>
- getWidgetsFieldBuilder() {
- if (widgetsBuilder_ == null) {
- widgetsBuilder_ =
- new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Columns.Column.Widgets,
- com.google.apps.card.v1.Columns.Column.Widgets.Builder,
- com.google.apps.card.v1.Columns.Column.WidgetsOrBuilder>(
- widgets_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
- widgets_ = null;
- }
- return widgetsBuilder_;
- }
-
- @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.Columns.Column)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Columns.Column)
- private static final com.google.apps.card.v1.Columns.Column DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Columns.Column();
- }
-
- public static com.google.apps.card.v1.Columns.Column getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Column 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.Columns.Column getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
- }
-
- public static final int COLUMN_ITEMS_FIELD_NUMBER = 2;
-
- @SuppressWarnings("serial")
- private java.util.List columnItems_;
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- @java.lang.Override
- public java.util.List getColumnItemsList() {
- return columnItems_;
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- @java.lang.Override
- public java.util.List extends com.google.apps.card.v1.Columns.ColumnOrBuilder>
- getColumnItemsOrBuilderList() {
- return columnItems_;
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- @java.lang.Override
- public int getColumnItemsCount() {
- return columnItems_.size();
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Columns.Column getColumnItems(int index) {
- return columnItems_.get(index);
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Columns.ColumnOrBuilder getColumnItemsOrBuilder(int index) {
- return columnItems_.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 < columnItems_.size(); i++) {
- output.writeMessage(2, columnItems_.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 < columnItems_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, columnItems_.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.Columns)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Columns other = (com.google.apps.card.v1.Columns) obj;
-
- if (!getColumnItemsList().equals(other.getColumnItemsList())) 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 (getColumnItemsCount() > 0) {
- hash = (37 * hash) + COLUMN_ITEMS_FIELD_NUMBER;
- hash = (53 * hash) + getColumnItemsList().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Columns parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Columns 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.Columns parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Columns 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.Columns parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Columns 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.Columns parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Columns 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.Columns parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Columns 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.Columns 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.Columns 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.Columns prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
-
- @java.lang.Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- *
- *
- * The `Columns` widget displays up to 2 columns in a card or dialog. You can
- * add widgets to each column; the widgets appear in the order that they are
- * specified. For an example in Google Chat apps, see
- * [Columns](https://developers.google.com/chat/ui/widgets/columns).
- *
- * The height of each column is determined by the taller column. For example, if
- * the first column is taller than the second column, both columns have the
- * height of the first column. Because each column can contain a different
- * number of widgets, you can't define rows or align widgets between the
- * columns.
- *
- * Columns are displayed side-by-side. You can customize the width of each
- * column using the `HorizontalSizeStyle` field. If the user's
- * screen width is too narrow, the second column wraps below the first:
- *
- * * On web, the second column wraps if the screen width is less than or equal
- * to 480 pixels.
- * * On iOS devices, the second column wraps if the screen width is
- * less than or equal to 300 pt.
- * * 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
- * [`Grid`][google.apps.card.v1.Grid] widget.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- * Columns for Google Workspace Add-ons are in
- * [Developer Preview](https://developers.google.com/workspace/preview).
- *
- *
- * Protobuf type {@code google.apps.card.v1.Columns}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Columns)
- com.google.apps.card.v1.ColumnsOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Columns_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Columns_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Columns.class, com.google.apps.card.v1.Columns.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Columns.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- if (columnItemsBuilder_ == null) {
- columnItems_ = java.util.Collections.emptyList();
- } else {
- columnItems_ = null;
- columnItemsBuilder_.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_Columns_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Columns getDefaultInstanceForType() {
- return com.google.apps.card.v1.Columns.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Columns build() {
- com.google.apps.card.v1.Columns result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Columns buildPartial() {
- com.google.apps.card.v1.Columns result = new com.google.apps.card.v1.Columns(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.apps.card.v1.Columns result) {
- if (columnItemsBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
- columnItems_ = java.util.Collections.unmodifiableList(columnItems_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.columnItems_ = columnItems_;
- } else {
- result.columnItems_ = columnItemsBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.apps.card.v1.Columns 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.Columns) {
- return mergeFrom((com.google.apps.card.v1.Columns) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Columns other) {
- if (other == com.google.apps.card.v1.Columns.getDefaultInstance()) return this;
- if (columnItemsBuilder_ == null) {
- if (!other.columnItems_.isEmpty()) {
- if (columnItems_.isEmpty()) {
- columnItems_ = other.columnItems_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureColumnItemsIsMutable();
- columnItems_.addAll(other.columnItems_);
- }
- onChanged();
- }
- } else {
- if (!other.columnItems_.isEmpty()) {
- if (columnItemsBuilder_.isEmpty()) {
- columnItemsBuilder_.dispose();
- columnItemsBuilder_ = null;
- columnItems_ = other.columnItems_;
- bitField0_ = (bitField0_ & ~0x00000001);
- columnItemsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
- ? getColumnItemsFieldBuilder()
- : null;
- } else {
- columnItemsBuilder_.addAllMessages(other.columnItems_);
- }
- }
- }
- 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 18:
- {
- com.google.apps.card.v1.Columns.Column m =
- input.readMessage(
- com.google.apps.card.v1.Columns.Column.parser(), extensionRegistry);
- if (columnItemsBuilder_ == null) {
- ensureColumnItemsIsMutable();
- columnItems_.add(m);
- } else {
- columnItemsBuilder_.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 columnItems_ =
- java.util.Collections.emptyList();
-
- private void ensureColumnItemsIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- columnItems_ =
- new java.util.ArrayList(columnItems_);
- bitField0_ |= 0x00000001;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Columns.Column,
- com.google.apps.card.v1.Columns.Column.Builder,
- com.google.apps.card.v1.Columns.ColumnOrBuilder>
- columnItemsBuilder_;
-
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public java.util.List getColumnItemsList() {
- if (columnItemsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(columnItems_);
- } else {
- return columnItemsBuilder_.getMessageList();
- }
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public int getColumnItemsCount() {
- if (columnItemsBuilder_ == null) {
- return columnItems_.size();
- } else {
- return columnItemsBuilder_.getCount();
- }
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public com.google.apps.card.v1.Columns.Column getColumnItems(int index) {
- if (columnItemsBuilder_ == null) {
- return columnItems_.get(index);
- } else {
- return columnItemsBuilder_.getMessage(index);
- }
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public Builder setColumnItems(int index, com.google.apps.card.v1.Columns.Column value) {
- if (columnItemsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureColumnItemsIsMutable();
- columnItems_.set(index, value);
- onChanged();
- } else {
- columnItemsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public Builder setColumnItems(
- int index, com.google.apps.card.v1.Columns.Column.Builder builderForValue) {
- if (columnItemsBuilder_ == null) {
- ensureColumnItemsIsMutable();
- columnItems_.set(index, builderForValue.build());
- onChanged();
- } else {
- columnItemsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public Builder addColumnItems(com.google.apps.card.v1.Columns.Column value) {
- if (columnItemsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureColumnItemsIsMutable();
- columnItems_.add(value);
- onChanged();
- } else {
- columnItemsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public Builder addColumnItems(int index, com.google.apps.card.v1.Columns.Column value) {
- if (columnItemsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureColumnItemsIsMutable();
- columnItems_.add(index, value);
- onChanged();
- } else {
- columnItemsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public Builder addColumnItems(com.google.apps.card.v1.Columns.Column.Builder builderForValue) {
- if (columnItemsBuilder_ == null) {
- ensureColumnItemsIsMutable();
- columnItems_.add(builderForValue.build());
- onChanged();
- } else {
- columnItemsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public Builder addColumnItems(
- int index, com.google.apps.card.v1.Columns.Column.Builder builderForValue) {
- if (columnItemsBuilder_ == null) {
- ensureColumnItemsIsMutable();
- columnItems_.add(index, builderForValue.build());
- onChanged();
- } else {
- columnItemsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public Builder addAllColumnItems(
- java.lang.Iterable extends com.google.apps.card.v1.Columns.Column> values) {
- if (columnItemsBuilder_ == null) {
- ensureColumnItemsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, columnItems_);
- onChanged();
- } else {
- columnItemsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public Builder clearColumnItems() {
- if (columnItemsBuilder_ == null) {
- columnItems_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- columnItemsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public Builder removeColumnItems(int index) {
- if (columnItemsBuilder_ == null) {
- ensureColumnItemsIsMutable();
- columnItems_.remove(index);
- onChanged();
- } else {
- columnItemsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public com.google.apps.card.v1.Columns.Column.Builder getColumnItemsBuilder(int index) {
- return getColumnItemsFieldBuilder().getBuilder(index);
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public com.google.apps.card.v1.Columns.ColumnOrBuilder getColumnItemsOrBuilder(int index) {
- if (columnItemsBuilder_ == null) {
- return columnItems_.get(index);
- } else {
- return columnItemsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public java.util.List extends com.google.apps.card.v1.Columns.ColumnOrBuilder>
- getColumnItemsOrBuilderList() {
- if (columnItemsBuilder_ != null) {
- return columnItemsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(columnItems_);
- }
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public com.google.apps.card.v1.Columns.Column.Builder addColumnItemsBuilder() {
- return getColumnItemsFieldBuilder()
- .addBuilder(com.google.apps.card.v1.Columns.Column.getDefaultInstance());
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public com.google.apps.card.v1.Columns.Column.Builder addColumnItemsBuilder(int index) {
- return getColumnItemsFieldBuilder()
- .addBuilder(index, com.google.apps.card.v1.Columns.Column.getDefaultInstance());
- }
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- public java.util.List
- getColumnItemsBuilderList() {
- return getColumnItemsFieldBuilder().getBuilderList();
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Columns.Column,
- com.google.apps.card.v1.Columns.Column.Builder,
- com.google.apps.card.v1.Columns.ColumnOrBuilder>
- getColumnItemsFieldBuilder() {
- if (columnItemsBuilder_ == null) {
- columnItemsBuilder_ =
- new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Columns.Column,
- com.google.apps.card.v1.Columns.Column.Builder,
- com.google.apps.card.v1.Columns.ColumnOrBuilder>(
- columnItems_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
- columnItems_ = null;
- }
- return columnItemsBuilder_;
- }
-
- @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.Columns)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Columns)
- private static final com.google.apps.card.v1.Columns DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Columns();
- }
-
- public static com.google.apps.card.v1.Columns getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Columns 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.Columns getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ColumnsOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ColumnsOrBuilder.java
deleted file mode 100644
index 91d3aafc4d76..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ColumnsOrBuilder.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface ColumnsOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Columns)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- java.util.List getColumnItemsList();
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- com.google.apps.card.v1.Columns.Column getColumnItems(int index);
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- int getColumnItemsCount();
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- java.util.List extends com.google.apps.card.v1.Columns.ColumnOrBuilder>
- getColumnItemsOrBuilderList();
- /**
- *
- *
- *
- * An array of columns. You can include up to 2 columns in a card or dialog.
- *
- *
- * repeated .google.apps.card.v1.Columns.Column column_items = 2;
- */
- com.google.apps.card.v1.Columns.ColumnOrBuilder getColumnItemsOrBuilder(int index);
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DateTimePicker.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DateTimePicker.java
deleted file mode 100644
index 1bbb64650d13..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DateTimePicker.java
+++ /dev/null
@@ -1,1702 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * Lets users input a date, a time, or both a date and a time. For an example in
- * Google Chat apps, see [Date time
- * picker](https://developers.google.com/chat/ui/widgets/date-time-picker).
- *
- * Users can input text or use the picker to select dates and times. If users
- * input an invalid date or time, the picker shows an error that prompts users
- * to input the information correctly.
- *
- * [Google Workspace
- * Add-ons and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.DateTimePicker}
- */
-public final class DateTimePicker extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.DateTimePicker)
- DateTimePickerOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use DateTimePicker.newBuilder() to construct.
- private DateTimePicker(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private DateTimePicker() {
- name_ = "";
- label_ = "";
- type_ = 0;
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new DateTimePicker();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DateTimePicker_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DateTimePicker_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.DateTimePicker.class,
- com.google.apps.card.v1.DateTimePicker.Builder.class);
- }
-
- /**
- *
- *
- *
- * 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
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.DateTimePicker.DateTimePickerType}
- */
- public enum DateTimePickerType implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * Users input a date and time.
- *
- *
- * DATE_AND_TIME = 0;
- */
- DATE_AND_TIME(0),
- /**
- *
- *
- *
- * Users input a date.
- *
- *
- * DATE_ONLY = 1;
- */
- DATE_ONLY(1),
- /**
- *
- *
- *
- * Users input a time.
- *
- *
- * TIME_ONLY = 2;
- */
- TIME_ONLY(2),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * Users input a date and time.
- *
- *
- * DATE_AND_TIME = 0;
- */
- public static final int DATE_AND_TIME_VALUE = 0;
- /**
- *
- *
- *
- * Users input a date.
- *
- *
- * DATE_ONLY = 1;
- */
- public static final int DATE_ONLY_VALUE = 1;
- /**
- *
- *
- *
- * Users input a time.
- *
- *
- * TIME_ONLY = 2;
- */
- public static final int TIME_ONLY_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 DateTimePickerType 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 DateTimePickerType forNumber(int value) {
- switch (value) {
- case 0:
- return DATE_AND_TIME;
- case 1:
- return DATE_ONLY;
- case 2:
- return TIME_ONLY;
- 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 DateTimePickerType findValueByNumber(int number) {
- return DateTimePickerType.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.DateTimePicker.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final DateTimePickerType[] VALUES = values();
-
- public static DateTimePickerType 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 DateTimePickerType(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.apps.card.v1.DateTimePicker.DateTimePickerType)
- }
-
- private int bitField0_;
- public static final int NAME_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object name_ = "";
- /**
- *
- *
- *
- * The name by which the `DateTimePicker` is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The name.
- */
- @java.lang.Override
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- 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();
- name_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The name by which the `DateTimePicker` is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The bytes for name.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int LABEL_FIELD_NUMBER = 2;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object label_ = "";
- /**
- *
- *
- *
- * The text that prompts users to input a date, a time, or a date and time.
- * For example, if users are scheduling an appointment, use a label such as
- * `Appointment date` or `Appointment date and time`.
- *
- *
- * 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 that prompts users to input a date, a time, or a date and time.
- * For example, if users are scheduling an appointment, use a label such as
- * `Appointment date` or `Appointment date and time`.
- *
- *
- * 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 TYPE_FIELD_NUMBER = 3;
- private int type_ = 0;
- /**
- *
- *
- *
- * Whether the widget supports inputting a date, a time, or the date and time.
- *
- *
- * .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;
- *
- * @return The enum numeric value on the wire for type.
- */
- @java.lang.Override
- public int getTypeValue() {
- return type_;
- }
- /**
- *
- *
- *
- * Whether the widget supports inputting a date, a time, or the date and time.
- *
- *
- * .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;
- *
- * @return The type.
- */
- @java.lang.Override
- public com.google.apps.card.v1.DateTimePicker.DateTimePickerType getType() {
- com.google.apps.card.v1.DateTimePicker.DateTimePickerType result =
- com.google.apps.card.v1.DateTimePicker.DateTimePickerType.forNumber(type_);
- return result == null
- ? com.google.apps.card.v1.DateTimePicker.DateTimePickerType.UNRECOGNIZED
- : result;
- }
-
- public static final int VALUE_MS_EPOCH_FIELD_NUMBER = 4;
- private long valueMsEpoch_ = 0L;
- /**
- *
- *
- *
- * 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`).
- *
- *
- * int64 value_ms_epoch = 4;
- *
- * @return The valueMsEpoch.
- */
- @java.lang.Override
- public long getValueMsEpoch() {
- return valueMsEpoch_;
- }
-
- public static final int TIMEZONE_OFFSET_DATE_FIELD_NUMBER = 5;
- private int timezoneOffsetDate_ = 0;
- /**
- *
- *
- *
- * The number representing the time zone offset from UTC, in minutes.
- * If set, the `value_ms_epoch` is displayed in the specified time zone.
- * If unset, the value defaults to the user's time zone setting.
- *
- *
- * int32 timezone_offset_date = 5;
- *
- * @return The timezoneOffsetDate.
- */
- @java.lang.Override
- public int getTimezoneOffsetDate() {
- return timezoneOffsetDate_;
- }
-
- public static final int ON_CHANGE_ACTION_FIELD_NUMBER = 6;
- private com.google.apps.card.v1.Action onChangeAction_;
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- *
- * @return Whether the onChangeAction field is set.
- */
- @java.lang.Override
- public boolean hasOnChangeAction() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- *
- * @return The onChangeAction.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Action getOnChangeAction() {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- }
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, label_);
- }
- if (type_
- != com.google.apps.card.v1.DateTimePicker.DateTimePickerType.DATE_AND_TIME.getNumber()) {
- output.writeEnum(3, type_);
- }
- if (valueMsEpoch_ != 0L) {
- output.writeInt64(4, valueMsEpoch_);
- }
- if (timezoneOffsetDate_ != 0) {
- output.writeInt32(5, timezoneOffsetDate_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(6, getOnChangeAction());
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, label_);
- }
- if (type_
- != com.google.apps.card.v1.DateTimePicker.DateTimePickerType.DATE_AND_TIME.getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_);
- }
- if (valueMsEpoch_ != 0L) {
- size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, valueMsEpoch_);
- }
- if (timezoneOffsetDate_ != 0) {
- size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, timezoneOffsetDate_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOnChangeAction());
- }
- 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.DateTimePicker)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.DateTimePicker other = (com.google.apps.card.v1.DateTimePicker) 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 (getTimezoneOffsetDate() != other.getTimezoneOffsetDate()) return false;
- if (hasOnChangeAction() != other.hasOnChangeAction()) return false;
- if (hasOnChangeAction()) {
- if (!getOnChangeAction().equals(other.getOnChangeAction())) 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) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- hash = (37 * hash) + LABEL_FIELD_NUMBER;
- 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());
- hash = (37 * hash) + TIMEZONE_OFFSET_DATE_FIELD_NUMBER;
- hash = (53 * hash) + getTimezoneOffsetDate();
- if (hasOnChangeAction()) {
- hash = (37 * hash) + ON_CHANGE_ACTION_FIELD_NUMBER;
- hash = (53 * hash) + getOnChangeAction().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.DateTimePicker parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.DateTimePicker 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.DateTimePicker parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.DateTimePicker 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.DateTimePicker parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.DateTimePicker 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.DateTimePicker parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.DateTimePicker 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.DateTimePicker parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.DateTimePicker 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.DateTimePicker 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.DateTimePicker 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.DateTimePicker 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;
- }
- /**
- *
- *
- *
- * Lets users input a date, a time, or both a date and a time. For an example in
- * Google Chat apps, see [Date time
- * picker](https://developers.google.com/chat/ui/widgets/date-time-picker).
- *
- * Users can input text or use the picker to select dates and times. If users
- * input an invalid date or time, the picker shows an error that prompts users
- * to input the information correctly.
- *
- * [Google Workspace
- * Add-ons and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.DateTimePicker}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.DateTimePicker)
- com.google.apps.card.v1.DateTimePickerOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DateTimePicker_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DateTimePicker_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.DateTimePicker.class,
- com.google.apps.card.v1.DateTimePicker.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.DateTimePicker.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getOnChangeActionFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- name_ = "";
- label_ = "";
- type_ = 0;
- valueMsEpoch_ = 0L;
- timezoneOffsetDate_ = 0;
- onChangeAction_ = null;
- if (onChangeActionBuilder_ != null) {
- onChangeActionBuilder_.dispose();
- onChangeActionBuilder_ = 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_DateTimePicker_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.DateTimePicker getDefaultInstanceForType() {
- return com.google.apps.card.v1.DateTimePicker.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.DateTimePicker build() {
- com.google.apps.card.v1.DateTimePicker result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.DateTimePicker buildPartial() {
- com.google.apps.card.v1.DateTimePicker result =
- new com.google.apps.card.v1.DateTimePicker(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.DateTimePicker result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.name_ = name_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.label_ = label_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.type_ = type_;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.valueMsEpoch_ = valueMsEpoch_;
- }
- 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;
- }
- 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.DateTimePicker) {
- return mergeFrom((com.google.apps.card.v1.DateTimePicker) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.DateTimePicker other) {
- if (other == com.google.apps.card.v1.DateTimePicker.getDefaultInstance()) return this;
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getLabel().isEmpty()) {
- label_ = other.label_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- if (other.type_ != 0) {
- setTypeValue(other.getTypeValue());
- }
- if (other.getValueMsEpoch() != 0L) {
- setValueMsEpoch(other.getValueMsEpoch());
- }
- if (other.getTimezoneOffsetDate() != 0) {
- setTimezoneOffsetDate(other.getTimezoneOffsetDate());
- }
- if (other.hasOnChangeAction()) {
- mergeOnChangeAction(other.getOnChangeAction());
- }
- 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:
- {
- name_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- label_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 24:
- {
- type_ = input.readEnum();
- bitField0_ |= 0x00000004;
- break;
- } // case 24
- case 32:
- {
- valueMsEpoch_ = input.readInt64();
- bitField0_ |= 0x00000008;
- break;
- } // case 32
- case 40:
- {
- timezoneOffsetDate_ = input.readInt32();
- bitField0_ |= 0x00000010;
- break;
- } // case 40
- case 50:
- {
- input.readMessage(getOnChangeActionFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000020;
- break;
- } // case 50
- default:
- {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object name_ = "";
- /**
- *
- *
- *
- * The name by which the `DateTimePicker` is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The name.
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The name by which the `DateTimePicker` is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The bytes for name.
- */
- public com.google.protobuf.ByteString getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The name by which the `DateTimePicker` is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @param value The name to set.
- * @return This builder for chaining.
- */
- public Builder setName(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- name_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The name by which the `DateTimePicker` is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearName() {
- name_ = getDefaultInstance().getName();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The name by which the `DateTimePicker` is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @param value The bytes for name to set.
- * @return This builder for chaining.
- */
- public Builder setNameBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- name_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object label_ = "";
- /**
- *
- *
- *
- * The text that prompts users to input a date, a time, or a date and time.
- * For example, if users are scheduling an appointment, use a label such as
- * `Appointment date` or `Appointment date and time`.
- *
- *
- * 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 that prompts users to input a date, a time, or a date and time.
- * For example, if users are scheduling an appointment, use a label such as
- * `Appointment date` or `Appointment date and time`.
- *
- *
- * 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 that prompts users to input a date, a time, or a date and time.
- * For example, if users are scheduling an appointment, use a label such as
- * `Appointment date` or `Appointment date and time`.
- *
- *
- * 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 that prompts users to input a date, a time, or a date and time.
- * For example, if users are scheduling an appointment, use a label such as
- * `Appointment date` or `Appointment date and time`.
- *
- *
- * string label = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearLabel() {
- label_ = getDefaultInstance().getLabel();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The text that prompts users to input a date, a time, or a date and time.
- * For example, if users are scheduling an appointment, use a label such as
- * `Appointment date` or `Appointment date and time`.
- *
- *
- * 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 int type_ = 0;
- /**
- *
- *
- *
- * Whether the widget supports inputting a date, a time, or the date and time.
- *
- *
- * .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;
- *
- * @return The enum numeric value on the wire for type.
- */
- @java.lang.Override
- public int getTypeValue() {
- return type_;
- }
- /**
- *
- *
- *
- * Whether the widget supports inputting a date, a time, or the date and time.
- *
- *
- * .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;
- *
- * @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_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Whether the widget supports inputting a date, a time, or the date and time.
- *
- *
- * .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;
- *
- * @return The type.
- */
- @java.lang.Override
- public com.google.apps.card.v1.DateTimePicker.DateTimePickerType getType() {
- com.google.apps.card.v1.DateTimePicker.DateTimePickerType result =
- com.google.apps.card.v1.DateTimePicker.DateTimePickerType.forNumber(type_);
- return result == null
- ? com.google.apps.card.v1.DateTimePicker.DateTimePickerType.UNRECOGNIZED
- : result;
- }
- /**
- *
- *
- *
- * Whether the widget supports inputting a date, a time, or the date and time.
- *
- *
- * .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;
- *
- * @param value The type to set.
- * @return This builder for chaining.
- */
- public Builder setType(com.google.apps.card.v1.DateTimePicker.DateTimePickerType value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- type_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Whether the widget supports inputting a date, a time, or the date and time.
- *
- *
- * .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;
- *
- * @return This builder for chaining.
- */
- public Builder clearType() {
- bitField0_ = (bitField0_ & ~0x00000004);
- type_ = 0;
- onChanged();
- return this;
- }
-
- private long valueMsEpoch_;
- /**
- *
- *
- *
- * 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`).
- *
- *
- * int64 value_ms_epoch = 4;
- *
- * @return The valueMsEpoch.
- */
- @java.lang.Override
- public long getValueMsEpoch() {
- return valueMsEpoch_;
- }
- /**
- *
- *
- *
- * 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`).
- *
- *
- * int64 value_ms_epoch = 4;
- *
- * @param value The valueMsEpoch to set.
- * @return This builder for chaining.
- */
- public Builder setValueMsEpoch(long value) {
-
- valueMsEpoch_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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`).
- *
- *
- * int64 value_ms_epoch = 4;
- *
- * @return This builder for chaining.
- */
- public Builder clearValueMsEpoch() {
- bitField0_ = (bitField0_ & ~0x00000008);
- valueMsEpoch_ = 0L;
- onChanged();
- return this;
- }
-
- private int timezoneOffsetDate_;
- /**
- *
- *
- *
- * The number representing the time zone offset from UTC, in minutes.
- * If set, the `value_ms_epoch` is displayed in the specified time zone.
- * If unset, the value defaults to the user's time zone setting.
- *
- *
- * int32 timezone_offset_date = 5;
- *
- * @return The timezoneOffsetDate.
- */
- @java.lang.Override
- public int getTimezoneOffsetDate() {
- return timezoneOffsetDate_;
- }
- /**
- *
- *
- *
- * The number representing the time zone offset from UTC, in minutes.
- * If set, the `value_ms_epoch` is displayed in the specified time zone.
- * If unset, the value defaults to the user's time zone setting.
- *
- *
- * int32 timezone_offset_date = 5;
- *
- * @param value The timezoneOffsetDate to set.
- * @return This builder for chaining.
- */
- public Builder setTimezoneOffsetDate(int value) {
-
- timezoneOffsetDate_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The number representing the time zone offset from UTC, in minutes.
- * If set, the `value_ms_epoch` is displayed in the specified time zone.
- * If unset, the value defaults to the user's time zone setting.
- *
- *
- * int32 timezone_offset_date = 5;
- *
- * @return This builder for chaining.
- */
- public Builder clearTimezoneOffsetDate() {
- bitField0_ = (bitField0_ & ~0x00000010);
- timezoneOffsetDate_ = 0;
- onChanged();
- return this;
- }
-
- private com.google.apps.card.v1.Action onChangeAction_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- onChangeActionBuilder_;
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- *
- * @return Whether the onChangeAction field is set.
- */
- public boolean hasOnChangeAction() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- *
- * @return The onChangeAction.
- */
- public com.google.apps.card.v1.Action getOnChangeAction() {
- if (onChangeActionBuilder_ == null) {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- } else {
- return onChangeActionBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- */
- public Builder setOnChangeAction(com.google.apps.card.v1.Action value) {
- if (onChangeActionBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- onChangeAction_ = value;
- } else {
- onChangeActionBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- */
- public Builder setOnChangeAction(com.google.apps.card.v1.Action.Builder builderForValue) {
- if (onChangeActionBuilder_ == null) {
- onChangeAction_ = builderForValue.build();
- } else {
- onChangeActionBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- */
- public Builder mergeOnChangeAction(com.google.apps.card.v1.Action value) {
- if (onChangeActionBuilder_ == null) {
- if (((bitField0_ & 0x00000020) != 0)
- && onChangeAction_ != null
- && onChangeAction_ != com.google.apps.card.v1.Action.getDefaultInstance()) {
- getOnChangeActionBuilder().mergeFrom(value);
- } else {
- onChangeAction_ = value;
- }
- } else {
- onChangeActionBuilder_.mergeFrom(value);
- }
- if (onChangeAction_ != null) {
- bitField0_ |= 0x00000020;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- */
- public Builder clearOnChangeAction() {
- bitField0_ = (bitField0_ & ~0x00000020);
- onChangeAction_ = null;
- if (onChangeActionBuilder_ != null) {
- onChangeActionBuilder_.dispose();
- onChangeActionBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- */
- public com.google.apps.card.v1.Action.Builder getOnChangeActionBuilder() {
- bitField0_ |= 0x00000020;
- onChanged();
- return getOnChangeActionFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- */
- public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() {
- if (onChangeActionBuilder_ != null) {
- return onChangeActionBuilder_.getMessageOrBuilder();
- } else {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- }
- }
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- getOnChangeActionFieldBuilder() {
- if (onChangeActionBuilder_ == null) {
- onChangeActionBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>(
- getOnChangeAction(), getParentForChildren(), isClean());
- onChangeAction_ = null;
- }
- return onChangeActionBuilder_;
- }
-
- @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.DateTimePicker)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.DateTimePicker)
- private static final com.google.apps.card.v1.DateTimePicker DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.DateTimePicker();
- }
-
- public static com.google.apps.card.v1.DateTimePicker getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public DateTimePicker 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.DateTimePicker getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DateTimePickerOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DateTimePickerOrBuilder.java
deleted file mode 100644
index 4b7eb88888de..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DateTimePickerOrBuilder.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface DateTimePickerOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.DateTimePicker)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The name by which the `DateTimePicker` is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The name.
- */
- java.lang.String getName();
- /**
- *
- *
- *
- * The name by which the `DateTimePicker` is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString getNameBytes();
-
- /**
- *
- *
- *
- * The text that prompts users to input a date, a time, or a date and time.
- * For example, if users are scheduling an appointment, use a label such as
- * `Appointment date` or `Appointment date and time`.
- *
- *
- * string label = 2;
- *
- * @return The label.
- */
- java.lang.String getLabel();
- /**
- *
- *
- *
- * The text that prompts users to input a date, a time, or a date and time.
- * For example, if users are scheduling an appointment, use a label such as
- * `Appointment date` or `Appointment date and time`.
- *
- *
- * string label = 2;
- *
- * @return The bytes for label.
- */
- com.google.protobuf.ByteString getLabelBytes();
-
- /**
- *
- *
- *
- * Whether the widget supports inputting a date, a time, or the date and time.
- *
- *
- * .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;
- *
- * @return The enum numeric value on the wire for type.
- */
- int getTypeValue();
- /**
- *
- *
- *
- * Whether the widget supports inputting a date, a time, or the date and time.
- *
- *
- * .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;
- *
- * @return The type.
- */
- 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).
- *
- * 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`).
- *
- *
- * int64 value_ms_epoch = 4;
- *
- * @return The valueMsEpoch.
- */
- long getValueMsEpoch();
-
- /**
- *
- *
- *
- * The number representing the time zone offset from UTC, in minutes.
- * If set, the `value_ms_epoch` is displayed in the specified time zone.
- * If unset, the value defaults to the user's time zone setting.
- *
- *
- * int32 timezone_offset_date = 5;
- *
- * @return The timezoneOffsetDate.
- */
- int getTimezoneOffsetDate();
-
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- *
- * @return Whether the onChangeAction field is set.
- */
- boolean hasOnChangeAction();
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- *
- * @return The onChangeAction.
- */
- com.google.apps.card.v1.Action getOnChangeAction();
- /**
- *
- *
- *
- * Triggered when the user clicks **Save** or **Clear** from the
- * `DateTimePicker` interface.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 6;
- */
- com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DecoratedText.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DecoratedText.java
deleted file mode 100644
index 65f32071debf..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DecoratedText.java
+++ /dev/null
@@ -1,4738 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * A widget that displays text with optional decorations such as a label above
- * or below the text, an icon in front of the text, a selection widget, or a
- * button after the text. For an example in
- * Google Chat apps, see [Decorated
- * text](https://developers.google.com/chat/ui/widgets/decorated-text).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.DecoratedText}
- */
-public final class DecoratedText extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.DecoratedText)
- DecoratedTextOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use DecoratedText.newBuilder() to construct.
- private DecoratedText(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private DecoratedText() {
- topLabel_ = "";
- text_ = "";
- bottomLabel_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new DecoratedText();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DecoratedText_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DecoratedText_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.DecoratedText.class,
- com.google.apps.card.v1.DecoratedText.Builder.class);
- }
-
- public interface SwitchControlOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.DecoratedText.SwitchControl)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The name by which the switch widget is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The name.
- */
- java.lang.String getName();
- /**
- *
- *
- *
- * The name by which the switch widget is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString getNameBytes();
-
- /**
- *
- *
- *
- * The value entered by a user, returned as part of a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The value.
- */
- java.lang.String getValue();
- /**
- *
- *
- *
- * The value entered by a user, returned as part of a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The bytes for value.
- */
- com.google.protobuf.ByteString getValueBytes();
-
- /**
- *
- *
- *
- * When `true`, the switch is selected.
- *
- *
- * bool selected = 3;
- *
- * @return The selected.
- */
- boolean getSelected();
-
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- *
- * @return Whether the onChangeAction field is set.
- */
- boolean hasOnChangeAction();
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- *
- * @return The onChangeAction.
- */
- com.google.apps.card.v1.Action getOnChangeAction();
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- */
- com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder();
-
- /**
- *
- *
- *
- * How the switch appears in the user interface.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5;
- *
- * @return The enum numeric value on the wire for controlType.
- */
- int getControlTypeValue();
- /**
- *
- *
- *
- * How the switch appears in the user interface.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5;
- *
- * @return The controlType.
- */
- com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType getControlType();
- }
- /**
- *
- *
- *
- * Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- * Only supported in the `decoratedText` widget.
- *
- *
- * Protobuf type {@code google.apps.card.v1.DecoratedText.SwitchControl}
- */
- public static final class SwitchControl extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.DecoratedText.SwitchControl)
- SwitchControlOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use SwitchControl.newBuilder() to construct.
- private SwitchControl(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private SwitchControl() {
- name_ = "";
- value_ = "";
- controlType_ = 0;
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new SwitchControl();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DecoratedText_SwitchControl_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DecoratedText_SwitchControl_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.DecoratedText.SwitchControl.class,
- com.google.apps.card.v1.DecoratedText.SwitchControl.Builder.class);
- }
-
- /**
- *
- *
- *
- * How the switch appears in the user interface.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.DecoratedText.SwitchControl.ControlType}
- */
- public enum ControlType implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * A toggle-style switch.
- *
- *
- * SWITCH = 0;
- */
- SWITCH(0),
- /**
- *
- *
- *
- * Deprecated in favor of `CHECK_BOX`.
- *
- *
- * CHECKBOX = 1;
- */
- CHECKBOX(1),
- /**
- *
- *
- *
- * A checkbox.
- *
- *
- * CHECK_BOX = 2;
- */
- CHECK_BOX(2),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * A toggle-style switch.
- *
- *
- * SWITCH = 0;
- */
- public static final int SWITCH_VALUE = 0;
- /**
- *
- *
- *
- * Deprecated in favor of `CHECK_BOX`.
- *
- *
- * CHECKBOX = 1;
- */
- public static final int CHECKBOX_VALUE = 1;
- /**
- *
- *
- *
- * A checkbox.
- *
- *
- * CHECK_BOX = 2;
- */
- public static final int CHECK_BOX_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 ControlType 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 ControlType forNumber(int value) {
- switch (value) {
- case 0:
- return SWITCH;
- case 1:
- return CHECKBOX;
- case 2:
- return CHECK_BOX;
- 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 ControlType findValueByNumber(int number) {
- return ControlType.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.DecoratedText.SwitchControl.getDescriptor()
- .getEnumTypes()
- .get(0);
- }
-
- private static final ControlType[] VALUES = values();
-
- public static ControlType 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 ControlType(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.apps.card.v1.DecoratedText.SwitchControl.ControlType)
- }
-
- private int bitField0_;
- public static final int NAME_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object name_ = "";
- /**
- *
- *
- *
- * The name by which the switch widget is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The name.
- */
- @java.lang.Override
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- 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();
- name_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The name by which the switch widget is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The bytes for name.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int VALUE_FIELD_NUMBER = 2;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object value_ = "";
- /**
- *
- *
- *
- * The value entered by a user, returned as part of a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The value.
- */
- @java.lang.Override
- public java.lang.String getValue() {
- java.lang.Object ref = value_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- value_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The value entered by a user, returned as part of a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The bytes for value.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getValueBytes() {
- java.lang.Object ref = value_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- value_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int SELECTED_FIELD_NUMBER = 3;
- private boolean selected_ = false;
- /**
- *
- *
- *
- * When `true`, the switch is selected.
- *
- *
- * bool selected = 3;
- *
- * @return The selected.
- */
- @java.lang.Override
- public boolean getSelected() {
- return selected_;
- }
-
- public static final int ON_CHANGE_ACTION_FIELD_NUMBER = 4;
- private com.google.apps.card.v1.Action onChangeAction_;
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- *
- * @return Whether the onChangeAction field is set.
- */
- @java.lang.Override
- public boolean hasOnChangeAction() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- *
- * @return The onChangeAction.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Action getOnChangeAction() {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- }
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- }
-
- public static final int CONTROL_TYPE_FIELD_NUMBER = 5;
- private int controlType_ = 0;
- /**
- *
- *
- *
- * How the switch appears in the user interface.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5;
- *
- * @return The enum numeric value on the wire for controlType.
- */
- @java.lang.Override
- public int getControlTypeValue() {
- return controlType_;
- }
- /**
- *
- *
- *
- * How the switch appears in the user interface.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5;
- *
- * @return The controlType.
- */
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType getControlType() {
- com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType result =
- com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType.forNumber(controlType_);
- return result == null
- ? com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType.UNRECOGNIZED
- : result;
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
- }
- if (selected_ != false) {
- output.writeBool(3, selected_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(4, getOnChangeAction());
- }
- if (controlType_
- != com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType.SWITCH.getNumber()) {
- output.writeEnum(5, controlType_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
- }
- if (selected_ != false) {
- size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, selected_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOnChangeAction());
- }
- if (controlType_
- != com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType.SWITCH.getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, controlType_);
- }
- 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.DecoratedText.SwitchControl)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.DecoratedText.SwitchControl other =
- (com.google.apps.card.v1.DecoratedText.SwitchControl) obj;
-
- if (!getName().equals(other.getName())) return false;
- if (!getValue().equals(other.getValue())) return false;
- if (getSelected() != other.getSelected()) return false;
- if (hasOnChangeAction() != other.hasOnChangeAction()) return false;
- if (hasOnChangeAction()) {
- if (!getOnChangeAction().equals(other.getOnChangeAction())) return false;
- }
- if (controlType_ != other.controlType_) 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) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- hash = (37 * hash) + VALUE_FIELD_NUMBER;
- hash = (53 * hash) + getValue().hashCode();
- hash = (37 * hash) + SELECTED_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSelected());
- if (hasOnChangeAction()) {
- hash = (37 * hash) + ON_CHANGE_ACTION_FIELD_NUMBER;
- hash = (53 * hash) + getOnChangeAction().hashCode();
- }
- hash = (37 * hash) + CONTROL_TYPE_FIELD_NUMBER;
- hash = (53 * hash) + controlType_;
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.DecoratedText.SwitchControl parseFrom(
- java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.DecoratedText.SwitchControl 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.DecoratedText.SwitchControl parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.DecoratedText.SwitchControl 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.DecoratedText.SwitchControl parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.DecoratedText.SwitchControl 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.DecoratedText.SwitchControl parseFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.DecoratedText.SwitchControl 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.DecoratedText.SwitchControl parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.DecoratedText.SwitchControl 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.DecoratedText.SwitchControl 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.DecoratedText.SwitchControl 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.DecoratedText.SwitchControl 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;
- }
- /**
- *
- *
- *
- * Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- * Only supported in the `decoratedText` widget.
- *
- *
- * Protobuf type {@code google.apps.card.v1.DecoratedText.SwitchControl}
- */
- public static final class Builder
- extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.DecoratedText.SwitchControl)
- com.google.apps.card.v1.DecoratedText.SwitchControlOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DecoratedText_SwitchControl_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DecoratedText_SwitchControl_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.DecoratedText.SwitchControl.class,
- com.google.apps.card.v1.DecoratedText.SwitchControl.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.DecoratedText.SwitchControl.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getOnChangeActionFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- name_ = "";
- value_ = "";
- selected_ = false;
- onChangeAction_ = null;
- if (onChangeActionBuilder_ != null) {
- onChangeActionBuilder_.dispose();
- onChangeActionBuilder_ = null;
- }
- controlType_ = 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_DecoratedText_SwitchControl_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText.SwitchControl getDefaultInstanceForType() {
- return com.google.apps.card.v1.DecoratedText.SwitchControl.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText.SwitchControl build() {
- com.google.apps.card.v1.DecoratedText.SwitchControl result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText.SwitchControl buildPartial() {
- com.google.apps.card.v1.DecoratedText.SwitchControl result =
- new com.google.apps.card.v1.DecoratedText.SwitchControl(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.DecoratedText.SwitchControl result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.name_ = name_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.value_ = value_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.selected_ = selected_;
- }
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.onChangeAction_ =
- onChangeActionBuilder_ == null ? onChangeAction_ : onChangeActionBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.controlType_ = controlType_;
- }
- 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.DecoratedText.SwitchControl) {
- return mergeFrom((com.google.apps.card.v1.DecoratedText.SwitchControl) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.DecoratedText.SwitchControl other) {
- if (other == com.google.apps.card.v1.DecoratedText.SwitchControl.getDefaultInstance())
- return this;
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getValue().isEmpty()) {
- value_ = other.value_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- if (other.getSelected() != false) {
- setSelected(other.getSelected());
- }
- if (other.hasOnChangeAction()) {
- mergeOnChangeAction(other.getOnChangeAction());
- }
- if (other.controlType_ != 0) {
- setControlTypeValue(other.getControlTypeValue());
- }
- 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:
- {
- name_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- value_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 24:
- {
- selected_ = input.readBool();
- bitField0_ |= 0x00000004;
- break;
- } // case 24
- case 34:
- {
- input.readMessage(
- getOnChangeActionFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000008;
- break;
- } // case 34
- case 40:
- {
- controlType_ = input.readEnum();
- bitField0_ |= 0x00000010;
- break;
- } // case 40
- default:
- {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object name_ = "";
- /**
- *
- *
- *
- * The name by which the switch widget is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The name.
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The name by which the switch widget is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The bytes for name.
- */
- public com.google.protobuf.ByteString getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The name by which the switch widget is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @param value The name to set.
- * @return This builder for chaining.
- */
- public Builder setName(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- name_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The name by which the switch widget is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearName() {
- name_ = getDefaultInstance().getName();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The name by which the switch widget is identified in a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @param value The bytes for name to set.
- * @return This builder for chaining.
- */
- public Builder setNameBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- name_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object value_ = "";
- /**
- *
- *
- *
- * The value entered by a user, returned as part of a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The value.
- */
- public java.lang.String getValue() {
- java.lang.Object ref = value_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- value_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The value entered by a user, returned as part of a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The bytes for value.
- */
- public com.google.protobuf.ByteString getValueBytes() {
- java.lang.Object ref = value_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- value_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The value entered by a user, returned as part of a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @param value The value to set.
- * @return This builder for chaining.
- */
- public Builder setValue(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- value_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The value entered by a user, returned as part of a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearValue() {
- value_ = getDefaultInstance().getValue();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The value entered by a user, returned as part of a form input event.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @param value The bytes for value to set.
- * @return This builder for chaining.
- */
- public Builder setValueBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- value_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
-
- private boolean selected_;
- /**
- *
- *
- *
- * When `true`, the switch is selected.
- *
- *
- * bool selected = 3;
- *
- * @return The selected.
- */
- @java.lang.Override
- public boolean getSelected() {
- return selected_;
- }
- /**
- *
- *
- *
- * When `true`, the switch is selected.
- *
- *
- * bool selected = 3;
- *
- * @param value The selected to set.
- * @return This builder for chaining.
- */
- public Builder setSelected(boolean value) {
-
- selected_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * When `true`, the switch is selected.
- *
- *
- * bool selected = 3;
- *
- * @return This builder for chaining.
- */
- public Builder clearSelected() {
- bitField0_ = (bitField0_ & ~0x00000004);
- selected_ = false;
- onChanged();
- return this;
- }
-
- private com.google.apps.card.v1.Action onChangeAction_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- onChangeActionBuilder_;
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- *
- * @return Whether the onChangeAction field is set.
- */
- public boolean hasOnChangeAction() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- *
- * @return The onChangeAction.
- */
- public com.google.apps.card.v1.Action getOnChangeAction() {
- if (onChangeActionBuilder_ == null) {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- } else {
- return onChangeActionBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- */
- public Builder setOnChangeAction(com.google.apps.card.v1.Action value) {
- if (onChangeActionBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- onChangeAction_ = value;
- } else {
- onChangeActionBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- */
- public Builder setOnChangeAction(com.google.apps.card.v1.Action.Builder builderForValue) {
- if (onChangeActionBuilder_ == null) {
- onChangeAction_ = builderForValue.build();
- } else {
- onChangeActionBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- */
- public Builder mergeOnChangeAction(com.google.apps.card.v1.Action value) {
- if (onChangeActionBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0)
- && onChangeAction_ != null
- && onChangeAction_ != com.google.apps.card.v1.Action.getDefaultInstance()) {
- getOnChangeActionBuilder().mergeFrom(value);
- } else {
- onChangeAction_ = value;
- }
- } else {
- onChangeActionBuilder_.mergeFrom(value);
- }
- if (onChangeAction_ != null) {
- bitField0_ |= 0x00000008;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- */
- public Builder clearOnChangeAction() {
- bitField0_ = (bitField0_ & ~0x00000008);
- onChangeAction_ = null;
- if (onChangeActionBuilder_ != null) {
- onChangeActionBuilder_.dispose();
- onChangeActionBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- */
- public com.google.apps.card.v1.Action.Builder getOnChangeActionBuilder() {
- bitField0_ |= 0x00000008;
- onChanged();
- return getOnChangeActionFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- */
- public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() {
- if (onChangeActionBuilder_ != null) {
- return onChangeActionBuilder_.getMessageOrBuilder();
- } else {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- }
- }
- /**
- *
- *
- *
- * The action to perform when the switch state is changed, such as what
- * function to run.
- *
- *
- * .google.apps.card.v1.Action on_change_action = 4;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- getOnChangeActionFieldBuilder() {
- if (onChangeActionBuilder_ == null) {
- onChangeActionBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>(
- getOnChangeAction(), getParentForChildren(), isClean());
- onChangeAction_ = null;
- }
- return onChangeActionBuilder_;
- }
-
- private int controlType_ = 0;
- /**
- *
- *
- *
- * How the switch appears in the user interface.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5;
- *
- * @return The enum numeric value on the wire for controlType.
- */
- @java.lang.Override
- public int getControlTypeValue() {
- return controlType_;
- }
- /**
- *
- *
- *
- * How the switch appears in the user interface.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5;
- *
- * @param value The enum numeric value on the wire for controlType to set.
- * @return This builder for chaining.
- */
- public Builder setControlTypeValue(int value) {
- controlType_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * How the switch appears in the user interface.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5;
- *
- * @return The controlType.
- */
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType getControlType() {
- com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType result =
- com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType.forNumber(controlType_);
- return result == null
- ? com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType.UNRECOGNIZED
- : result;
- }
- /**
- *
- *
- *
- * How the switch appears in the user interface.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5;
- *
- * @param value The controlType to set.
- * @return This builder for chaining.
- */
- public Builder setControlType(
- com.google.apps.card.v1.DecoratedText.SwitchControl.ControlType value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- controlType_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * How the switch appears in the user interface.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5;
- *
- * @return This builder for chaining.
- */
- public Builder clearControlType() {
- bitField0_ = (bitField0_ & ~0x00000010);
- controlType_ = 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.DecoratedText.SwitchControl)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.DecoratedText.SwitchControl)
- private static final com.google.apps.card.v1.DecoratedText.SwitchControl DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.DecoratedText.SwitchControl();
- }
-
- public static com.google.apps.card.v1.DecoratedText.SwitchControl getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public SwitchControl 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.DecoratedText.SwitchControl getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
- }
-
- private int bitField0_;
- private int controlCase_ = 0;
-
- @SuppressWarnings("serial")
- private java.lang.Object control_;
-
- public enum ControlCase
- implements
- com.google.protobuf.Internal.EnumLite,
- com.google.protobuf.AbstractMessage.InternalOneOfEnum {
- BUTTON(8),
- SWITCH_CONTROL(9),
- END_ICON(11),
- CONTROL_NOT_SET(0);
- private final int value;
-
- private ControlCase(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 ControlCase valueOf(int value) {
- return forNumber(value);
- }
-
- public static ControlCase forNumber(int value) {
- switch (value) {
- case 8:
- return BUTTON;
- case 9:
- return SWITCH_CONTROL;
- case 11:
- return END_ICON;
- case 0:
- return CONTROL_NOT_SET;
- default:
- return null;
- }
- }
-
- public int getNumber() {
- return this.value;
- }
- };
-
- public ControlCase getControlCase() {
- return ControlCase.forNumber(controlCase_);
- }
-
- public static final int ICON_FIELD_NUMBER = 1;
- private com.google.apps.card.v1.Icon icon_;
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .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=794
- * @return Whether the icon field is set.
- */
- @java.lang.Override
- @java.lang.Deprecated
- public boolean hasIcon() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .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=794
- * @return The icon.
- */
- @java.lang.Override
- @java.lang.Deprecated
- public com.google.apps.card.v1.Icon getIcon() {
- return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_;
- }
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .google.apps.card.v1.Icon icon = 1 [deprecated = true];
- */
- @java.lang.Override
- @java.lang.Deprecated
- public com.google.apps.card.v1.IconOrBuilder getIconOrBuilder() {
- return icon_ == null ? com.google.apps.card.v1.Icon.getDefaultInstance() : icon_;
- }
-
- public static final int START_ICON_FIELD_NUMBER = 12;
- private com.google.apps.card.v1.Icon startIcon_;
- /**
- *
- *
- *
- * The icon displayed in front of the text.
- *
- *
- * .google.apps.card.v1.Icon start_icon = 12;
- *
- * @return Whether the startIcon field is set.
- */
- @java.lang.Override
- public boolean hasStartIcon() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *
- *
- * The icon displayed in front of the text.
- *
- *
- * .google.apps.card.v1.Icon start_icon = 12;
- *
- * @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 = 12;
- */
- @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 TOP_LABEL_FIELD_NUMBER = 3;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object topLabel_ = "";
- /**
- *
- *
- *
- * The text that appears above `text`. Always truncates.
- *
- *
- * string top_label = 3;
- *
- * @return The topLabel.
- */
- @java.lang.Override
- public java.lang.String getTopLabel() {
- java.lang.Object ref = topLabel_;
- 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();
- topLabel_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The text that appears above `text`. Always truncates.
- *
- *
- * string top_label = 3;
- *
- * @return The bytes for topLabel.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getTopLabelBytes() {
- java.lang.Object ref = topLabel_;
- if (ref instanceof java.lang.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 static final int TEXT_FIELD_NUMBER = 4;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object text_ = "";
- /**
- *
- *
- *
- * Required. The primary text.
- *
- * Supports simple formatting. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string text = 4;
- *
- * @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 primary text.
- *
- * Supports simple formatting. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string text = 4;
- *
- * @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 WRAP_TEXT_FIELD_NUMBER = 5;
- private boolean wrapText_ = false;
- /**
- *
- *
- *
- * The wrap text setting. If `true`, the text wraps and displays on
- * multiple lines. Otherwise, the text is truncated.
- *
- * Only applies to `text`, not `topLabel` and `bottomLabel`.
- *
- *
- * bool wrap_text = 5;
- *
- * @return The wrapText.
- */
- @java.lang.Override
- public boolean getWrapText() {
- return wrapText_;
- }
-
- public static final int BOTTOM_LABEL_FIELD_NUMBER = 6;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object bottomLabel_ = "";
- /**
- *
- *
- *
- * The text that appears below `text`. Always wraps.
- *
- *
- * string bottom_label = 6;
- *
- * @return The bottomLabel.
- */
- @java.lang.Override
- public java.lang.String getBottomLabel() {
- java.lang.Object ref = bottomLabel_;
- 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();
- bottomLabel_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The text that appears below `text`. Always wraps.
- *
- *
- * string bottom_label = 6;
- *
- * @return The bytes for bottomLabel.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getBottomLabelBytes() {
- java.lang.Object ref = bottomLabel_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- bottomLabel_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ON_CLICK_FIELD_NUMBER = 7;
- private com.google.apps.card.v1.OnClick onClick_;
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- *
- * @return Whether the onClick field is set.
- */
- @java.lang.Override
- public boolean hasOnClick() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- *
- * @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_;
- }
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- */
- @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 BUTTON_FIELD_NUMBER = 8;
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- *
- * @return Whether the button field is set.
- */
- @java.lang.Override
- public boolean hasButton() {
- return controlCase_ == 8;
- }
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- *
- * @return The button.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Button getButton() {
- if (controlCase_ == 8) {
- return (com.google.apps.card.v1.Button) control_;
- }
- return com.google.apps.card.v1.Button.getDefaultInstance();
- }
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ButtonOrBuilder getButtonOrBuilder() {
- if (controlCase_ == 8) {
- return (com.google.apps.card.v1.Button) control_;
- }
- return com.google.apps.card.v1.Button.getDefaultInstance();
- }
-
- public static final int SWITCH_CONTROL_FIELD_NUMBER = 9;
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- *
- * @return Whether the switchControl field is set.
- */
- @java.lang.Override
- public boolean hasSwitchControl() {
- return controlCase_ == 9;
- }
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- *
- * @return The switchControl.
- */
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText.SwitchControl getSwitchControl() {
- if (controlCase_ == 9) {
- return (com.google.apps.card.v1.DecoratedText.SwitchControl) control_;
- }
- return com.google.apps.card.v1.DecoratedText.SwitchControl.getDefaultInstance();
- }
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- */
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText.SwitchControlOrBuilder getSwitchControlOrBuilder() {
- if (controlCase_ == 9) {
- return (com.google.apps.card.v1.DecoratedText.SwitchControl) control_;
- }
- return com.google.apps.card.v1.DecoratedText.SwitchControl.getDefaultInstance();
- }
-
- public static final int END_ICON_FIELD_NUMBER = 11;
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- *
- * @return Whether the endIcon field is set.
- */
- @java.lang.Override
- public boolean hasEndIcon() {
- return controlCase_ == 11;
- }
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- *
- * @return The endIcon.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Icon getEndIcon() {
- if (controlCase_ == 11) {
- return (com.google.apps.card.v1.Icon) control_;
- }
- return com.google.apps.card.v1.Icon.getDefaultInstance();
- }
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- */
- @java.lang.Override
- public com.google.apps.card.v1.IconOrBuilder getEndIconOrBuilder() {
- if (controlCase_ == 11) {
- return (com.google.apps.card.v1.Icon) control_;
- }
- return com.google.apps.card.v1.Icon.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 (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(1, getIcon());
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topLabel_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, topLabel_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, text_);
- }
- if (wrapText_ != false) {
- output.writeBool(5, wrapText_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bottomLabel_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 6, bottomLabel_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeMessage(7, getOnClick());
- }
- if (controlCase_ == 8) {
- output.writeMessage(8, (com.google.apps.card.v1.Button) control_);
- }
- if (controlCase_ == 9) {
- output.writeMessage(9, (com.google.apps.card.v1.DecoratedText.SwitchControl) control_);
- }
- if (controlCase_ == 11) {
- output.writeMessage(11, (com.google.apps.card.v1.Icon) control_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeMessage(12, getStartIcon());
- }
- 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(topLabel_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, topLabel_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, text_);
- }
- if (wrapText_ != false) {
- size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, wrapText_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bottomLabel_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, bottomLabel_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getOnClick());
- }
- if (controlCase_ == 8) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 8, (com.google.apps.card.v1.Button) control_);
- }
- if (controlCase_ == 9) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 9, (com.google.apps.card.v1.DecoratedText.SwitchControl) control_);
- }
- if (controlCase_ == 11) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 11, (com.google.apps.card.v1.Icon) control_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getStartIcon());
- }
- 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.DecoratedText)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.DecoratedText other = (com.google.apps.card.v1.DecoratedText) obj;
-
- if (hasIcon() != other.hasIcon()) return false;
- if (hasIcon()) {
- if (!getIcon().equals(other.getIcon())) return false;
- }
- if (hasStartIcon() != other.hasStartIcon()) return false;
- if (hasStartIcon()) {
- if (!getStartIcon().equals(other.getStartIcon())) return false;
- }
- if (!getTopLabel().equals(other.getTopLabel())) return false;
- if (!getText().equals(other.getText())) return false;
- if (getWrapText() != other.getWrapText()) return false;
- if (!getBottomLabel().equals(other.getBottomLabel())) return false;
- if (hasOnClick() != other.hasOnClick()) return false;
- if (hasOnClick()) {
- if (!getOnClick().equals(other.getOnClick())) return false;
- }
- if (!getControlCase().equals(other.getControlCase())) return false;
- switch (controlCase_) {
- case 8:
- if (!getButton().equals(other.getButton())) return false;
- break;
- case 9:
- if (!getSwitchControl().equals(other.getSwitchControl())) return false;
- break;
- case 11:
- if (!getEndIcon().equals(other.getEndIcon())) 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();
- if (hasIcon()) {
- hash = (37 * hash) + ICON_FIELD_NUMBER;
- hash = (53 * hash) + getIcon().hashCode();
- }
- if (hasStartIcon()) {
- hash = (37 * hash) + START_ICON_FIELD_NUMBER;
- hash = (53 * hash) + getStartIcon().hashCode();
- }
- hash = (37 * hash) + TOP_LABEL_FIELD_NUMBER;
- hash = (53 * hash) + getTopLabel().hashCode();
- hash = (37 * hash) + TEXT_FIELD_NUMBER;
- hash = (53 * hash) + getText().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 (hasOnClick()) {
- hash = (37 * hash) + ON_CLICK_FIELD_NUMBER;
- hash = (53 * hash) + getOnClick().hashCode();
- }
- switch (controlCase_) {
- case 8:
- hash = (37 * hash) + BUTTON_FIELD_NUMBER;
- hash = (53 * hash) + getButton().hashCode();
- break;
- case 9:
- hash = (37 * hash) + SWITCH_CONTROL_FIELD_NUMBER;
- hash = (53 * hash) + getSwitchControl().hashCode();
- break;
- case 11:
- hash = (37 * hash) + END_ICON_FIELD_NUMBER;
- hash = (53 * hash) + getEndIcon().hashCode();
- break;
- case 0:
- default:
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.DecoratedText parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.DecoratedText 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.DecoratedText parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.DecoratedText 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.DecoratedText parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.DecoratedText 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.DecoratedText parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.DecoratedText 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.DecoratedText parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.DecoratedText 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.DecoratedText 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.DecoratedText 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.DecoratedText 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 displays text with optional decorations such as a label above
- * or below the text, an icon in front of the text, a selection widget, or a
- * button after the text. For an example in
- * Google Chat apps, see [Decorated
- * text](https://developers.google.com/chat/ui/widgets/decorated-text).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.DecoratedText}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.DecoratedText)
- com.google.apps.card.v1.DecoratedTextOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DecoratedText_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_DecoratedText_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.DecoratedText.class,
- com.google.apps.card.v1.DecoratedText.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.DecoratedText.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();
- getStartIconFieldBuilder();
- getOnClickFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- icon_ = null;
- if (iconBuilder_ != null) {
- iconBuilder_.dispose();
- iconBuilder_ = null;
- }
- startIcon_ = null;
- if (startIconBuilder_ != null) {
- startIconBuilder_.dispose();
- startIconBuilder_ = null;
- }
- topLabel_ = "";
- text_ = "";
- wrapText_ = false;
- bottomLabel_ = "";
- onClick_ = null;
- if (onClickBuilder_ != null) {
- onClickBuilder_.dispose();
- onClickBuilder_ = null;
- }
- if (buttonBuilder_ != null) {
- buttonBuilder_.clear();
- }
- if (switchControlBuilder_ != null) {
- switchControlBuilder_.clear();
- }
- if (endIconBuilder_ != null) {
- endIconBuilder_.clear();
- }
- controlCase_ = 0;
- control_ = 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_DecoratedText_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText getDefaultInstanceForType() {
- return com.google.apps.card.v1.DecoratedText.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText build() {
- com.google.apps.card.v1.DecoratedText result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText buildPartial() {
- com.google.apps.card.v1.DecoratedText result =
- new com.google.apps.card.v1.DecoratedText(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- buildPartialOneofs(result);
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.DecoratedText 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.startIcon_ = startIconBuilder_ == null ? startIcon_ : startIconBuilder_.build();
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.topLabel_ = topLabel_;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.text_ = text_;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.wrapText_ = wrapText_;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.bottomLabel_ = bottomLabel_;
- }
- if (((from_bitField0_ & 0x00000040) != 0)) {
- result.onClick_ = onClickBuilder_ == null ? onClick_ : onClickBuilder_.build();
- to_bitField0_ |= 0x00000004;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- private void buildPartialOneofs(com.google.apps.card.v1.DecoratedText result) {
- result.controlCase_ = controlCase_;
- result.control_ = this.control_;
- if (controlCase_ == 8 && buttonBuilder_ != null) {
- result.control_ = buttonBuilder_.build();
- }
- if (controlCase_ == 9 && switchControlBuilder_ != null) {
- result.control_ = switchControlBuilder_.build();
- }
- if (controlCase_ == 11 && endIconBuilder_ != null) {
- result.control_ = endIconBuilder_.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.DecoratedText) {
- return mergeFrom((com.google.apps.card.v1.DecoratedText) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.DecoratedText other) {
- if (other == com.google.apps.card.v1.DecoratedText.getDefaultInstance()) return this;
- if (other.hasIcon()) {
- mergeIcon(other.getIcon());
- }
- if (other.hasStartIcon()) {
- mergeStartIcon(other.getStartIcon());
- }
- if (!other.getTopLabel().isEmpty()) {
- topLabel_ = other.topLabel_;
- bitField0_ |= 0x00000004;
- onChanged();
- }
- if (!other.getText().isEmpty()) {
- text_ = other.text_;
- bitField0_ |= 0x00000008;
- onChanged();
- }
- if (other.getWrapText() != false) {
- setWrapText(other.getWrapText());
- }
- if (!other.getBottomLabel().isEmpty()) {
- bottomLabel_ = other.bottomLabel_;
- bitField0_ |= 0x00000020;
- onChanged();
- }
- if (other.hasOnClick()) {
- mergeOnClick(other.getOnClick());
- }
- switch (other.getControlCase()) {
- case BUTTON:
- {
- mergeButton(other.getButton());
- break;
- }
- case SWITCH_CONTROL:
- {
- mergeSwitchControl(other.getSwitchControl());
- break;
- }
- case END_ICON:
- {
- mergeEndIcon(other.getEndIcon());
- break;
- }
- case CONTROL_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(getIconFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 26:
- {
- topLabel_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000004;
- break;
- } // case 26
- case 34:
- {
- text_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000008;
- break;
- } // case 34
- case 40:
- {
- wrapText_ = input.readBool();
- bitField0_ |= 0x00000010;
- break;
- } // case 40
- case 50:
- {
- bottomLabel_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000020;
- break;
- } // case 50
- case 58:
- {
- input.readMessage(getOnClickFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000040;
- break;
- } // case 58
- case 66:
- {
- input.readMessage(getButtonFieldBuilder().getBuilder(), extensionRegistry);
- controlCase_ = 8;
- break;
- } // case 66
- case 74:
- {
- input.readMessage(getSwitchControlFieldBuilder().getBuilder(), extensionRegistry);
- controlCase_ = 9;
- break;
- } // case 74
- case 90:
- {
- input.readMessage(getEndIconFieldBuilder().getBuilder(), extensionRegistry);
- controlCase_ = 11;
- break;
- } // case 90
- case 98:
- {
- input.readMessage(getStartIconFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000002;
- break;
- } // case 98
- 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 controlCase_ = 0;
- private java.lang.Object control_;
-
- public ControlCase getControlCase() {
- return ControlCase.forNumber(controlCase_);
- }
-
- public Builder clearControl() {
- controlCase_ = 0;
- control_ = null;
- onChanged();
- 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_;
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .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=794
- * @return Whether the icon field is set.
- */
- @java.lang.Deprecated
- public boolean hasIcon() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .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=794
- * @return The icon.
- */
- @java.lang.Deprecated
- 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();
- }
- }
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .google.apps.card.v1.Icon icon = 1 [deprecated = true];
- */
- @java.lang.Deprecated
- 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;
- }
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .google.apps.card.v1.Icon icon = 1 [deprecated = true];
- */
- @java.lang.Deprecated
- 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;
- }
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .google.apps.card.v1.Icon icon = 1 [deprecated = true];
- */
- @java.lang.Deprecated
- 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;
- }
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .google.apps.card.v1.Icon icon = 1 [deprecated = true];
- */
- @java.lang.Deprecated
- public Builder clearIcon() {
- bitField0_ = (bitField0_ & ~0x00000001);
- icon_ = null;
- if (iconBuilder_ != null) {
- iconBuilder_.dispose();
- iconBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .google.apps.card.v1.Icon icon = 1 [deprecated = true];
- */
- @java.lang.Deprecated
- public com.google.apps.card.v1.Icon.Builder getIconBuilder() {
- bitField0_ |= 0x00000001;
- onChanged();
- return getIconFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .google.apps.card.v1.Icon icon = 1 [deprecated = true];
- */
- @java.lang.Deprecated
- 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_;
- }
- }
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .google.apps.card.v1.Icon icon = 1 [deprecated = true];
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Icon,
- com.google.apps.card.v1.Icon.Builder,
- com.google.apps.card.v1.IconOrBuilder>
- getIconFieldBuilder() {
- if (iconBuilder_ == null) {
- iconBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Icon,
- com.google.apps.card.v1.Icon.Builder,
- com.google.apps.card.v1.IconOrBuilder>(
- getIcon(), getParentForChildren(), isClean());
- icon_ = null;
- }
- return iconBuilder_;
- }
-
- private com.google.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 = 12;
- *
- * @return Whether the startIcon field is set.
- */
- public boolean hasStartIcon() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *
- *
- * The icon displayed in front of the text.
- *
- *
- * .google.apps.card.v1.Icon start_icon = 12;
- *
- * @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 = 12;
- */
- 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_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The icon displayed in front of the text.
- *
- *
- * .google.apps.card.v1.Icon start_icon = 12;
- */
- public Builder setStartIcon(com.google.apps.card.v1.Icon.Builder builderForValue) {
- if (startIconBuilder_ == null) {
- startIcon_ = builderForValue.build();
- } else {
- startIconBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The icon displayed in front of the text.
- *
- *
- * .google.apps.card.v1.Icon start_icon = 12;
- */
- public Builder mergeStartIcon(com.google.apps.card.v1.Icon value) {
- if (startIconBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 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_ |= 0x00000002;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * The icon displayed in front of the text.
- *
- *
- * .google.apps.card.v1.Icon start_icon = 12;
- */
- public Builder clearStartIcon() {
- bitField0_ = (bitField0_ & ~0x00000002);
- 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 = 12;
- */
- public com.google.apps.card.v1.Icon.Builder getStartIconBuilder() {
- bitField0_ |= 0x00000002;
- onChanged();
- return getStartIconFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The icon displayed in front of the text.
- *
- *
- * .google.apps.card.v1.Icon start_icon = 12;
- */
- 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 = 12;
- */
- 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 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_ |= 0x00000004;
- 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_ & ~0x00000004);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The text that appears above `text`. Always truncates.
- *
- *
- * string top_label = 3;
- *
- * @param value The bytes for topLabel to set.
- * @return This builder for chaining.
- */
- public Builder setTopLabelBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- topLabel_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
-
- private java.lang.Object text_ = "";
- /**
- *
- *
- *
- * Required. The primary text.
- *
- * Supports simple formatting. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string text = 4;
- *
- * @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 primary text.
- *
- * Supports simple formatting. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string text = 4;
- *
- * @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 primary text.
- *
- * Supports simple formatting. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string text = 4;
- *
- * @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_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The primary text.
- *
- * Supports simple formatting. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string text = 4;
- *
- * @return This builder for chaining.
- */
- public Builder clearText() {
- text_ = getDefaultInstance().getText();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Required. The primary text.
- *
- * Supports simple formatting. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string text = 4;
- *
- * @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_ |= 0x00000008;
- onChanged();
- return this;
- }
-
- private boolean wrapText_;
- /**
- *
- *
- *
- * The wrap text setting. If `true`, the text wraps and displays on
- * multiple lines. Otherwise, the text is truncated.
- *
- * Only applies to `text`, not `topLabel` and `bottomLabel`.
- *
- *
- * bool wrap_text = 5;
- *
- * @return The wrapText.
- */
- @java.lang.Override
- public boolean getWrapText() {
- return wrapText_;
- }
- /**
- *
- *
- *
- * The wrap text setting. If `true`, the text wraps and displays on
- * multiple lines. Otherwise, the text is truncated.
- *
- * Only applies to `text`, not `topLabel` and `bottomLabel`.
- *
- *
- * bool wrap_text = 5;
- *
- * @param value The wrapText to set.
- * @return This builder for chaining.
- */
- public Builder setWrapText(boolean value) {
-
- wrapText_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The wrap text setting. If `true`, the text wraps and displays on
- * multiple lines. Otherwise, the text is truncated.
- *
- * Only applies to `text`, not `topLabel` and `bottomLabel`.
- *
- *
- * bool wrap_text = 5;
- *
- * @return This builder for chaining.
- */
- public Builder clearWrapText() {
- bitField0_ = (bitField0_ & ~0x00000010);
- wrapText_ = false;
- onChanged();
- return this;
- }
-
- private java.lang.Object bottomLabel_ = "";
- /**
- *
- *
- *
- * The text that appears below `text`. Always wraps.
- *
- *
- * string bottom_label = 6;
- *
- * @return The bottomLabel.
- */
- public java.lang.String getBottomLabel() {
- java.lang.Object ref = bottomLabel_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- bottomLabel_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The text that appears below `text`. Always wraps.
- *
- *
- * string bottom_label = 6;
- *
- * @return The bytes for bottomLabel.
- */
- public com.google.protobuf.ByteString getBottomLabelBytes() {
- java.lang.Object ref = bottomLabel_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- bottomLabel_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The text that appears below `text`. Always wraps.
- *
- *
- * string bottom_label = 6;
- *
- * @param value The bottomLabel to set.
- * @return This builder for chaining.
- */
- public Builder setBottomLabel(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bottomLabel_ = value;
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The text that appears below `text`. Always wraps.
- *
- *
- * string bottom_label = 6;
- *
- * @return This builder for chaining.
- */
- public Builder clearBottomLabel() {
- bottomLabel_ = getDefaultInstance().getBottomLabel();
- bitField0_ = (bitField0_ & ~0x00000020);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The text that appears below `text`. Always wraps.
- *
- *
- * string bottom_label = 6;
- *
- * @param value The bytes for bottomLabel to set.
- * @return This builder for chaining.
- */
- public Builder setBottomLabelBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- bottomLabel_ = value;
- bitField0_ |= 0x00000020;
- 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_;
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- *
- * @return Whether the onClick field is set.
- */
- public boolean hasOnClick() {
- return ((bitField0_ & 0x00000040) != 0);
- }
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- *
- * @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();
- }
- }
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- */
- 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_ |= 0x00000040;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- */
- public Builder setOnClick(com.google.apps.card.v1.OnClick.Builder builderForValue) {
- if (onClickBuilder_ == null) {
- onClick_ = builderForValue.build();
- } else {
- onClickBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000040;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- */
- public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) {
- if (onClickBuilder_ == null) {
- if (((bitField0_ & 0x00000040) != 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_ |= 0x00000040;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- */
- public Builder clearOnClick() {
- bitField0_ = (bitField0_ & ~0x00000040);
- onClick_ = null;
- if (onClickBuilder_ != null) {
- onClickBuilder_.dispose();
- onClickBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- */
- public com.google.apps.card.v1.OnClick.Builder getOnClickBuilder() {
- bitField0_ |= 0x00000040;
- onChanged();
- return getOnClickFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- */
- 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_;
- }
- }
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- */
- 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 com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>
- buttonBuilder_;
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- *
- * @return Whether the button field is set.
- */
- @java.lang.Override
- public boolean hasButton() {
- return controlCase_ == 8;
- }
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- *
- * @return The button.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Button getButton() {
- if (buttonBuilder_ == null) {
- if (controlCase_ == 8) {
- return (com.google.apps.card.v1.Button) control_;
- }
- return com.google.apps.card.v1.Button.getDefaultInstance();
- } else {
- if (controlCase_ == 8) {
- return buttonBuilder_.getMessage();
- }
- return com.google.apps.card.v1.Button.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- */
- public Builder setButton(com.google.apps.card.v1.Button value) {
- if (buttonBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- control_ = value;
- onChanged();
- } else {
- buttonBuilder_.setMessage(value);
- }
- controlCase_ = 8;
- return this;
- }
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- */
- public Builder setButton(com.google.apps.card.v1.Button.Builder builderForValue) {
- if (buttonBuilder_ == null) {
- control_ = builderForValue.build();
- onChanged();
- } else {
- buttonBuilder_.setMessage(builderForValue.build());
- }
- controlCase_ = 8;
- return this;
- }
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- */
- public Builder mergeButton(com.google.apps.card.v1.Button value) {
- if (buttonBuilder_ == null) {
- if (controlCase_ == 8 && control_ != com.google.apps.card.v1.Button.getDefaultInstance()) {
- control_ =
- com.google.apps.card.v1.Button.newBuilder((com.google.apps.card.v1.Button) control_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- control_ = value;
- }
- onChanged();
- } else {
- if (controlCase_ == 8) {
- buttonBuilder_.mergeFrom(value);
- } else {
- buttonBuilder_.setMessage(value);
- }
- }
- controlCase_ = 8;
- return this;
- }
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- */
- public Builder clearButton() {
- if (buttonBuilder_ == null) {
- if (controlCase_ == 8) {
- controlCase_ = 0;
- control_ = null;
- onChanged();
- }
- } else {
- if (controlCase_ == 8) {
- controlCase_ = 0;
- control_ = null;
- }
- buttonBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- */
- public com.google.apps.card.v1.Button.Builder getButtonBuilder() {
- return getButtonFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ButtonOrBuilder getButtonOrBuilder() {
- if ((controlCase_ == 8) && (buttonBuilder_ != null)) {
- return buttonBuilder_.getMessageOrBuilder();
- } else {
- if (controlCase_ == 8) {
- return (com.google.apps.card.v1.Button) control_;
- }
- return com.google.apps.card.v1.Button.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>
- getButtonFieldBuilder() {
- if (buttonBuilder_ == null) {
- if (!(controlCase_ == 8)) {
- control_ = com.google.apps.card.v1.Button.getDefaultInstance();
- }
- buttonBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Button,
- com.google.apps.card.v1.Button.Builder,
- com.google.apps.card.v1.ButtonOrBuilder>(
- (com.google.apps.card.v1.Button) control_, getParentForChildren(), isClean());
- control_ = null;
- }
- controlCase_ = 8;
- onChanged();
- return buttonBuilder_;
- }
-
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.DecoratedText.SwitchControl,
- com.google.apps.card.v1.DecoratedText.SwitchControl.Builder,
- com.google.apps.card.v1.DecoratedText.SwitchControlOrBuilder>
- switchControlBuilder_;
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- *
- * @return Whether the switchControl field is set.
- */
- @java.lang.Override
- public boolean hasSwitchControl() {
- return controlCase_ == 9;
- }
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- *
- * @return The switchControl.
- */
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText.SwitchControl getSwitchControl() {
- if (switchControlBuilder_ == null) {
- if (controlCase_ == 9) {
- return (com.google.apps.card.v1.DecoratedText.SwitchControl) control_;
- }
- return com.google.apps.card.v1.DecoratedText.SwitchControl.getDefaultInstance();
- } else {
- if (controlCase_ == 9) {
- return switchControlBuilder_.getMessage();
- }
- return com.google.apps.card.v1.DecoratedText.SwitchControl.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- */
- public Builder setSwitchControl(com.google.apps.card.v1.DecoratedText.SwitchControl value) {
- if (switchControlBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- control_ = value;
- onChanged();
- } else {
- switchControlBuilder_.setMessage(value);
- }
- controlCase_ = 9;
- return this;
- }
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- */
- public Builder setSwitchControl(
- com.google.apps.card.v1.DecoratedText.SwitchControl.Builder builderForValue) {
- if (switchControlBuilder_ == null) {
- control_ = builderForValue.build();
- onChanged();
- } else {
- switchControlBuilder_.setMessage(builderForValue.build());
- }
- controlCase_ = 9;
- return this;
- }
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- */
- public Builder mergeSwitchControl(com.google.apps.card.v1.DecoratedText.SwitchControl value) {
- if (switchControlBuilder_ == null) {
- if (controlCase_ == 9
- && control_
- != com.google.apps.card.v1.DecoratedText.SwitchControl.getDefaultInstance()) {
- control_ =
- com.google.apps.card.v1.DecoratedText.SwitchControl.newBuilder(
- (com.google.apps.card.v1.DecoratedText.SwitchControl) control_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- control_ = value;
- }
- onChanged();
- } else {
- if (controlCase_ == 9) {
- switchControlBuilder_.mergeFrom(value);
- } else {
- switchControlBuilder_.setMessage(value);
- }
- }
- controlCase_ = 9;
- return this;
- }
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- */
- public Builder clearSwitchControl() {
- if (switchControlBuilder_ == null) {
- if (controlCase_ == 9) {
- controlCase_ = 0;
- control_ = null;
- onChanged();
- }
- } else {
- if (controlCase_ == 9) {
- controlCase_ = 0;
- control_ = null;
- }
- switchControlBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- */
- public com.google.apps.card.v1.DecoratedText.SwitchControl.Builder getSwitchControlBuilder() {
- return getSwitchControlFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- */
- @java.lang.Override
- public com.google.apps.card.v1.DecoratedText.SwitchControlOrBuilder
- getSwitchControlOrBuilder() {
- if ((controlCase_ == 9) && (switchControlBuilder_ != null)) {
- return switchControlBuilder_.getMessageOrBuilder();
- } else {
- if (controlCase_ == 9) {
- return (com.google.apps.card.v1.DecoratedText.SwitchControl) control_;
- }
- return com.google.apps.card.v1.DecoratedText.SwitchControl.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.DecoratedText.SwitchControl,
- com.google.apps.card.v1.DecoratedText.SwitchControl.Builder,
- com.google.apps.card.v1.DecoratedText.SwitchControlOrBuilder>
- getSwitchControlFieldBuilder() {
- if (switchControlBuilder_ == null) {
- if (!(controlCase_ == 9)) {
- control_ = com.google.apps.card.v1.DecoratedText.SwitchControl.getDefaultInstance();
- }
- switchControlBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.DecoratedText.SwitchControl,
- com.google.apps.card.v1.DecoratedText.SwitchControl.Builder,
- com.google.apps.card.v1.DecoratedText.SwitchControlOrBuilder>(
- (com.google.apps.card.v1.DecoratedText.SwitchControl) control_,
- getParentForChildren(),
- isClean());
- control_ = null;
- }
- controlCase_ = 9;
- onChanged();
- return switchControlBuilder_;
- }
-
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Icon,
- com.google.apps.card.v1.Icon.Builder,
- com.google.apps.card.v1.IconOrBuilder>
- endIconBuilder_;
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- *
- * @return Whether the endIcon field is set.
- */
- @java.lang.Override
- public boolean hasEndIcon() {
- return controlCase_ == 11;
- }
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- *
- * @return The endIcon.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Icon getEndIcon() {
- if (endIconBuilder_ == null) {
- if (controlCase_ == 11) {
- return (com.google.apps.card.v1.Icon) control_;
- }
- return com.google.apps.card.v1.Icon.getDefaultInstance();
- } else {
- if (controlCase_ == 11) {
- return endIconBuilder_.getMessage();
- }
- return com.google.apps.card.v1.Icon.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- */
- public Builder setEndIcon(com.google.apps.card.v1.Icon value) {
- if (endIconBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- control_ = value;
- onChanged();
- } else {
- endIconBuilder_.setMessage(value);
- }
- controlCase_ = 11;
- return this;
- }
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- */
- public Builder setEndIcon(com.google.apps.card.v1.Icon.Builder builderForValue) {
- if (endIconBuilder_ == null) {
- control_ = builderForValue.build();
- onChanged();
- } else {
- endIconBuilder_.setMessage(builderForValue.build());
- }
- controlCase_ = 11;
- return this;
- }
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- */
- public Builder mergeEndIcon(com.google.apps.card.v1.Icon value) {
- if (endIconBuilder_ == null) {
- if (controlCase_ == 11 && control_ != com.google.apps.card.v1.Icon.getDefaultInstance()) {
- control_ =
- com.google.apps.card.v1.Icon.newBuilder((com.google.apps.card.v1.Icon) control_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- control_ = value;
- }
- onChanged();
- } else {
- if (controlCase_ == 11) {
- endIconBuilder_.mergeFrom(value);
- } else {
- endIconBuilder_.setMessage(value);
- }
- }
- controlCase_ = 11;
- return this;
- }
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- */
- public Builder clearEndIcon() {
- if (endIconBuilder_ == null) {
- if (controlCase_ == 11) {
- controlCase_ = 0;
- control_ = null;
- onChanged();
- }
- } else {
- if (controlCase_ == 11) {
- controlCase_ = 0;
- control_ = null;
- }
- endIconBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- */
- public com.google.apps.card.v1.Icon.Builder getEndIconBuilder() {
- return getEndIconFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- */
- @java.lang.Override
- public com.google.apps.card.v1.IconOrBuilder getEndIconOrBuilder() {
- if ((controlCase_ == 11) && (endIconBuilder_ != null)) {
- return endIconBuilder_.getMessageOrBuilder();
- } else {
- if (controlCase_ == 11) {
- return (com.google.apps.card.v1.Icon) control_;
- }
- return com.google.apps.card.v1.Icon.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Icon,
- com.google.apps.card.v1.Icon.Builder,
- com.google.apps.card.v1.IconOrBuilder>
- getEndIconFieldBuilder() {
- if (endIconBuilder_ == null) {
- if (!(controlCase_ == 11)) {
- control_ = com.google.apps.card.v1.Icon.getDefaultInstance();
- }
- endIconBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Icon,
- com.google.apps.card.v1.Icon.Builder,
- com.google.apps.card.v1.IconOrBuilder>(
- (com.google.apps.card.v1.Icon) control_, getParentForChildren(), isClean());
- control_ = null;
- }
- controlCase_ = 11;
- onChanged();
- return endIconBuilder_;
- }
-
- @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.DecoratedText)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.DecoratedText)
- private static final com.google.apps.card.v1.DecoratedText DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.DecoratedText();
- }
-
- public static com.google.apps.card.v1.DecoratedText getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public DecoratedText 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.DecoratedText getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DecoratedTextOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DecoratedTextOrBuilder.java
deleted file mode 100644
index 1e4d4ecc4852..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DecoratedTextOrBuilder.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface DecoratedTextOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.DecoratedText)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .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=794
- * @return Whether the icon field is set.
- */
- @java.lang.Deprecated
- boolean hasIcon();
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .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=794
- * @return The icon.
- */
- @java.lang.Deprecated
- com.google.apps.card.v1.Icon getIcon();
- /**
- *
- *
- *
- * Deprecated in favor of `startIcon`.
- *
- *
- * .google.apps.card.v1.Icon icon = 1 [deprecated = true];
- */
- @java.lang.Deprecated
- com.google.apps.card.v1.IconOrBuilder getIconOrBuilder();
-
- /**
- *
- *
- *
- * The icon displayed in front of the text.
- *
- *
- * .google.apps.card.v1.Icon start_icon = 12;
- *
- * @return Whether the startIcon field is set.
- */
- boolean hasStartIcon();
- /**
- *
- *
- *
- * The icon displayed in front of the text.
- *
- *
- * .google.apps.card.v1.Icon start_icon = 12;
- *
- * @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 = 12;
- */
- com.google.apps.card.v1.IconOrBuilder getStartIconOrBuilder();
-
- /**
- *
- *
- *
- * The text that appears above `text`. Always truncates.
- *
- *
- * string top_label = 3;
- *
- * @return The topLabel.
- */
- java.lang.String getTopLabel();
- /**
- *
- *
- *
- * The text that appears above `text`. Always truncates.
- *
- *
- * string top_label = 3;
- *
- * @return The bytes for topLabel.
- */
- com.google.protobuf.ByteString getTopLabelBytes();
-
- /**
- *
- *
- *
- * Required. The primary text.
- *
- * Supports simple formatting. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string text = 4;
- *
- * @return The text.
- */
- java.lang.String getText();
- /**
- *
- *
- *
- * Required. The primary text.
- *
- * Supports simple formatting. For more information
- * about formatting text, see
- * [Formatting text in Google Chat
- * apps](https://developers.google.com/chat/format-messages#card-formatting)
- * and
- * [Formatting
- * text in Google Workspace
- * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- *
- *
- * string text = 4;
- *
- * @return The bytes for text.
- */
- com.google.protobuf.ByteString getTextBytes();
-
- /**
- *
- *
- *
- * The wrap text setting. If `true`, the text wraps and displays on
- * multiple lines. Otherwise, the text is truncated.
- *
- * Only applies to `text`, not `topLabel` and `bottomLabel`.
- *
- *
- * bool wrap_text = 5;
- *
- * @return The wrapText.
- */
- boolean getWrapText();
-
- /**
- *
- *
- *
- * The text that appears below `text`. Always wraps.
- *
- *
- * string bottom_label = 6;
- *
- * @return The bottomLabel.
- */
- java.lang.String getBottomLabel();
- /**
- *
- *
- *
- * The text that appears below `text`. Always wraps.
- *
- *
- * string bottom_label = 6;
- *
- * @return The bytes for bottomLabel.
- */
- com.google.protobuf.ByteString getBottomLabelBytes();
-
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- *
- * @return Whether the onClick field is set.
- */
- boolean hasOnClick();
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- *
- * @return The onClick.
- */
- com.google.apps.card.v1.OnClick getOnClick();
- /**
- *
- *
- *
- * This action is triggered when users click `topLabel` or `bottomLabel`.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 7;
- */
- com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder();
-
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- *
- * @return Whether the button field is set.
- */
- boolean hasButton();
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- *
- * @return The button.
- */
- com.google.apps.card.v1.Button getButton();
- /**
- *
- *
- *
- * A button that a user can click to trigger an action.
- *
- *
- * .google.apps.card.v1.Button button = 8;
- */
- com.google.apps.card.v1.ButtonOrBuilder getButtonOrBuilder();
-
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- *
- * @return Whether the switchControl field is set.
- */
- boolean hasSwitchControl();
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- *
- * @return The switchControl.
- */
- com.google.apps.card.v1.DecoratedText.SwitchControl getSwitchControl();
- /**
- *
- *
- *
- * A switch widget that a user can click to change its state and trigger an
- * action.
- *
- *
- * .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;
- */
- com.google.apps.card.v1.DecoratedText.SwitchControlOrBuilder getSwitchControlOrBuilder();
-
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- *
- * @return Whether the endIcon field is set.
- */
- boolean hasEndIcon();
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- *
- * @return The endIcon.
- */
- com.google.apps.card.v1.Icon getEndIcon();
- /**
- *
- *
- *
- * An icon displayed after the text.
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- *
- * .google.apps.card.v1.Icon end_icon = 11;
- */
- com.google.apps.card.v1.IconOrBuilder getEndIconOrBuilder();
-
- com.google.apps.card.v1.DecoratedText.ControlCase getControlCase();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Divider.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Divider.java
deleted file mode 100644
index dec1571e4a76..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Divider.java
+++ /dev/null
@@ -1,447 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * Displays a divider between widgets as a horizontal line. For an example in
- * Google Chat apps, see
- * [Divider](https://developers.google.com/chat/ui/widgets/divider).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- * For example, the following JSON creates a divider:
- *
- * ```
- * "divider": {}
- * ```
- *
- *
- * Protobuf type {@code google.apps.card.v1.Divider}
- */
-public final class Divider extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Divider)
- DividerOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Divider.newBuilder() to construct.
- private Divider(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Divider() {}
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new Divider();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Divider_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Divider_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Divider.class, com.google.apps.card.v1.Divider.Builder.class);
- }
-
- 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 {
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- 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.Divider)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Divider other = (com.google.apps.card.v1.Divider) obj;
-
- 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 = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Divider parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Divider 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.Divider parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Divider 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.Divider parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Divider 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.Divider parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Divider 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.Divider parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Divider 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.Divider 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.Divider 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.Divider 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;
- }
- /**
- *
- *
- *
- * Displays a divider between widgets as a horizontal line. For an example in
- * Google Chat apps, see
- * [Divider](https://developers.google.com/chat/ui/widgets/divider).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- * For example, the following JSON creates a divider:
- *
- * ```
- * "divider": {}
- * ```
- *
- *
- * Protobuf type {@code google.apps.card.v1.Divider}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Divider)
- com.google.apps.card.v1.DividerOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Divider_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Divider_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Divider.class, com.google.apps.card.v1.Divider.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Divider.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- 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_Divider_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Divider getDefaultInstanceForType() {
- return com.google.apps.card.v1.Divider.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Divider build() {
- com.google.apps.card.v1.Divider result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Divider buildPartial() {
- com.google.apps.card.v1.Divider result = new com.google.apps.card.v1.Divider(this);
- onBuilt();
- return result;
- }
-
- @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.Divider) {
- return mergeFrom((com.google.apps.card.v1.Divider) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Divider other) {
- if (other == com.google.apps.card.v1.Divider.getDefaultInstance()) return this;
- 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;
- 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;
- }
-
- @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.Divider)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Divider)
- private static final com.google.apps.card.v1.Divider DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Divider();
- }
-
- public static com.google.apps.card.v1.Divider getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Divider 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.Divider getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DividerOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DividerOrBuilder.java
deleted file mode 100644
index 296f3c884822..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/DividerOrBuilder.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface DividerOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Divider)
- com.google.protobuf.MessageOrBuilder {}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Grid.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Grid.java
deleted file mode 100644
index 99788298ed8d..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Grid.java
+++ /dev/null
@@ -1,3586 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * Displays a grid with a collection of items. Items can only include text or
- * images. For responsive columns, or to include more than text or images, use
- * [`Columns`][google.apps.card.v1.Columns]. For an example in Google Chat apps,
- * see [Grid](https://developers.google.com/chat/ui/widgets/grid).
- *
- * A grid supports any number of columns and items. The number of rows is
- * determined by items divided by 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 Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- * For example, the following JSON creates a 2 column grid with a single
- * item:
- *
- * ```
- * "grid": {
- * "title": "A fine collection of items",
- * "columnCount": 2,
- * "borderStyle": {
- * "type": "STROKE",
- * "cornerRadius": 4
- * },
- * "items": [
- * {
- * "image": {
- * "imageUri": "https://www.example.com/image.png",
- * "cropStyle": {
- * "type": "SQUARE"
- * },
- * "borderStyle": {
- * "type": "STROKE"
- * }
- * },
- * "title": "An item",
- * "textAlignment": "CENTER"
- * }
- * ],
- * "onClick": {
- * "openLink": {
- * "url": "https://www.example.com"
- * }
- * }
- * }
- * ```
- *
- *
- * Protobuf type {@code google.apps.card.v1.Grid}
- */
-public final class Grid extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Grid)
- GridOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Grid.newBuilder() to construct.
- private Grid(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Grid() {
- title_ = "";
- items_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new Grid();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Grid_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Grid_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Grid.class, com.google.apps.card.v1.Grid.Builder.class);
- }
-
- public interface GridItemOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Grid.GridItem)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * A user-specified identifier for this grid item. This identifier is
- * returned in the parent grid's `onClick` callback parameters.
- *
- *
- * string id = 1;
- *
- * @return The id.
- */
- java.lang.String getId();
- /**
- *
- *
- *
- * A user-specified identifier for this grid item. This identifier is
- * returned in the parent grid's `onClick` callback parameters.
- *
- *
- * string id = 1;
- *
- * @return The bytes for id.
- */
- com.google.protobuf.ByteString getIdBytes();
-
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- *
- * @return Whether the image field is set.
- */
- boolean hasImage();
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- *
- * @return The image.
- */
- com.google.apps.card.v1.ImageComponent getImage();
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- */
- com.google.apps.card.v1.ImageComponentOrBuilder getImageOrBuilder();
-
- /**
- *
- *
- *
- * The grid item's title.
- *
- *
- * string title = 3;
- *
- * @return The title.
- */
- java.lang.String getTitle();
- /**
- *
- *
- *
- * The grid item's title.
- *
- *
- * string title = 3;
- *
- * @return The bytes for title.
- */
- com.google.protobuf.ByteString getTitleBytes();
-
- /**
- *
- *
- *
- * The grid item's subtitle.
- *
- *
- * string subtitle = 4;
- *
- * @return The subtitle.
- */
- java.lang.String getSubtitle();
- /**
- *
- *
- *
- * The grid item's subtitle.
- *
- *
- * string subtitle = 4;
- *
- * @return The bytes for subtitle.
- */
- com.google.protobuf.ByteString getSubtitleBytes();
-
- /**
- *
- *
- *
- * The layout to use for the grid item.
- *
- *
- * .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9;
- *
- * @return The enum numeric value on the wire for layout.
- */
- int getLayoutValue();
- /**
- *
- *
- *
- * The layout to use for the grid item.
- *
- *
- * .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9;
- *
- * @return The layout.
- */
- com.google.apps.card.v1.Grid.GridItem.GridItemLayout getLayout();
- }
- /**
- *
- *
- *
- * 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
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Grid.GridItem}
- */
- public static final class GridItem extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Grid.GridItem)
- GridItemOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use GridItem.newBuilder() to construct.
- private GridItem(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private GridItem() {
- id_ = "";
- title_ = "";
- subtitle_ = "";
- layout_ = 0;
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new GridItem();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Grid_GridItem_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Grid_GridItem_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Grid.GridItem.class,
- com.google.apps.card.v1.Grid.GridItem.Builder.class);
- }
-
- /**
- *
- *
- *
- * Represents the various layout options available for a grid item.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.Grid.GridItem.GridItemLayout}
- */
- public enum GridItemLayout implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * GRID_ITEM_LAYOUT_UNSPECIFIED = 0;
- */
- GRID_ITEM_LAYOUT_UNSPECIFIED(0),
- /**
- *
- *
- *
- * The title and subtitle are shown below the grid item's image.
- *
- *
- * TEXT_BELOW = 1;
- */
- TEXT_BELOW(1),
- /**
- *
- *
- *
- * The title and subtitle are shown above the grid item's image.
- *
- *
- * TEXT_ABOVE = 2;
- */
- TEXT_ABOVE(2),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * GRID_ITEM_LAYOUT_UNSPECIFIED = 0;
- */
- public static final int GRID_ITEM_LAYOUT_UNSPECIFIED_VALUE = 0;
- /**
- *
- *
- *
- * The title and subtitle are shown below the grid item's image.
- *
- *
- * TEXT_BELOW = 1;
- */
- public static final int TEXT_BELOW_VALUE = 1;
- /**
- *
- *
- *
- * The title and subtitle are shown above the grid item's image.
- *
- *
- * TEXT_ABOVE = 2;
- */
- public static final int TEXT_ABOVE_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 GridItemLayout 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 GridItemLayout forNumber(int value) {
- switch (value) {
- case 0:
- return GRID_ITEM_LAYOUT_UNSPECIFIED;
- case 1:
- return TEXT_BELOW;
- case 2:
- return TEXT_ABOVE;
- 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 GridItemLayout findValueByNumber(int number) {
- return GridItemLayout.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.Grid.GridItem.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final GridItemLayout[] VALUES = values();
-
- public static GridItemLayout 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 GridItemLayout(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.apps.card.v1.Grid.GridItem.GridItemLayout)
- }
-
- private int bitField0_;
- public static final int ID_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object id_ = "";
- /**
- *
- *
- *
- * A user-specified identifier for this grid item. This identifier is
- * returned in the parent grid's `onClick` callback parameters.
- *
- *
- * string id = 1;
- *
- * @return The id.
- */
- @java.lang.Override
- public java.lang.String getId() {
- java.lang.Object ref = id_;
- 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();
- id_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * A user-specified identifier for this grid item. This identifier is
- * returned in the parent grid's `onClick` callback parameters.
- *
- *
- * string id = 1;
- *
- * @return The bytes for id.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getIdBytes() {
- java.lang.Object ref = id_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- id_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int IMAGE_FIELD_NUMBER = 2;
- private com.google.apps.card.v1.ImageComponent image_;
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- *
- * @return Whether the image field is set.
- */
- @java.lang.Override
- public boolean hasImage() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- *
- * @return The image.
- */
- @java.lang.Override
- public com.google.apps.card.v1.ImageComponent getImage() {
- return image_ == null ? com.google.apps.card.v1.ImageComponent.getDefaultInstance() : image_;
- }
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ImageComponentOrBuilder getImageOrBuilder() {
- return image_ == null ? com.google.apps.card.v1.ImageComponent.getDefaultInstance() : image_;
- }
-
- public static final int TITLE_FIELD_NUMBER = 3;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object title_ = "";
- /**
- *
- *
- *
- * The grid item's title.
- *
- *
- * string title = 3;
- *
- * @return The title.
- */
- @java.lang.Override
- public java.lang.String getTitle() {
- java.lang.Object ref = title_;
- 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();
- title_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The grid item's title.
- *
- *
- * string title = 3;
- *
- * @return The bytes for title.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getTitleBytes() {
- java.lang.Object ref = title_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- title_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int SUBTITLE_FIELD_NUMBER = 4;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object subtitle_ = "";
- /**
- *
- *
- *
- * The grid item's subtitle.
- *
- *
- * string subtitle = 4;
- *
- * @return The subtitle.
- */
- @java.lang.Override
- public java.lang.String getSubtitle() {
- java.lang.Object ref = subtitle_;
- 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();
- subtitle_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The grid item's subtitle.
- *
- *
- * string subtitle = 4;
- *
- * @return The bytes for subtitle.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getSubtitleBytes() {
- java.lang.Object ref = subtitle_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- subtitle_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int LAYOUT_FIELD_NUMBER = 9;
- private int layout_ = 0;
- /**
- *
- *
- *
- * The layout to use for the grid item.
- *
- *
- * .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9;
- *
- * @return The enum numeric value on the wire for layout.
- */
- @java.lang.Override
- public int getLayoutValue() {
- return layout_;
- }
- /**
- *
- *
- *
- * The layout to use for the grid item.
- *
- *
- * .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9;
- *
- * @return The layout.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Grid.GridItem.GridItemLayout getLayout() {
- com.google.apps.card.v1.Grid.GridItem.GridItemLayout result =
- com.google.apps.card.v1.Grid.GridItem.GridItemLayout.forNumber(layout_);
- return result == null
- ? com.google.apps.card.v1.Grid.GridItem.GridItemLayout.UNRECOGNIZED
- : result;
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(2, getImage());
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, title_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subtitle_);
- }
- if (layout_
- != com.google.apps.card.v1.Grid.GridItem.GridItemLayout.GRID_ITEM_LAYOUT_UNSPECIFIED
- .getNumber()) {
- output.writeEnum(9, layout_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getImage());
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, title_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, subtitle_);
- }
- if (layout_
- != com.google.apps.card.v1.Grid.GridItem.GridItemLayout.GRID_ITEM_LAYOUT_UNSPECIFIED
- .getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, layout_);
- }
- 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.Grid.GridItem)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Grid.GridItem other = (com.google.apps.card.v1.Grid.GridItem) obj;
-
- if (!getId().equals(other.getId())) return false;
- if (hasImage() != other.hasImage()) return false;
- if (hasImage()) {
- if (!getImage().equals(other.getImage())) return false;
- }
- if (!getTitle().equals(other.getTitle())) return false;
- if (!getSubtitle().equals(other.getSubtitle())) return false;
- if (layout_ != other.layout_) 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) + ID_FIELD_NUMBER;
- hash = (53 * hash) + getId().hashCode();
- if (hasImage()) {
- hash = (37 * hash) + IMAGE_FIELD_NUMBER;
- hash = (53 * hash) + getImage().hashCode();
- }
- hash = (37 * hash) + TITLE_FIELD_NUMBER;
- hash = (53 * hash) + getTitle().hashCode();
- hash = (37 * hash) + SUBTITLE_FIELD_NUMBER;
- hash = (53 * hash) + getSubtitle().hashCode();
- hash = (37 * hash) + LAYOUT_FIELD_NUMBER;
- hash = (53 * hash) + layout_;
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Grid.GridItem parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Grid.GridItem 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.Grid.GridItem parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Grid.GridItem 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.Grid.GridItem parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Grid.GridItem 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.Grid.GridItem parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Grid.GridItem 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.Grid.GridItem parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Grid.GridItem 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.Grid.GridItem 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.Grid.GridItem 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.Grid.GridItem 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 an item in a grid layout. Items can contain text, an image, or
- * both text and an image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Grid.GridItem}
- */
- public static final class Builder
- extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Grid.GridItem)
- com.google.apps.card.v1.Grid.GridItemOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Grid_GridItem_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Grid_GridItem_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Grid.GridItem.class,
- com.google.apps.card.v1.Grid.GridItem.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Grid.GridItem.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getImageFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- id_ = "";
- image_ = null;
- if (imageBuilder_ != null) {
- imageBuilder_.dispose();
- imageBuilder_ = null;
- }
- title_ = "";
- subtitle_ = "";
- layout_ = 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_Grid_GridItem_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Grid.GridItem getDefaultInstanceForType() {
- return com.google.apps.card.v1.Grid.GridItem.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Grid.GridItem build() {
- com.google.apps.card.v1.Grid.GridItem result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Grid.GridItem buildPartial() {
- com.google.apps.card.v1.Grid.GridItem result =
- new com.google.apps.card.v1.Grid.GridItem(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.Grid.GridItem result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.id_ = id_;
- }
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.image_ = imageBuilder_ == null ? image_ : imageBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.title_ = title_;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.subtitle_ = subtitle_;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.layout_ = layout_;
- }
- 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.Grid.GridItem) {
- return mergeFrom((com.google.apps.card.v1.Grid.GridItem) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Grid.GridItem other) {
- if (other == com.google.apps.card.v1.Grid.GridItem.getDefaultInstance()) return this;
- if (!other.getId().isEmpty()) {
- id_ = other.id_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (other.hasImage()) {
- mergeImage(other.getImage());
- }
- if (!other.getTitle().isEmpty()) {
- title_ = other.title_;
- bitField0_ |= 0x00000004;
- onChanged();
- }
- if (!other.getSubtitle().isEmpty()) {
- subtitle_ = other.subtitle_;
- bitField0_ |= 0x00000008;
- onChanged();
- }
- if (other.layout_ != 0) {
- setLayoutValue(other.getLayoutValue());
- }
- 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:
- {
- id_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- input.readMessage(getImageFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 26:
- {
- title_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000004;
- break;
- } // case 26
- case 34:
- {
- subtitle_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000008;
- break;
- } // case 34
- case 72:
- {
- layout_ = input.readEnum();
- bitField0_ |= 0x00000010;
- break;
- } // case 72
- default:
- {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object id_ = "";
- /**
- *
- *
- *
- * A user-specified identifier for this grid item. This identifier is
- * returned in the parent grid's `onClick` callback parameters.
- *
- *
- * string id = 1;
- *
- * @return The id.
- */
- public java.lang.String getId() {
- java.lang.Object ref = id_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- id_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * A user-specified identifier for this grid item. This identifier is
- * returned in the parent grid's `onClick` callback parameters.
- *
- *
- * string id = 1;
- *
- * @return The bytes for id.
- */
- public com.google.protobuf.ByteString getIdBytes() {
- java.lang.Object ref = id_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- id_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * A user-specified identifier for this grid item. This identifier is
- * returned in the parent grid's `onClick` callback parameters.
- *
- *
- * string id = 1;
- *
- * @param value The id to set.
- * @return This builder for chaining.
- */
- public Builder setId(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- id_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A user-specified identifier for this grid item. This identifier is
- * returned in the parent grid's `onClick` callback parameters.
- *
- *
- * string id = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearId() {
- id_ = getDefaultInstance().getId();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A user-specified identifier for this grid item. This identifier is
- * returned in the parent grid's `onClick` callback parameters.
- *
- *
- * string id = 1;
- *
- * @param value The bytes for id to set.
- * @return This builder for chaining.
- */
- public Builder setIdBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- id_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private com.google.apps.card.v1.ImageComponent image_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.ImageComponent,
- com.google.apps.card.v1.ImageComponent.Builder,
- com.google.apps.card.v1.ImageComponentOrBuilder>
- imageBuilder_;
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- *
- * @return Whether the image field is set.
- */
- public boolean hasImage() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- *
- * @return The image.
- */
- public com.google.apps.card.v1.ImageComponent getImage() {
- if (imageBuilder_ == null) {
- return image_ == null
- ? com.google.apps.card.v1.ImageComponent.getDefaultInstance()
- : image_;
- } else {
- return imageBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- */
- public Builder setImage(com.google.apps.card.v1.ImageComponent value) {
- if (imageBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- image_ = value;
- } else {
- imageBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- */
- public Builder setImage(com.google.apps.card.v1.ImageComponent.Builder builderForValue) {
- if (imageBuilder_ == null) {
- image_ = builderForValue.build();
- } else {
- imageBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- */
- public Builder mergeImage(com.google.apps.card.v1.ImageComponent value) {
- if (imageBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0)
- && image_ != null
- && image_ != com.google.apps.card.v1.ImageComponent.getDefaultInstance()) {
- getImageBuilder().mergeFrom(value);
- } else {
- image_ = value;
- }
- } else {
- imageBuilder_.mergeFrom(value);
- }
- if (image_ != null) {
- bitField0_ |= 0x00000002;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- */
- public Builder clearImage() {
- bitField0_ = (bitField0_ & ~0x00000002);
- image_ = null;
- if (imageBuilder_ != null) {
- imageBuilder_.dispose();
- imageBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- */
- public com.google.apps.card.v1.ImageComponent.Builder getImageBuilder() {
- bitField0_ |= 0x00000002;
- onChanged();
- return getImageFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- */
- public com.google.apps.card.v1.ImageComponentOrBuilder getImageOrBuilder() {
- if (imageBuilder_ != null) {
- return imageBuilder_.getMessageOrBuilder();
- } else {
- return image_ == null
- ? com.google.apps.card.v1.ImageComponent.getDefaultInstance()
- : image_;
- }
- }
- /**
- *
- *
- *
- * The image that displays in the grid item.
- *
- *
- * .google.apps.card.v1.ImageComponent image = 2;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.ImageComponent,
- com.google.apps.card.v1.ImageComponent.Builder,
- com.google.apps.card.v1.ImageComponentOrBuilder>
- getImageFieldBuilder() {
- if (imageBuilder_ == null) {
- imageBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.ImageComponent,
- com.google.apps.card.v1.ImageComponent.Builder,
- com.google.apps.card.v1.ImageComponentOrBuilder>(
- getImage(), getParentForChildren(), isClean());
- image_ = null;
- }
- return imageBuilder_;
- }
-
- private java.lang.Object title_ = "";
- /**
- *
- *
- *
- * The grid item's title.
- *
- *
- * string title = 3;
- *
- * @return The title.
- */
- public java.lang.String getTitle() {
- java.lang.Object ref = title_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- title_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The grid item's title.
- *
- *
- * string title = 3;
- *
- * @return The bytes for title.
- */
- public com.google.protobuf.ByteString getTitleBytes() {
- java.lang.Object ref = title_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- title_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The grid item's title.
- *
- *
- * string title = 3;
- *
- * @param value The title to set.
- * @return This builder for chaining.
- */
- public Builder setTitle(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- title_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The grid item's title.
- *
- *
- * string title = 3;
- *
- * @return This builder for chaining.
- */
- public Builder clearTitle() {
- title_ = getDefaultInstance().getTitle();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The grid item's title.
- *
- *
- * string title = 3;
- *
- * @param value The bytes for title to set.
- * @return This builder for chaining.
- */
- public Builder setTitleBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- title_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
-
- private java.lang.Object subtitle_ = "";
- /**
- *
- *
- *
- * The grid item's subtitle.
- *
- *
- * string subtitle = 4;
- *
- * @return The subtitle.
- */
- public java.lang.String getSubtitle() {
- java.lang.Object ref = subtitle_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- subtitle_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The grid item's subtitle.
- *
- *
- * string subtitle = 4;
- *
- * @return The bytes for subtitle.
- */
- public com.google.protobuf.ByteString getSubtitleBytes() {
- java.lang.Object ref = subtitle_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- subtitle_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The grid item's subtitle.
- *
- *
- * string subtitle = 4;
- *
- * @param value The subtitle to set.
- * @return This builder for chaining.
- */
- public Builder setSubtitle(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- subtitle_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The grid item's subtitle.
- *
- *
- * string subtitle = 4;
- *
- * @return This builder for chaining.
- */
- public Builder clearSubtitle() {
- subtitle_ = getDefaultInstance().getSubtitle();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The grid item's subtitle.
- *
- *
- * string subtitle = 4;
- *
- * @param value The bytes for subtitle to set.
- * @return This builder for chaining.
- */
- public Builder setSubtitleBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- subtitle_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
-
- private int layout_ = 0;
- /**
- *
- *
- *
- * The layout to use for the grid item.
- *
- *
- * .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9;
- *
- * @return The enum numeric value on the wire for layout.
- */
- @java.lang.Override
- public int getLayoutValue() {
- return layout_;
- }
- /**
- *
- *
- *
- * The layout to use for the grid item.
- *
- *
- * .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9;
- *
- * @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_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The layout to use for the grid item.
- *
- *
- * .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9;
- *
- * @return The layout.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Grid.GridItem.GridItemLayout getLayout() {
- com.google.apps.card.v1.Grid.GridItem.GridItemLayout result =
- com.google.apps.card.v1.Grid.GridItem.GridItemLayout.forNumber(layout_);
- return result == null
- ? com.google.apps.card.v1.Grid.GridItem.GridItemLayout.UNRECOGNIZED
- : result;
- }
- /**
- *
- *
- *
- * The layout to use for the grid item.
- *
- *
- * .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9;
- *
- * @param value The layout to set.
- * @return This builder for chaining.
- */
- public Builder setLayout(com.google.apps.card.v1.Grid.GridItem.GridItemLayout value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- layout_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The layout to use for the grid item.
- *
- *
- * .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9;
- *
- * @return This builder for chaining.
- */
- public Builder clearLayout() {
- bitField0_ = (bitField0_ & ~0x00000010);
- layout_ = 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.Grid.GridItem)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Grid.GridItem)
- private static final com.google.apps.card.v1.Grid.GridItem DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Grid.GridItem();
- }
-
- public static com.google.apps.card.v1.Grid.GridItem getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public GridItem 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.Grid.GridItem getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
- }
-
- private int bitField0_;
- public static final int TITLE_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object title_ = "";
- /**
- *
- *
- *
- * The text that displays in the grid header.
- *
- *
- * string title = 1;
- *
- * @return The title.
- */
- @java.lang.Override
- public java.lang.String getTitle() {
- java.lang.Object ref = title_;
- 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();
- title_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The text that displays in the grid header.
- *
- *
- * string title = 1;
- *
- * @return The bytes for title.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getTitleBytes() {
- java.lang.Object ref = title_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- title_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ITEMS_FIELD_NUMBER = 2;
-
- @SuppressWarnings("serial")
- private java.util.List items_;
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- @java.lang.Override
- public java.util.List getItemsList() {
- return items_;
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- @java.lang.Override
- public java.util.List extends com.google.apps.card.v1.Grid.GridItemOrBuilder>
- getItemsOrBuilderList() {
- return items_;
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- @java.lang.Override
- public int getItemsCount() {
- return items_.size();
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Grid.GridItem getItems(int index) {
- return items_.get(index);
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.Grid.GridItemOrBuilder getItemsOrBuilder(int index) {
- return items_.get(index);
- }
-
- public static final int BORDER_STYLE_FIELD_NUMBER = 3;
- private com.google.apps.card.v1.BorderStyle borderStyle_;
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- *
- * @return Whether the borderStyle field is set.
- */
- @java.lang.Override
- public boolean hasBorderStyle() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- *
- * @return The borderStyle.
- */
- @java.lang.Override
- public com.google.apps.card.v1.BorderStyle getBorderStyle() {
- return borderStyle_ == null
- ? com.google.apps.card.v1.BorderStyle.getDefaultInstance()
- : borderStyle_;
- }
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- */
- @java.lang.Override
- public com.google.apps.card.v1.BorderStyleOrBuilder getBorderStyleOrBuilder() {
- return borderStyle_ == null
- ? com.google.apps.card.v1.BorderStyle.getDefaultInstance()
- : borderStyle_;
- }
-
- public static final int COLUMN_COUNT_FIELD_NUMBER = 4;
- private int columnCount_ = 0;
- /**
- *
- *
- *
- * The number of columns to display in the grid. A default value
- * is used if this field isn't specified, and that default value is
- * different depending on where the grid is shown (dialog versus companion).
- *
- *
- * int32 column_count = 4;
- *
- * @return The columnCount.
- */
- @java.lang.Override
- public int getColumnCount() {
- return columnCount_;
- }
-
- public static final int ON_CLICK_FIELD_NUMBER = 5;
- private com.google.apps.card.v1.OnClick onClick_;
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- *
- * @return Whether the onClick field is set.
- */
- @java.lang.Override
- public boolean hasOnClick() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- *
- * @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_;
- }
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- */
- @java.lang.Override
- public com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder() {
- return onClick_ == null ? com.google.apps.card.v1.OnClick.getDefaultInstance() : onClick_;
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
- }
- for (int i = 0; i < items_.size(); i++) {
- output.writeMessage(2, items_.get(i));
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(3, getBorderStyle());
- }
- if (columnCount_ != 0) {
- output.writeInt32(4, columnCount_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeMessage(5, getOnClick());
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
- }
- for (int i = 0; i < items_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, items_.get(i));
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBorderStyle());
- }
- if (columnCount_ != 0) {
- size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, columnCount_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOnClick());
- }
- 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.Grid)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Grid other = (com.google.apps.card.v1.Grid) obj;
-
- if (!getTitle().equals(other.getTitle())) return false;
- if (!getItemsList().equals(other.getItemsList())) return false;
- if (hasBorderStyle() != other.hasBorderStyle()) return false;
- if (hasBorderStyle()) {
- if (!getBorderStyle().equals(other.getBorderStyle())) return false;
- }
- if (getColumnCount() != other.getColumnCount()) return false;
- if (hasOnClick() != other.hasOnClick()) return false;
- if (hasOnClick()) {
- if (!getOnClick().equals(other.getOnClick())) 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) + TITLE_FIELD_NUMBER;
- hash = (53 * hash) + getTitle().hashCode();
- if (getItemsCount() > 0) {
- hash = (37 * hash) + ITEMS_FIELD_NUMBER;
- hash = (53 * hash) + getItemsList().hashCode();
- }
- if (hasBorderStyle()) {
- hash = (37 * hash) + BORDER_STYLE_FIELD_NUMBER;
- hash = (53 * hash) + getBorderStyle().hashCode();
- }
- hash = (37 * hash) + COLUMN_COUNT_FIELD_NUMBER;
- hash = (53 * hash) + getColumnCount();
- if (hasOnClick()) {
- hash = (37 * hash) + ON_CLICK_FIELD_NUMBER;
- hash = (53 * hash) + getOnClick().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Grid parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Grid 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.Grid parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Grid 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.Grid parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Grid 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.Grid parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Grid 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.Grid parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Grid 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.Grid 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.Grid 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.Grid 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;
- }
- /**
- *
- *
- *
- * Displays a grid with a collection of items. Items can only include text or
- * images. For responsive columns, or to include more than text or images, use
- * [`Columns`][google.apps.card.v1.Columns]. For an example in Google Chat apps,
- * see [Grid](https://developers.google.com/chat/ui/widgets/grid).
- *
- * A grid supports any number of columns and items. The number of rows is
- * determined by items divided by 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 Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- * For example, the following JSON creates a 2 column grid with a single
- * item:
- *
- * ```
- * "grid": {
- * "title": "A fine collection of items",
- * "columnCount": 2,
- * "borderStyle": {
- * "type": "STROKE",
- * "cornerRadius": 4
- * },
- * "items": [
- * {
- * "image": {
- * "imageUri": "https://www.example.com/image.png",
- * "cropStyle": {
- * "type": "SQUARE"
- * },
- * "borderStyle": {
- * "type": "STROKE"
- * }
- * },
- * "title": "An item",
- * "textAlignment": "CENTER"
- * }
- * ],
- * "onClick": {
- * "openLink": {
- * "url": "https://www.example.com"
- * }
- * }
- * }
- * ```
- *
- *
- * Protobuf type {@code google.apps.card.v1.Grid}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Grid)
- com.google.apps.card.v1.GridOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Grid_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Grid_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Grid.class, com.google.apps.card.v1.Grid.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Grid.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getItemsFieldBuilder();
- getBorderStyleFieldBuilder();
- getOnClickFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- title_ = "";
- if (itemsBuilder_ == null) {
- items_ = java.util.Collections.emptyList();
- } else {
- items_ = null;
- itemsBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000002);
- borderStyle_ = null;
- if (borderStyleBuilder_ != null) {
- borderStyleBuilder_.dispose();
- borderStyleBuilder_ = null;
- }
- columnCount_ = 0;
- onClick_ = null;
- if (onClickBuilder_ != null) {
- onClickBuilder_.dispose();
- onClickBuilder_ = 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_Grid_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Grid getDefaultInstanceForType() {
- return com.google.apps.card.v1.Grid.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Grid build() {
- com.google.apps.card.v1.Grid result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Grid buildPartial() {
- com.google.apps.card.v1.Grid result = new com.google.apps.card.v1.Grid(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.apps.card.v1.Grid result) {
- if (itemsBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0)) {
- items_ = java.util.Collections.unmodifiableList(items_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.items_ = items_;
- } else {
- result.items_ = itemsBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.apps.card.v1.Grid result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.title_ = title_;
- }
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.borderStyle_ =
- borderStyleBuilder_ == null ? borderStyle_ : borderStyleBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.columnCount_ = columnCount_;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.onClick_ = onClickBuilder_ == null ? onClick_ : onClickBuilder_.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.Grid) {
- return mergeFrom((com.google.apps.card.v1.Grid) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Grid other) {
- if (other == com.google.apps.card.v1.Grid.getDefaultInstance()) return this;
- if (!other.getTitle().isEmpty()) {
- title_ = other.title_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (itemsBuilder_ == null) {
- if (!other.items_.isEmpty()) {
- if (items_.isEmpty()) {
- items_ = other.items_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureItemsIsMutable();
- items_.addAll(other.items_);
- }
- onChanged();
- }
- } else {
- if (!other.items_.isEmpty()) {
- if (itemsBuilder_.isEmpty()) {
- itemsBuilder_.dispose();
- itemsBuilder_ = null;
- items_ = other.items_;
- bitField0_ = (bitField0_ & ~0x00000002);
- itemsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
- ? getItemsFieldBuilder()
- : null;
- } else {
- itemsBuilder_.addAllMessages(other.items_);
- }
- }
- }
- if (other.hasBorderStyle()) {
- mergeBorderStyle(other.getBorderStyle());
- }
- if (other.getColumnCount() != 0) {
- setColumnCount(other.getColumnCount());
- }
- if (other.hasOnClick()) {
- mergeOnClick(other.getOnClick());
- }
- 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:
- {
- title_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- com.google.apps.card.v1.Grid.GridItem m =
- input.readMessage(
- com.google.apps.card.v1.Grid.GridItem.parser(), extensionRegistry);
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- items_.add(m);
- } else {
- itemsBuilder_.addMessage(m);
- }
- break;
- } // case 18
- case 26:
- {
- input.readMessage(getBorderStyleFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000004;
- break;
- } // case 26
- case 32:
- {
- columnCount_ = input.readInt32();
- bitField0_ |= 0x00000008;
- break;
- } // case 32
- case 42:
- {
- input.readMessage(getOnClickFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000010;
- break;
- } // case 42
- default:
- {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object title_ = "";
- /**
- *
- *
- *
- * The text that displays in the grid header.
- *
- *
- * string title = 1;
- *
- * @return The title.
- */
- public java.lang.String getTitle() {
- java.lang.Object ref = title_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- title_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The text that displays in the grid header.
- *
- *
- * string title = 1;
- *
- * @return The bytes for title.
- */
- public com.google.protobuf.ByteString getTitleBytes() {
- java.lang.Object ref = title_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- title_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The text that displays in the grid header.
- *
- *
- * string title = 1;
- *
- * @param value The title to set.
- * @return This builder for chaining.
- */
- public Builder setTitle(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- title_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The text that displays in the grid header.
- *
- *
- * string title = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearTitle() {
- title_ = getDefaultInstance().getTitle();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The text that displays in the grid header.
- *
- *
- * string title = 1;
- *
- * @param value The bytes for title to set.
- * @return This builder for chaining.
- */
- public Builder setTitleBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- title_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.util.List items_ =
- java.util.Collections.emptyList();
-
- private void ensureItemsIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- items_ = new java.util.ArrayList(items_);
- bitField0_ |= 0x00000002;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Grid.GridItem,
- com.google.apps.card.v1.Grid.GridItem.Builder,
- com.google.apps.card.v1.Grid.GridItemOrBuilder>
- itemsBuilder_;
-
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public java.util.List getItemsList() {
- if (itemsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(items_);
- } else {
- return itemsBuilder_.getMessageList();
- }
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public int getItemsCount() {
- if (itemsBuilder_ == null) {
- return items_.size();
- } else {
- return itemsBuilder_.getCount();
- }
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public com.google.apps.card.v1.Grid.GridItem getItems(int index) {
- if (itemsBuilder_ == null) {
- return items_.get(index);
- } else {
- return itemsBuilder_.getMessage(index);
- }
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public Builder setItems(int index, com.google.apps.card.v1.Grid.GridItem value) {
- if (itemsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureItemsIsMutable();
- items_.set(index, value);
- onChanged();
- } else {
- itemsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public Builder setItems(
- int index, com.google.apps.card.v1.Grid.GridItem.Builder builderForValue) {
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- items_.set(index, builderForValue.build());
- onChanged();
- } else {
- itemsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public Builder addItems(com.google.apps.card.v1.Grid.GridItem value) {
- if (itemsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureItemsIsMutable();
- items_.add(value);
- onChanged();
- } else {
- itemsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public Builder addItems(int index, com.google.apps.card.v1.Grid.GridItem value) {
- if (itemsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureItemsIsMutable();
- items_.add(index, value);
- onChanged();
- } else {
- itemsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public Builder addItems(com.google.apps.card.v1.Grid.GridItem.Builder builderForValue) {
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- items_.add(builderForValue.build());
- onChanged();
- } else {
- itemsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public Builder addItems(
- int index, com.google.apps.card.v1.Grid.GridItem.Builder builderForValue) {
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- items_.add(index, builderForValue.build());
- onChanged();
- } else {
- itemsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public Builder addAllItems(
- java.lang.Iterable extends com.google.apps.card.v1.Grid.GridItem> values) {
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, items_);
- onChanged();
- } else {
- itemsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public Builder clearItems() {
- if (itemsBuilder_ == null) {
- items_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- } else {
- itemsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public Builder removeItems(int index) {
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- items_.remove(index);
- onChanged();
- } else {
- itemsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public com.google.apps.card.v1.Grid.GridItem.Builder getItemsBuilder(int index) {
- return getItemsFieldBuilder().getBuilder(index);
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public com.google.apps.card.v1.Grid.GridItemOrBuilder getItemsOrBuilder(int index) {
- if (itemsBuilder_ == null) {
- return items_.get(index);
- } else {
- return itemsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public java.util.List extends com.google.apps.card.v1.Grid.GridItemOrBuilder>
- getItemsOrBuilderList() {
- if (itemsBuilder_ != null) {
- return itemsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(items_);
- }
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public com.google.apps.card.v1.Grid.GridItem.Builder addItemsBuilder() {
- return getItemsFieldBuilder()
- .addBuilder(com.google.apps.card.v1.Grid.GridItem.getDefaultInstance());
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public com.google.apps.card.v1.Grid.GridItem.Builder addItemsBuilder(int index) {
- return getItemsFieldBuilder()
- .addBuilder(index, com.google.apps.card.v1.Grid.GridItem.getDefaultInstance());
- }
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- public java.util.List getItemsBuilderList() {
- return getItemsFieldBuilder().getBuilderList();
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Grid.GridItem,
- com.google.apps.card.v1.Grid.GridItem.Builder,
- com.google.apps.card.v1.Grid.GridItemOrBuilder>
- getItemsFieldBuilder() {
- if (itemsBuilder_ == null) {
- itemsBuilder_ =
- new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.Grid.GridItem,
- com.google.apps.card.v1.Grid.GridItem.Builder,
- com.google.apps.card.v1.Grid.GridItemOrBuilder>(
- items_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
- items_ = null;
- }
- return itemsBuilder_;
- }
-
- private com.google.apps.card.v1.BorderStyle borderStyle_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.BorderStyle,
- com.google.apps.card.v1.BorderStyle.Builder,
- com.google.apps.card.v1.BorderStyleOrBuilder>
- borderStyleBuilder_;
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- *
- * @return Whether the borderStyle field is set.
- */
- public boolean hasBorderStyle() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- *
- * @return The borderStyle.
- */
- public com.google.apps.card.v1.BorderStyle getBorderStyle() {
- if (borderStyleBuilder_ == null) {
- return borderStyle_ == null
- ? com.google.apps.card.v1.BorderStyle.getDefaultInstance()
- : borderStyle_;
- } else {
- return borderStyleBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- */
- public Builder setBorderStyle(com.google.apps.card.v1.BorderStyle value) {
- if (borderStyleBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- borderStyle_ = value;
- } else {
- borderStyleBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- */
- public Builder setBorderStyle(com.google.apps.card.v1.BorderStyle.Builder builderForValue) {
- if (borderStyleBuilder_ == null) {
- borderStyle_ = builderForValue.build();
- } else {
- borderStyleBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- */
- public Builder mergeBorderStyle(com.google.apps.card.v1.BorderStyle value) {
- if (borderStyleBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0)
- && borderStyle_ != null
- && borderStyle_ != com.google.apps.card.v1.BorderStyle.getDefaultInstance()) {
- getBorderStyleBuilder().mergeFrom(value);
- } else {
- borderStyle_ = value;
- }
- } else {
- borderStyleBuilder_.mergeFrom(value);
- }
- if (borderStyle_ != null) {
- bitField0_ |= 0x00000004;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- */
- public Builder clearBorderStyle() {
- bitField0_ = (bitField0_ & ~0x00000004);
- borderStyle_ = null;
- if (borderStyleBuilder_ != null) {
- borderStyleBuilder_.dispose();
- borderStyleBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- */
- public com.google.apps.card.v1.BorderStyle.Builder getBorderStyleBuilder() {
- bitField0_ |= 0x00000004;
- onChanged();
- return getBorderStyleFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- */
- public com.google.apps.card.v1.BorderStyleOrBuilder getBorderStyleOrBuilder() {
- if (borderStyleBuilder_ != null) {
- return borderStyleBuilder_.getMessageOrBuilder();
- } else {
- return borderStyle_ == null
- ? com.google.apps.card.v1.BorderStyle.getDefaultInstance()
- : borderStyle_;
- }
- }
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.BorderStyle,
- com.google.apps.card.v1.BorderStyle.Builder,
- com.google.apps.card.v1.BorderStyleOrBuilder>
- getBorderStyleFieldBuilder() {
- if (borderStyleBuilder_ == null) {
- borderStyleBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.BorderStyle,
- com.google.apps.card.v1.BorderStyle.Builder,
- com.google.apps.card.v1.BorderStyleOrBuilder>(
- getBorderStyle(), getParentForChildren(), isClean());
- borderStyle_ = null;
- }
- return borderStyleBuilder_;
- }
-
- private int columnCount_;
- /**
- *
- *
- *
- * The number of columns to display in the grid. A default value
- * is used if this field isn't specified, and that default value is
- * different depending on where the grid is shown (dialog versus companion).
- *
- *
- * int32 column_count = 4;
- *
- * @return The columnCount.
- */
- @java.lang.Override
- public int getColumnCount() {
- return columnCount_;
- }
- /**
- *
- *
- *
- * The number of columns to display in the grid. A default value
- * is used if this field isn't specified, and that default value is
- * different depending on where the grid is shown (dialog versus companion).
- *
- *
- * int32 column_count = 4;
- *
- * @param value The columnCount to set.
- * @return This builder for chaining.
- */
- public Builder setColumnCount(int value) {
-
- columnCount_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The number of columns to display in the grid. A default value
- * is used if this field isn't specified, and that default value is
- * different depending on where the grid is shown (dialog versus companion).
- *
- *
- * int32 column_count = 4;
- *
- * @return This builder for chaining.
- */
- public Builder clearColumnCount() {
- bitField0_ = (bitField0_ & ~0x00000008);
- columnCount_ = 0;
- 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_;
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- *
- * @return Whether the onClick field is set.
- */
- public boolean hasOnClick() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- *
- * @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();
- }
- }
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- */
- 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_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- */
- public Builder setOnClick(com.google.apps.card.v1.OnClick.Builder builderForValue) {
- if (onClickBuilder_ == null) {
- onClick_ = builderForValue.build();
- } else {
- onClickBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- */
- public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) {
- if (onClickBuilder_ == null) {
- if (((bitField0_ & 0x00000010) != 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_ |= 0x00000010;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- */
- public Builder clearOnClick() {
- bitField0_ = (bitField0_ & ~0x00000010);
- onClick_ = null;
- if (onClickBuilder_ != null) {
- onClickBuilder_.dispose();
- onClickBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- */
- public com.google.apps.card.v1.OnClick.Builder getOnClickBuilder() {
- bitField0_ |= 0x00000010;
- onChanged();
- return getOnClickFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- */
- 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_;
- }
- }
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- */
- 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_;
- }
-
- @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.Grid)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Grid)
- private static final com.google.apps.card.v1.Grid DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Grid();
- }
-
- public static com.google.apps.card.v1.Grid getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Grid 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.Grid getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/GridOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/GridOrBuilder.java
deleted file mode 100644
index 0548b477e2c1..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/GridOrBuilder.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface GridOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Grid)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The text that displays in the grid header.
- *
- *
- * string title = 1;
- *
- * @return The title.
- */
- java.lang.String getTitle();
- /**
- *
- *
- *
- * The text that displays in the grid header.
- *
- *
- * string title = 1;
- *
- * @return The bytes for title.
- */
- com.google.protobuf.ByteString getTitleBytes();
-
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- java.util.List getItemsList();
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- com.google.apps.card.v1.Grid.GridItem getItems(int index);
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- int getItemsCount();
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- java.util.List extends com.google.apps.card.v1.Grid.GridItemOrBuilder> getItemsOrBuilderList();
- /**
- *
- *
- *
- * The items to display in the grid.
- *
- *
- * repeated .google.apps.card.v1.Grid.GridItem items = 2;
- */
- com.google.apps.card.v1.Grid.GridItemOrBuilder getItemsOrBuilder(int index);
-
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- *
- * @return Whether the borderStyle field is set.
- */
- boolean hasBorderStyle();
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- *
- * @return The borderStyle.
- */
- com.google.apps.card.v1.BorderStyle getBorderStyle();
- /**
- *
- *
- *
- * The border style to apply to each grid item.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 3;
- */
- com.google.apps.card.v1.BorderStyleOrBuilder getBorderStyleOrBuilder();
-
- /**
- *
- *
- *
- * The number of columns to display in the grid. A default value
- * is used if this field isn't specified, and that default value is
- * different depending on where the grid is shown (dialog versus companion).
- *
- *
- * int32 column_count = 4;
- *
- * @return The columnCount.
- */
- int getColumnCount();
-
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- *
- * @return Whether the onClick field is set.
- */
- boolean hasOnClick();
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- *
- * @return The onClick.
- */
- com.google.apps.card.v1.OnClick getOnClick();
- /**
- *
- *
- *
- * This callback is reused by each individual grid item, but with the
- * item's identifier and index in the items list added to the callback's
- * parameters.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 5;
- */
- com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Icon.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Icon.java
deleted file mode 100644
index 697507352d25..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Icon.java
+++ /dev/null
@@ -1,1544 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * An icon displayed in a widget on a card. For an example in Google Chat apps,
- * see [Icon](https://developers.google.com/chat/ui/widgets/icon).
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Icon}
- */
-public final class Icon extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Icon)
- IconOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Icon.newBuilder() to construct.
- private Icon(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Icon() {
- altText_ = "";
- imageType_ = 0;
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new Icon();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Icon_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Icon_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Icon.class, com.google.apps.card.v1.Icon.Builder.class);
- }
-
- private int iconsCase_ = 0;
-
- @SuppressWarnings("serial")
- private java.lang.Object icons_;
-
- public enum IconsCase
- implements
- com.google.protobuf.Internal.EnumLite,
- com.google.protobuf.AbstractMessage.InternalOneOfEnum {
- KNOWN_ICON(1),
- ICON_URL(2),
- ICONS_NOT_SET(0);
- private final int value;
-
- private IconsCase(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 IconsCase valueOf(int value) {
- return forNumber(value);
- }
-
- public static IconsCase forNumber(int value) {
- switch (value) {
- case 1:
- return KNOWN_ICON;
- case 2:
- return ICON_URL;
- case 0:
- return ICONS_NOT_SET;
- default:
- return null;
- }
- }
-
- public int getNumber() {
- return this.value;
- }
- };
-
- public IconsCase getIconsCase() {
- return IconsCase.forNumber(iconsCase_);
- }
-
- public static final int KNOWN_ICON_FIELD_NUMBER = 1;
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @return Whether the knownIcon field is set.
- */
- public boolean hasKnownIcon() {
- return iconsCase_ == 1;
- }
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @return The knownIcon.
- */
- public java.lang.String getKnownIcon() {
- java.lang.Object ref = "";
- if (iconsCase_ == 1) {
- ref = icons_;
- }
- 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();
- if (iconsCase_ == 1) {
- icons_ = s;
- }
- return s;
- }
- }
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @return The bytes for knownIcon.
- */
- public com.google.protobuf.ByteString getKnownIconBytes() {
- java.lang.Object ref = "";
- if (iconsCase_ == 1) {
- ref = icons_;
- }
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- if (iconsCase_ == 1) {
- icons_ = b;
- }
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ICON_URL_FIELD_NUMBER = 2;
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @return Whether the iconUrl field is set.
- */
- public boolean hasIconUrl() {
- return iconsCase_ == 2;
- }
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @return The iconUrl.
- */
- public java.lang.String getIconUrl() {
- java.lang.Object ref = "";
- if (iconsCase_ == 2) {
- ref = icons_;
- }
- 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();
- if (iconsCase_ == 2) {
- icons_ = s;
- }
- return s;
- }
- }
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @return The bytes for iconUrl.
- */
- public com.google.protobuf.ByteString getIconUrlBytes() {
- java.lang.Object ref = "";
- if (iconsCase_ == 2) {
- ref = icons_;
- }
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- if (iconsCase_ == 2) {
- icons_ = b;
- }
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ALT_TEXT_FIELD_NUMBER = 3;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object altText_ = "";
- /**
- *
- *
- *
- * Optional. A description of the icon used for accessibility.
- * If unspecified, the default value `Button` is provided. As a best practice,
- * you should set a helpful description for what the icon displays, and if
- * applicable, what it does. For example, `A user's account portrait`, or
- * `Opens a new browser tab and navigates to the Google Chat developer
- * documentation at https://developers.google.com/chat`.
- *
- * If the icon is set in a [`Button`][google.apps.card.v1.Button], the
- * `altText` appears as helper text when the user hovers over the button.
- * However, if the button also sets `text`, the icon's `altText` is ignored.
- *
- *
- * string alt_text = 3;
- *
- * @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;
- }
- }
- /**
- *
- *
- *
- * Optional. A description of the icon used for accessibility.
- * If unspecified, the default value `Button` is provided. As a best practice,
- * you should set a helpful description for what the icon displays, and if
- * applicable, what it does. For example, `A user's account portrait`, or
- * `Opens a new browser tab and navigates to the Google Chat developer
- * documentation at https://developers.google.com/chat`.
- *
- * If the icon is set in a [`Button`][google.apps.card.v1.Button], the
- * `altText` appears as helper text when the user hovers over the button.
- * However, if the button also sets `text`, the icon's `altText` is ignored.
- *
- *
- * string alt_text = 3;
- *
- * @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;
- }
- }
-
- public static final int IMAGE_TYPE_FIELD_NUMBER = 4;
- private int imageType_ = 0;
- /**
- *
- *
- *
- * The crop style applied to the image. In some cases, applying a
- * `CIRCLE` crop causes the image to be drawn larger than a built-in
- * icon.
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 4;
- *
- * @return The enum numeric value on the wire for imageType.
- */
- @java.lang.Override
- public int getImageTypeValue() {
- return imageType_;
- }
- /**
- *
- *
- *
- * The crop style applied to the image. In some cases, applying a
- * `CIRCLE` crop causes the image to be drawn larger than a built-in
- * icon.
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 4;
- *
- * @return The imageType.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Widget.ImageType getImageType() {
- com.google.apps.card.v1.Widget.ImageType result =
- com.google.apps.card.v1.Widget.ImageType.forNumber(imageType_);
- return result == null ? com.google.apps.card.v1.Widget.ImageType.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 (iconsCase_ == 1) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, icons_);
- }
- if (iconsCase_ == 2) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, icons_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, altText_);
- }
- if (imageType_ != com.google.apps.card.v1.Widget.ImageType.SQUARE.getNumber()) {
- output.writeEnum(4, imageType_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (iconsCase_ == 1) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, icons_);
- }
- if (iconsCase_ == 2) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, icons_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, altText_);
- }
- if (imageType_ != com.google.apps.card.v1.Widget.ImageType.SQUARE.getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, imageType_);
- }
- 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.Icon)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Icon other = (com.google.apps.card.v1.Icon) obj;
-
- if (!getAltText().equals(other.getAltText())) return false;
- if (imageType_ != other.imageType_) return false;
- if (!getIconsCase().equals(other.getIconsCase())) return false;
- switch (iconsCase_) {
- case 1:
- if (!getKnownIcon().equals(other.getKnownIcon())) return false;
- break;
- case 2:
- if (!getIconUrl().equals(other.getIconUrl())) 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();
- hash = (37 * hash) + ALT_TEXT_FIELD_NUMBER;
- hash = (53 * hash) + getAltText().hashCode();
- hash = (37 * hash) + IMAGE_TYPE_FIELD_NUMBER;
- hash = (53 * hash) + imageType_;
- switch (iconsCase_) {
- case 1:
- hash = (37 * hash) + KNOWN_ICON_FIELD_NUMBER;
- hash = (53 * hash) + getKnownIcon().hashCode();
- break;
- case 2:
- hash = (37 * hash) + ICON_URL_FIELD_NUMBER;
- hash = (53 * hash) + getIconUrl().hashCode();
- break;
- case 0:
- default:
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Icon parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Icon 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.Icon parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Icon 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.Icon parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Icon 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.Icon parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Icon 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.Icon parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Icon 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.Icon 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.Icon 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.Icon 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 icon displayed in a widget on a card. For an example in Google Chat apps,
- * see [Icon](https://developers.google.com/chat/ui/widgets/icon).
- *
- * Supports
- * [built-in](https://developers.google.com/chat/format-messages#builtinicons)
- * and
- * [custom](https://developers.google.com/chat/format-messages#customicons)
- * icons.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Icon}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Icon)
- com.google.apps.card.v1.IconOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Icon_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Icon_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Icon.class, com.google.apps.card.v1.Icon.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Icon.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- altText_ = "";
- imageType_ = 0;
- iconsCase_ = 0;
- icons_ = 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_Icon_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Icon getDefaultInstanceForType() {
- return com.google.apps.card.v1.Icon.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Icon build() {
- com.google.apps.card.v1.Icon result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Icon buildPartial() {
- com.google.apps.card.v1.Icon result = new com.google.apps.card.v1.Icon(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- buildPartialOneofs(result);
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.Icon result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.altText_ = altText_;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.imageType_ = imageType_;
- }
- }
-
- private void buildPartialOneofs(com.google.apps.card.v1.Icon result) {
- result.iconsCase_ = iconsCase_;
- result.icons_ = this.icons_;
- }
-
- @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.Icon) {
- return mergeFrom((com.google.apps.card.v1.Icon) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Icon other) {
- if (other == com.google.apps.card.v1.Icon.getDefaultInstance()) return this;
- if (!other.getAltText().isEmpty()) {
- altText_ = other.altText_;
- bitField0_ |= 0x00000004;
- onChanged();
- }
- if (other.imageType_ != 0) {
- setImageTypeValue(other.getImageTypeValue());
- }
- switch (other.getIconsCase()) {
- case KNOWN_ICON:
- {
- iconsCase_ = 1;
- icons_ = other.icons_;
- onChanged();
- break;
- }
- case ICON_URL:
- {
- iconsCase_ = 2;
- icons_ = other.icons_;
- onChanged();
- break;
- }
- case ICONS_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:
- {
- java.lang.String s = input.readStringRequireUtf8();
- iconsCase_ = 1;
- icons_ = s;
- break;
- } // case 10
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
- iconsCase_ = 2;
- icons_ = s;
- break;
- } // case 18
- case 26:
- {
- altText_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000004;
- break;
- } // case 26
- case 32:
- {
- imageType_ = input.readEnum();
- 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 iconsCase_ = 0;
- private java.lang.Object icons_;
-
- public IconsCase getIconsCase() {
- return IconsCase.forNumber(iconsCase_);
- }
-
- public Builder clearIcons() {
- iconsCase_ = 0;
- icons_ = null;
- onChanged();
- return this;
- }
-
- private int bitField0_;
-
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @return Whether the knownIcon field is set.
- */
- @java.lang.Override
- public boolean hasKnownIcon() {
- return iconsCase_ == 1;
- }
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @return The knownIcon.
- */
- @java.lang.Override
- public java.lang.String getKnownIcon() {
- java.lang.Object ref = "";
- if (iconsCase_ == 1) {
- ref = icons_;
- }
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (iconsCase_ == 1) {
- icons_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @return The bytes for knownIcon.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getKnownIconBytes() {
- java.lang.Object ref = "";
- if (iconsCase_ == 1) {
- ref = icons_;
- }
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- if (iconsCase_ == 1) {
- icons_ = b;
- }
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @param value The knownIcon to set.
- * @return This builder for chaining.
- */
- public Builder setKnownIcon(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- iconsCase_ = 1;
- icons_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearKnownIcon() {
- if (iconsCase_ == 1) {
- iconsCase_ = 0;
- icons_ = null;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @param value The bytes for knownIcon to set.
- * @return This builder for chaining.
- */
- public Builder setKnownIconBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- iconsCase_ = 1;
- icons_ = value;
- onChanged();
- return this;
- }
-
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @return Whether the iconUrl field is set.
- */
- @java.lang.Override
- public boolean hasIconUrl() {
- return iconsCase_ == 2;
- }
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @return The iconUrl.
- */
- @java.lang.Override
- public java.lang.String getIconUrl() {
- java.lang.Object ref = "";
- if (iconsCase_ == 2) {
- ref = icons_;
- }
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (iconsCase_ == 2) {
- icons_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @return The bytes for iconUrl.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getIconUrlBytes() {
- java.lang.Object ref = "";
- if (iconsCase_ == 2) {
- ref = icons_;
- }
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- if (iconsCase_ == 2) {
- icons_ = b;
- }
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @param value The iconUrl to set.
- * @return This builder for chaining.
- */
- public Builder setIconUrl(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- iconsCase_ = 2;
- icons_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearIconUrl() {
- if (iconsCase_ == 2) {
- iconsCase_ = 0;
- icons_ = null;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @param value The bytes for iconUrl to set.
- * @return This builder for chaining.
- */
- public Builder setIconUrlBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- iconsCase_ = 2;
- icons_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object altText_ = "";
- /**
- *
- *
- *
- * Optional. A description of the icon used for accessibility.
- * If unspecified, the default value `Button` is provided. As a best practice,
- * you should set a helpful description for what the icon displays, and if
- * applicable, what it does. For example, `A user's account portrait`, or
- * `Opens a new browser tab and navigates to the Google Chat developer
- * documentation at https://developers.google.com/chat`.
- *
- * If the icon is set in a [`Button`][google.apps.card.v1.Button], the
- * `altText` appears as helper text when the user hovers over the button.
- * However, if the button also sets `text`, the icon's `altText` is ignored.
- *
- *
- * string alt_text = 3;
- *
- * @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;
- }
- }
- /**
- *
- *
- *
- * Optional. A description of the icon used for accessibility.
- * If unspecified, the default value `Button` is provided. As a best practice,
- * you should set a helpful description for what the icon displays, and if
- * applicable, what it does. For example, `A user's account portrait`, or
- * `Opens a new browser tab and navigates to the Google Chat developer
- * documentation at https://developers.google.com/chat`.
- *
- * If the icon is set in a [`Button`][google.apps.card.v1.Button], the
- * `altText` appears as helper text when the user hovers over the button.
- * However, if the button also sets `text`, the icon's `altText` is ignored.
- *
- *
- * string alt_text = 3;
- *
- * @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;
- }
- }
- /**
- *
- *
- *
- * Optional. A description of the icon used for accessibility.
- * If unspecified, the default value `Button` is provided. As a best practice,
- * you should set a helpful description for what the icon displays, and if
- * applicable, what it does. For example, `A user's account portrait`, or
- * `Opens a new browser tab and navigates to the Google Chat developer
- * documentation at https://developers.google.com/chat`.
- *
- * If the icon is set in a [`Button`][google.apps.card.v1.Button], the
- * `altText` appears as helper text when the user hovers over the button.
- * However, if the button also sets `text`, the icon's `altText` is ignored.
- *
- *
- * string alt_text = 3;
- *
- * @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_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Optional. A description of the icon used for accessibility.
- * If unspecified, the default value `Button` is provided. As a best practice,
- * you should set a helpful description for what the icon displays, and if
- * applicable, what it does. For example, `A user's account portrait`, or
- * `Opens a new browser tab and navigates to the Google Chat developer
- * documentation at https://developers.google.com/chat`.
- *
- * If the icon is set in a [`Button`][google.apps.card.v1.Button], the
- * `altText` appears as helper text when the user hovers over the button.
- * However, if the button also sets `text`, the icon's `altText` is ignored.
- *
- *
- * string alt_text = 3;
- *
- * @return This builder for chaining.
- */
- public Builder clearAltText() {
- altText_ = getDefaultInstance().getAltText();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Optional. A description of the icon used for accessibility.
- * If unspecified, the default value `Button` is provided. As a best practice,
- * you should set a helpful description for what the icon displays, and if
- * applicable, what it does. For example, `A user's account portrait`, or
- * `Opens a new browser tab and navigates to the Google Chat developer
- * documentation at https://developers.google.com/chat`.
- *
- * If the icon is set in a [`Button`][google.apps.card.v1.Button], the
- * `altText` appears as helper text when the user hovers over the button.
- * However, if the button also sets `text`, the icon's `altText` is ignored.
- *
- *
- * string alt_text = 3;
- *
- * @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_ |= 0x00000004;
- onChanged();
- return this;
- }
-
- private int imageType_ = 0;
- /**
- *
- *
- *
- * The crop style applied to the image. In some cases, applying a
- * `CIRCLE` crop causes the image to be drawn larger than a built-in
- * icon.
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 4;
- *
- * @return The enum numeric value on the wire for imageType.
- */
- @java.lang.Override
- public int getImageTypeValue() {
- return imageType_;
- }
- /**
- *
- *
- *
- * The crop style applied to the image. In some cases, applying a
- * `CIRCLE` crop causes the image to be drawn larger than a built-in
- * icon.
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 4;
- *
- * @param value The enum numeric value on the wire for imageType to set.
- * @return This builder for chaining.
- */
- public Builder setImageTypeValue(int value) {
- imageType_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The crop style applied to the image. In some cases, applying a
- * `CIRCLE` crop causes the image to be drawn larger than a built-in
- * icon.
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 4;
- *
- * @return The imageType.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Widget.ImageType getImageType() {
- com.google.apps.card.v1.Widget.ImageType result =
- com.google.apps.card.v1.Widget.ImageType.forNumber(imageType_);
- return result == null ? com.google.apps.card.v1.Widget.ImageType.UNRECOGNIZED : result;
- }
- /**
- *
- *
- *
- * The crop style applied to the image. In some cases, applying a
- * `CIRCLE` crop causes the image to be drawn larger than a built-in
- * icon.
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 4;
- *
- * @param value The imageType to set.
- * @return This builder for chaining.
- */
- public Builder setImageType(com.google.apps.card.v1.Widget.ImageType value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- imageType_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The crop style applied to the image. In some cases, applying a
- * `CIRCLE` crop causes the image to be drawn larger than a built-in
- * icon.
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 4;
- *
- * @return This builder for chaining.
- */
- public Builder clearImageType() {
- bitField0_ = (bitField0_ & ~0x00000008);
- imageType_ = 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.Icon)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Icon)
- private static final com.google.apps.card.v1.Icon DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Icon();
- }
-
- public static com.google.apps.card.v1.Icon getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Icon 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.Icon getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/IconOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/IconOrBuilder.java
deleted file mode 100644
index ea55c874ada8..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/IconOrBuilder.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface IconOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Icon)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @return Whether the knownIcon field is set.
- */
- boolean hasKnownIcon();
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @return The knownIcon.
- */
- java.lang.String getKnownIcon();
- /**
- *
- *
- *
- * Display one of the built-in icons provided by Google Workspace.
- *
- * For example, to display an airplane icon, specify `AIRPLANE`.
- * For a bus, specify `BUS`.
- *
- * For a full list of supported icons, see [built-in
- * icons](https://developers.google.com/chat/format-messages#builtinicons).
- *
- *
- * string known_icon = 1;
- *
- * @return The bytes for knownIcon.
- */
- com.google.protobuf.ByteString getKnownIconBytes();
-
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @return Whether the iconUrl field is set.
- */
- boolean hasIconUrl();
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @return The iconUrl.
- */
- java.lang.String getIconUrl();
- /**
- *
- *
- *
- * Display a custom icon hosted at an HTTPS URL.
- *
- * For example:
- *
- * ```
- * "iconUrl":
- * "https://developers.google.com/chat/images/quickstart-app-avatar.png"
- * ```
- *
- * Supported file types include `.png` and `.jpg`.
- *
- *
- * string icon_url = 2;
- *
- * @return The bytes for iconUrl.
- */
- com.google.protobuf.ByteString getIconUrlBytes();
-
- /**
- *
- *
- *
- * Optional. A description of the icon used for accessibility.
- * If unspecified, the default value `Button` is provided. As a best practice,
- * you should set a helpful description for what the icon displays, and if
- * applicable, what it does. For example, `A user's account portrait`, or
- * `Opens a new browser tab and navigates to the Google Chat developer
- * documentation at https://developers.google.com/chat`.
- *
- * If the icon is set in a [`Button`][google.apps.card.v1.Button], the
- * `altText` appears as helper text when the user hovers over the button.
- * However, if the button also sets `text`, the icon's `altText` is ignored.
- *
- *
- * string alt_text = 3;
- *
- * @return The altText.
- */
- java.lang.String getAltText();
- /**
- *
- *
- *
- * Optional. A description of the icon used for accessibility.
- * If unspecified, the default value `Button` is provided. As a best practice,
- * you should set a helpful description for what the icon displays, and if
- * applicable, what it does. For example, `A user's account portrait`, or
- * `Opens a new browser tab and navigates to the Google Chat developer
- * documentation at https://developers.google.com/chat`.
- *
- * If the icon is set in a [`Button`][google.apps.card.v1.Button], the
- * `altText` appears as helper text when the user hovers over the button.
- * However, if the button also sets `text`, the icon's `altText` is ignored.
- *
- *
- * string alt_text = 3;
- *
- * @return The bytes for altText.
- */
- com.google.protobuf.ByteString getAltTextBytes();
-
- /**
- *
- *
- *
- * The crop style applied to the image. In some cases, applying a
- * `CIRCLE` crop causes the image to be drawn larger than a built-in
- * icon.
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 4;
- *
- * @return The enum numeric value on the wire for imageType.
- */
- int getImageTypeValue();
- /**
- *
- *
- *
- * The crop style applied to the image. In some cases, applying a
- * `CIRCLE` crop causes the image to be drawn larger than a built-in
- * icon.
- *
- *
- * .google.apps.card.v1.Widget.ImageType image_type = 4;
- *
- * @return The imageType.
- */
- com.google.apps.card.v1.Widget.ImageType getImageType();
-
- com.google.apps.card.v1.Icon.IconsCase getIconsCase();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Image.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Image.java
deleted file mode 100644
index 7d5820e3984c..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Image.java
+++ /dev/null
@@ -1,1119 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * An image that is specified by a URL and can have an `onClick` action. For an
- * example, see [Image](https://developers.google.com/chat/ui/widgets/image).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Image}
- */
-public final class Image extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Image)
- ImageOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Image.newBuilder() to construct.
- private Image(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Image() {
- imageUrl_ = "";
- altText_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new Image();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Image_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Image_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Image.class, com.google.apps.card.v1.Image.Builder.class);
- }
-
- private int bitField0_;
- public static final int IMAGE_URL_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object imageUrl_ = "";
- /**
- *
- *
- *
- * The HTTPS URL that hosts the image.
- *
- * For example:
- *
- * ```
- * https://developers.google.com/chat/images/quickstart-app-avatar.png
- * ```
- *
- *
- * string image_url = 1;
- *
- * @return The imageUrl.
- */
- @java.lang.Override
- public java.lang.String getImageUrl() {
- java.lang.Object ref = imageUrl_;
- 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();
- imageUrl_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The HTTPS URL that hosts the image.
- *
- * For example:
- *
- * ```
- * https://developers.google.com/chat/images/quickstart-app-avatar.png
- * ```
- *
- *
- * string image_url = 1;
- *
- * @return The bytes for imageUrl.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getImageUrlBytes() {
- java.lang.Object ref = imageUrl_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- imageUrl_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ON_CLICK_FIELD_NUMBER = 2;
- private com.google.apps.card.v1.OnClick onClick_;
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @return Whether the onClick field is set.
- */
- @java.lang.Override
- public boolean hasOnClick() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @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_;
- }
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- @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 ALT_TEXT_FIELD_NUMBER = 3;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object altText_ = "";
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string alt_text = 3;
- *
- * @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 of this image that's used for accessibility.
- *
- *
- * string alt_text = 3;
- *
- * @return The bytes for altText.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getAltTextBytes() {
- java.lang.Object ref = altText_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- altText_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUrl_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageUrl_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(2, getOnClick());
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, altText_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUrl_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageUrl_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOnClick());
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, altText_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.apps.card.v1.Image)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Image other = (com.google.apps.card.v1.Image) obj;
-
- if (!getImageUrl().equals(other.getImageUrl())) return false;
- if (hasOnClick() != other.hasOnClick()) return false;
- if (hasOnClick()) {
- if (!getOnClick().equals(other.getOnClick())) return false;
- }
- if (!getAltText().equals(other.getAltText())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + IMAGE_URL_FIELD_NUMBER;
- hash = (53 * hash) + getImageUrl().hashCode();
- if (hasOnClick()) {
- hash = (37 * hash) + ON_CLICK_FIELD_NUMBER;
- hash = (53 * hash) + getOnClick().hashCode();
- }
- 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.Image parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Image 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.Image parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Image 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.Image parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Image 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.Image parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Image 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.Image parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Image 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.Image 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.Image 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.Image 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 image that is specified by a URL and can have an `onClick` action. For an
- * example, see [Image](https://developers.google.com/chat/ui/widgets/image).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Image}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Image)
- com.google.apps.card.v1.ImageOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_Image_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Image_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Image.class, com.google.apps.card.v1.Image.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Image.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getOnClickFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- imageUrl_ = "";
- onClick_ = null;
- if (onClickBuilder_ != null) {
- onClickBuilder_.dispose();
- onClickBuilder_ = null;
- }
- 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_Image_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Image getDefaultInstanceForType() {
- return com.google.apps.card.v1.Image.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Image build() {
- com.google.apps.card.v1.Image result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Image buildPartial() {
- com.google.apps.card.v1.Image result = new com.google.apps.card.v1.Image(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.Image result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.imageUrl_ = imageUrl_;
- }
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.onClick_ = onClickBuilder_ == null ? onClick_ : onClickBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000004) != 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.Image) {
- return mergeFrom((com.google.apps.card.v1.Image) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Image other) {
- if (other == com.google.apps.card.v1.Image.getDefaultInstance()) return this;
- if (!other.getImageUrl().isEmpty()) {
- imageUrl_ = other.imageUrl_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (other.hasOnClick()) {
- mergeOnClick(other.getOnClick());
- }
- if (!other.getAltText().isEmpty()) {
- altText_ = other.altText_;
- bitField0_ |= 0x00000004;
- 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:
- {
- imageUrl_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- input.readMessage(getOnClickFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 26:
- {
- altText_ = input.readStringRequireUtf8();
- 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 java.lang.Object imageUrl_ = "";
- /**
- *
- *
- *
- * The HTTPS URL that hosts the image.
- *
- * For example:
- *
- * ```
- * https://developers.google.com/chat/images/quickstart-app-avatar.png
- * ```
- *
- *
- * string image_url = 1;
- *
- * @return The imageUrl.
- */
- public java.lang.String getImageUrl() {
- java.lang.Object ref = imageUrl_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- imageUrl_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The HTTPS URL that hosts the image.
- *
- * For example:
- *
- * ```
- * https://developers.google.com/chat/images/quickstart-app-avatar.png
- * ```
- *
- *
- * string image_url = 1;
- *
- * @return The bytes for imageUrl.
- */
- public com.google.protobuf.ByteString getImageUrlBytes() {
- java.lang.Object ref = imageUrl_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- imageUrl_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The HTTPS URL that hosts the image.
- *
- * For example:
- *
- * ```
- * https://developers.google.com/chat/images/quickstart-app-avatar.png
- * ```
- *
- *
- * string image_url = 1;
- *
- * @param value The imageUrl to set.
- * @return This builder for chaining.
- */
- public Builder setImageUrl(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- imageUrl_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The HTTPS URL that hosts the image.
- *
- * For example:
- *
- * ```
- * https://developers.google.com/chat/images/quickstart-app-avatar.png
- * ```
- *
- *
- * string image_url = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearImageUrl() {
- imageUrl_ = getDefaultInstance().getImageUrl();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The HTTPS URL that hosts the image.
- *
- * For example:
- *
- * ```
- * https://developers.google.com/chat/images/quickstart-app-avatar.png
- * ```
- *
- *
- * string image_url = 1;
- *
- * @param value The bytes for imageUrl to set.
- * @return This builder for chaining.
- */
- public Builder setImageUrlBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- imageUrl_ = value;
- bitField0_ |= 0x00000001;
- 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_;
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @return Whether the onClick field is set.
- */
- public boolean hasOnClick() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @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();
- }
- }
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- 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_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- public Builder setOnClick(com.google.apps.card.v1.OnClick.Builder builderForValue) {
- if (onClickBuilder_ == null) {
- onClick_ = builderForValue.build();
- } else {
- onClickBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- public Builder mergeOnClick(com.google.apps.card.v1.OnClick value) {
- if (onClickBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 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_ |= 0x00000002;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- public Builder clearOnClick() {
- bitField0_ = (bitField0_ & ~0x00000002);
- onClick_ = null;
- if (onClickBuilder_ != null) {
- onClickBuilder_.dispose();
- onClickBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- public com.google.apps.card.v1.OnClick.Builder getOnClickBuilder() {
- bitField0_ |= 0x00000002;
- onChanged();
- return getOnClickFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- 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_;
- }
- }
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- 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 java.lang.Object altText_ = "";
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string alt_text = 3;
- *
- * @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 of this image that's used for accessibility.
- *
- *
- * string alt_text = 3;
- *
- * @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 of this image that's used for accessibility.
- *
- *
- * string alt_text = 3;
- *
- * @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_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string alt_text = 3;
- *
- * @return This builder for chaining.
- */
- public Builder clearAltText() {
- altText_ = getDefaultInstance().getAltText();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string alt_text = 3;
- *
- * @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_ |= 0x00000004;
- 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.Image)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Image)
- private static final com.google.apps.card.v1.Image DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Image();
- }
-
- public static com.google.apps.card.v1.Image getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public Image 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.Image getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageComponent.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageComponent.java
deleted file mode 100644
index e5fcde65b9e8..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageComponent.java
+++ /dev/null
@@ -1,1359 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * Represents an image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.ImageComponent}
- */
-public final class ImageComponent extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.ImageComponent)
- ImageComponentOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use ImageComponent.newBuilder() to construct.
- private ImageComponent(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private ImageComponent() {
- imageUri_ = "";
- altText_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new ImageComponent();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ImageComponent_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ImageComponent_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.ImageComponent.class,
- com.google.apps.card.v1.ImageComponent.Builder.class);
- }
-
- private int bitField0_;
- public static final int IMAGE_URI_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object imageUri_ = "";
- /**
- *
- *
- *
- * The image URL.
- *
- *
- * string image_uri = 1;
- *
- * @return The imageUri.
- */
- @java.lang.Override
- public java.lang.String getImageUri() {
- java.lang.Object ref = imageUri_;
- 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();
- imageUri_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The image URL.
- *
- *
- * string image_uri = 1;
- *
- * @return The bytes for imageUri.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getImageUriBytes() {
- java.lang.Object ref = imageUri_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- imageUri_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ALT_TEXT_FIELD_NUMBER = 2;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object altText_ = "";
- /**
- *
- *
- *
- * The accessibility label for the image.
- *
- *
- * string alt_text = 2;
- *
- * @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 accessibility label for the image.
- *
- *
- * string alt_text = 2;
- *
- * @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;
- }
- }
-
- public static final int CROP_STYLE_FIELD_NUMBER = 3;
- private com.google.apps.card.v1.ImageCropStyle cropStyle_;
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- *
- * @return Whether the cropStyle field is set.
- */
- @java.lang.Override
- public boolean hasCropStyle() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- *
- * @return The cropStyle.
- */
- @java.lang.Override
- public com.google.apps.card.v1.ImageCropStyle getCropStyle() {
- return cropStyle_ == null
- ? com.google.apps.card.v1.ImageCropStyle.getDefaultInstance()
- : cropStyle_;
- }
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ImageCropStyleOrBuilder getCropStyleOrBuilder() {
- return cropStyle_ == null
- ? com.google.apps.card.v1.ImageCropStyle.getDefaultInstance()
- : cropStyle_;
- }
-
- public static final int BORDER_STYLE_FIELD_NUMBER = 4;
- private com.google.apps.card.v1.BorderStyle borderStyle_;
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- *
- * @return Whether the borderStyle field is set.
- */
- @java.lang.Override
- public boolean hasBorderStyle() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- *
- * @return The borderStyle.
- */
- @java.lang.Override
- public com.google.apps.card.v1.BorderStyle getBorderStyle() {
- return borderStyle_ == null
- ? com.google.apps.card.v1.BorderStyle.getDefaultInstance()
- : borderStyle_;
- }
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- */
- @java.lang.Override
- public com.google.apps.card.v1.BorderStyleOrBuilder getBorderStyleOrBuilder() {
- return borderStyle_ == null
- ? com.google.apps.card.v1.BorderStyle.getDefaultInstance()
- : borderStyle_;
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageUri_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, altText_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(3, getCropStyle());
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeMessage(4, getBorderStyle());
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageUri_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(altText_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, altText_);
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCropStyle());
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBorderStyle());
- }
- 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.ImageComponent)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.ImageComponent other = (com.google.apps.card.v1.ImageComponent) obj;
-
- if (!getImageUri().equals(other.getImageUri())) return false;
- if (!getAltText().equals(other.getAltText())) return false;
- if (hasCropStyle() != other.hasCropStyle()) return false;
- if (hasCropStyle()) {
- if (!getCropStyle().equals(other.getCropStyle())) return false;
- }
- if (hasBorderStyle() != other.hasBorderStyle()) return false;
- if (hasBorderStyle()) {
- if (!getBorderStyle().equals(other.getBorderStyle())) 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) + IMAGE_URI_FIELD_NUMBER;
- hash = (53 * hash) + getImageUri().hashCode();
- hash = (37 * hash) + ALT_TEXT_FIELD_NUMBER;
- hash = (53 * hash) + getAltText().hashCode();
- if (hasCropStyle()) {
- hash = (37 * hash) + CROP_STYLE_FIELD_NUMBER;
- hash = (53 * hash) + getCropStyle().hashCode();
- }
- if (hasBorderStyle()) {
- hash = (37 * hash) + BORDER_STYLE_FIELD_NUMBER;
- hash = (53 * hash) + getBorderStyle().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.ImageComponent parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.ImageComponent 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.ImageComponent parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.ImageComponent 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.ImageComponent parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.ImageComponent 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.ImageComponent parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.ImageComponent 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.ImageComponent parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.ImageComponent 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.ImageComponent 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.ImageComponent 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.ImageComponent 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 an image.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.ImageComponent}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.ImageComponent)
- com.google.apps.card.v1.ImageComponentOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ImageComponent_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ImageComponent_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.ImageComponent.class,
- com.google.apps.card.v1.ImageComponent.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.ImageComponent.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getCropStyleFieldBuilder();
- getBorderStyleFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- imageUri_ = "";
- altText_ = "";
- cropStyle_ = null;
- if (cropStyleBuilder_ != null) {
- cropStyleBuilder_.dispose();
- cropStyleBuilder_ = null;
- }
- borderStyle_ = null;
- if (borderStyleBuilder_ != null) {
- borderStyleBuilder_.dispose();
- borderStyleBuilder_ = 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_ImageComponent_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.ImageComponent getDefaultInstanceForType() {
- return com.google.apps.card.v1.ImageComponent.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.ImageComponent build() {
- com.google.apps.card.v1.ImageComponent result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.ImageComponent buildPartial() {
- com.google.apps.card.v1.ImageComponent result =
- new com.google.apps.card.v1.ImageComponent(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.ImageComponent result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.imageUri_ = imageUri_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.altText_ = altText_;
- }
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.cropStyle_ = cropStyleBuilder_ == null ? cropStyle_ : cropStyleBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.borderStyle_ =
- borderStyleBuilder_ == null ? borderStyle_ : borderStyleBuilder_.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.ImageComponent) {
- return mergeFrom((com.google.apps.card.v1.ImageComponent) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.ImageComponent other) {
- if (other == com.google.apps.card.v1.ImageComponent.getDefaultInstance()) return this;
- if (!other.getImageUri().isEmpty()) {
- imageUri_ = other.imageUri_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getAltText().isEmpty()) {
- altText_ = other.altText_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- if (other.hasCropStyle()) {
- mergeCropStyle(other.getCropStyle());
- }
- if (other.hasBorderStyle()) {
- mergeBorderStyle(other.getBorderStyle());
- }
- 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:
- {
- imageUri_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- altText_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 26:
- {
- input.readMessage(getCropStyleFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000004;
- break;
- } // case 26
- case 34:
- {
- input.readMessage(getBorderStyleFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000008;
- 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.lang.Object imageUri_ = "";
- /**
- *
- *
- *
- * The image URL.
- *
- *
- * string image_uri = 1;
- *
- * @return The imageUri.
- */
- public java.lang.String getImageUri() {
- java.lang.Object ref = imageUri_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- imageUri_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The image URL.
- *
- *
- * string image_uri = 1;
- *
- * @return The bytes for imageUri.
- */
- public com.google.protobuf.ByteString getImageUriBytes() {
- java.lang.Object ref = imageUri_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- imageUri_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The image URL.
- *
- *
- * string image_uri = 1;
- *
- * @param value The imageUri to set.
- * @return This builder for chaining.
- */
- public Builder setImageUri(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- imageUri_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The image URL.
- *
- *
- * string image_uri = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearImageUri() {
- imageUri_ = getDefaultInstance().getImageUri();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The image URL.
- *
- *
- * string image_uri = 1;
- *
- * @param value The bytes for imageUri to set.
- * @return This builder for chaining.
- */
- public Builder setImageUriBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- imageUri_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object altText_ = "";
- /**
- *
- *
- *
- * The accessibility label for the image.
- *
- *
- * string alt_text = 2;
- *
- * @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 accessibility label for the image.
- *
- *
- * string alt_text = 2;
- *
- * @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 accessibility label for the image.
- *
- *
- * string alt_text = 2;
- *
- * @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_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The accessibility label for the image.
- *
- *
- * string alt_text = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearAltText() {
- altText_ = getDefaultInstance().getAltText();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The accessibility label for the image.
- *
- *
- * string alt_text = 2;
- *
- * @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_ |= 0x00000002;
- onChanged();
- return this;
- }
-
- private com.google.apps.card.v1.ImageCropStyle cropStyle_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.ImageCropStyle,
- com.google.apps.card.v1.ImageCropStyle.Builder,
- com.google.apps.card.v1.ImageCropStyleOrBuilder>
- cropStyleBuilder_;
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- *
- * @return Whether the cropStyle field is set.
- */
- public boolean hasCropStyle() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- *
- * @return The cropStyle.
- */
- public com.google.apps.card.v1.ImageCropStyle getCropStyle() {
- if (cropStyleBuilder_ == null) {
- return cropStyle_ == null
- ? com.google.apps.card.v1.ImageCropStyle.getDefaultInstance()
- : cropStyle_;
- } else {
- return cropStyleBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- */
- public Builder setCropStyle(com.google.apps.card.v1.ImageCropStyle value) {
- if (cropStyleBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- cropStyle_ = value;
- } else {
- cropStyleBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- */
- public Builder setCropStyle(com.google.apps.card.v1.ImageCropStyle.Builder builderForValue) {
- if (cropStyleBuilder_ == null) {
- cropStyle_ = builderForValue.build();
- } else {
- cropStyleBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- */
- public Builder mergeCropStyle(com.google.apps.card.v1.ImageCropStyle value) {
- if (cropStyleBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0)
- && cropStyle_ != null
- && cropStyle_ != com.google.apps.card.v1.ImageCropStyle.getDefaultInstance()) {
- getCropStyleBuilder().mergeFrom(value);
- } else {
- cropStyle_ = value;
- }
- } else {
- cropStyleBuilder_.mergeFrom(value);
- }
- if (cropStyle_ != null) {
- bitField0_ |= 0x00000004;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- */
- public Builder clearCropStyle() {
- bitField0_ = (bitField0_ & ~0x00000004);
- cropStyle_ = null;
- if (cropStyleBuilder_ != null) {
- cropStyleBuilder_.dispose();
- cropStyleBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- */
- public com.google.apps.card.v1.ImageCropStyle.Builder getCropStyleBuilder() {
- bitField0_ |= 0x00000004;
- onChanged();
- return getCropStyleFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- */
- public com.google.apps.card.v1.ImageCropStyleOrBuilder getCropStyleOrBuilder() {
- if (cropStyleBuilder_ != null) {
- return cropStyleBuilder_.getMessageOrBuilder();
- } else {
- return cropStyle_ == null
- ? com.google.apps.card.v1.ImageCropStyle.getDefaultInstance()
- : cropStyle_;
- }
- }
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.ImageCropStyle,
- com.google.apps.card.v1.ImageCropStyle.Builder,
- com.google.apps.card.v1.ImageCropStyleOrBuilder>
- getCropStyleFieldBuilder() {
- if (cropStyleBuilder_ == null) {
- cropStyleBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.ImageCropStyle,
- com.google.apps.card.v1.ImageCropStyle.Builder,
- com.google.apps.card.v1.ImageCropStyleOrBuilder>(
- getCropStyle(), getParentForChildren(), isClean());
- cropStyle_ = null;
- }
- return cropStyleBuilder_;
- }
-
- private com.google.apps.card.v1.BorderStyle borderStyle_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.BorderStyle,
- com.google.apps.card.v1.BorderStyle.Builder,
- com.google.apps.card.v1.BorderStyleOrBuilder>
- borderStyleBuilder_;
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- *
- * @return Whether the borderStyle field is set.
- */
- public boolean hasBorderStyle() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- *
- * @return The borderStyle.
- */
- public com.google.apps.card.v1.BorderStyle getBorderStyle() {
- if (borderStyleBuilder_ == null) {
- return borderStyle_ == null
- ? com.google.apps.card.v1.BorderStyle.getDefaultInstance()
- : borderStyle_;
- } else {
- return borderStyleBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- */
- public Builder setBorderStyle(com.google.apps.card.v1.BorderStyle value) {
- if (borderStyleBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- borderStyle_ = value;
- } else {
- borderStyleBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- */
- public Builder setBorderStyle(com.google.apps.card.v1.BorderStyle.Builder builderForValue) {
- if (borderStyleBuilder_ == null) {
- borderStyle_ = builderForValue.build();
- } else {
- borderStyleBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- */
- public Builder mergeBorderStyle(com.google.apps.card.v1.BorderStyle value) {
- if (borderStyleBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0)
- && borderStyle_ != null
- && borderStyle_ != com.google.apps.card.v1.BorderStyle.getDefaultInstance()) {
- getBorderStyleBuilder().mergeFrom(value);
- } else {
- borderStyle_ = value;
- }
- } else {
- borderStyleBuilder_.mergeFrom(value);
- }
- if (borderStyle_ != null) {
- bitField0_ |= 0x00000008;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- */
- public Builder clearBorderStyle() {
- bitField0_ = (bitField0_ & ~0x00000008);
- borderStyle_ = null;
- if (borderStyleBuilder_ != null) {
- borderStyleBuilder_.dispose();
- borderStyleBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- */
- public com.google.apps.card.v1.BorderStyle.Builder getBorderStyleBuilder() {
- bitField0_ |= 0x00000008;
- onChanged();
- return getBorderStyleFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- */
- public com.google.apps.card.v1.BorderStyleOrBuilder getBorderStyleOrBuilder() {
- if (borderStyleBuilder_ != null) {
- return borderStyleBuilder_.getMessageOrBuilder();
- } else {
- return borderStyle_ == null
- ? com.google.apps.card.v1.BorderStyle.getDefaultInstance()
- : borderStyle_;
- }
- }
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.BorderStyle,
- com.google.apps.card.v1.BorderStyle.Builder,
- com.google.apps.card.v1.BorderStyleOrBuilder>
- getBorderStyleFieldBuilder() {
- if (borderStyleBuilder_ == null) {
- borderStyleBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.BorderStyle,
- com.google.apps.card.v1.BorderStyle.Builder,
- com.google.apps.card.v1.BorderStyleOrBuilder>(
- getBorderStyle(), getParentForChildren(), isClean());
- borderStyle_ = null;
- }
- return borderStyleBuilder_;
- }
-
- @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.ImageComponent)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.ImageComponent)
- private static final com.google.apps.card.v1.ImageComponent DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.ImageComponent();
- }
-
- public static com.google.apps.card.v1.ImageComponent getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public ImageComponent 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.ImageComponent getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageComponentOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageComponentOrBuilder.java
deleted file mode 100644
index 078405a9c118..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageComponentOrBuilder.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface ImageComponentOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.ImageComponent)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The image URL.
- *
- *
- * string image_uri = 1;
- *
- * @return The imageUri.
- */
- java.lang.String getImageUri();
- /**
- *
- *
- *
- * The image URL.
- *
- *
- * string image_uri = 1;
- *
- * @return The bytes for imageUri.
- */
- com.google.protobuf.ByteString getImageUriBytes();
-
- /**
- *
- *
- *
- * The accessibility label for the image.
- *
- *
- * string alt_text = 2;
- *
- * @return The altText.
- */
- java.lang.String getAltText();
- /**
- *
- *
- *
- * The accessibility label for the image.
- *
- *
- * string alt_text = 2;
- *
- * @return The bytes for altText.
- */
- com.google.protobuf.ByteString getAltTextBytes();
-
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- *
- * @return Whether the cropStyle field is set.
- */
- boolean hasCropStyle();
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- *
- * @return The cropStyle.
- */
- com.google.apps.card.v1.ImageCropStyle getCropStyle();
- /**
- *
- *
- *
- * The crop style to apply to the image.
- *
- *
- * .google.apps.card.v1.ImageCropStyle crop_style = 3;
- */
- com.google.apps.card.v1.ImageCropStyleOrBuilder getCropStyleOrBuilder();
-
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- *
- * @return Whether the borderStyle field is set.
- */
- boolean hasBorderStyle();
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- *
- * @return The borderStyle.
- */
- com.google.apps.card.v1.BorderStyle getBorderStyle();
- /**
- *
- *
- *
- * The border style to apply to the image.
- *
- *
- * .google.apps.card.v1.BorderStyle border_style = 4;
- */
- com.google.apps.card.v1.BorderStyleOrBuilder getBorderStyleOrBuilder();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageCropStyle.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageCropStyle.java
deleted file mode 100644
index 494c11014ac3..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageCropStyle.java
+++ /dev/null
@@ -1,960 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * Represents the crop style applied to an image.
- *
- * [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:
- *
- * ```
- * cropStyle {
- * "type": "RECTANGLE_CUSTOM",
- * "aspectRatio": 16/9
- * }
- * ```
- *
- *
- * Protobuf type {@code google.apps.card.v1.ImageCropStyle}
- */
-public final class ImageCropStyle extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.ImageCropStyle)
- ImageCropStyleOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use ImageCropStyle.newBuilder() to construct.
- private ImageCropStyle(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private ImageCropStyle() {
- type_ = 0;
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new ImageCropStyle();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ImageCropStyle_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ImageCropStyle_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.ImageCropStyle.class,
- com.google.apps.card.v1.ImageCropStyle.Builder.class);
- }
-
- /**
- *
- *
- *
- * Represents the crop style applied to an image.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.ImageCropStyle.ImageCropType}
- */
- public enum ImageCropType implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * IMAGE_CROP_TYPE_UNSPECIFIED = 0;
- */
- IMAGE_CROP_TYPE_UNSPECIFIED(0),
- /**
- *
- *
- *
- * Default value. Applies a square crop.
- *
- *
- * SQUARE = 1;
- */
- SQUARE(1),
- /**
- *
- *
- *
- * Applies a circular crop.
- *
- *
- * CIRCLE = 2;
- */
- CIRCLE(2),
- /**
- *
- *
- *
- * Applies a rectangular crop with a custom aspect ratio. Set the custom
- * aspect ratio with `aspectRatio`.
- *
- *
- * RECTANGLE_CUSTOM = 3;
- */
- RECTANGLE_CUSTOM(3),
- /**
- *
- *
- *
- * Applies a rectangular crop with a 4:3 aspect ratio.
- *
- *
- * RECTANGLE_4_3 = 4;
- */
- RECTANGLE_4_3(4),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * Don't use. Unspecified.
- *
- *
- * IMAGE_CROP_TYPE_UNSPECIFIED = 0;
- */
- public static final int IMAGE_CROP_TYPE_UNSPECIFIED_VALUE = 0;
- /**
- *
- *
- *
- * Default value. Applies a square crop.
- *
- *
- * SQUARE = 1;
- */
- public static final int SQUARE_VALUE = 1;
- /**
- *
- *
- *
- * Applies a circular crop.
- *
- *
- * CIRCLE = 2;
- */
- public static final int CIRCLE_VALUE = 2;
- /**
- *
- *
- *
- * Applies a rectangular crop with a custom aspect ratio. Set the custom
- * aspect ratio with `aspectRatio`.
- *
- *
- * RECTANGLE_CUSTOM = 3;
- */
- public static final int RECTANGLE_CUSTOM_VALUE = 3;
- /**
- *
- *
- *
- * Applies a rectangular crop with a 4:3 aspect ratio.
- *
- *
- * RECTANGLE_4_3 = 4;
- */
- public static final int RECTANGLE_4_3_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 ImageCropType 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 ImageCropType forNumber(int value) {
- switch (value) {
- case 0:
- return IMAGE_CROP_TYPE_UNSPECIFIED;
- case 1:
- return SQUARE;
- case 2:
- return CIRCLE;
- case 3:
- return RECTANGLE_CUSTOM;
- case 4:
- return RECTANGLE_4_3;
- 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 ImageCropType findValueByNumber(int number) {
- return ImageCropType.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.ImageCropStyle.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final ImageCropType[] VALUES = values();
-
- public static ImageCropType 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 ImageCropType(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.apps.card.v1.ImageCropStyle.ImageCropType)
- }
-
- public static final int TYPE_FIELD_NUMBER = 1;
- private int type_ = 0;
- /**
- *
- *
- *
- * The crop type.
- *
- *
- * .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
- *
- * @return The enum numeric value on the wire for type.
- */
- @java.lang.Override
- public int getTypeValue() {
- return type_;
- }
- /**
- *
- *
- *
- * The crop type.
- *
- *
- * .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
- *
- * @return The type.
- */
- @java.lang.Override
- public com.google.apps.card.v1.ImageCropStyle.ImageCropType getType() {
- com.google.apps.card.v1.ImageCropStyle.ImageCropType result =
- com.google.apps.card.v1.ImageCropStyle.ImageCropType.forNumber(type_);
- return result == null
- ? com.google.apps.card.v1.ImageCropStyle.ImageCropType.UNRECOGNIZED
- : result;
- }
-
- public static final int ASPECT_RATIO_FIELD_NUMBER = 2;
- private double aspectRatio_ = 0D;
- /**
- *
- *
- *
- * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`.
- *
- * For example, here's how to apply a 16:9 aspect ratio:
- *
- * ```
- * cropStyle {
- * "type": "RECTANGLE_CUSTOM",
- * "aspectRatio": 16/9
- * }
- * ```
- *
- *
- * double aspect_ratio = 2;
- *
- * @return The aspectRatio.
- */
- @java.lang.Override
- public double getAspectRatio() {
- return aspectRatio_;
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (type_
- != com.google.apps.card.v1.ImageCropStyle.ImageCropType.IMAGE_CROP_TYPE_UNSPECIFIED
- .getNumber()) {
- output.writeEnum(1, type_);
- }
- if (java.lang.Double.doubleToRawLongBits(aspectRatio_) != 0) {
- output.writeDouble(2, aspectRatio_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (type_
- != com.google.apps.card.v1.ImageCropStyle.ImageCropType.IMAGE_CROP_TYPE_UNSPECIFIED
- .getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_);
- }
- if (java.lang.Double.doubleToRawLongBits(aspectRatio_) != 0) {
- size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, aspectRatio_);
- }
- 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.ImageCropStyle)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.ImageCropStyle other = (com.google.apps.card.v1.ImageCropStyle) obj;
-
- if (type_ != other.type_) return false;
- if (java.lang.Double.doubleToLongBits(getAspectRatio())
- != java.lang.Double.doubleToLongBits(other.getAspectRatio())) return false;
- if (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + TYPE_FIELD_NUMBER;
- hash = (53 * hash) + type_;
- hash = (37 * hash) + ASPECT_RATIO_FIELD_NUMBER;
- hash =
- (53 * hash)
- + com.google.protobuf.Internal.hashLong(
- java.lang.Double.doubleToLongBits(getAspectRatio()));
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.ImageCropStyle parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.ImageCropStyle 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.ImageCropStyle parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.ImageCropStyle 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.ImageCropStyle parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.ImageCropStyle 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.ImageCropStyle parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.ImageCropStyle 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.ImageCropStyle parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.ImageCropStyle 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.ImageCropStyle 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.ImageCropStyle 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.ImageCropStyle 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 crop style applied to an image.
- *
- * [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:
- *
- * ```
- * cropStyle {
- * "type": "RECTANGLE_CUSTOM",
- * "aspectRatio": 16/9
- * }
- * ```
- *
- *
- * Protobuf type {@code google.apps.card.v1.ImageCropStyle}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.ImageCropStyle)
- com.google.apps.card.v1.ImageCropStyleOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ImageCropStyle_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_ImageCropStyle_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.ImageCropStyle.class,
- com.google.apps.card.v1.ImageCropStyle.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.ImageCropStyle.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- type_ = 0;
- aspectRatio_ = 0D;
- 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_ImageCropStyle_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.ImageCropStyle getDefaultInstanceForType() {
- return com.google.apps.card.v1.ImageCropStyle.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.ImageCropStyle build() {
- com.google.apps.card.v1.ImageCropStyle result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.ImageCropStyle buildPartial() {
- com.google.apps.card.v1.ImageCropStyle result =
- new com.google.apps.card.v1.ImageCropStyle(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.ImageCropStyle result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.type_ = type_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.aspectRatio_ = aspectRatio_;
- }
- }
-
- @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.ImageCropStyle) {
- return mergeFrom((com.google.apps.card.v1.ImageCropStyle) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.ImageCropStyle other) {
- if (other == com.google.apps.card.v1.ImageCropStyle.getDefaultInstance()) return this;
- if (other.type_ != 0) {
- setTypeValue(other.getTypeValue());
- }
- if (other.getAspectRatio() != 0D) {
- setAspectRatio(other.getAspectRatio());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8:
- {
- type_ = input.readEnum();
- bitField0_ |= 0x00000001;
- break;
- } // case 8
- case 17:
- {
- aspectRatio_ = input.readDouble();
- bitField0_ |= 0x00000002;
- break;
- } // case 17
- default:
- {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
-
- private int bitField0_;
-
- private int type_ = 0;
- /**
- *
- *
- *
- * The crop type.
- *
- *
- * .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
- *
- * @return The enum numeric value on the wire for type.
- */
- @java.lang.Override
- public int getTypeValue() {
- return type_;
- }
- /**
- *
- *
- *
- * The crop type.
- *
- *
- * .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
- *
- * @param value The enum numeric value on the wire for type to set.
- * @return This builder for chaining.
- */
- public Builder setTypeValue(int value) {
- type_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The crop type.
- *
- *
- * .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
- *
- * @return The type.
- */
- @java.lang.Override
- public com.google.apps.card.v1.ImageCropStyle.ImageCropType getType() {
- com.google.apps.card.v1.ImageCropStyle.ImageCropType result =
- com.google.apps.card.v1.ImageCropStyle.ImageCropType.forNumber(type_);
- return result == null
- ? com.google.apps.card.v1.ImageCropStyle.ImageCropType.UNRECOGNIZED
- : result;
- }
- /**
- *
- *
- *
- * The crop type.
- *
- *
- * .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
- *
- * @param value The type to set.
- * @return This builder for chaining.
- */
- public Builder setType(com.google.apps.card.v1.ImageCropStyle.ImageCropType value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- type_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The crop type.
- *
- *
- * .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearType() {
- bitField0_ = (bitField0_ & ~0x00000001);
- type_ = 0;
- onChanged();
- return this;
- }
-
- private double aspectRatio_;
- /**
- *
- *
- *
- * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`.
- *
- * For example, here's how to apply a 16:9 aspect ratio:
- *
- * ```
- * cropStyle {
- * "type": "RECTANGLE_CUSTOM",
- * "aspectRatio": 16/9
- * }
- * ```
- *
- *
- * double aspect_ratio = 2;
- *
- * @return The aspectRatio.
- */
- @java.lang.Override
- public double getAspectRatio() {
- return aspectRatio_;
- }
- /**
- *
- *
- *
- * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`.
- *
- * For example, here's how to apply a 16:9 aspect ratio:
- *
- * ```
- * cropStyle {
- * "type": "RECTANGLE_CUSTOM",
- * "aspectRatio": 16/9
- * }
- * ```
- *
- *
- * double aspect_ratio = 2;
- *
- * @param value The aspectRatio to set.
- * @return This builder for chaining.
- */
- public Builder setAspectRatio(double value) {
-
- aspectRatio_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`.
- *
- * For example, here's how to apply a 16:9 aspect ratio:
- *
- * ```
- * cropStyle {
- * "type": "RECTANGLE_CUSTOM",
- * "aspectRatio": 16/9
- * }
- * ```
- *
- *
- * double aspect_ratio = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearAspectRatio() {
- bitField0_ = (bitField0_ & ~0x00000002);
- aspectRatio_ = 0D;
- 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.ImageCropStyle)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.ImageCropStyle)
- private static final com.google.apps.card.v1.ImageCropStyle DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.ImageCropStyle();
- }
-
- public static com.google.apps.card.v1.ImageCropStyle getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public ImageCropStyle 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.ImageCropStyle getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageCropStyleOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageCropStyleOrBuilder.java
deleted file mode 100644
index 702238e09571..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageCropStyleOrBuilder.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface ImageCropStyleOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.ImageCropStyle)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The crop type.
- *
- *
- * .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
- *
- * @return The enum numeric value on the wire for type.
- */
- int getTypeValue();
- /**
- *
- *
- *
- * The crop type.
- *
- *
- * .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
- *
- * @return The type.
- */
- com.google.apps.card.v1.ImageCropStyle.ImageCropType getType();
-
- /**
- *
- *
- *
- * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`.
- *
- * For example, here's how to apply a 16:9 aspect ratio:
- *
- * ```
- * cropStyle {
- * "type": "RECTANGLE_CUSTOM",
- * "aspectRatio": 16/9
- * }
- * ```
- *
- *
- * double aspect_ratio = 2;
- *
- * @return The aspectRatio.
- */
- double getAspectRatio();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageOrBuilder.java
deleted file mode 100644
index 508ea4fddba5..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/ImageOrBuilder.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface ImageOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Image)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The HTTPS URL that hosts the image.
- *
- * For example:
- *
- * ```
- * https://developers.google.com/chat/images/quickstart-app-avatar.png
- * ```
- *
- *
- * string image_url = 1;
- *
- * @return The imageUrl.
- */
- java.lang.String getImageUrl();
- /**
- *
- *
- *
- * The HTTPS URL that hosts the image.
- *
- * For example:
- *
- * ```
- * https://developers.google.com/chat/images/quickstart-app-avatar.png
- * ```
- *
- *
- * string image_url = 1;
- *
- * @return The bytes for imageUrl.
- */
- com.google.protobuf.ByteString getImageUrlBytes();
-
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @return Whether the onClick field is set.
- */
- boolean hasOnClick();
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- *
- * @return The onClick.
- */
- com.google.apps.card.v1.OnClick getOnClick();
- /**
- *
- *
- *
- * When a user clicks the image, the click triggers this action.
- *
- *
- * .google.apps.card.v1.OnClick on_click = 2;
- */
- com.google.apps.card.v1.OnClickOrBuilder getOnClickOrBuilder();
-
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string alt_text = 3;
- *
- * @return The altText.
- */
- java.lang.String getAltText();
- /**
- *
- *
- *
- * The alternative text of this image that's used for accessibility.
- *
- *
- * string alt_text = 3;
- *
- * @return The bytes for altText.
- */
- com.google.protobuf.ByteString getAltTextBytes();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OnClick.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OnClick.java
deleted file mode 100644
index e57862b45d21..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OnClick.java
+++ /dev/null
@@ -1,1793 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * Represents how to respond when users click an interactive element on
- * a card, such as a button.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.OnClick}
- */
-public final class OnClick extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.OnClick)
- OnClickOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use OnClick.newBuilder() to construct.
- private OnClick(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private OnClick() {}
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new OnClick();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto.internal_static_google_apps_card_v1_OnClick_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_OnClick_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.OnClick.class, com.google.apps.card.v1.OnClick.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 {
- ACTION(1),
- OPEN_LINK(2),
- OPEN_DYNAMIC_LINK_ACTION(3),
- CARD(4),
- 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 ACTION;
- case 2:
- return OPEN_LINK;
- case 3:
- return OPEN_DYNAMIC_LINK_ACTION;
- case 4:
- return CARD;
- 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 ACTION_FIELD_NUMBER = 1;
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- *
- * @return Whether the action field is set.
- */
- @java.lang.Override
- public boolean hasAction() {
- return dataCase_ == 1;
- }
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- *
- * @return The action.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Action getAction() {
- if (dataCase_ == 1) {
- return (com.google.apps.card.v1.Action) data_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ActionOrBuilder getActionOrBuilder() {
- if (dataCase_ == 1) {
- return (com.google.apps.card.v1.Action) data_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
-
- public static final int OPEN_LINK_FIELD_NUMBER = 2;
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- *
- * @return Whether the openLink field is set.
- */
- @java.lang.Override
- public boolean hasOpenLink() {
- return dataCase_ == 2;
- }
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- *
- * @return The openLink.
- */
- @java.lang.Override
- public com.google.apps.card.v1.OpenLink getOpenLink() {
- if (dataCase_ == 2) {
- return (com.google.apps.card.v1.OpenLink) data_;
- }
- return com.google.apps.card.v1.OpenLink.getDefaultInstance();
- }
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.OpenLinkOrBuilder getOpenLinkOrBuilder() {
- if (dataCase_ == 2) {
- return (com.google.apps.card.v1.OpenLink) data_;
- }
- return com.google.apps.card.v1.OpenLink.getDefaultInstance();
- }
-
- public static final int OPEN_DYNAMIC_LINK_ACTION_FIELD_NUMBER = 3;
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- *
- * @return Whether the openDynamicLinkAction field is set.
- */
- @java.lang.Override
- public boolean hasOpenDynamicLinkAction() {
- return dataCase_ == 3;
- }
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- *
- * @return The openDynamicLinkAction.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Action getOpenDynamicLinkAction() {
- if (dataCase_ == 3) {
- return (com.google.apps.card.v1.Action) data_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ActionOrBuilder getOpenDynamicLinkActionOrBuilder() {
- if (dataCase_ == 3) {
- return (com.google.apps.card.v1.Action) data_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
-
- public static final int CARD_FIELD_NUMBER = 4;
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- *
- * @return Whether the card field is set.
- */
- @java.lang.Override
- public boolean hasCard() {
- return dataCase_ == 4;
- }
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- *
- * @return The card.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card getCard() {
- if (dataCase_ == 4) {
- return (com.google.apps.card.v1.Card) data_;
- }
- return com.google.apps.card.v1.Card.getDefaultInstance();
- }
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- */
- @java.lang.Override
- public com.google.apps.card.v1.CardOrBuilder getCardOrBuilder() {
- if (dataCase_ == 4) {
- return (com.google.apps.card.v1.Card) data_;
- }
- return com.google.apps.card.v1.Card.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.Action) data_);
- }
- if (dataCase_ == 2) {
- output.writeMessage(2, (com.google.apps.card.v1.OpenLink) data_);
- }
- if (dataCase_ == 3) {
- output.writeMessage(3, (com.google.apps.card.v1.Action) data_);
- }
- if (dataCase_ == 4) {
- output.writeMessage(4, (com.google.apps.card.v1.Card) 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.Action) data_);
- }
- if (dataCase_ == 2) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 2, (com.google.apps.card.v1.OpenLink) data_);
- }
- if (dataCase_ == 3) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 3, (com.google.apps.card.v1.Action) data_);
- }
- if (dataCase_ == 4) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 4, (com.google.apps.card.v1.Card) 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.OnClick)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.OnClick other = (com.google.apps.card.v1.OnClick) obj;
-
- if (!getDataCase().equals(other.getDataCase())) return false;
- switch (dataCase_) {
- case 1:
- if (!getAction().equals(other.getAction())) return false;
- break;
- case 2:
- if (!getOpenLink().equals(other.getOpenLink())) return false;
- break;
- case 3:
- if (!getOpenDynamicLinkAction().equals(other.getOpenDynamicLinkAction())) return false;
- break;
- case 4:
- if (!getCard().equals(other.getCard())) 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) + ACTION_FIELD_NUMBER;
- hash = (53 * hash) + getAction().hashCode();
- break;
- case 2:
- hash = (37 * hash) + OPEN_LINK_FIELD_NUMBER;
- hash = (53 * hash) + getOpenLink().hashCode();
- break;
- case 3:
- hash = (37 * hash) + OPEN_DYNAMIC_LINK_ACTION_FIELD_NUMBER;
- hash = (53 * hash) + getOpenDynamicLinkAction().hashCode();
- break;
- case 4:
- hash = (37 * hash) + CARD_FIELD_NUMBER;
- hash = (53 * hash) + getCard().hashCode();
- break;
- case 0:
- default:
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.OnClick parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.OnClick 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.OnClick parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.OnClick 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.OnClick parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.OnClick 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.OnClick parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.OnClick 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.OnClick parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.OnClick 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.OnClick 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.OnClick 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.OnClick 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 how to respond when users click an interactive element on
- * a card, such as a button.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.OnClick}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.OnClick)
- com.google.apps.card.v1.OnClickOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_OnClick_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_OnClick_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.OnClick.class, com.google.apps.card.v1.OnClick.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.OnClick.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- if (actionBuilder_ != null) {
- actionBuilder_.clear();
- }
- if (openLinkBuilder_ != null) {
- openLinkBuilder_.clear();
- }
- if (openDynamicLinkActionBuilder_ != null) {
- openDynamicLinkActionBuilder_.clear();
- }
- if (cardBuilder_ != null) {
- cardBuilder_.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_OnClick_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.OnClick getDefaultInstanceForType() {
- return com.google.apps.card.v1.OnClick.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.OnClick build() {
- com.google.apps.card.v1.OnClick result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.OnClick buildPartial() {
- com.google.apps.card.v1.OnClick result = new com.google.apps.card.v1.OnClick(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- buildPartialOneofs(result);
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.OnClick result) {
- int from_bitField0_ = bitField0_;
- }
-
- private void buildPartialOneofs(com.google.apps.card.v1.OnClick result) {
- result.dataCase_ = dataCase_;
- result.data_ = this.data_;
- if (dataCase_ == 1 && actionBuilder_ != null) {
- result.data_ = actionBuilder_.build();
- }
- if (dataCase_ == 2 && openLinkBuilder_ != null) {
- result.data_ = openLinkBuilder_.build();
- }
- if (dataCase_ == 3 && openDynamicLinkActionBuilder_ != null) {
- result.data_ = openDynamicLinkActionBuilder_.build();
- }
- if (dataCase_ == 4 && cardBuilder_ != null) {
- result.data_ = cardBuilder_.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.OnClick) {
- return mergeFrom((com.google.apps.card.v1.OnClick) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.OnClick other) {
- if (other == com.google.apps.card.v1.OnClick.getDefaultInstance()) return this;
- switch (other.getDataCase()) {
- case ACTION:
- {
- mergeAction(other.getAction());
- break;
- }
- case OPEN_LINK:
- {
- mergeOpenLink(other.getOpenLink());
- break;
- }
- case OPEN_DYNAMIC_LINK_ACTION:
- {
- mergeOpenDynamicLinkAction(other.getOpenDynamicLinkAction());
- break;
- }
- case CARD:
- {
- mergeCard(other.getCard());
- 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(getActionFieldBuilder().getBuilder(), extensionRegistry);
- dataCase_ = 1;
- break;
- } // case 10
- case 18:
- {
- input.readMessage(getOpenLinkFieldBuilder().getBuilder(), extensionRegistry);
- dataCase_ = 2;
- break;
- } // case 18
- case 26:
- {
- input.readMessage(
- getOpenDynamicLinkActionFieldBuilder().getBuilder(), extensionRegistry);
- dataCase_ = 3;
- break;
- } // case 26
- case 34:
- {
- input.readMessage(getCardFieldBuilder().getBuilder(), extensionRegistry);
- dataCase_ = 4;
- 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 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.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- actionBuilder_;
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- *
- * @return Whether the action field is set.
- */
- @java.lang.Override
- public boolean hasAction() {
- return dataCase_ == 1;
- }
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- *
- * @return The action.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Action getAction() {
- if (actionBuilder_ == null) {
- if (dataCase_ == 1) {
- return (com.google.apps.card.v1.Action) data_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- } else {
- if (dataCase_ == 1) {
- return actionBuilder_.getMessage();
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- */
- public Builder setAction(com.google.apps.card.v1.Action value) {
- if (actionBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- data_ = value;
- onChanged();
- } else {
- actionBuilder_.setMessage(value);
- }
- dataCase_ = 1;
- return this;
- }
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- */
- public Builder setAction(com.google.apps.card.v1.Action.Builder builderForValue) {
- if (actionBuilder_ == null) {
- data_ = builderForValue.build();
- onChanged();
- } else {
- actionBuilder_.setMessage(builderForValue.build());
- }
- dataCase_ = 1;
- return this;
- }
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- */
- public Builder mergeAction(com.google.apps.card.v1.Action value) {
- if (actionBuilder_ == null) {
- if (dataCase_ == 1 && data_ != com.google.apps.card.v1.Action.getDefaultInstance()) {
- data_ =
- com.google.apps.card.v1.Action.newBuilder((com.google.apps.card.v1.Action) data_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- data_ = value;
- }
- onChanged();
- } else {
- if (dataCase_ == 1) {
- actionBuilder_.mergeFrom(value);
- } else {
- actionBuilder_.setMessage(value);
- }
- }
- dataCase_ = 1;
- return this;
- }
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- */
- public Builder clearAction() {
- if (actionBuilder_ == null) {
- if (dataCase_ == 1) {
- dataCase_ = 0;
- data_ = null;
- onChanged();
- }
- } else {
- if (dataCase_ == 1) {
- dataCase_ = 0;
- data_ = null;
- }
- actionBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- */
- public com.google.apps.card.v1.Action.Builder getActionBuilder() {
- return getActionFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ActionOrBuilder getActionOrBuilder() {
- if ((dataCase_ == 1) && (actionBuilder_ != null)) {
- return actionBuilder_.getMessageOrBuilder();
- } else {
- if (dataCase_ == 1) {
- return (com.google.apps.card.v1.Action) data_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- getActionFieldBuilder() {
- if (actionBuilder_ == null) {
- if (!(dataCase_ == 1)) {
- data_ = com.google.apps.card.v1.Action.getDefaultInstance();
- }
- actionBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>(
- (com.google.apps.card.v1.Action) data_, getParentForChildren(), isClean());
- data_ = null;
- }
- dataCase_ = 1;
- onChanged();
- return actionBuilder_;
- }
-
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.OpenLink,
- com.google.apps.card.v1.OpenLink.Builder,
- com.google.apps.card.v1.OpenLinkOrBuilder>
- openLinkBuilder_;
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- *
- * @return Whether the openLink field is set.
- */
- @java.lang.Override
- public boolean hasOpenLink() {
- return dataCase_ == 2;
- }
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- *
- * @return The openLink.
- */
- @java.lang.Override
- public com.google.apps.card.v1.OpenLink getOpenLink() {
- if (openLinkBuilder_ == null) {
- if (dataCase_ == 2) {
- return (com.google.apps.card.v1.OpenLink) data_;
- }
- return com.google.apps.card.v1.OpenLink.getDefaultInstance();
- } else {
- if (dataCase_ == 2) {
- return openLinkBuilder_.getMessage();
- }
- return com.google.apps.card.v1.OpenLink.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- */
- public Builder setOpenLink(com.google.apps.card.v1.OpenLink value) {
- if (openLinkBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- data_ = value;
- onChanged();
- } else {
- openLinkBuilder_.setMessage(value);
- }
- dataCase_ = 2;
- return this;
- }
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- */
- public Builder setOpenLink(com.google.apps.card.v1.OpenLink.Builder builderForValue) {
- if (openLinkBuilder_ == null) {
- data_ = builderForValue.build();
- onChanged();
- } else {
- openLinkBuilder_.setMessage(builderForValue.build());
- }
- dataCase_ = 2;
- return this;
- }
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- */
- public Builder mergeOpenLink(com.google.apps.card.v1.OpenLink value) {
- if (openLinkBuilder_ == null) {
- if (dataCase_ == 2 && data_ != com.google.apps.card.v1.OpenLink.getDefaultInstance()) {
- data_ =
- com.google.apps.card.v1.OpenLink.newBuilder((com.google.apps.card.v1.OpenLink) data_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- data_ = value;
- }
- onChanged();
- } else {
- if (dataCase_ == 2) {
- openLinkBuilder_.mergeFrom(value);
- } else {
- openLinkBuilder_.setMessage(value);
- }
- }
- dataCase_ = 2;
- return this;
- }
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- */
- public Builder clearOpenLink() {
- if (openLinkBuilder_ == null) {
- if (dataCase_ == 2) {
- dataCase_ = 0;
- data_ = null;
- onChanged();
- }
- } else {
- if (dataCase_ == 2) {
- dataCase_ = 0;
- data_ = null;
- }
- openLinkBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- */
- public com.google.apps.card.v1.OpenLink.Builder getOpenLinkBuilder() {
- return getOpenLinkFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- */
- @java.lang.Override
- public com.google.apps.card.v1.OpenLinkOrBuilder getOpenLinkOrBuilder() {
- if ((dataCase_ == 2) && (openLinkBuilder_ != null)) {
- return openLinkBuilder_.getMessageOrBuilder();
- } else {
- if (dataCase_ == 2) {
- return (com.google.apps.card.v1.OpenLink) data_;
- }
- return com.google.apps.card.v1.OpenLink.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.OpenLink,
- com.google.apps.card.v1.OpenLink.Builder,
- com.google.apps.card.v1.OpenLinkOrBuilder>
- getOpenLinkFieldBuilder() {
- if (openLinkBuilder_ == null) {
- if (!(dataCase_ == 2)) {
- data_ = com.google.apps.card.v1.OpenLink.getDefaultInstance();
- }
- openLinkBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.OpenLink,
- com.google.apps.card.v1.OpenLink.Builder,
- com.google.apps.card.v1.OpenLinkOrBuilder>(
- (com.google.apps.card.v1.OpenLink) data_, getParentForChildren(), isClean());
- data_ = null;
- }
- dataCase_ = 2;
- onChanged();
- return openLinkBuilder_;
- }
-
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- openDynamicLinkActionBuilder_;
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- *
- * @return Whether the openDynamicLinkAction field is set.
- */
- @java.lang.Override
- public boolean hasOpenDynamicLinkAction() {
- return dataCase_ == 3;
- }
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- *
- * @return The openDynamicLinkAction.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Action getOpenDynamicLinkAction() {
- if (openDynamicLinkActionBuilder_ == null) {
- if (dataCase_ == 3) {
- return (com.google.apps.card.v1.Action) data_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- } else {
- if (dataCase_ == 3) {
- return openDynamicLinkActionBuilder_.getMessage();
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- */
- public Builder setOpenDynamicLinkAction(com.google.apps.card.v1.Action value) {
- if (openDynamicLinkActionBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- data_ = value;
- onChanged();
- } else {
- openDynamicLinkActionBuilder_.setMessage(value);
- }
- dataCase_ = 3;
- return this;
- }
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- */
- public Builder setOpenDynamicLinkAction(
- com.google.apps.card.v1.Action.Builder builderForValue) {
- if (openDynamicLinkActionBuilder_ == null) {
- data_ = builderForValue.build();
- onChanged();
- } else {
- openDynamicLinkActionBuilder_.setMessage(builderForValue.build());
- }
- dataCase_ = 3;
- return this;
- }
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- */
- public Builder mergeOpenDynamicLinkAction(com.google.apps.card.v1.Action value) {
- if (openDynamicLinkActionBuilder_ == null) {
- if (dataCase_ == 3 && data_ != com.google.apps.card.v1.Action.getDefaultInstance()) {
- data_ =
- com.google.apps.card.v1.Action.newBuilder((com.google.apps.card.v1.Action) data_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- data_ = value;
- }
- onChanged();
- } else {
- if (dataCase_ == 3) {
- openDynamicLinkActionBuilder_.mergeFrom(value);
- } else {
- openDynamicLinkActionBuilder_.setMessage(value);
- }
- }
- dataCase_ = 3;
- return this;
- }
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- */
- public Builder clearOpenDynamicLinkAction() {
- if (openDynamicLinkActionBuilder_ == null) {
- if (dataCase_ == 3) {
- dataCase_ = 0;
- data_ = null;
- onChanged();
- }
- } else {
- if (dataCase_ == 3) {
- dataCase_ = 0;
- data_ = null;
- }
- openDynamicLinkActionBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- */
- public com.google.apps.card.v1.Action.Builder getOpenDynamicLinkActionBuilder() {
- return getOpenDynamicLinkActionFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ActionOrBuilder getOpenDynamicLinkActionOrBuilder() {
- if ((dataCase_ == 3) && (openDynamicLinkActionBuilder_ != null)) {
- return openDynamicLinkActionBuilder_.getMessageOrBuilder();
- } else {
- if (dataCase_ == 3) {
- return (com.google.apps.card.v1.Action) data_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- getOpenDynamicLinkActionFieldBuilder() {
- if (openDynamicLinkActionBuilder_ == null) {
- if (!(dataCase_ == 3)) {
- data_ = com.google.apps.card.v1.Action.getDefaultInstance();
- }
- openDynamicLinkActionBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>(
- (com.google.apps.card.v1.Action) data_, getParentForChildren(), isClean());
- data_ = null;
- }
- dataCase_ = 3;
- onChanged();
- return openDynamicLinkActionBuilder_;
- }
-
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card,
- com.google.apps.card.v1.Card.Builder,
- com.google.apps.card.v1.CardOrBuilder>
- cardBuilder_;
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- *
- * @return Whether the card field is set.
- */
- @java.lang.Override
- public boolean hasCard() {
- return dataCase_ == 4;
- }
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- *
- * @return The card.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Card getCard() {
- if (cardBuilder_ == null) {
- if (dataCase_ == 4) {
- return (com.google.apps.card.v1.Card) data_;
- }
- return com.google.apps.card.v1.Card.getDefaultInstance();
- } else {
- if (dataCase_ == 4) {
- return cardBuilder_.getMessage();
- }
- return com.google.apps.card.v1.Card.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- */
- public Builder setCard(com.google.apps.card.v1.Card value) {
- if (cardBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- data_ = value;
- onChanged();
- } else {
- cardBuilder_.setMessage(value);
- }
- dataCase_ = 4;
- return this;
- }
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- */
- public Builder setCard(com.google.apps.card.v1.Card.Builder builderForValue) {
- if (cardBuilder_ == null) {
- data_ = builderForValue.build();
- onChanged();
- } else {
- cardBuilder_.setMessage(builderForValue.build());
- }
- dataCase_ = 4;
- return this;
- }
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- */
- public Builder mergeCard(com.google.apps.card.v1.Card value) {
- if (cardBuilder_ == null) {
- if (dataCase_ == 4 && data_ != com.google.apps.card.v1.Card.getDefaultInstance()) {
- data_ =
- com.google.apps.card.v1.Card.newBuilder((com.google.apps.card.v1.Card) data_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- data_ = value;
- }
- onChanged();
- } else {
- if (dataCase_ == 4) {
- cardBuilder_.mergeFrom(value);
- } else {
- cardBuilder_.setMessage(value);
- }
- }
- dataCase_ = 4;
- return this;
- }
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- */
- public Builder clearCard() {
- if (cardBuilder_ == null) {
- if (dataCase_ == 4) {
- dataCase_ = 0;
- data_ = null;
- onChanged();
- }
- } else {
- if (dataCase_ == 4) {
- dataCase_ = 0;
- data_ = null;
- }
- cardBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- */
- public com.google.apps.card.v1.Card.Builder getCardBuilder() {
- return getCardFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- */
- @java.lang.Override
- public com.google.apps.card.v1.CardOrBuilder getCardOrBuilder() {
- if ((dataCase_ == 4) && (cardBuilder_ != null)) {
- return cardBuilder_.getMessageOrBuilder();
- } else {
- if (dataCase_ == 4) {
- return (com.google.apps.card.v1.Card) data_;
- }
- return com.google.apps.card.v1.Card.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * A new card is pushed to the card stack after clicking if specified.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card,
- com.google.apps.card.v1.Card.Builder,
- com.google.apps.card.v1.CardOrBuilder>
- getCardFieldBuilder() {
- if (cardBuilder_ == null) {
- if (!(dataCase_ == 4)) {
- data_ = com.google.apps.card.v1.Card.getDefaultInstance();
- }
- cardBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Card,
- com.google.apps.card.v1.Card.Builder,
- com.google.apps.card.v1.CardOrBuilder>(
- (com.google.apps.card.v1.Card) data_, getParentForChildren(), isClean());
- data_ = null;
- }
- dataCase_ = 4;
- onChanged();
- return cardBuilder_;
- }
-
- @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.OnClick)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.OnClick)
- private static final com.google.apps.card.v1.OnClick DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.OnClick();
- }
-
- public static com.google.apps.card.v1.OnClick getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public OnClick 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.OnClick getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OnClickOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OnClickOrBuilder.java
deleted file mode 100644
index fc13bf762a43..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OnClickOrBuilder.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface OnClickOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.OnClick)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- *
- * @return Whether the action field is set.
- */
- boolean hasAction();
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- *
- * @return The action.
- */
- com.google.apps.card.v1.Action getAction();
- /**
- *
- *
- *
- * If specified, an action is triggered by this `onClick`.
- *
- *
- * .google.apps.card.v1.Action action = 1;
- */
- com.google.apps.card.v1.ActionOrBuilder getActionOrBuilder();
-
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- *
- * @return Whether the openLink field is set.
- */
- boolean hasOpenLink();
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- *
- * @return The openLink.
- */
- com.google.apps.card.v1.OpenLink getOpenLink();
- /**
- *
- *
- *
- * If specified, this `onClick` triggers an open link action.
- *
- *
- * .google.apps.card.v1.OpenLink open_link = 2;
- */
- com.google.apps.card.v1.OpenLinkOrBuilder getOpenLinkOrBuilder();
-
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- *
- * @return Whether the openDynamicLinkAction field is set.
- */
- boolean hasOpenDynamicLinkAction();
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- *
- * @return The openDynamicLinkAction.
- */
- com.google.apps.card.v1.Action getOpenDynamicLinkAction();
- /**
- *
- *
- *
- * An add-on triggers this action when the action needs to open a
- * link. This differs from the `open_link` above in that this needs to talk
- * to server to get the link. Thus some preparation work is required for
- * web client to do before the open link action response comes back.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.Action open_dynamic_link_action = 3;
- */
- 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):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- *
- * @return Whether the card field is set.
- */
- 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):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- *
- * @return The card.
- */
- 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):
- *
- *
- * .google.apps.card.v1.Card card = 4;
- */
- com.google.apps.card.v1.CardOrBuilder getCardOrBuilder();
-
- com.google.apps.card.v1.OnClick.DataCase getDataCase();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OpenLink.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OpenLink.java
deleted file mode 100644
index ba80b7c7a1d6..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OpenLink.java
+++ /dev/null
@@ -1,1269 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * Represents an `onClick` event that opens a hyperlink.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.OpenLink}
- */
-public final class OpenLink extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.OpenLink)
- OpenLinkOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use OpenLink.newBuilder() to construct.
- private OpenLink(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private OpenLink() {
- url_ = "";
- openAs_ = 0;
- onClose_ = 0;
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new OpenLink();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_OpenLink_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_OpenLink_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.OpenLink.class, com.google.apps.card.v1.OpenLink.Builder.class);
- }
-
- /**
- *
- *
- *
- * When an `OnClick` action opens a link, then the client can either open it
- * as a full-size window (if that's the frame used by the client), or an
- * overlay (such as a pop-up). The implementation depends on the client
- * platform capabilities, and the value selected might be ignored if the
- * client doesn't support it. `FULL_SIZE` is supported by all clients.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.OpenLink.OpenAs}
- */
- public enum OpenAs implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * The link opens as a full-size window (if that's the frame used by the
- * client).
- *
- *
- * FULL_SIZE = 0;
- */
- FULL_SIZE(0),
- /**
- *
- *
- *
- * The link opens as an overlay, such as a pop-up.
- *
- *
- * OVERLAY = 1;
- */
- OVERLAY(1),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * The link opens as a full-size window (if that's the frame used by the
- * client).
- *
- *
- * FULL_SIZE = 0;
- */
- public static final int FULL_SIZE_VALUE = 0;
- /**
- *
- *
- *
- * The link opens as an overlay, such as a pop-up.
- *
- *
- * OVERLAY = 1;
- */
- public static final int OVERLAY_VALUE = 1;
-
- public final int getNumber() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalArgumentException(
- "Can't get the number of an unknown enum value.");
- }
- return value;
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static OpenAs 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 OpenAs forNumber(int value) {
- switch (value) {
- case 0:
- return FULL_SIZE;
- case 1:
- return OVERLAY;
- 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 OpenAs findValueByNumber(int number) {
- return OpenAs.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.OpenLink.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final OpenAs[] VALUES = values();
-
- public static OpenAs 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 OpenAs(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.apps.card.v1.OpenLink.OpenAs)
- }
-
- /**
- *
- *
- *
- * What the client does when a link opened by an `OnClick` action is closed.
- *
- * Implementation depends on client platform capabilities. For example, a web
- * browser might open a link in a pop-up window with an `OnClose` handler.
- *
- * If both `OnOpen` and `OnClose` handlers are set, and the client platform
- * can't support both values, `OnClose` takes precedence.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.OpenLink.OnClose}
- */
- public enum OnClose implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * Default value. The card doesn't reload; nothing happens.
- *
- *
- * NOTHING = 0;
- */
- NOTHING(0),
- /**
- *
- *
- *
- * Reloads the card after the child window closes.
- *
- * If used in conjunction with
- * [`OpenAs.OVERLAY`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#openas),
- * the child window acts as a modal dialog and the parent card is blocked
- * until the child window closes.
- *
- *
- * RELOAD = 1;
- */
- RELOAD(1),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * Default value. The card doesn't reload; nothing happens.
- *
- *
- * NOTHING = 0;
- */
- public static final int NOTHING_VALUE = 0;
- /**
- *
- *
- *
- * Reloads the card after the child window closes.
- *
- * If used in conjunction with
- * [`OpenAs.OVERLAY`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#openas),
- * the child window acts as a modal dialog and the parent card is blocked
- * until the child window closes.
- *
- *
- * RELOAD = 1;
- */
- public static final int RELOAD_VALUE = 1;
-
- public final int getNumber() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalArgumentException(
- "Can't get the number of an unknown enum value.");
- }
- return value;
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static OnClose 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 OnClose forNumber(int value) {
- switch (value) {
- case 0:
- return NOTHING;
- case 1:
- return RELOAD;
- 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 OnClose findValueByNumber(int number) {
- return OnClose.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.OpenLink.getDescriptor().getEnumTypes().get(1);
- }
-
- private static final OnClose[] VALUES = values();
-
- public static OnClose 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 OnClose(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.apps.card.v1.OpenLink.OnClose)
- }
-
- public static final int URL_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object url_ = "";
- /**
- *
- *
- *
- * The URL to open.
- *
- *
- * string url = 1;
- *
- * @return The url.
- */
- @java.lang.Override
- public java.lang.String getUrl() {
- java.lang.Object ref = url_;
- 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();
- url_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The URL to open.
- *
- *
- * string url = 1;
- *
- * @return The bytes for url.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getUrlBytes() {
- java.lang.Object ref = url_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- url_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int OPEN_AS_FIELD_NUMBER = 2;
- private int openAs_ = 0;
- /**
- *
- *
- *
- * How to open a link.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.OpenLink.OpenAs open_as = 2;
- *
- * @return The enum numeric value on the wire for openAs.
- */
- @java.lang.Override
- public int getOpenAsValue() {
- return openAs_;
- }
- /**
- *
- *
- *
- * How to open a link.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.OpenLink.OpenAs open_as = 2;
- *
- * @return The openAs.
- */
- @java.lang.Override
- public com.google.apps.card.v1.OpenLink.OpenAs getOpenAs() {
- com.google.apps.card.v1.OpenLink.OpenAs result =
- com.google.apps.card.v1.OpenLink.OpenAs.forNumber(openAs_);
- return result == null ? com.google.apps.card.v1.OpenLink.OpenAs.UNRECOGNIZED : result;
- }
-
- public static final int ON_CLOSE_FIELD_NUMBER = 3;
- private int onClose_ = 0;
- /**
- *
- *
- *
- * 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):
- *
- *
- * .google.apps.card.v1.OpenLink.OnClose on_close = 3;
- *
- * @return The enum numeric value on the wire for onClose.
- */
- @java.lang.Override
- public int getOnCloseValue() {
- return onClose_;
- }
- /**
- *
- *
- *
- * 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):
- *
- *
- * .google.apps.card.v1.OpenLink.OnClose on_close = 3;
- *
- * @return The onClose.
- */
- @java.lang.Override
- public com.google.apps.card.v1.OpenLink.OnClose getOnClose() {
- com.google.apps.card.v1.OpenLink.OnClose result =
- com.google.apps.card.v1.OpenLink.OnClose.forNumber(onClose_);
- return result == null ? com.google.apps.card.v1.OpenLink.OnClose.UNRECOGNIZED : result;
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_);
- }
- if (openAs_ != com.google.apps.card.v1.OpenLink.OpenAs.FULL_SIZE.getNumber()) {
- output.writeEnum(2, openAs_);
- }
- if (onClose_ != com.google.apps.card.v1.OpenLink.OnClose.NOTHING.getNumber()) {
- output.writeEnum(3, onClose_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_);
- }
- if (openAs_ != com.google.apps.card.v1.OpenLink.OpenAs.FULL_SIZE.getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, openAs_);
- }
- if (onClose_ != com.google.apps.card.v1.OpenLink.OnClose.NOTHING.getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, onClose_);
- }
- 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.OpenLink)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.OpenLink other = (com.google.apps.card.v1.OpenLink) obj;
-
- if (!getUrl().equals(other.getUrl())) return false;
- if (openAs_ != other.openAs_) return false;
- if (onClose_ != other.onClose_) 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) + URL_FIELD_NUMBER;
- hash = (53 * hash) + getUrl().hashCode();
- hash = (37 * hash) + OPEN_AS_FIELD_NUMBER;
- hash = (53 * hash) + openAs_;
- hash = (37 * hash) + ON_CLOSE_FIELD_NUMBER;
- hash = (53 * hash) + onClose_;
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.OpenLink parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.OpenLink 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.OpenLink parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.OpenLink 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.OpenLink parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.OpenLink 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.OpenLink parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.OpenLink 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.OpenLink parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.OpenLink 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.OpenLink 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.OpenLink 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.OpenLink 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 an `onClick` event that opens a hyperlink.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.OpenLink}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.OpenLink)
- com.google.apps.card.v1.OpenLinkOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_OpenLink_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_OpenLink_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.OpenLink.class,
- com.google.apps.card.v1.OpenLink.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.OpenLink.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- url_ = "";
- openAs_ = 0;
- onClose_ = 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_OpenLink_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.OpenLink getDefaultInstanceForType() {
- return com.google.apps.card.v1.OpenLink.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.OpenLink build() {
- com.google.apps.card.v1.OpenLink result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.OpenLink buildPartial() {
- com.google.apps.card.v1.OpenLink result = new com.google.apps.card.v1.OpenLink(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.OpenLink result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.url_ = url_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.openAs_ = openAs_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.onClose_ = onClose_;
- }
- }
-
- @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.OpenLink) {
- return mergeFrom((com.google.apps.card.v1.OpenLink) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.OpenLink other) {
- if (other == com.google.apps.card.v1.OpenLink.getDefaultInstance()) return this;
- if (!other.getUrl().isEmpty()) {
- url_ = other.url_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (other.openAs_ != 0) {
- setOpenAsValue(other.getOpenAsValue());
- }
- if (other.onClose_ != 0) {
- setOnCloseValue(other.getOnCloseValue());
- }
- 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:
- {
- url_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 16:
- {
- openAs_ = input.readEnum();
- bitField0_ |= 0x00000002;
- break;
- } // case 16
- case 24:
- {
- onClose_ = input.readEnum();
- bitField0_ |= 0x00000004;
- break;
- } // case 24
- default:
- {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object url_ = "";
- /**
- *
- *
- *
- * The URL to open.
- *
- *
- * string url = 1;
- *
- * @return The url.
- */
- public java.lang.String getUrl() {
- java.lang.Object ref = url_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- url_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The URL to open.
- *
- *
- * string url = 1;
- *
- * @return The bytes for url.
- */
- public com.google.protobuf.ByteString getUrlBytes() {
- java.lang.Object ref = url_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- url_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The URL to open.
- *
- *
- * string url = 1;
- *
- * @param value The url to set.
- * @return This builder for chaining.
- */
- public Builder setUrl(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- url_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The URL to open.
- *
- *
- * string url = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearUrl() {
- url_ = getDefaultInstance().getUrl();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The URL to open.
- *
- *
- * string url = 1;
- *
- * @param value The bytes for url to set.
- * @return This builder for chaining.
- */
- public Builder setUrlBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- url_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private int openAs_ = 0;
- /**
- *
- *
- *
- * How to open a link.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.OpenLink.OpenAs open_as = 2;
- *
- * @return The enum numeric value on the wire for openAs.
- */
- @java.lang.Override
- public int getOpenAsValue() {
- return openAs_;
- }
- /**
- *
- *
- *
- * How to open a link.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.OpenLink.OpenAs open_as = 2;
- *
- * @param value The enum numeric value on the wire for openAs to set.
- * @return This builder for chaining.
- */
- public Builder setOpenAsValue(int value) {
- openAs_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * How to open a link.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.OpenLink.OpenAs open_as = 2;
- *
- * @return The openAs.
- */
- @java.lang.Override
- public com.google.apps.card.v1.OpenLink.OpenAs getOpenAs() {
- com.google.apps.card.v1.OpenLink.OpenAs result =
- com.google.apps.card.v1.OpenLink.OpenAs.forNumber(openAs_);
- return result == null ? com.google.apps.card.v1.OpenLink.OpenAs.UNRECOGNIZED : result;
- }
- /**
- *
- *
- *
- * How to open a link.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.OpenLink.OpenAs open_as = 2;
- *
- * @param value The openAs to set.
- * @return This builder for chaining.
- */
- public Builder setOpenAs(com.google.apps.card.v1.OpenLink.OpenAs value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- openAs_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * How to open a link.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.OpenLink.OpenAs open_as = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearOpenAs() {
- bitField0_ = (bitField0_ & ~0x00000002);
- openAs_ = 0;
- onChanged();
- return this;
- }
-
- private int onClose_ = 0;
- /**
- *
- *
- *
- * 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):
- *
- *
- * .google.apps.card.v1.OpenLink.OnClose on_close = 3;
- *
- * @return The enum numeric value on the wire for onClose.
- */
- @java.lang.Override
- public int getOnCloseValue() {
- return onClose_;
- }
- /**
- *
- *
- *
- * 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):
- *
- *
- * .google.apps.card.v1.OpenLink.OnClose on_close = 3;
- *
- * @param value The enum numeric value on the wire for onClose to set.
- * @return This builder for chaining.
- */
- public Builder setOnCloseValue(int value) {
- onClose_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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):
- *
- *
- * .google.apps.card.v1.OpenLink.OnClose on_close = 3;
- *
- * @return The onClose.
- */
- @java.lang.Override
- public com.google.apps.card.v1.OpenLink.OnClose getOnClose() {
- com.google.apps.card.v1.OpenLink.OnClose result =
- com.google.apps.card.v1.OpenLink.OnClose.forNumber(onClose_);
- return result == null ? com.google.apps.card.v1.OpenLink.OnClose.UNRECOGNIZED : result;
- }
- /**
- *
- *
- *
- * 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):
- *
- *
- * .google.apps.card.v1.OpenLink.OnClose on_close = 3;
- *
- * @param value The onClose to set.
- * @return This builder for chaining.
- */
- public Builder setOnClose(com.google.apps.card.v1.OpenLink.OnClose value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- onClose_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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):
- *
- *
- * .google.apps.card.v1.OpenLink.OnClose on_close = 3;
- *
- * @return This builder for chaining.
- */
- public Builder clearOnClose() {
- bitField0_ = (bitField0_ & ~0x00000004);
- onClose_ = 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.OpenLink)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.OpenLink)
- private static final com.google.apps.card.v1.OpenLink DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.OpenLink();
- }
-
- public static com.google.apps.card.v1.OpenLink getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public OpenLink 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.OpenLink getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OpenLinkOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OpenLinkOrBuilder.java
deleted file mode 100644
index f8e9d3be0348..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/OpenLinkOrBuilder.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface OpenLinkOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.OpenLink)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The URL to open.
- *
- *
- * string url = 1;
- *
- * @return The url.
- */
- java.lang.String getUrl();
- /**
- *
- *
- *
- * The URL to open.
- *
- *
- * string url = 1;
- *
- * @return The bytes for url.
- */
- com.google.protobuf.ByteString getUrlBytes();
-
- /**
- *
- *
- *
- * How to open a link.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.OpenLink.OpenAs open_as = 2;
- *
- * @return The enum numeric value on the wire for openAs.
- */
- int getOpenAsValue();
- /**
- *
- *
- *
- * How to open a link.
- *
- * [Google Workspace
- * Add-ons](https://developers.google.com/workspace/add-ons):
- *
- *
- * .google.apps.card.v1.OpenLink.OpenAs open_as = 2;
- *
- * @return The openAs.
- */
- com.google.apps.card.v1.OpenLink.OpenAs getOpenAs();
-
- /**
- *
- *
- *
- * 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):
- *
- *
- * .google.apps.card.v1.OpenLink.OnClose on_close = 3;
- *
- * @return The enum numeric value on the wire for onClose.
- */
- int getOnCloseValue();
- /**
- *
- *
- *
- * 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):
- *
- *
- * .google.apps.card.v1.OpenLink.OnClose on_close = 3;
- *
- * @return The onClose.
- */
- com.google.apps.card.v1.OpenLink.OnClose getOnClose();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/SelectionInput.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/SelectionInput.java
deleted file mode 100644
index 164360ddfa6c..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/SelectionInput.java
+++ /dev/null
@@ -1,5468 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * A 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 [Selection
- * input](https://developers.google.com/chat/ui/widgets/selection-input).
- *
- * Chat apps can process the value of items that users select or input. For
- * details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- * To collect undefined or abstract data from users, use
- * the [TextInput][google.apps.card.v1.TextInput] widget.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.SelectionInput}
- */
-public final class SelectionInput extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.SelectionInput)
- SelectionInputOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use SelectionInput.newBuilder() to construct.
- private SelectionInput(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private SelectionInput() {
- name_ = "";
- label_ = "";
- type_ = 0;
- items_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new SelectionInput();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.SelectionInput.class,
- com.google.apps.card.v1.SelectionInput.Builder.class);
- }
-
- /**
- *
- *
- *
- * The format for the items that users can select. Different options support
- * different types of interactions. For example, users can select multiple
- * checkboxes, but can only select one item from a dropdown menu.
- *
- * Each selection input supports one type of selection. Mixing checkboxes
- * and switches, for example, isn't supported.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.SelectionInput.SelectionType}
- */
- public enum SelectionType implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * A set of checkboxes. Users can select one or more checkboxes.
- *
- *
- * CHECK_BOX = 0;
- */
- CHECK_BOX(0),
- /**
- *
- *
- *
- * A set of radio buttons. Users can select one radio button.
- *
- *
- * RADIO_BUTTON = 1;
- */
- RADIO_BUTTON(1),
- /**
- *
- *
- *
- * A set of switches. Users can turn on one or more switches.
- *
- *
- * SWITCH = 2;
- */
- SWITCH(2),
- /**
- *
- *
- *
- * A dropdown menu. Users can select one item from the menu.
- *
- *
- * DROPDOWN = 3;
- */
- 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.
- *
- * To populate items for a multiselect menu, you can 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 the
- * [`SelectionInput` widget
- * page](https://developers.google.com/chat/ui/widgets/selection-input#multiselect-menu).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- * multiselect for Google Workspace Add-ons are in
- * [Developer Preview](https://developers.google.com/workspace/preview).
- *
- *
- * MULTI_SELECT = 4;
- */
- MULTI_SELECT(4),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * A set of checkboxes. Users can select one or more checkboxes.
- *
- *
- * CHECK_BOX = 0;
- */
- public static final int CHECK_BOX_VALUE = 0;
- /**
- *
- *
- *
- * A set of radio buttons. Users can select one radio button.
- *
- *
- * RADIO_BUTTON = 1;
- */
- public static final int RADIO_BUTTON_VALUE = 1;
- /**
- *
- *
- *
- * A set of switches. Users can turn on one or more switches.
- *
- *
- * SWITCH = 2;
- */
- public static final int SWITCH_VALUE = 2;
- /**
- *
- *
- *
- * A dropdown menu. Users can select one item from the menu.
- *
- *
- * DROPDOWN = 3;
- */
- public static final int DROPDOWN_VALUE = 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.
- *
- * To populate items for a multiselect menu, you can 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 the
- * [`SelectionInput` widget
- * page](https://developers.google.com/chat/ui/widgets/selection-input#multiselect-menu).
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- * multiselect for Google Workspace Add-ons are in
- * [Developer Preview](https://developers.google.com/workspace/preview).
- *
- *
- * MULTI_SELECT = 4;
- */
- public static final int MULTI_SELECT_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 SelectionType 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 SelectionType forNumber(int value) {
- switch (value) {
- case 0:
- return CHECK_BOX;
- case 1:
- return RADIO_BUTTON;
- case 2:
- return SWITCH;
- case 3:
- return DROPDOWN;
- case 4:
- return MULTI_SELECT;
- 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 SelectionType findValueByNumber(int number) {
- return SelectionType.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.SelectionInput.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final SelectionType[] VALUES = values();
-
- public static SelectionType 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 SelectionType(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.apps.card.v1.SelectionInput.SelectionType)
- }
-
- public interface SelectionItemOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.SelectionInput.SelectionItem)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The text that identifies or describes the item to users.
- *
- *
- * string text = 1;
- *
- * @return The text.
- */
- java.lang.String getText();
- /**
- *
- *
- *
- * The text that identifies or describes the item to users.
- *
- *
- * string text = 1;
- *
- * @return The bytes for text.
- */
- com.google.protobuf.ByteString getTextBytes();
-
- /**
- *
- *
- *
- * The value associated with this item. The client should use this as a form
- * input value.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The value.
- */
- java.lang.String getValue();
- /**
- *
- *
- *
- * The value associated with this item. The client should use this as a form
- * input value.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The bytes for value.
- */
- com.google.protobuf.ByteString getValueBytes();
-
- /**
- *
- *
- *
- * Whether the item is selected by default. If the selection input only
- * accepts one value (such as for radio buttons or a dropdown menu), only
- * set this field for one item.
- *
- *
- * bool selected = 3;
- *
- * @return The selected.
- */
- boolean getSelected();
-
- /**
- *
- *
- *
- * 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/chat/images/quickstart-app-avatar.png`.
- *
- *
- * string start_icon_uri = 4;
- *
- * @return The startIconUri.
- */
- 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/chat/images/quickstart-app-avatar.png`.
- *
- *
- * string start_icon_uri = 4;
- *
- * @return The bytes for startIconUri.
- */
- com.google.protobuf.ByteString getStartIconUriBytes();
-
- /**
- *
- *
- *
- * For multiselect menus, a text description or label that's
- * displayed below the item's `text` field.
- *
- *
- * string bottom_text = 5;
- *
- * @return The bottomText.
- */
- java.lang.String getBottomText();
- /**
- *
- *
- *
- * For multiselect menus, a text description or label that's
- * displayed below the item's `text` field.
- *
- *
- * string bottom_text = 5;
- *
- * @return The bytes for bottomText.
- */
- com.google.protobuf.ByteString getBottomTextBytes();
- }
- /**
- *
- *
- *
- * An item that users can select in a selection input, such as a checkbox
- * or switch.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.SelectionInput.SelectionItem}
- */
- public static final class SelectionItem extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.SelectionInput.SelectionItem)
- SelectionItemOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use SelectionItem.newBuilder() to construct.
- private SelectionItem(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private SelectionItem() {
- text_ = "";
- value_ = "";
- startIconUri_ = "";
- bottomText_ = "";
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new SelectionItem();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_SelectionItem_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_SelectionItem_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.SelectionInput.SelectionItem.class,
- com.google.apps.card.v1.SelectionInput.SelectionItem.Builder.class);
- }
-
- public static final int TEXT_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object text_ = "";
- /**
- *
- *
- *
- * The text that identifies or describes the item to users.
- *
- *
- * string text = 1;
- *
- * @return The text.
- */
- @java.lang.Override
- public java.lang.String getText() {
- java.lang.Object ref = text_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- text_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The text that identifies or describes the item to users.
- *
- *
- * string text = 1;
- *
- * @return The bytes for text.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getTextBytes() {
- java.lang.Object ref = text_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- text_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int VALUE_FIELD_NUMBER = 2;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object value_ = "";
- /**
- *
- *
- *
- * The value associated with this item. The client should use this as a form
- * input value.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The value.
- */
- @java.lang.Override
- public java.lang.String getValue() {
- java.lang.Object ref = value_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- value_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * The value associated with this item. The client should use this as a form
- * input value.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The bytes for value.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getValueBytes() {
- java.lang.Object ref = value_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- value_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int SELECTED_FIELD_NUMBER = 3;
- private boolean selected_ = false;
- /**
- *
- *
- *
- * Whether the item is selected by default. If the selection input only
- * accepts one value (such as for radio buttons or a dropdown menu), only
- * set this field for one item.
- *
- *
- * bool selected = 3;
- *
- * @return The selected.
- */
- @java.lang.Override
- public boolean getSelected() {
- return selected_;
- }
-
- public static final int START_ICON_URI_FIELD_NUMBER = 4;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object startIconUri_ = "";
- /**
- *
- *
- *
- * 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/chat/images/quickstart-app-avatar.png`.
- *
- *
- * string start_icon_uri = 4;
- *
- * @return The startIconUri.
- */
- @java.lang.Override
- public java.lang.String getStartIconUri() {
- java.lang.Object ref = startIconUri_;
- 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;
- 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/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_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- startIconUri_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int BOTTOM_TEXT_FIELD_NUMBER = 5;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object bottomText_ = "";
- /**
- *
- *
- *
- * For multiselect menus, a text description or label that's
- * displayed below the item's `text` field.
- *
- *
- * string bottom_text = 5;
- *
- * @return The bottomText.
- */
- @java.lang.Override
- public java.lang.String getBottomText() {
- java.lang.Object ref = bottomText_;
- 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();
- bottomText_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * For multiselect menus, a text description or label that's
- * displayed below the item's `text` field.
- *
- *
- * string bottom_text = 5;
- *
- * @return The bytes for bottomText.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getBottomTextBytes() {
- java.lang.Object ref = bottomText_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- bottomText_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
-
- @java.lang.Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @java.lang.Override
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
- }
- if (selected_ != false) {
- output.writeBool(3, selected_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startIconUri_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, startIconUri_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bottomText_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 5, bottomText_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
- }
- 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bottomText_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, bottomText_);
- }
- 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.SelectionInput.SelectionItem)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.SelectionInput.SelectionItem other =
- (com.google.apps.card.v1.SelectionInput.SelectionItem) 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 (!getUnknownFields().equals(other.getUnknownFields())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + TEXT_FIELD_NUMBER;
- hash = (53 * hash) + getText().hashCode();
- hash = (37 * hash) + VALUE_FIELD_NUMBER;
- 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();
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.SelectionInput.SelectionItem parseFrom(
- java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.SelectionInput.SelectionItem 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.SelectionInput.SelectionItem parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.SelectionInput.SelectionItem 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.SelectionInput.SelectionItem parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.SelectionInput.SelectionItem 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.SelectionInput.SelectionItem parseFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.SelectionInput.SelectionItem 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.SelectionInput.SelectionItem parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.SelectionInput.SelectionItem 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.SelectionInput.SelectionItem 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.SelectionInput.SelectionItem 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.SelectionInput.SelectionItem 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 item that users can select in a selection input, such as a checkbox
- * or switch.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.SelectionInput.SelectionItem}
- */
- public static final class Builder
- extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.SelectionInput.SelectionItem)
- com.google.apps.card.v1.SelectionInput.SelectionItemOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_SelectionItem_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_SelectionItem_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.SelectionInput.SelectionItem.class,
- com.google.apps.card.v1.SelectionInput.SelectionItem.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.SelectionInput.SelectionItem.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- text_ = "";
- value_ = "";
- selected_ = false;
- startIconUri_ = "";
- bottomText_ = "";
- 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_SelectionInput_SelectionItem_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.SelectionItem getDefaultInstanceForType() {
- return com.google.apps.card.v1.SelectionInput.SelectionItem.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.SelectionItem build() {
- com.google.apps.card.v1.SelectionInput.SelectionItem result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.SelectionItem buildPartial() {
- com.google.apps.card.v1.SelectionInput.SelectionItem result =
- new com.google.apps.card.v1.SelectionInput.SelectionItem(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.SelectionInput.SelectionItem result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.text_ = text_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.value_ = value_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.selected_ = selected_;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.startIconUri_ = startIconUri_;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.bottomText_ = bottomText_;
- }
- }
-
- @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.SelectionInput.SelectionItem) {
- return mergeFrom((com.google.apps.card.v1.SelectionInput.SelectionItem) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.SelectionInput.SelectionItem other) {
- if (other == com.google.apps.card.v1.SelectionInput.SelectionItem.getDefaultInstance())
- return this;
- if (!other.getText().isEmpty()) {
- text_ = other.text_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getValue().isEmpty()) {
- value_ = other.value_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- 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();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- onChanged();
- return this;
- }
-
- @java.lang.Override
- public final boolean isInitialized() {
- return true;
- }
-
- @java.lang.Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- text_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- value_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 24:
- {
- selected_ = input.readBool();
- bitField0_ |= 0x00000004;
- break;
- } // case 24
- case 34:
- {
- startIconUri_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000008;
- break;
- } // case 34
- case 42:
- {
- bottomText_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000010;
- break;
- } // case 42
- default:
- {
- if (!super.parseUnknownField(input, extensionRegistry, tag)) {
- done = true; // was an endgroup tag
- }
- break;
- } // default:
- } // switch (tag)
- } // while (!done)
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.unwrapIOException();
- } finally {
- onChanged();
- } // finally
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object text_ = "";
- /**
- *
- *
- *
- * The text that identifies or describes the item to users.
- *
- *
- * string text = 1;
- *
- * @return The text.
- */
- public java.lang.String getText() {
- java.lang.Object ref = text_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- text_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The text that identifies or describes the item to users.
- *
- *
- * string text = 1;
- *
- * @return The bytes for text.
- */
- public com.google.protobuf.ByteString getTextBytes() {
- java.lang.Object ref = text_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- text_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The text that identifies or describes the item to users.
- *
- *
- * string text = 1;
- *
- * @param value The text to set.
- * @return This builder for chaining.
- */
- public Builder setText(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- text_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The text that identifies or describes the item to users.
- *
- *
- * string text = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearText() {
- text_ = getDefaultInstance().getText();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The text that identifies or describes the item to users.
- *
- *
- * string text = 1;
- *
- * @param value The bytes for text to set.
- * @return This builder for chaining.
- */
- public Builder setTextBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- text_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object value_ = "";
- /**
- *
- *
- *
- * The value associated with this item. The client should use this as a form
- * input value.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The value.
- */
- public java.lang.String getValue() {
- java.lang.Object ref = value_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- value_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The value associated with this item. The client should use this as a form
- * input value.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return The bytes for value.
- */
- public com.google.protobuf.ByteString getValueBytes() {
- java.lang.Object ref = value_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- value_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The value associated with this item. The client should use this as a form
- * input value.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @param value The value to set.
- * @return This builder for chaining.
- */
- public Builder setValue(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- value_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The value associated with this item. The client should use this as a form
- * input value.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearValue() {
- value_ = getDefaultInstance().getValue();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The value associated with this item. The client should use this as a form
- * input value.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * string value = 2;
- *
- * @param value The bytes for value to set.
- * @return This builder for chaining.
- */
- public Builder setValueBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- value_ = value;
- bitField0_ |= 0x00000002;
- onChanged();
- return this;
- }
-
- private boolean selected_;
- /**
- *
- *
- *
- * Whether the item is selected by default. If the selection input only
- * accepts one value (such as for radio buttons or a dropdown menu), only
- * set this field for one item.
- *
- *
- * bool selected = 3;
- *
- * @return The selected.
- */
- @java.lang.Override
- public boolean getSelected() {
- return selected_;
- }
- /**
- *
- *
- *
- * Whether the item is selected by default. If the selection input only
- * accepts one value (such as for radio buttons or a dropdown menu), only
- * set this field for one item.
- *
- *
- * bool selected = 3;
- *
- * @param value The selected to set.
- * @return This builder for chaining.
- */
- public Builder setSelected(boolean value) {
-
- selected_ = value;
- bitField0_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * Whether the item is selected by default. If the selection input only
- * accepts one value (such as for radio buttons or a dropdown menu), only
- * set this field for one item.
- *
- *
- * bool selected = 3;
- *
- * @return This builder for chaining.
- */
- public Builder clearSelected() {
- bitField0_ = (bitField0_ & ~0x00000004);
- selected_ = false;
- onChanged();
- return this;
- }
-
- private java.lang.Object startIconUri_ = "";
- /**
- *
- *
- *
- * 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/chat/images/quickstart-app-avatar.png`.
- *
- *
- * string start_icon_uri = 4;
- *
- * @return The startIconUri.
- */
- public java.lang.String getStartIconUri() {
- java.lang.Object ref = startIconUri_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- startIconUri_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * 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/chat/images/quickstart-app-avatar.png`.
- *
- *
- * string start_icon_uri = 4;
- *
- * @return The bytes for startIconUri.
- */
- public com.google.protobuf.ByteString getStartIconUriBytes() {
- java.lang.Object ref = startIconUri_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- startIconUri_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * 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/chat/images/quickstart-app-avatar.png`.
- *
- *
- * string start_icon_uri = 4;
- *
- * @param value The startIconUri to set.
- * @return This builder for chaining.
- */
- public Builder setStartIconUri(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- startIconUri_ = value;
- bitField0_ |= 0x00000008;
- 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/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();
- 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/chat/images/quickstart-app-avatar.png`.
- *
- *
- * string start_icon_uri = 4;
- *
- * @param value The bytes for startIconUri to set.
- * @return This builder for chaining.
- */
- public Builder setStartIconUriBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- startIconUri_ = value;
- bitField0_ |= 0x00000008;
- onChanged();
- return this;
- }
-
- private java.lang.Object bottomText_ = "";
- /**
- *
- *
- *
- * For multiselect menus, a text description or label that's
- * displayed below the item's `text` field.
- *
- *
- * string bottom_text = 5;
- *
- * @return The bottomText.
- */
- public java.lang.String getBottomText() {
- java.lang.Object ref = bottomText_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- bottomText_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * For multiselect menus, a text description or label that's
- * displayed below the item's `text` field.
- *
- *
- * string bottom_text = 5;
- *
- * @return The bytes for bottomText.
- */
- public com.google.protobuf.ByteString getBottomTextBytes() {
- java.lang.Object ref = bottomText_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- bottomText_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * For multiselect menus, a text description or label that's
- * displayed below the item's `text` field.
- *
- *
- * string bottom_text = 5;
- *
- * @param value The bottomText to set.
- * @return This builder for chaining.
- */
- public Builder setBottomText(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bottomText_ = value;
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * For multiselect menus, a text description or label that's
- * displayed below the item's `text` field.
- *
- *
- * string bottom_text = 5;
- *
- * @return This builder for chaining.
- */
- public Builder clearBottomText() {
- bottomText_ = getDefaultInstance().getBottomText();
- bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * For multiselect menus, a text description or label that's
- * displayed below the item's `text` field.
- *
- *
- * string bottom_text = 5;
- *
- * @param value The bytes for bottomText to set.
- * @return This builder for chaining.
- */
- public Builder setBottomTextBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- bottomText_ = value;
- bitField0_ |= 0x00000010;
- 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.SelectionInput.SelectionItem)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.SelectionInput.SelectionItem)
- private static final com.google.apps.card.v1.SelectionInput.SelectionItem DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.SelectionInput.SelectionItem();
- }
-
- public static com.google.apps.card.v1.SelectionInput.SelectionItem getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public SelectionItem 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.SelectionInput.SelectionItem getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
- }
-
- public interface PlatformDataSourceOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.SelectionInput.PlatformDataSource)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @return Whether the commonDataSource field is set.
- */
- boolean hasCommonDataSource();
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @return The enum numeric value on the wire for commonDataSource.
- */
- int getCommonDataSourceValue();
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @return The commonDataSource.
- */
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource
- getCommonDataSource();
-
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.DataSourceCase getDataSourceCase();
- }
- /**
- *
- *
- *
- * For a
- * [`SelectionInput`][google.apps.card.v1.SelectionInput] widget that uses a
- * multiselect menu, a data source from Google Workspace. Used to populate
- * items in a multiselect menu.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * Protobuf type {@code google.apps.card.v1.SelectionInput.PlatformDataSource}
- */
- public static final class PlatformDataSource extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.SelectionInput.PlatformDataSource)
- PlatformDataSourceOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use PlatformDataSource.newBuilder() to construct.
- private PlatformDataSource(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private PlatformDataSource() {}
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new PlatformDataSource();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_PlatformDataSource_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_PlatformDataSource_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.class,
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.Builder.class);
- }
-
- /**
- *
- *
- *
- * A data source shared by all [Google Workspace
- * applications]
- * (https://developers.google.com/chat/api/reference/rest/v1/HostApp).
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * Protobuf enum {@code google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource}
- */
- public enum CommonDataSource implements com.google.protobuf.ProtocolMessageEnum {
- /**
- *
- *
- *
- * Default value. Don't use.
- *
- *
- * UNKNOWN = 0;
- */
- UNKNOWN(0),
- /**
- *
- *
- *
- * Google Workspace users. The user can only view and select users from
- * their Google Workspace organization.
- *
- *
- * USER = 1;
- */
- USER(1),
- UNRECOGNIZED(-1),
- ;
-
- /**
- *
- *
- *
- * Default value. Don't use.
- *
- *
- * UNKNOWN = 0;
- */
- public static final int UNKNOWN_VALUE = 0;
- /**
- *
- *
- *
- * Google Workspace users. The user can only view and select users from
- * their Google Workspace organization.
- *
- *
- * USER = 1;
- */
- public static final int USER_VALUE = 1;
-
- public final int getNumber() {
- if (this == UNRECOGNIZED) {
- throw new java.lang.IllegalArgumentException(
- "Can't get the number of an unknown enum value.");
- }
- return value;
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static CommonDataSource 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 CommonDataSource forNumber(int value) {
- switch (value) {
- case 0:
- return UNKNOWN;
- case 1:
- return USER;
- 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 CommonDataSource findValueByNumber(int number) {
- return CommonDataSource.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.SelectionInput.PlatformDataSource.getDescriptor()
- .getEnumTypes()
- .get(0);
- }
-
- private static final CommonDataSource[] VALUES = values();
-
- public static CommonDataSource 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 CommonDataSource(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource)
- }
-
- private int dataSourceCase_ = 0;
-
- @SuppressWarnings("serial")
- private java.lang.Object dataSource_;
-
- public enum DataSourceCase
- implements
- com.google.protobuf.Internal.EnumLite,
- com.google.protobuf.AbstractMessage.InternalOneOfEnum {
- COMMON_DATA_SOURCE(1),
- DATASOURCE_NOT_SET(0);
- private final int value;
-
- private DataSourceCase(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 DataSourceCase valueOf(int value) {
- return forNumber(value);
- }
-
- public static DataSourceCase forNumber(int value) {
- switch (value) {
- case 1:
- return COMMON_DATA_SOURCE;
- case 0:
- return DATASOURCE_NOT_SET;
- default:
- return null;
- }
- }
-
- public int getNumber() {
- return this.value;
- }
- };
-
- public DataSourceCase getDataSourceCase() {
- return DataSourceCase.forNumber(dataSourceCase_);
- }
-
- public static final int COMMON_DATA_SOURCE_FIELD_NUMBER = 1;
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @return Whether the commonDataSource field is set.
- */
- public boolean hasCommonDataSource() {
- return dataSourceCase_ == 1;
- }
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @return The enum numeric value on the wire for commonDataSource.
- */
- public int getCommonDataSourceValue() {
- if (dataSourceCase_ == 1) {
- return (java.lang.Integer) dataSource_;
- }
- return 0;
- }
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @return The commonDataSource.
- */
- public com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource
- getCommonDataSource() {
- if (dataSourceCase_ == 1) {
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource result =
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource.forNumber(
- (java.lang.Integer) dataSource_);
- return result == null
- ? com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource
- .UNRECOGNIZED
- : result;
- }
- return com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource.UNKNOWN;
- }
-
- 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 (dataSourceCase_ == 1) {
- output.writeEnum(1, ((java.lang.Integer) dataSource_));
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (dataSourceCase_ == 1) {
- size +=
- com.google.protobuf.CodedOutputStream.computeEnumSize(
- 1, ((java.lang.Integer) dataSource_));
- }
- 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.SelectionInput.PlatformDataSource)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.SelectionInput.PlatformDataSource other =
- (com.google.apps.card.v1.SelectionInput.PlatformDataSource) obj;
-
- if (!getDataSourceCase().equals(other.getDataSourceCase())) return false;
- switch (dataSourceCase_) {
- case 1:
- if (getCommonDataSourceValue() != other.getCommonDataSourceValue()) 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 (dataSourceCase_) {
- case 1:
- hash = (37 * hash) + COMMON_DATA_SOURCE_FIELD_NUMBER;
- hash = (53 * hash) + getCommonDataSourceValue();
- break;
- case 0:
- default:
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.SelectionInput.PlatformDataSource parseFrom(
- java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.SelectionInput.PlatformDataSource 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.SelectionInput.PlatformDataSource parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.SelectionInput.PlatformDataSource 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.SelectionInput.PlatformDataSource parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.SelectionInput.PlatformDataSource 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.SelectionInput.PlatformDataSource parseFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.SelectionInput.PlatformDataSource 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.SelectionInput.PlatformDataSource parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.SelectionInput.PlatformDataSource 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.SelectionInput.PlatformDataSource 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.SelectionInput.PlatformDataSource 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.SelectionInput.PlatformDataSource 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;
- }
- /**
- *
- *
- *
- * For a
- * [`SelectionInput`][google.apps.card.v1.SelectionInput] widget that uses a
- * multiselect menu, a data source from Google Workspace. Used to populate
- * items in a multiselect menu.
- *
- * [Google Chat apps](https://developers.google.com/chat):
- *
- *
- * Protobuf type {@code google.apps.card.v1.SelectionInput.PlatformDataSource}
- */
- public static final class Builder
- extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.SelectionInput.PlatformDataSource)
- com.google.apps.card.v1.SelectionInput.PlatformDataSourceOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_PlatformDataSource_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_PlatformDataSource_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.class,
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.SelectionInput.PlatformDataSource.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- dataSourceCase_ = 0;
- dataSource_ = 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_SelectionInput_PlatformDataSource_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.PlatformDataSource getDefaultInstanceForType() {
- return com.google.apps.card.v1.SelectionInput.PlatformDataSource.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.PlatformDataSource build() {
- com.google.apps.card.v1.SelectionInput.PlatformDataSource result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.PlatformDataSource buildPartial() {
- com.google.apps.card.v1.SelectionInput.PlatformDataSource result =
- new com.google.apps.card.v1.SelectionInput.PlatformDataSource(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- buildPartialOneofs(result);
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.SelectionInput.PlatformDataSource result) {
- int from_bitField0_ = bitField0_;
- }
-
- private void buildPartialOneofs(
- com.google.apps.card.v1.SelectionInput.PlatformDataSource result) {
- result.dataSourceCase_ = dataSourceCase_;
- result.dataSource_ = this.dataSource_;
- }
-
- @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.SelectionInput.PlatformDataSource) {
- return mergeFrom((com.google.apps.card.v1.SelectionInput.PlatformDataSource) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.SelectionInput.PlatformDataSource other) {
- if (other == com.google.apps.card.v1.SelectionInput.PlatformDataSource.getDefaultInstance())
- return this;
- switch (other.getDataSourceCase()) {
- case COMMON_DATA_SOURCE:
- {
- setCommonDataSourceValue(other.getCommonDataSourceValue());
- break;
- }
- case DATASOURCE_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 8:
- {
- int rawValue = input.readEnum();
- dataSourceCase_ = 1;
- dataSource_ = rawValue;
- break;
- } // case 8
- 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 dataSourceCase_ = 0;
- private java.lang.Object dataSource_;
-
- public DataSourceCase getDataSourceCase() {
- return DataSourceCase.forNumber(dataSourceCase_);
- }
-
- public Builder clearDataSource() {
- dataSourceCase_ = 0;
- dataSource_ = null;
- onChanged();
- return this;
- }
-
- private int bitField0_;
-
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @return Whether the commonDataSource field is set.
- */
- @java.lang.Override
- public boolean hasCommonDataSource() {
- return dataSourceCase_ == 1;
- }
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @return The enum numeric value on the wire for commonDataSource.
- */
- @java.lang.Override
- public int getCommonDataSourceValue() {
- if (dataSourceCase_ == 1) {
- return ((java.lang.Integer) dataSource_).intValue();
- }
- return 0;
- }
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @param value The enum numeric value on the wire for commonDataSource to set.
- * @return This builder for chaining.
- */
- public Builder setCommonDataSourceValue(int value) {
- dataSourceCase_ = 1;
- dataSource_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @return The commonDataSource.
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource
- getCommonDataSource() {
- if (dataSourceCase_ == 1) {
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource result =
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource.forNumber(
- (java.lang.Integer) dataSource_);
- return result == null
- ? com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource
- .UNRECOGNIZED
- : result;
- }
- return com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource.UNKNOWN;
- }
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @param value The commonDataSource to set.
- * @return This builder for chaining.
- */
- public Builder setCommonDataSource(
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource value) {
- if (value == null) {
- throw new NullPointerException();
- }
- dataSourceCase_ = 1;
- dataSource_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * A data source shared by all Google Workspace applications, such as
- * users in a Google Workspace organization.
- *
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1;
- *
- *
- * @return This builder for chaining.
- */
- public Builder clearCommonDataSource() {
- if (dataSourceCase_ == 1) {
- dataSourceCase_ = 0;
- dataSource_ = null;
- 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.SelectionInput.PlatformDataSource)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.SelectionInput.PlatformDataSource)
- private static final com.google.apps.card.v1.SelectionInput.PlatformDataSource DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.SelectionInput.PlatformDataSource();
- }
-
- public static com.google.apps.card.v1.SelectionInput.PlatformDataSource getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public PlatformDataSource 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.SelectionInput.PlatformDataSource getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
- }
-
- private int bitField0_;
- private int multiSelectDataSourceCase_ = 0;
-
- @SuppressWarnings("serial")
- private java.lang.Object multiSelectDataSource_;
-
- public enum MultiSelectDataSourceCase
- implements
- com.google.protobuf.Internal.EnumLite,
- com.google.protobuf.AbstractMessage.InternalOneOfEnum {
- EXTERNAL_DATA_SOURCE(8),
- PLATFORM_DATA_SOURCE(9),
- MULTISELECTDATASOURCE_NOT_SET(0);
- private final int value;
-
- private MultiSelectDataSourceCase(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 MultiSelectDataSourceCase valueOf(int value) {
- return forNumber(value);
- }
-
- public static MultiSelectDataSourceCase forNumber(int value) {
- switch (value) {
- case 8:
- return EXTERNAL_DATA_SOURCE;
- case 9:
- return PLATFORM_DATA_SOURCE;
- case 0:
- return MULTISELECTDATASOURCE_NOT_SET;
- default:
- return null;
- }
- }
-
- public int getNumber() {
- return this.value;
- }
- };
-
- public MultiSelectDataSourceCase getMultiSelectDataSourceCase() {
- return MultiSelectDataSourceCase.forNumber(multiSelectDataSourceCase_);
- }
-
- public static final int NAME_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object name_ = "";
- /**
- *
- *
- *
- * 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/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The name.
- */
- @java.lang.Override
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- 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();
- name_ = s;
- return s;
- }
- }
- /**
- *
- *
- *
- * 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/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The bytes for name.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int LABEL_FIELD_NUMBER = 2;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object label_ = "";
- /**
- *
- *
- *
- * The text that appears above the selection input field in the user
- * interface.
- *
- * Specify text that helps the user enter the information your app needs.
- * For example, if users are selecting the urgency of a work ticket from a
- * drop-down menu, the label might be "Urgency" or "Select urgency".
- *
- *
- * 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 that appears above the selection input field in the user
- * interface.
- *
- * Specify text that helps the user enter the information your app needs.
- * For example, if users are selecting the urgency of a work ticket from a
- * drop-down menu, the label might be "Urgency" or "Select urgency".
- *
- *
- * 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 TYPE_FIELD_NUMBER = 3;
- private int type_ = 0;
- /**
- *
- *
- *
- * The type of items that are displayed to users in a `SelectionInput` widget.
- * Selection types support different types of interactions. For example, users
- * can select one or more checkboxes, but they can only select one value from
- * a dropdown menu.
- *
- *
- * .google.apps.card.v1.SelectionInput.SelectionType type = 3;
- *
- * @return The enum numeric value on the wire for type.
- */
- @java.lang.Override
- public int getTypeValue() {
- return type_;
- }
- /**
- *
- *
- *
- * The type of items that are displayed to users in a `SelectionInput` widget.
- * Selection types support different types of interactions. For example, users
- * can select one or more checkboxes, but they can only select one value from
- * a dropdown menu.
- *
- *
- * .google.apps.card.v1.SelectionInput.SelectionType type = 3;
- *
- * @return The type.
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.SelectionType getType() {
- com.google.apps.card.v1.SelectionInput.SelectionType result =
- com.google.apps.card.v1.SelectionInput.SelectionType.forNumber(type_);
- return result == null
- ? com.google.apps.card.v1.SelectionInput.SelectionType.UNRECOGNIZED
- : result;
- }
-
- public static final int ITEMS_FIELD_NUMBER = 4;
-
- @SuppressWarnings("serial")
- private java.util.List items_;
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- @java.lang.Override
- public java.util.List getItemsList() {
- return items_;
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- @java.lang.Override
- public java.util.List extends com.google.apps.card.v1.SelectionInput.SelectionItemOrBuilder>
- getItemsOrBuilderList() {
- return items_;
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- @java.lang.Override
- public int getItemsCount() {
- return items_.size();
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.SelectionItem getItems(int index) {
- return items_.get(index);
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.SelectionItemOrBuilder getItemsOrBuilder(
- int index) {
- return items_.get(index);
- }
-
- public static final int ON_CHANGE_ACTION_FIELD_NUMBER = 5;
- private com.google.apps.card.v1.Action onChangeAction_;
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- *
- * @return Whether the onChangeAction field is set.
- */
- @java.lang.Override
- public boolean hasOnChangeAction() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- *
- * @return The onChangeAction.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Action getOnChangeAction() {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- }
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- }
-
- public static final int MULTI_SELECT_MAX_SELECTED_ITEMS_FIELD_NUMBER = 6;
- private int multiSelectMaxSelectedItems_ = 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.
- *
- *
- * int32 multi_select_max_selected_items = 6;
- *
- * @return The multiSelectMaxSelectedItems.
- */
- @java.lang.Override
- public int getMultiSelectMaxSelectedItems() {
- return multiSelectMaxSelectedItems_;
- }
-
- public static final int MULTI_SELECT_MIN_QUERY_LENGTH_FIELD_NUMBER = 7;
- private int multiSelectMinQueryLength_ = 0;
- /**
- *
- *
- *
- * For multiselect menus, the number of text characters that a user inputs
- * before the Chat app queries autocomplete and displays suggested items
- * in the menu.
- *
- * If unspecified, defaults to 0 characters for static data sources and 3
- * characters for external data sources.
- *
- *
- * int32 multi_select_min_query_length = 7;
- *
- * @return The multiSelectMinQueryLength.
- */
- @java.lang.Override
- public int getMultiSelectMinQueryLength() {
- return multiSelectMinQueryLength_;
- }
-
- public static final int EXTERNAL_DATA_SOURCE_FIELD_NUMBER = 8;
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- *
- * @return Whether the externalDataSource field is set.
- */
- @java.lang.Override
- public boolean hasExternalDataSource() {
- return multiSelectDataSourceCase_ == 8;
- }
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- *
- * @return The externalDataSource.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Action getExternalDataSource() {
- if (multiSelectDataSourceCase_ == 8) {
- return (com.google.apps.card.v1.Action) multiSelectDataSource_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ActionOrBuilder getExternalDataSourceOrBuilder() {
- if (multiSelectDataSourceCase_ == 8) {
- return (com.google.apps.card.v1.Action) multiSelectDataSource_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
-
- public static final int PLATFORM_DATA_SOURCE_FIELD_NUMBER = 9;
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- *
- * @return Whether the platformDataSource field is set.
- */
- @java.lang.Override
- public boolean hasPlatformDataSource() {
- return multiSelectDataSourceCase_ == 9;
- }
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- *
- * @return The platformDataSource.
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.PlatformDataSource getPlatformDataSource() {
- if (multiSelectDataSourceCase_ == 9) {
- return (com.google.apps.card.v1.SelectionInput.PlatformDataSource) multiSelectDataSource_;
- }
- return com.google.apps.card.v1.SelectionInput.PlatformDataSource.getDefaultInstance();
- }
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.PlatformDataSourceOrBuilder
- getPlatformDataSourceOrBuilder() {
- if (multiSelectDataSourceCase_ == 9) {
- return (com.google.apps.card.v1.SelectionInput.PlatformDataSource) multiSelectDataSource_;
- }
- return com.google.apps.card.v1.SelectionInput.PlatformDataSource.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, label_);
- }
- if (type_ != com.google.apps.card.v1.SelectionInput.SelectionType.CHECK_BOX.getNumber()) {
- output.writeEnum(3, type_);
- }
- for (int i = 0; i < items_.size(); i++) {
- output.writeMessage(4, items_.get(i));
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(5, getOnChangeAction());
- }
- if (multiSelectMaxSelectedItems_ != 0) {
- output.writeInt32(6, multiSelectMaxSelectedItems_);
- }
- if (multiSelectMinQueryLength_ != 0) {
- output.writeInt32(7, multiSelectMinQueryLength_);
- }
- if (multiSelectDataSourceCase_ == 8) {
- output.writeMessage(8, (com.google.apps.card.v1.Action) multiSelectDataSource_);
- }
- if (multiSelectDataSourceCase_ == 9) {
- output.writeMessage(
- 9, (com.google.apps.card.v1.SelectionInput.PlatformDataSource) multiSelectDataSource_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
- }
- if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, label_);
- }
- if (type_ != com.google.apps.card.v1.SelectionInput.SelectionType.CHECK_BOX.getNumber()) {
- size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_);
- }
- for (int i = 0; i < items_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, items_.get(i));
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOnChangeAction());
- }
- if (multiSelectMaxSelectedItems_ != 0) {
- size +=
- com.google.protobuf.CodedOutputStream.computeInt32Size(6, multiSelectMaxSelectedItems_);
- }
- if (multiSelectMinQueryLength_ != 0) {
- size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, multiSelectMinQueryLength_);
- }
- if (multiSelectDataSourceCase_ == 8) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 8, (com.google.apps.card.v1.Action) multiSelectDataSource_);
- }
- if (multiSelectDataSourceCase_ == 9) {
- size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 9,
- (com.google.apps.card.v1.SelectionInput.PlatformDataSource) multiSelectDataSource_);
- }
- 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.SelectionInput)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.SelectionInput other = (com.google.apps.card.v1.SelectionInput) obj;
-
- if (!getName().equals(other.getName())) return false;
- if (!getLabel().equals(other.getLabel())) return false;
- if (type_ != other.type_) return false;
- if (!getItemsList().equals(other.getItemsList())) return false;
- if (hasOnChangeAction() != other.hasOnChangeAction()) return false;
- if (hasOnChangeAction()) {
- if (!getOnChangeAction().equals(other.getOnChangeAction())) return false;
- }
- if (getMultiSelectMaxSelectedItems() != other.getMultiSelectMaxSelectedItems()) return false;
- if (getMultiSelectMinQueryLength() != other.getMultiSelectMinQueryLength()) return false;
- if (!getMultiSelectDataSourceCase().equals(other.getMultiSelectDataSourceCase())) return false;
- switch (multiSelectDataSourceCase_) {
- case 8:
- if (!getExternalDataSource().equals(other.getExternalDataSource())) return false;
- break;
- case 9:
- if (!getPlatformDataSource().equals(other.getPlatformDataSource())) 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();
- hash = (37 * hash) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- hash = (37 * hash) + LABEL_FIELD_NUMBER;
- hash = (53 * hash) + getLabel().hashCode();
- hash = (37 * hash) + TYPE_FIELD_NUMBER;
- hash = (53 * hash) + type_;
- if (getItemsCount() > 0) {
- hash = (37 * hash) + ITEMS_FIELD_NUMBER;
- hash = (53 * hash) + getItemsList().hashCode();
- }
- if (hasOnChangeAction()) {
- 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();
- hash = (37 * hash) + MULTI_SELECT_MIN_QUERY_LENGTH_FIELD_NUMBER;
- hash = (53 * hash) + getMultiSelectMinQueryLength();
- switch (multiSelectDataSourceCase_) {
- case 8:
- hash = (37 * hash) + EXTERNAL_DATA_SOURCE_FIELD_NUMBER;
- hash = (53 * hash) + getExternalDataSource().hashCode();
- break;
- case 9:
- hash = (37 * hash) + PLATFORM_DATA_SOURCE_FIELD_NUMBER;
- hash = (53 * hash) + getPlatformDataSource().hashCode();
- break;
- case 0:
- default:
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.SelectionInput parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.SelectionInput 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.SelectionInput parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.SelectionInput 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.SelectionInput parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.SelectionInput 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.SelectionInput parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.SelectionInput 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.SelectionInput parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.SelectionInput 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.SelectionInput 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.SelectionInput 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.SelectionInput 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 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 [Selection
- * input](https://developers.google.com/chat/ui/widgets/selection-input).
- *
- * Chat apps can process the value of items that users select or input. For
- * details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- * To collect undefined or abstract data from users, use
- * the [TextInput][google.apps.card.v1.TextInput] widget.
- *
- * [Google Workspace Add-ons
- * and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.SelectionInput}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.SelectionInput)
- com.google.apps.card.v1.SelectionInputOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_SelectionInput_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.SelectionInput.class,
- com.google.apps.card.v1.SelectionInput.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.SelectionInput.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getItemsFieldBuilder();
- getOnChangeActionFieldBuilder();
- }
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- name_ = "";
- label_ = "";
- type_ = 0;
- if (itemsBuilder_ == null) {
- items_ = java.util.Collections.emptyList();
- } else {
- items_ = null;
- itemsBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000008);
- onChangeAction_ = null;
- if (onChangeActionBuilder_ != null) {
- onChangeActionBuilder_.dispose();
- onChangeActionBuilder_ = null;
- }
- multiSelectMaxSelectedItems_ = 0;
- multiSelectMinQueryLength_ = 0;
- if (externalDataSourceBuilder_ != null) {
- externalDataSourceBuilder_.clear();
- }
- if (platformDataSourceBuilder_ != null) {
- platformDataSourceBuilder_.clear();
- }
- multiSelectDataSourceCase_ = 0;
- multiSelectDataSource_ = 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_SelectionInput_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput getDefaultInstanceForType() {
- return com.google.apps.card.v1.SelectionInput.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput build() {
- com.google.apps.card.v1.SelectionInput result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput buildPartial() {
- com.google.apps.card.v1.SelectionInput result =
- new com.google.apps.card.v1.SelectionInput(this);
- buildPartialRepeatedFields(result);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- buildPartialOneofs(result);
- onBuilt();
- return result;
- }
-
- private void buildPartialRepeatedFields(com.google.apps.card.v1.SelectionInput result) {
- if (itemsBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0)) {
- items_ = java.util.Collections.unmodifiableList(items_);
- bitField0_ = (bitField0_ & ~0x00000008);
- }
- result.items_ = items_;
- } else {
- result.items_ = itemsBuilder_.build();
- }
- }
-
- private void buildPartial0(com.google.apps.card.v1.SelectionInput result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.name_ = name_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.label_ = label_;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.type_ = type_;
- }
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.onChangeAction_ =
- onChangeActionBuilder_ == null ? onChangeAction_ : onChangeActionBuilder_.build();
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.multiSelectMaxSelectedItems_ = multiSelectMaxSelectedItems_;
- }
- if (((from_bitField0_ & 0x00000040) != 0)) {
- result.multiSelectMinQueryLength_ = multiSelectMinQueryLength_;
- }
- result.bitField0_ |= to_bitField0_;
- }
-
- private void buildPartialOneofs(com.google.apps.card.v1.SelectionInput result) {
- result.multiSelectDataSourceCase_ = multiSelectDataSourceCase_;
- result.multiSelectDataSource_ = this.multiSelectDataSource_;
- if (multiSelectDataSourceCase_ == 8 && externalDataSourceBuilder_ != null) {
- result.multiSelectDataSource_ = externalDataSourceBuilder_.build();
- }
- if (multiSelectDataSourceCase_ == 9 && platformDataSourceBuilder_ != null) {
- result.multiSelectDataSource_ = platformDataSourceBuilder_.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.SelectionInput) {
- return mergeFrom((com.google.apps.card.v1.SelectionInput) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.SelectionInput other) {
- if (other == com.google.apps.card.v1.SelectionInput.getDefaultInstance()) return this;
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- if (!other.getLabel().isEmpty()) {
- label_ = other.label_;
- bitField0_ |= 0x00000002;
- onChanged();
- }
- if (other.type_ != 0) {
- setTypeValue(other.getTypeValue());
- }
- if (itemsBuilder_ == null) {
- if (!other.items_.isEmpty()) {
- if (items_.isEmpty()) {
- items_ = other.items_;
- bitField0_ = (bitField0_ & ~0x00000008);
- } else {
- ensureItemsIsMutable();
- items_.addAll(other.items_);
- }
- onChanged();
- }
- } else {
- if (!other.items_.isEmpty()) {
- if (itemsBuilder_.isEmpty()) {
- itemsBuilder_.dispose();
- itemsBuilder_ = null;
- items_ = other.items_;
- bitField0_ = (bitField0_ & ~0x00000008);
- itemsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
- ? getItemsFieldBuilder()
- : null;
- } else {
- itemsBuilder_.addAllMessages(other.items_);
- }
- }
- }
- if (other.hasOnChangeAction()) {
- mergeOnChangeAction(other.getOnChangeAction());
- }
- if (other.getMultiSelectMaxSelectedItems() != 0) {
- setMultiSelectMaxSelectedItems(other.getMultiSelectMaxSelectedItems());
- }
- if (other.getMultiSelectMinQueryLength() != 0) {
- setMultiSelectMinQueryLength(other.getMultiSelectMinQueryLength());
- }
- switch (other.getMultiSelectDataSourceCase()) {
- case EXTERNAL_DATA_SOURCE:
- {
- mergeExternalDataSource(other.getExternalDataSource());
- break;
- }
- case PLATFORM_DATA_SOURCE:
- {
- mergePlatformDataSource(other.getPlatformDataSource());
- break;
- }
- case MULTISELECTDATASOURCE_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:
- {
- name_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 18:
- {
- label_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
- break;
- } // case 18
- case 24:
- {
- type_ = input.readEnum();
- bitField0_ |= 0x00000004;
- break;
- } // case 24
- case 34:
- {
- com.google.apps.card.v1.SelectionInput.SelectionItem m =
- input.readMessage(
- com.google.apps.card.v1.SelectionInput.SelectionItem.parser(),
- extensionRegistry);
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- items_.add(m);
- } else {
- itemsBuilder_.addMessage(m);
- }
- break;
- } // case 34
- case 42:
- {
- input.readMessage(getOnChangeActionFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000010;
- break;
- } // case 42
- case 48:
- {
- multiSelectMaxSelectedItems_ = input.readInt32();
- bitField0_ |= 0x00000020;
- break;
- } // case 48
- case 56:
- {
- multiSelectMinQueryLength_ = input.readInt32();
- bitField0_ |= 0x00000040;
- break;
- } // case 56
- case 66:
- {
- input.readMessage(
- getExternalDataSourceFieldBuilder().getBuilder(), extensionRegistry);
- multiSelectDataSourceCase_ = 8;
- break;
- } // case 66
- case 74:
- {
- input.readMessage(
- getPlatformDataSourceFieldBuilder().getBuilder(), extensionRegistry);
- multiSelectDataSourceCase_ = 9;
- break;
- } // case 74
- 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 multiSelectDataSourceCase_ = 0;
- private java.lang.Object multiSelectDataSource_;
-
- public MultiSelectDataSourceCase getMultiSelectDataSourceCase() {
- return MultiSelectDataSourceCase.forNumber(multiSelectDataSourceCase_);
- }
-
- public Builder clearMultiSelectDataSource() {
- multiSelectDataSourceCase_ = 0;
- multiSelectDataSource_ = null;
- onChanged();
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object name_ = "";
- /**
- *
- *
- *
- * 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/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The name.
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * 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/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The bytes for name.
- */
- public com.google.protobuf.ByteString getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * 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/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @param value The name to set.
- * @return This builder for chaining.
- */
- public Builder setName(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- name_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearName() {
- name_ = getDefaultInstance().getName();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @param value The bytes for name to set.
- * @return This builder for chaining.
- */
- public Builder setNameBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- name_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
- private java.lang.Object label_ = "";
- /**
- *
- *
- *
- * The text that appears above the selection input field in the user
- * interface.
- *
- * Specify text that helps the user enter the information your app needs.
- * For example, if users are selecting the urgency of a work ticket from a
- * drop-down menu, the label might be "Urgency" or "Select urgency".
- *
- *
- * 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 that appears above the selection input field in the user
- * interface.
- *
- * Specify text that helps the user enter the information your app needs.
- * For example, if users are selecting the urgency of a work ticket from a
- * drop-down menu, the label might be "Urgency" or "Select urgency".
- *
- *
- * 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 that appears above the selection input field in the user
- * interface.
- *
- * Specify text that helps the user enter the information your app needs.
- * For example, if users are selecting the urgency of a work ticket from a
- * drop-down menu, the label might be "Urgency" or "Select urgency".
- *
- *
- * 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 that appears above the selection input field in the user
- * interface.
- *
- * Specify text that helps the user enter the information your app needs.
- * For example, if users are selecting the urgency of a work ticket from a
- * drop-down menu, the label might be "Urgency" or "Select urgency".
- *
- *
- * string label = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearLabel() {
- label_ = getDefaultInstance().getLabel();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The text that appears above the selection input field in the user
- * interface.
- *
- * Specify text that helps the user enter the information your app needs.
- * For example, if users are selecting the urgency of a work ticket from a
- * drop-down menu, the label might be "Urgency" or "Select urgency".
- *
- *
- * 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 int type_ = 0;
- /**
- *
- *
- *
- * The type of items that are displayed to users in a `SelectionInput` widget.
- * Selection types support different types of interactions. For example, users
- * can select one or more checkboxes, but they can only select one value from
- * a dropdown menu.
- *
- *
- * .google.apps.card.v1.SelectionInput.SelectionType type = 3;
- *
- * @return The enum numeric value on the wire for type.
- */
- @java.lang.Override
- public int getTypeValue() {
- return type_;
- }
- /**
- *
- *
- *
- * The type of items that are displayed to users in a `SelectionInput` widget.
- * Selection types support different types of interactions. For example, users
- * can select one or more checkboxes, but they can only select one value from
- * a dropdown menu.
- *
- *
- * .google.apps.card.v1.SelectionInput.SelectionType type = 3;
- *
- * @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_ |= 0x00000004;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The type of items that are displayed to users in a `SelectionInput` widget.
- * Selection types support different types of interactions. For example, users
- * can select one or more checkboxes, but they can only select one value from
- * a dropdown menu.
- *
- *
- * .google.apps.card.v1.SelectionInput.SelectionType type = 3;
- *
- * @return The type.
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.SelectionType getType() {
- com.google.apps.card.v1.SelectionInput.SelectionType result =
- com.google.apps.card.v1.SelectionInput.SelectionType.forNumber(type_);
- return result == null
- ? com.google.apps.card.v1.SelectionInput.SelectionType.UNRECOGNIZED
- : result;
- }
- /**
- *
- *
- *
- * The type of items that are displayed to users in a `SelectionInput` widget.
- * Selection types support different types of interactions. For example, users
- * can select one or more checkboxes, but they can only select one value from
- * a dropdown menu.
- *
- *
- * .google.apps.card.v1.SelectionInput.SelectionType type = 3;
- *
- * @param value The type to set.
- * @return This builder for chaining.
- */
- public Builder setType(com.google.apps.card.v1.SelectionInput.SelectionType value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- type_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The type of items that are displayed to users in a `SelectionInput` widget.
- * Selection types support different types of interactions. For example, users
- * can select one or more checkboxes, but they can only select one value from
- * a dropdown menu.
- *
- *
- * .google.apps.card.v1.SelectionInput.SelectionType type = 3;
- *
- * @return This builder for chaining.
- */
- public Builder clearType() {
- bitField0_ = (bitField0_ & ~0x00000004);
- type_ = 0;
- onChanged();
- return this;
- }
-
- private java.util.List items_ =
- java.util.Collections.emptyList();
-
- private void ensureItemsIsMutable() {
- if (!((bitField0_ & 0x00000008) != 0)) {
- items_ =
- new java.util.ArrayList(items_);
- bitField0_ |= 0x00000008;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.SelectionInput.SelectionItem,
- com.google.apps.card.v1.SelectionInput.SelectionItem.Builder,
- com.google.apps.card.v1.SelectionInput.SelectionItemOrBuilder>
- itemsBuilder_;
-
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public java.util.List getItemsList() {
- if (itemsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(items_);
- } else {
- return itemsBuilder_.getMessageList();
- }
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public int getItemsCount() {
- if (itemsBuilder_ == null) {
- return items_.size();
- } else {
- return itemsBuilder_.getCount();
- }
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public com.google.apps.card.v1.SelectionInput.SelectionItem getItems(int index) {
- if (itemsBuilder_ == null) {
- return items_.get(index);
- } else {
- return itemsBuilder_.getMessage(index);
- }
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public Builder setItems(int index, com.google.apps.card.v1.SelectionInput.SelectionItem value) {
- if (itemsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureItemsIsMutable();
- items_.set(index, value);
- onChanged();
- } else {
- itemsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public Builder setItems(
- int index, com.google.apps.card.v1.SelectionInput.SelectionItem.Builder builderForValue) {
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- items_.set(index, builderForValue.build());
- onChanged();
- } else {
- itemsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public Builder addItems(com.google.apps.card.v1.SelectionInput.SelectionItem value) {
- if (itemsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureItemsIsMutable();
- items_.add(value);
- onChanged();
- } else {
- itemsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public Builder addItems(int index, com.google.apps.card.v1.SelectionInput.SelectionItem value) {
- if (itemsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureItemsIsMutable();
- items_.add(index, value);
- onChanged();
- } else {
- itemsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public Builder addItems(
- com.google.apps.card.v1.SelectionInput.SelectionItem.Builder builderForValue) {
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- items_.add(builderForValue.build());
- onChanged();
- } else {
- itemsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public Builder addItems(
- int index, com.google.apps.card.v1.SelectionInput.SelectionItem.Builder builderForValue) {
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- items_.add(index, builderForValue.build());
- onChanged();
- } else {
- itemsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public Builder addAllItems(
- java.lang.Iterable extends com.google.apps.card.v1.SelectionInput.SelectionItem> values) {
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, items_);
- onChanged();
- } else {
- itemsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public Builder clearItems() {
- if (itemsBuilder_ == null) {
- items_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- } else {
- itemsBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public Builder removeItems(int index) {
- if (itemsBuilder_ == null) {
- ensureItemsIsMutable();
- items_.remove(index);
- onChanged();
- } else {
- itemsBuilder_.remove(index);
- }
- return this;
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public com.google.apps.card.v1.SelectionInput.SelectionItem.Builder getItemsBuilder(int index) {
- return getItemsFieldBuilder().getBuilder(index);
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public com.google.apps.card.v1.SelectionInput.SelectionItemOrBuilder getItemsOrBuilder(
- int index) {
- if (itemsBuilder_ == null) {
- return items_.get(index);
- } else {
- return itemsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public java.util.List extends com.google.apps.card.v1.SelectionInput.SelectionItemOrBuilder>
- getItemsOrBuilderList() {
- if (itemsBuilder_ != null) {
- return itemsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(items_);
- }
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public com.google.apps.card.v1.SelectionInput.SelectionItem.Builder addItemsBuilder() {
- return getItemsFieldBuilder()
- .addBuilder(com.google.apps.card.v1.SelectionInput.SelectionItem.getDefaultInstance());
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public com.google.apps.card.v1.SelectionInput.SelectionItem.Builder addItemsBuilder(int index) {
- return getItemsFieldBuilder()
- .addBuilder(
- index, com.google.apps.card.v1.SelectionInput.SelectionItem.getDefaultInstance());
- }
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- public java.util.List
- getItemsBuilderList() {
- return getItemsFieldBuilder().getBuilderList();
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.SelectionInput.SelectionItem,
- com.google.apps.card.v1.SelectionInput.SelectionItem.Builder,
- com.google.apps.card.v1.SelectionInput.SelectionItemOrBuilder>
- getItemsFieldBuilder() {
- if (itemsBuilder_ == null) {
- itemsBuilder_ =
- new com.google.protobuf.RepeatedFieldBuilderV3<
- com.google.apps.card.v1.SelectionInput.SelectionItem,
- com.google.apps.card.v1.SelectionInput.SelectionItem.Builder,
- com.google.apps.card.v1.SelectionInput.SelectionItemOrBuilder>(
- items_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
- items_ = null;
- }
- return itemsBuilder_;
- }
-
- private com.google.apps.card.v1.Action onChangeAction_;
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- onChangeActionBuilder_;
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- *
- * @return Whether the onChangeAction field is set.
- */
- public boolean hasOnChangeAction() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- *
- * @return The onChangeAction.
- */
- public com.google.apps.card.v1.Action getOnChangeAction() {
- if (onChangeActionBuilder_ == null) {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- } else {
- return onChangeActionBuilder_.getMessage();
- }
- }
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- */
- public Builder setOnChangeAction(com.google.apps.card.v1.Action value) {
- if (onChangeActionBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- onChangeAction_ = value;
- } else {
- onChangeActionBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- */
- public Builder setOnChangeAction(com.google.apps.card.v1.Action.Builder builderForValue) {
- if (onChangeActionBuilder_ == null) {
- onChangeAction_ = builderForValue.build();
- } else {
- onChangeActionBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000010;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- */
- public Builder mergeOnChangeAction(com.google.apps.card.v1.Action value) {
- if (onChangeActionBuilder_ == null) {
- if (((bitField0_ & 0x00000010) != 0)
- && onChangeAction_ != null
- && onChangeAction_ != com.google.apps.card.v1.Action.getDefaultInstance()) {
- getOnChangeActionBuilder().mergeFrom(value);
- } else {
- onChangeAction_ = value;
- }
- } else {
- onChangeActionBuilder_.mergeFrom(value);
- }
- if (onChangeAction_ != null) {
- bitField0_ |= 0x00000010;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- */
- public Builder clearOnChangeAction() {
- bitField0_ = (bitField0_ & ~0x00000010);
- onChangeAction_ = null;
- if (onChangeActionBuilder_ != null) {
- onChangeActionBuilder_.dispose();
- onChangeActionBuilder_ = null;
- }
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- */
- public com.google.apps.card.v1.Action.Builder getOnChangeActionBuilder() {
- bitField0_ |= 0x00000010;
- onChanged();
- return getOnChangeActionFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- */
- public com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder() {
- if (onChangeActionBuilder_ != null) {
- return onChangeActionBuilder_.getMessageOrBuilder();
- } else {
- return onChangeAction_ == null
- ? com.google.apps.card.v1.Action.getDefaultInstance()
- : onChangeAction_;
- }
- }
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- getOnChangeActionFieldBuilder() {
- if (onChangeActionBuilder_ == null) {
- onChangeActionBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>(
- getOnChangeAction(), getParentForChildren(), isClean());
- onChangeAction_ = null;
- }
- return onChangeActionBuilder_;
- }
-
- private int multiSelectMaxSelectedItems_;
- /**
- *
- *
- *
- * 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;
- *
- * @return The multiSelectMaxSelectedItems.
- */
- @java.lang.Override
- public int getMultiSelectMaxSelectedItems() {
- return multiSelectMaxSelectedItems_;
- }
- /**
- *
- *
- *
- * 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;
- *
- * @param value The multiSelectMaxSelectedItems to set.
- * @return This builder for chaining.
- */
- public Builder setMultiSelectMaxSelectedItems(int value) {
-
- multiSelectMaxSelectedItems_ = value;
- bitField0_ |= 0x00000020;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * 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;
- *
- * @return This builder for chaining.
- */
- public Builder clearMultiSelectMaxSelectedItems() {
- bitField0_ = (bitField0_ & ~0x00000020);
- multiSelectMaxSelectedItems_ = 0;
- onChanged();
- return this;
- }
-
- private int multiSelectMinQueryLength_;
- /**
- *
- *
- *
- * For multiselect menus, the number of text characters that a user inputs
- * before the Chat app queries autocomplete and displays suggested items
- * in the menu.
- *
- * If unspecified, defaults to 0 characters for static data sources and 3
- * characters for external data sources.
- *
- *
- * int32 multi_select_min_query_length = 7;
- *
- * @return The multiSelectMinQueryLength.
- */
- @java.lang.Override
- public int getMultiSelectMinQueryLength() {
- return multiSelectMinQueryLength_;
- }
- /**
- *
- *
- *
- * For multiselect menus, the number of text characters that a user inputs
- * before the Chat app queries autocomplete and displays suggested items
- * in the menu.
- *
- * If unspecified, defaults to 0 characters for static data sources and 3
- * characters for external data sources.
- *
- *
- * int32 multi_select_min_query_length = 7;
- *
- * @param value The multiSelectMinQueryLength to set.
- * @return This builder for chaining.
- */
- public Builder setMultiSelectMinQueryLength(int value) {
-
- multiSelectMinQueryLength_ = value;
- bitField0_ |= 0x00000040;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * For multiselect menus, the number of text characters that a user inputs
- * before the Chat app queries autocomplete and displays suggested items
- * in the menu.
- *
- * If unspecified, defaults to 0 characters for static data sources and 3
- * characters for external data sources.
- *
- *
- * int32 multi_select_min_query_length = 7;
- *
- * @return This builder for chaining.
- */
- public Builder clearMultiSelectMinQueryLength() {
- bitField0_ = (bitField0_ & ~0x00000040);
- multiSelectMinQueryLength_ = 0;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- externalDataSourceBuilder_;
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- *
- * @return Whether the externalDataSource field is set.
- */
- @java.lang.Override
- public boolean hasExternalDataSource() {
- return multiSelectDataSourceCase_ == 8;
- }
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- *
- * @return The externalDataSource.
- */
- @java.lang.Override
- public com.google.apps.card.v1.Action getExternalDataSource() {
- if (externalDataSourceBuilder_ == null) {
- if (multiSelectDataSourceCase_ == 8) {
- return (com.google.apps.card.v1.Action) multiSelectDataSource_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- } else {
- if (multiSelectDataSourceCase_ == 8) {
- return externalDataSourceBuilder_.getMessage();
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- */
- public Builder setExternalDataSource(com.google.apps.card.v1.Action value) {
- if (externalDataSourceBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- multiSelectDataSource_ = value;
- onChanged();
- } else {
- externalDataSourceBuilder_.setMessage(value);
- }
- multiSelectDataSourceCase_ = 8;
- return this;
- }
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- */
- public Builder setExternalDataSource(com.google.apps.card.v1.Action.Builder builderForValue) {
- if (externalDataSourceBuilder_ == null) {
- multiSelectDataSource_ = builderForValue.build();
- onChanged();
- } else {
- externalDataSourceBuilder_.setMessage(builderForValue.build());
- }
- multiSelectDataSourceCase_ = 8;
- return this;
- }
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- */
- public Builder mergeExternalDataSource(com.google.apps.card.v1.Action value) {
- if (externalDataSourceBuilder_ == null) {
- if (multiSelectDataSourceCase_ == 8
- && multiSelectDataSource_ != com.google.apps.card.v1.Action.getDefaultInstance()) {
- multiSelectDataSource_ =
- com.google.apps.card.v1.Action.newBuilder(
- (com.google.apps.card.v1.Action) multiSelectDataSource_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- multiSelectDataSource_ = value;
- }
- onChanged();
- } else {
- if (multiSelectDataSourceCase_ == 8) {
- externalDataSourceBuilder_.mergeFrom(value);
- } else {
- externalDataSourceBuilder_.setMessage(value);
- }
- }
- multiSelectDataSourceCase_ = 8;
- return this;
- }
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- */
- public Builder clearExternalDataSource() {
- if (externalDataSourceBuilder_ == null) {
- if (multiSelectDataSourceCase_ == 8) {
- multiSelectDataSourceCase_ = 0;
- multiSelectDataSource_ = null;
- onChanged();
- }
- } else {
- if (multiSelectDataSourceCase_ == 8) {
- multiSelectDataSourceCase_ = 0;
- multiSelectDataSource_ = null;
- }
- externalDataSourceBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- */
- public com.google.apps.card.v1.Action.Builder getExternalDataSourceBuilder() {
- return getExternalDataSourceFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- */
- @java.lang.Override
- public com.google.apps.card.v1.ActionOrBuilder getExternalDataSourceOrBuilder() {
- if ((multiSelectDataSourceCase_ == 8) && (externalDataSourceBuilder_ != null)) {
- return externalDataSourceBuilder_.getMessageOrBuilder();
- } else {
- if (multiSelectDataSourceCase_ == 8) {
- return (com.google.apps.card.v1.Action) multiSelectDataSource_;
- }
- return com.google.apps.card.v1.Action.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>
- getExternalDataSourceFieldBuilder() {
- if (externalDataSourceBuilder_ == null) {
- if (!(multiSelectDataSourceCase_ == 8)) {
- multiSelectDataSource_ = com.google.apps.card.v1.Action.getDefaultInstance();
- }
- externalDataSourceBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.Action,
- com.google.apps.card.v1.Action.Builder,
- com.google.apps.card.v1.ActionOrBuilder>(
- (com.google.apps.card.v1.Action) multiSelectDataSource_,
- getParentForChildren(),
- isClean());
- multiSelectDataSource_ = null;
- }
- multiSelectDataSourceCase_ = 8;
- onChanged();
- return externalDataSourceBuilder_;
- }
-
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.SelectionInput.PlatformDataSource,
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.Builder,
- com.google.apps.card.v1.SelectionInput.PlatformDataSourceOrBuilder>
- platformDataSourceBuilder_;
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- *
- * @return Whether the platformDataSource field is set.
- */
- @java.lang.Override
- public boolean hasPlatformDataSource() {
- return multiSelectDataSourceCase_ == 9;
- }
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- *
- * @return The platformDataSource.
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.PlatformDataSource getPlatformDataSource() {
- if (platformDataSourceBuilder_ == null) {
- if (multiSelectDataSourceCase_ == 9) {
- return (com.google.apps.card.v1.SelectionInput.PlatformDataSource) multiSelectDataSource_;
- }
- return com.google.apps.card.v1.SelectionInput.PlatformDataSource.getDefaultInstance();
- } else {
- if (multiSelectDataSourceCase_ == 9) {
- return platformDataSourceBuilder_.getMessage();
- }
- return com.google.apps.card.v1.SelectionInput.PlatformDataSource.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- */
- public Builder setPlatformDataSource(
- com.google.apps.card.v1.SelectionInput.PlatformDataSource value) {
- if (platformDataSourceBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- multiSelectDataSource_ = value;
- onChanged();
- } else {
- platformDataSourceBuilder_.setMessage(value);
- }
- multiSelectDataSourceCase_ = 9;
- return this;
- }
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- */
- public Builder setPlatformDataSource(
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.Builder builderForValue) {
- if (platformDataSourceBuilder_ == null) {
- multiSelectDataSource_ = builderForValue.build();
- onChanged();
- } else {
- platformDataSourceBuilder_.setMessage(builderForValue.build());
- }
- multiSelectDataSourceCase_ = 9;
- return this;
- }
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- */
- public Builder mergePlatformDataSource(
- com.google.apps.card.v1.SelectionInput.PlatformDataSource value) {
- if (platformDataSourceBuilder_ == null) {
- if (multiSelectDataSourceCase_ == 9
- && multiSelectDataSource_
- != com.google.apps.card.v1.SelectionInput.PlatformDataSource.getDefaultInstance()) {
- multiSelectDataSource_ =
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.newBuilder(
- (com.google.apps.card.v1.SelectionInput.PlatformDataSource)
- multiSelectDataSource_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- multiSelectDataSource_ = value;
- }
- onChanged();
- } else {
- if (multiSelectDataSourceCase_ == 9) {
- platformDataSourceBuilder_.mergeFrom(value);
- } else {
- platformDataSourceBuilder_.setMessage(value);
- }
- }
- multiSelectDataSourceCase_ = 9;
- return this;
- }
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- */
- public Builder clearPlatformDataSource() {
- if (platformDataSourceBuilder_ == null) {
- if (multiSelectDataSourceCase_ == 9) {
- multiSelectDataSourceCase_ = 0;
- multiSelectDataSource_ = null;
- onChanged();
- }
- } else {
- if (multiSelectDataSourceCase_ == 9) {
- multiSelectDataSourceCase_ = 0;
- multiSelectDataSource_ = null;
- }
- platformDataSourceBuilder_.clear();
- }
- return this;
- }
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- */
- public com.google.apps.card.v1.SelectionInput.PlatformDataSource.Builder
- getPlatformDataSourceBuilder() {
- return getPlatformDataSourceFieldBuilder().getBuilder();
- }
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- */
- @java.lang.Override
- public com.google.apps.card.v1.SelectionInput.PlatformDataSourceOrBuilder
- getPlatformDataSourceOrBuilder() {
- if ((multiSelectDataSourceCase_ == 9) && (platformDataSourceBuilder_ != null)) {
- return platformDataSourceBuilder_.getMessageOrBuilder();
- } else {
- if (multiSelectDataSourceCase_ == 9) {
- return (com.google.apps.card.v1.SelectionInput.PlatformDataSource) multiSelectDataSource_;
- }
- return com.google.apps.card.v1.SelectionInput.PlatformDataSource.getDefaultInstance();
- }
- }
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.SelectionInput.PlatformDataSource,
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.Builder,
- com.google.apps.card.v1.SelectionInput.PlatformDataSourceOrBuilder>
- getPlatformDataSourceFieldBuilder() {
- if (platformDataSourceBuilder_ == null) {
- if (!(multiSelectDataSourceCase_ == 9)) {
- multiSelectDataSource_ =
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.getDefaultInstance();
- }
- platformDataSourceBuilder_ =
- new com.google.protobuf.SingleFieldBuilderV3<
- com.google.apps.card.v1.SelectionInput.PlatformDataSource,
- com.google.apps.card.v1.SelectionInput.PlatformDataSource.Builder,
- com.google.apps.card.v1.SelectionInput.PlatformDataSourceOrBuilder>(
- (com.google.apps.card.v1.SelectionInput.PlatformDataSource) multiSelectDataSource_,
- getParentForChildren(),
- isClean());
- multiSelectDataSource_ = null;
- }
- multiSelectDataSourceCase_ = 9;
- onChanged();
- return platformDataSourceBuilder_;
- }
-
- @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.SelectionInput)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.SelectionInput)
- private static final com.google.apps.card.v1.SelectionInput DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.SelectionInput();
- }
-
- public static com.google.apps.card.v1.SelectionInput getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public SelectionInput 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.SelectionInput getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/SelectionInputOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/SelectionInputOrBuilder.java
deleted file mode 100644
index 7bb3390904c6..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/SelectionInputOrBuilder.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-public interface SelectionInputOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.SelectionInput)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * 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/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The name.
- */
- java.lang.String getName();
- /**
- *
- *
- *
- * 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/chat/ui/read-form-data).
- *
- *
- * string name = 1;
- *
- * @return The bytes for name.
- */
- com.google.protobuf.ByteString getNameBytes();
-
- /**
- *
- *
- *
- * The text that appears above the selection input field in the user
- * interface.
- *
- * Specify text that helps the user enter the information your app needs.
- * For example, if users are selecting the urgency of a work ticket from a
- * drop-down menu, the label might be "Urgency" or "Select urgency".
- *
- *
- * string label = 2;
- *
- * @return The label.
- */
- java.lang.String getLabel();
- /**
- *
- *
- *
- * The text that appears above the selection input field in the user
- * interface.
- *
- * Specify text that helps the user enter the information your app needs.
- * For example, if users are selecting the urgency of a work ticket from a
- * drop-down menu, the label might be "Urgency" or "Select urgency".
- *
- *
- * string label = 2;
- *
- * @return The bytes for label.
- */
- com.google.protobuf.ByteString getLabelBytes();
-
- /**
- *
- *
- *
- * The type of items that are displayed to users in a `SelectionInput` widget.
- * Selection types support different types of interactions. For example, users
- * can select one or more checkboxes, but they can only select one value from
- * a dropdown menu.
- *
- *
- * .google.apps.card.v1.SelectionInput.SelectionType type = 3;
- *
- * @return The enum numeric value on the wire for type.
- */
- int getTypeValue();
- /**
- *
- *
- *
- * The type of items that are displayed to users in a `SelectionInput` widget.
- * Selection types support different types of interactions. For example, users
- * can select one or more checkboxes, but they can only select one value from
- * a dropdown menu.
- *
- *
- * .google.apps.card.v1.SelectionInput.SelectionType type = 3;
- *
- * @return The type.
- */
- com.google.apps.card.v1.SelectionInput.SelectionType getType();
-
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- java.util.List getItemsList();
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- com.google.apps.card.v1.SelectionInput.SelectionItem getItems(int index);
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- int getItemsCount();
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- java.util.List extends com.google.apps.card.v1.SelectionInput.SelectionItemOrBuilder>
- getItemsOrBuilderList();
- /**
- *
- *
- *
- * An array of selectable items. For example, an array of radio buttons or
- * checkboxes. Supports up to 100 items.
- *
- *
- * repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4;
- */
- com.google.apps.card.v1.SelectionInput.SelectionItemOrBuilder getItemsOrBuilder(int index);
-
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- *
- * @return Whether the onChangeAction field is set.
- */
- boolean hasOnChangeAction();
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- *
- * @return The onChangeAction.
- */
- com.google.apps.card.v1.Action getOnChangeAction();
- /**
- *
- *
- *
- * If specified, the form is submitted when the selection changes. If not
- * specified, you must specify a separate button that submits the form.
- *
- * For details about working with form inputs, see [Receive form
- * data](https://developers.google.com/chat/ui/read-form-data).
- *
- *
- * .google.apps.card.v1.Action on_change_action = 5;
- */
- com.google.apps.card.v1.ActionOrBuilder getOnChangeActionOrBuilder();
-
- /**
- *
- *
- *
- * 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;
- *
- * @return The multiSelectMaxSelectedItems.
- */
- int getMultiSelectMaxSelectedItems();
-
- /**
- *
- *
- *
- * For multiselect menus, the number of text characters that a user inputs
- * before the Chat app queries autocomplete and displays suggested items
- * in the menu.
- *
- * If unspecified, defaults to 0 characters for static data sources and 3
- * characters for external data sources.
- *
- *
- * int32 multi_select_min_query_length = 7;
- *
- * @return The multiSelectMinQueryLength.
- */
- int getMultiSelectMinQueryLength();
-
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- *
- * @return Whether the externalDataSource field is set.
- */
- boolean hasExternalDataSource();
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- *
- * @return The externalDataSource.
- */
- com.google.apps.card.v1.Action getExternalDataSource();
- /**
- *
- *
- *
- * An external data source, such as a relational data base.
- *
- *
- * .google.apps.card.v1.Action external_data_source = 8;
- */
- com.google.apps.card.v1.ActionOrBuilder getExternalDataSourceOrBuilder();
-
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- *
- * @return Whether the platformDataSource field is set.
- */
- boolean hasPlatformDataSource();
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- *
- * @return The platformDataSource.
- */
- com.google.apps.card.v1.SelectionInput.PlatformDataSource getPlatformDataSource();
- /**
- *
- *
- *
- * A data source from Google Workspace.
- *
- *
- * .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9;
- */
- com.google.apps.card.v1.SelectionInput.PlatformDataSourceOrBuilder
- getPlatformDataSourceOrBuilder();
-
- com.google.apps.card.v1.SelectionInput.MultiSelectDataSourceCase getMultiSelectDataSourceCase();
-}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Suggestions.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Suggestions.java
deleted file mode 100644
index 696bc5935603..000000000000
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/apps/card/v1/Suggestions.java
+++ /dev/null
@@ -1,1797 +0,0 @@
-/*
- * Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/apps/card/v1/card.proto
-
-// Protobuf Java Version: 3.25.2
-package com.google.apps.card.v1;
-
-/**
- *
- *
- *
- * Suggested values that users can enter. These values appear when users click
- * inside the text input field. As users type, the suggested values
- * dynamically filter to match what the users have typed.
- *
- * For example, a text input field for programming language might suggest
- * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list
- * of suggestions filters to show `Java` and `JavaScript`.
- *
- * Suggested values help guide users to enter values that your app can make
- * sense of. When referring to JavaScript, some users might enter `javascript`
- * and others `java script`. Suggesting `JavaScript` can standardize how users
- * interact with your app.
- *
- * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set
- * to `MULTIPLE_LINE`.
- *
- * [Google Workspace
- * Add-ons and Chat apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Suggestions}
- */
-public final class Suggestions extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Suggestions)
- SuggestionsOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Suggestions.newBuilder() to construct.
- private Suggestions(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Suggestions() {
- items_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new Suggestions();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Suggestions_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Suggestions_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Suggestions.class,
- com.google.apps.card.v1.Suggestions.Builder.class);
- }
-
- public interface SuggestionItemOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.apps.card.v1.Suggestions.SuggestionItem)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @return Whether the text field is set.
- */
- boolean hasText();
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @return The text.
- */
- java.lang.String getText();
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @return The bytes for text.
- */
- com.google.protobuf.ByteString getTextBytes();
-
- com.google.apps.card.v1.Suggestions.SuggestionItem.ContentCase getContentCase();
- }
- /**
- *
- *
- *
- * One suggested value that users can enter in a text input field.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Suggestions.SuggestionItem}
- */
- public static final class SuggestionItem extends com.google.protobuf.GeneratedMessageV3
- implements
- // @@protoc_insertion_point(message_implements:google.apps.card.v1.Suggestions.SuggestionItem)
- SuggestionItemOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use SuggestionItem.newBuilder() to construct.
- private SuggestionItem(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private SuggestionItem() {}
-
- @java.lang.Override
- @SuppressWarnings({"unused"})
- protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
- return new SuggestionItem();
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Suggestions_SuggestionItem_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Suggestions_SuggestionItem_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Suggestions.SuggestionItem.class,
- com.google.apps.card.v1.Suggestions.SuggestionItem.Builder.class);
- }
-
- private int contentCase_ = 0;
-
- @SuppressWarnings("serial")
- private java.lang.Object content_;
-
- public enum ContentCase
- implements
- com.google.protobuf.Internal.EnumLite,
- com.google.protobuf.AbstractMessage.InternalOneOfEnum {
- TEXT(1),
- CONTENT_NOT_SET(0);
- private final int value;
-
- private ContentCase(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 ContentCase valueOf(int value) {
- return forNumber(value);
- }
-
- public static ContentCase forNumber(int value) {
- switch (value) {
- case 1:
- return TEXT;
- case 0:
- return CONTENT_NOT_SET;
- default:
- return null;
- }
- }
-
- public int getNumber() {
- return this.value;
- }
- };
-
- public ContentCase getContentCase() {
- return ContentCase.forNumber(contentCase_);
- }
-
- public static final int TEXT_FIELD_NUMBER = 1;
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @return Whether the text field is set.
- */
- public boolean hasText() {
- return contentCase_ == 1;
- }
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @return The text.
- */
- public java.lang.String getText() {
- java.lang.Object ref = "";
- if (contentCase_ == 1) {
- ref = content_;
- }
- 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();
- if (contentCase_ == 1) {
- content_ = s;
- }
- return s;
- }
- }
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @return The bytes for text.
- */
- public com.google.protobuf.ByteString getTextBytes() {
- java.lang.Object ref = "";
- if (contentCase_ == 1) {
- ref = content_;
- }
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- if (contentCase_ == 1) {
- content_ = 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 (contentCase_ == 1) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_);
- }
- getUnknownFields().writeTo(output);
- }
-
- @java.lang.Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (contentCase_ == 1) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_);
- }
- 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.Suggestions.SuggestionItem)) {
- return super.equals(obj);
- }
- com.google.apps.card.v1.Suggestions.SuggestionItem other =
- (com.google.apps.card.v1.Suggestions.SuggestionItem) obj;
-
- if (!getContentCase().equals(other.getContentCase())) return false;
- switch (contentCase_) {
- case 1:
- if (!getText().equals(other.getText())) 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 (contentCase_) {
- case 1:
- hash = (37 * hash) + TEXT_FIELD_NUMBER;
- hash = (53 * hash) + getText().hashCode();
- break;
- case 0:
- default:
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.apps.card.v1.Suggestions.SuggestionItem parseFrom(
- java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Suggestions.SuggestionItem 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.Suggestions.SuggestionItem parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Suggestions.SuggestionItem 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.Suggestions.SuggestionItem parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.google.apps.card.v1.Suggestions.SuggestionItem 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.Suggestions.SuggestionItem parseFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Suggestions.SuggestionItem 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.Suggestions.SuggestionItem parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.google.apps.card.v1.Suggestions.SuggestionItem 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.Suggestions.SuggestionItem 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.Suggestions.SuggestionItem 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.Suggestions.SuggestionItem 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;
- }
- /**
- *
- *
- *
- * One suggested value that users can enter in a text input field.
- *
- * [Google Workspace Add-ons and Chat
- * apps](https://developers.google.com/workspace/extend):
- *
- *
- * Protobuf type {@code google.apps.card.v1.Suggestions.SuggestionItem}
- */
- public static final class Builder
- extends com.google.protobuf.GeneratedMessageV3.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.apps.card.v1.Suggestions.SuggestionItem)
- com.google.apps.card.v1.Suggestions.SuggestionItemOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Suggestions_SuggestionItem_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.apps.card.v1.CardProto
- .internal_static_google_apps_card_v1_Suggestions_SuggestionItem_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.apps.card.v1.Suggestions.SuggestionItem.class,
- com.google.apps.card.v1.Suggestions.SuggestionItem.Builder.class);
- }
-
- // Construct using com.google.apps.card.v1.Suggestions.SuggestionItem.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- contentCase_ = 0;
- content_ = 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_Suggestions_SuggestionItem_descriptor;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Suggestions.SuggestionItem getDefaultInstanceForType() {
- return com.google.apps.card.v1.Suggestions.SuggestionItem.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Suggestions.SuggestionItem build() {
- com.google.apps.card.v1.Suggestions.SuggestionItem result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.apps.card.v1.Suggestions.SuggestionItem buildPartial() {
- com.google.apps.card.v1.Suggestions.SuggestionItem result =
- new com.google.apps.card.v1.Suggestions.SuggestionItem(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- buildPartialOneofs(result);
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.apps.card.v1.Suggestions.SuggestionItem result) {
- int from_bitField0_ = bitField0_;
- }
-
- private void buildPartialOneofs(com.google.apps.card.v1.Suggestions.SuggestionItem result) {
- result.contentCase_ = contentCase_;
- result.content_ = this.content_;
- }
-
- @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.Suggestions.SuggestionItem) {
- return mergeFrom((com.google.apps.card.v1.Suggestions.SuggestionItem) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.apps.card.v1.Suggestions.SuggestionItem other) {
- if (other == com.google.apps.card.v1.Suggestions.SuggestionItem.getDefaultInstance())
- return this;
- switch (other.getContentCase()) {
- case TEXT:
- {
- contentCase_ = 1;
- content_ = other.content_;
- onChanged();
- break;
- }
- case CONTENT_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:
- {
- java.lang.String s = input.readStringRequireUtf8();
- contentCase_ = 1;
- content_ = s;
- 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 contentCase_ = 0;
- private java.lang.Object content_;
-
- public ContentCase getContentCase() {
- return ContentCase.forNumber(contentCase_);
- }
-
- public Builder clearContent() {
- contentCase_ = 0;
- content_ = null;
- onChanged();
- return this;
- }
-
- private int bitField0_;
-
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @return Whether the text field is set.
- */
- @java.lang.Override
- public boolean hasText() {
- return contentCase_ == 1;
- }
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @return The text.
- */
- @java.lang.Override
- public java.lang.String getText() {
- java.lang.Object ref = "";
- if (contentCase_ == 1) {
- ref = content_;
- }
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (contentCase_ == 1) {
- content_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @return The bytes for text.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getTextBytes() {
- java.lang.Object ref = "";
- if (contentCase_ == 1) {
- ref = content_;
- }
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- if (contentCase_ == 1) {
- content_ = b;
- }
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @param value The text to set.
- * @return This builder for chaining.
- */
- public Builder setText(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- contentCase_ = 1;
- content_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearText() {
- if (contentCase_ == 1) {
- contentCase_ = 0;
- content_ = null;
- onChanged();
- }
- return this;
- }
- /**
- *
- *
- *
- * The value of a suggested input to a text input field. This is
- * equivalent to what users enter themselves.
- *
- *
- * string text = 1;
- *
- * @param value The bytes for text to set.
- * @return This builder for chaining.
- */
- public Builder setTextBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- contentCase_ = 1;
- content_ = value;
- 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.Suggestions.SuggestionItem)
- }
-
- // @@protoc_insertion_point(class_scope:google.apps.card.v1.Suggestions.SuggestionItem)
- private static final com.google.apps.card.v1.Suggestions.SuggestionItem DEFAULT_INSTANCE;
-
- static {
- DEFAULT_INSTANCE = new com.google.apps.card.v1.Suggestions.SuggestionItem();
- }
-
- public static com.google.apps.card.v1.Suggestions.SuggestionItem getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- @java.lang.Override
- public SuggestionItem 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.Suggestions.SuggestionItem getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
- }
-
- public static final int ITEMS_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private java.util.List items_;
- /**
- *
- *
- *
- * A list of suggestions used for autocomplete recommendations in text input
- * fields.
- *
- *
- * repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1;
- */
- @java.lang.Override
- public java.util.List getItemsList() {
- return items_;
- }
- /**
- *
- *
- *