Interface CardOrBuilder (2.37.1)

public interface CardOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getCardActions(int index)

public abstract Card.CardAction getCardActions(int index)

The card's actions. Actions are added to the card's toolbar menu.

Google Workspace Add-ons:

For example, the following JSON constructs a card action menu with Settings and Send Feedback options:

<code><code> "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" } } } ] </code></code>

repeated .google.apps.card.v1.Card.CardAction card_actions = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Card.CardAction

getCardActionsCount()

public abstract int getCardActionsCount()

The card's actions. Actions are added to the card's toolbar menu.

Google Workspace Add-ons:

For example, the following JSON constructs a card action menu with Settings and Send Feedback options:

<code><code> "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" } } } ] </code></code>

repeated .google.apps.card.v1.Card.CardAction card_actions = 3;

Returns
TypeDescription
int

getCardActionsList()

public abstract List<Card.CardAction> getCardActionsList()

The card's actions. Actions are added to the card's toolbar menu.

Google Workspace Add-ons:

For example, the following JSON constructs a card action menu with Settings and Send Feedback options:

<code><code> "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" } } } ] </code></code>

repeated .google.apps.card.v1.Card.CardAction card_actions = 3;

Returns
TypeDescription
List<CardAction>

getCardActionsOrBuilder(int index)

public abstract Card.CardActionOrBuilder getCardActionsOrBuilder(int index)

The card's actions. Actions are added to the card's toolbar menu.

Google Workspace Add-ons:

For example, the following JSON constructs a card action menu with Settings and Send Feedback options:

<code><code> "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" } } } ] </code></code>

repeated .google.apps.card.v1.Card.CardAction card_actions = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Card.CardActionOrBuilder

getCardActionsOrBuilderList()

public abstract List<? extends Card.CardActionOrBuilder> getCardActionsOrBuilderList()

The card's actions. Actions are added to the card's toolbar menu.

Google Workspace Add-ons:

For example, the following JSON constructs a card action menu with Settings and Send Feedback options:

<code><code> "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" } } } ] </code></code>

repeated .google.apps.card.v1.Card.CardAction card_actions = 3;

Returns
TypeDescription
List<? extends com.google.apps.card.v1.Card.CardActionOrBuilder>

getDisplayStyle()

public abstract Card.DisplayStyle getDisplayStyle()

In Google Workspace Add-ons, sets the display properties of the peekCardHeader.

Google Workspace Add-ons:

.google.apps.card.v1.Card.DisplayStyle display_style = 6;

Returns
TypeDescription
Card.DisplayStyle

The displayStyle.

getDisplayStyleValue()

public abstract int getDisplayStyleValue()

In Google Workspace Add-ons, sets the display properties of the peekCardHeader.

Google Workspace Add-ons:

.google.apps.card.v1.Card.DisplayStyle display_style = 6;

Returns
TypeDescription
int

The enum numeric value on the wire for displayStyle.

getFixedFooter()

public abstract 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, but not card messages.

Google Workspace Add-ons and Chat apps:

.google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;

Returns
TypeDescription
Card.CardFixedFooter

The fixedFooter.

getFixedFooterOrBuilder()

public abstract Card.CardFixedFooterOrBuilder getFixedFooterOrBuilder()

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, but not card messages.

Google Workspace Add-ons and Chat apps:

.google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;

Returns
TypeDescription
Card.CardFixedFooterOrBuilder

getHeader()

public abstract 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;

Returns
TypeDescription
Card.CardHeader

The header.

getHeaderOrBuilder()

public abstract Card.CardHeaderOrBuilder getHeaderOrBuilder()

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;

Returns
TypeDescription
Card.CardHeaderOrBuilder

getName()

public abstract String getName()

Name of the card. Used as a card identifier in card navigation.

Google Workspace Add-ons:

string name = 4;

Returns
TypeDescription
String

The name.

getNameBytes()

public abstract ByteString getNameBytes()

Name of the card. Used as a card identifier in card navigation.

Google Workspace Add-ons:

string name = 4;

Returns
TypeDescription
ByteString

The bytes for name.

getPeekCardHeader()

public abstract 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:

.google.apps.card.v1.Card.CardHeader peek_card_header = 7;

Returns
TypeDescription
Card.CardHeader

The peekCardHeader.

getPeekCardHeaderOrBuilder()

public abstract Card.CardHeaderOrBuilder getPeekCardHeaderOrBuilder()

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:

.google.apps.card.v1.Card.CardHeader peek_card_header = 7;

Returns
TypeDescription
Card.CardHeaderOrBuilder

getSectionDividerStyle()

public abstract Card.DividerStyle getSectionDividerStyle()

The divider style between sections.

.google.apps.card.v1.Card.DividerStyle section_divider_style = 9;

Returns
TypeDescription
Card.DividerStyle

The sectionDividerStyle.

getSectionDividerStyleValue()

public abstract int getSectionDividerStyleValue()

The divider style between sections.

.google.apps.card.v1.Card.DividerStyle section_divider_style = 9;

Returns
TypeDescription
int

The enum numeric value on the wire for sectionDividerStyle.

getSections(int index)

public abstract 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.

repeated .google.apps.card.v1.Card.Section sections = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Card.Section

getSectionsCount()

public abstract 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.

repeated .google.apps.card.v1.Card.Section sections = 2;

Returns
TypeDescription
int

getSectionsList()

public abstract List<Card.Section> 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.

repeated .google.apps.card.v1.Card.Section sections = 2;

Returns
TypeDescription
List<Section>

getSectionsOrBuilder(int index)

public abstract Card.SectionOrBuilder getSectionsOrBuilder(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.

repeated .google.apps.card.v1.Card.Section sections = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Card.SectionOrBuilder

getSectionsOrBuilderList()

public abstract List<? extends 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.

repeated .google.apps.card.v1.Card.Section sections = 2;

Returns
TypeDescription
List<? extends com.google.apps.card.v1.Card.SectionOrBuilder>

hasFixedFooter()

public abstract 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, but not card messages.

Google Workspace Add-ons and Chat apps:

.google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5;

Returns
TypeDescription
boolean

Whether the fixedFooter field is set.

hasHeader()

public abstract 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;

Returns
TypeDescription
boolean

Whether the header field is set.

hasPeekCardHeader()

public abstract 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:

.google.apps.card.v1.Card.CardHeader peek_card_header = 7;

Returns
TypeDescription
boolean

Whether the peekCardHeader field is set.