Google Cloud Dialogflow Cx V3 Client - Class Variant (0.3.4)

Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class Variant.

A single flow version with specified traffic allocation.

Generated from protobuf message google.cloud.dialogflow.cx.v3.VersionVariants.Variant

Namespace

Google \ Cloud \ Dialogflow \ Cx \ V3 \ VersionVariants

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ version string

The name of the flow version. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>.

↳ traffic_allocation float

Percentage of the traffic which should be routed to this version of flow. Traffic allocation for a single flow must sum up to 1.0.

↳ is_control_group bool

Whether the variant is for the control group.

getVersion

The name of the flow version.

Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>.

Returns
Type Description
string

setVersion

The name of the flow version.

Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>.

Parameter
Name Description
var string
Returns
Type Description
$this

getTrafficAllocation

Percentage of the traffic which should be routed to this version of flow. Traffic allocation for a single flow must sum up to 1.0.

Returns
Type Description
float

setTrafficAllocation

Percentage of the traffic which should be routed to this version of flow. Traffic allocation for a single flow must sum up to 1.0.

Parameter
Name Description
var float
Returns
Type Description
$this

getIsControlGroup

Whether the variant is for the control group.

Returns
Type Description
bool

setIsControlGroup

Whether the variant is for the control group.

Parameter
Name Description
var bool
Returns
Type Description
$this