Google Cloud Dialogflow V2 Client - Class Message (1.17.0)

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

A rich response message.

Corresponds to the intent Response field in the Dialogflow console. For more information, see Rich response messages.

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

Namespace

Google \ Cloud \ Dialogflow \ V2 \ Intent

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ text Message\Text

The text response.

↳ image Message\Image

The image response.

↳ quick_replies Message\QuickReplies

The quick replies response.

↳ card Message\Card

The card response.

↳ payload Google\Protobuf\Struct

A custom platform-specific response.

↳ simple_responses Message\SimpleResponses

The voice and text-only responses for Actions on Google.

↳ basic_card Message\BasicCard

The basic card response for Actions on Google.

↳ suggestions Message\Suggestions

The suggestion chips for Actions on Google.

↳ link_out_suggestion Message\LinkOutSuggestion

The link out suggestion chip for Actions on Google.

↳ list_select Message\ListSelect

The list card response for Actions on Google.

↳ carousel_select Message\CarouselSelect

The carousel card response for Actions on Google.

↳ browse_carousel_card Message\BrowseCarouselCard

Browse carousel card for Actions on Google.

↳ table_card Message\TableCard

Table card for Actions on Google.

↳ media_content Message\MediaContent

The media content card for Actions on Google.

↳ platform int

Optional. The platform that this message is intended for.

getText

The text response.

Returns
Type Description
Message\Text|null

hasText

setText

The text response.

Parameter
Name Description
var Message\Text
Returns
Type Description
$this

getImage

The image response.

Returns
Type Description
Message\Image|null

hasImage

setImage

The image response.

Parameter
Name Description
var Message\Image
Returns
Type Description
$this

getQuickReplies

The quick replies response.

Returns
Type Description
Message\QuickReplies|null

hasQuickReplies

setQuickReplies

The quick replies response.

Parameter
Name Description
var Message\QuickReplies
Returns
Type Description
$this

getCard

The card response.

Returns
Type Description
Message\Card|null

hasCard

setCard

The card response.

Parameter
Name Description
var Message\Card
Returns
Type Description
$this

getPayload

A custom platform-specific response.

Returns
Type Description
Google\Protobuf\Struct|null

hasPayload

setPayload

A custom platform-specific response.

Parameter
Name Description
var Google\Protobuf\Struct
Returns
Type Description
$this

getSimpleResponses

The voice and text-only responses for Actions on Google.

Returns
Type Description
Message\SimpleResponses|null

hasSimpleResponses

setSimpleResponses

The voice and text-only responses for Actions on Google.

Parameter
Name Description
var Message\SimpleResponses
Returns
Type Description
$this

getBasicCard

The basic card response for Actions on Google.

Returns
Type Description
Message\BasicCard|null

hasBasicCard

setBasicCard

The basic card response for Actions on Google.

Parameter
Name Description
var Message\BasicCard
Returns
Type Description
$this

getSuggestions

The suggestion chips for Actions on Google.

Returns
Type Description
Message\Suggestions|null

hasSuggestions

setSuggestions

The suggestion chips for Actions on Google.

Parameter
Name Description
var Message\Suggestions
Returns
Type Description
$this

getLinkOutSuggestion

The link out suggestion chip for Actions on Google.

Returns
Type Description
Message\LinkOutSuggestion|null

hasLinkOutSuggestion

setLinkOutSuggestion

The link out suggestion chip for Actions on Google.

Parameter
Name Description
var Message\LinkOutSuggestion
Returns
Type Description
$this

getListSelect

The list card response for Actions on Google.

Returns
Type Description
Message\ListSelect|null

hasListSelect

setListSelect

The list card response for Actions on Google.

Parameter
Name Description
var Message\ListSelect
Returns
Type Description
$this

getCarouselSelect

The carousel card response for Actions on Google.

Returns
Type Description
Message\CarouselSelect|null

hasCarouselSelect

setCarouselSelect

The carousel card response for Actions on Google.

Parameter
Name Description
var Message\CarouselSelect
Returns
Type Description
$this

getBrowseCarouselCard

Browse carousel card for Actions on Google.

Returns
Type Description
Message\BrowseCarouselCard|null

hasBrowseCarouselCard

setBrowseCarouselCard

Browse carousel card for Actions on Google.

Parameter
Name Description
var Message\BrowseCarouselCard
Returns
Type Description
$this

getTableCard

Table card for Actions on Google.

Returns
Type Description
Message\TableCard|null

hasTableCard

setTableCard

Table card for Actions on Google.

Parameter
Name Description
var Message\TableCard
Returns
Type Description
$this

getMediaContent

The media content card for Actions on Google.

Returns
Type Description
Message\MediaContent|null

hasMediaContent

setMediaContent

The media content card for Actions on Google.

Parameter
Name Description
var Message\MediaContent
Returns
Type Description
$this

getPlatform

Optional. The platform that this message is intended for.

Returns
Type Description
int

setPlatform

Optional. The platform that this message is intended for.

Parameter
Name Description
var int
Returns
Type Description
$this

getMessage

Returns
Type Description
string