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;
}
}