# Google Cloud Dialogflow Cx V3 Client - Class Experiment (0.11.1)

0.11.1 (latest) 0.11.0 0.10.2 0.9.2 0.8.1 0.7.2 0.6.0 0.5.2 0.4.1 0.3.4 0.2.1 0.1.1 Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class Experiment.

Represents an experiment in an environment.

Generated from protobuf message `google.cloud.dialogflow.cx.v3.Experiment`

## Namespace

Google \\ Cloud \\ Dialogflow \\ Cx \\ V3

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The name of the experiment. Format: projects/ |
| `↳ display_name` | `string` Required. The human-readable name of the experiment (unique in an environment). Limit of 64 characters. |
| `↳ description` | `string` The human-readable description of the experiment. |
| `↳ state` | `int` The current state of the experiment. Transition triggered by Experiments.StartExperiment: DRAFT-\>RUNNING. Transition triggered by Experiments.CancelExperiment: DRAFT-\>DONE or RUNNING-\>DONE. |
| `↳ definition` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Experiment.Definition` The definition of the experiment. |
| `↳ rollout_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.RolloutConfig` The configuration for auto rollout. If set, there should be exactly two variants in the experiment (control variant being the default version of the flow), the traffic allocation for the non-control variant will gradually increase to 100% when conditions are met, and eventually replace the control variant to become the default version of the flow. |
| `↳ rollout_state` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.RolloutState` State of the auto rollout process. |
| `↳ rollout_failure_reason` | `string` The reason why rollout has failed. Should only be set when state is ROLLOUT_FAILED. |
| `↳ result` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Experiment.Result` Inference result of the experiment. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Creation time of this experiment. |
| `↳ start_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Start time of this experiment. |
| `↳ end_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` End time of this experiment. |
| `↳ last_update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Last update time of this experiment. |
| `↳ experiment_length` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Maximum number of days to run the experiment/rollout. If auto-rollout is not enabled, default value and maximum will be 30 days. If auto-rollout is enabled, default value and maximum will be 6 days. |
| `↳ variants_history` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.VariantsHistory>` The history of updates to the experiment variants. |

### getName

The name of the experiment.

Format:
projects/


| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

The name of the experiment.

Format:
projects/


| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDisplayName

Required. The human-readable name of the experiment (unique in an
environment). Limit of 64 characters.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDisplayName

Required. The human-readable name of the experiment (unique in an
environment). Limit of 64 characters.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDescription

The human-readable description of the experiment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDescription

The human-readable description of the experiment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getState

The current state of the experiment.

Transition triggered by Experiments.StartExperiment: DRAFT-\>RUNNING.
Transition triggered by Experiments.CancelExperiment: DRAFT-\>DONE or
RUNNING-\>DONE.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Experiment.State). |

### setState

The current state of the experiment.

Transition triggered by Experiments.StartExperiment: DRAFT-\>RUNNING.
Transition triggered by Experiments.CancelExperiment: DRAFT-\>DONE or
RUNNING-\>DONE.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Experiment.State). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDefinition

The definition of the experiment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Experiment.Definition|null` |   |

### hasDefinition

### clearDefinition

### setDefinition

The definition of the experiment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Experiment.Definition` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRolloutConfig

The configuration for auto rollout. If set, there should be exactly two
variants in the experiment (control variant being the default version of
the flow), the traffic allocation for the non-control variant will
gradually increase to 100% when conditions are met, and eventually
replace the control variant to become the default version of the flow.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.RolloutConfig|null` |   |

### hasRolloutConfig

### clearRolloutConfig

### setRolloutConfig

The configuration for auto rollout. If set, there should be exactly two
variants in the experiment (control variant being the default version of
the flow), the traffic allocation for the non-control variant will
gradually increase to 100% when conditions are met, and eventually
replace the control variant to become the default version of the flow.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.RolloutConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRolloutState

State of the auto rollout process.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.RolloutState|null` |   |

### hasRolloutState

### clearRolloutState

### setRolloutState

State of the auto rollout process.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.RolloutState` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRolloutFailureReason

The reason why rollout has failed. Should only be set when state is
ROLLOUT_FAILED.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setRolloutFailureReason

The reason why rollout has failed. Should only be set when state is
ROLLOUT_FAILED.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getResult

Inference result of the experiment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Experiment.Result|null` |   |

### hasResult

### clearResult

### setResult

Inference result of the experiment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Experiment.Result` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Creation time of this experiment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Creation time of this experiment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getStartTime

Start time of this experiment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasStartTime

### clearStartTime

### setStartTime

Start time of this experiment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEndTime

End time of this experiment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasEndTime

### clearEndTime

### setEndTime

End time of this experiment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLastUpdateTime

Last update time of this experiment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasLastUpdateTime

### clearLastUpdateTime

### setLastUpdateTime

Last update time of this experiment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getExperimentLength

Maximum number of days to run the experiment/rollout. If auto-rollout is
not enabled, default value and maximum will be 30 days. If auto-rollout is
enabled, default value and maximum will be 6 days.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasExperimentLength

### clearExperimentLength

### setExperimentLength

Maximum number of days to run the experiment/rollout. If auto-rollout is
not enabled, default value and maximum will be 30 days. If auto-rollout is
enabled, default value and maximum will be 6 days.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVariantsHistory

The history of updates to the experiment variants.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.VariantsHistory>` |   |

### setVariantsHistory

The history of updates to the experiment variants.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.VariantsHistory>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |