# Google Cloud Dialogflow V2 Client - Class BoostControlSpec (2.4.0)

2.4.0 (latest) 2.3.1 2.2.1 2.1.2 2.0.1 1.17.2 1.16.0 1.15.1 1.14.0 1.13.0 1.12.3 1.11.0 1.10.2 1.9.0 1.8.0 1.7.2 1.6.0 1.5.0 1.4.0 1.3.2 1.2.0 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class BoostControlSpec.

Specification for custom ranking based on customer specified
attribute
value. It provides more controls for customized ranking than the
simple (condition, boost) combination above.

Generated from protobuf message `google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec`

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2 \\ SearchKnowledgeRequest \\ SearchConfig \\ BoostSpecs \\ BoostSpec \\ ConditionBoostSpec

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ field_name` | `string` Optional. The name of the field whose value will be used to determine the boost amount. |
| `↳ attribute_type` | `int` Optional. The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). |
| `↳ interpolation_type` | `int` Optional. The interpolation type to be applied to connect the control points listed below. |
| `↳ control_points` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint>` Optional. The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. |

### getFieldName

Optional. The name of the field whose value will be used to
determine the boost amount.

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

### setFieldName

Optional. The name of the field whose value will be used to
determine the boost amount.

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

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

### getAttributeType

Optional. The attribute type to be used to determine the boost
amount. The attribute value can be derived from the field value
of the specified field_name. In the case of numerical it is
straightforward i.e. attribute_value = numerical_field_value. In
the case of freshness however, attribute_value = (time.now() -
datetime_field_value).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [AttributeType](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType). |

### setAttributeType

Optional. The attribute type to be used to determine the boost
amount. The attribute value can be derived from the field value
of the specified field_name. In the case of numerical it is
straightforward i.e. attribute_value = numerical_field_value. In
the case of freshness however, attribute_value = (time.now() -
datetime_field_value).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [AttributeType](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType). |

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

### getInterpolationType

Optional. The interpolation type to be applied to connect the
control points listed below.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [InterpolationType](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType). |

### setInterpolationType

Optional. The interpolation type to be applied to connect the
control points listed below.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [InterpolationType](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType). |

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

### getControlPoints

Optional. The control points used to define the curve. The
monotonic function (defined through the interpolation_type above)
passes through the control points listed here.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint>` |   |

### setControlPoints

Optional. The control points used to define the curve. The
monotonic function (defined through the interpolation_type above)
passes through the control points listed here.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint>` |

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