# Google Cloud BigQuery Analytics Hub V1 Client - Class Routine (1.5.1)

1.5.1 (latest) 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.4 0.5.3 0.4.0 0.3.2 0.2.2 0.1.6 Reference documentation and code samples for the Google Cloud BigQuery Analytics Hub V1 Client class Routine.

Represents a bigquery routine.

Generated from protobuf message `google.cloud.bigquery.analyticshub.v1.Routine`

## Namespace

Google \\ Cloud \\ BigQuery \\ AnalyticsHub \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ routine_type` | `int` Required. The type of routine. |
| `↳ definition_body` | `string` Optional. The definition body of the routine. |

### getRoutineType

Required. The type of routine.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [RoutineType](https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-analyticshub/latest/V1.Routine.RoutineType). |

### setRoutineType

Required. The type of routine.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [RoutineType](https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-analyticshub/latest/V1.Routine.RoutineType). |

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

### getDefinitionBody

Optional. The definition body of the routine.

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

### setDefinitionBody

Optional. The definition body of the routine.

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

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