# Google Cloud Datastream V1 Client - Class JsonFileFormat (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.1 2.2.0 2.1.1 2.0.1 1.5.5 1.4.2 1.3.0 1.2.1 1.1.0 1.0.5 Reference documentation and code samples for the Google Cloud Datastream V1 Client class JsonFileFormat.

JSON file format configuration.

Generated from protobuf message `google.cloud.datastream.v1.JsonFileFormat`

## Namespace

Google \\ Cloud \\ Datastream \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ schema_file_format` | `int` The schema file format along JSON data files. |
| `↳ compression` | `int` Compression of the loaded JSON file. |

### getSchemaFileFormat

The schema file format along JSON data files.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [SchemaFileFormat](https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.JsonFileFormat.SchemaFileFormat). |

### setSchemaFileFormat

The schema file format along JSON data files.

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

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

### getCompression

Compression of the loaded JSON file.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [JsonCompression](https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.JsonFileFormat.JsonCompression). |

### setCompression

Compression of the loaded JSON file.

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

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