Google Cloud Dialogflow V2 Client - Class BasicCard (1.5.0)

Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class BasicCard.

The basic card message. Useful for displaying information.

Generated from protobuf message google.cloud.dialogflow.v2.Intent.Message.BasicCard

Namespace

Google \ Cloud \ Dialogflow \ V2 \ Intent \ Message

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ title string

Optional. The title of the card.

↳ subtitle string

Optional. The subtitle of the card.

↳ formatted_text string

Required, unless image is present. The body text of the card.

↳ image Google\Cloud\Dialogflow\V2\Intent\Message\Image

Optional. The image for the card.

↳ buttons array<Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button>

Optional. The collection of card buttons.

getTitle

Optional. The title of the card.

Returns
TypeDescription
string

setTitle

Optional. The title of the card.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSubtitle

Optional. The subtitle of the card.

Returns
TypeDescription
string

setSubtitle

Optional. The subtitle of the card.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getFormattedText

Required, unless image is present. The body text of the card.

Returns
TypeDescription
string

setFormattedText

Required, unless image is present. The body text of the card.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getImage

Optional. The image for the card.

Returns
TypeDescription
Google\Cloud\Dialogflow\V2\Intent\Message\Image|null

hasImage

clearImage

setImage

Optional. The image for the card.

Parameter
NameDescription
var Google\Cloud\Dialogflow\V2\Intent\Message\Image
Returns
TypeDescription
$this

getButtons

Optional. The collection of card buttons.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setButtons

Optional. The collection of card buttons.

Parameter
NameDescription
var array<Google\Cloud\Dialogflow\V2\Intent\Message\BasicCard\Button>
Returns
TypeDescription
$this