# Cloud Natural Language V1 Client - Class ClassificationModelOptions (1.2.1)

1.2.1 (latest) 1.2.0 1.1.4 1.0.1 0.34.3 0.33.0 0.32.7 0.31.3 0.30.2 0.29.0 0.28.5 Reference documentation and code samples for the Cloud Natural Language V1 Client class ClassificationModelOptions.

Model options available for classification requests.

Generated from protobuf message `google.cloud.language.v1.ClassificationModelOptions`

## Namespace

Google \\ Cloud \\ Language \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ v1_model` | `https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.ClassificationModelOptions.V1Model` Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future. |
| `↳ v2_model` | `https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.ClassificationModelOptions.V2Model` Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model. |

### getV1Model

Setting this field will use the V1 model and V1 content categories
version. The V1 model is a legacy model; support for this will be
discontinued in the future.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.ClassificationModelOptions.V1Model|null` |   |

### hasV1Model

### setV1Model

Setting this field will use the V1 model and V1 content categories
version. The V1 model is a legacy model; support for this will be
discontinued in the future.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.ClassificationModelOptions.V1Model` |

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

### getV2Model

Setting this field will use the V2 model with the appropriate content
categories version. The V2 model is a better performing model.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.ClassificationModelOptions.V2Model|null` |   |

### hasV2Model

### setV2Model

Setting this field will use the V2 model with the appropriate content
categories version. The V2 model is a better performing model.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.ClassificationModelOptions.V2Model` |

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

### getModelType

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