<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/datastream/v1/datastream_resources.proto

namespace Google\Cloud\Datastream\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * JSON file format configuration.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.JsonFileFormat</code>
 */
class JsonFileFormat extends \Google\Protobuf\Internal\Message
{
    /**
     * The schema file format along JSON data files.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat schema_file_format = 1;</code>
     */
    protected $schema_file_format = 0;
    /**
     * Compression of the loaded JSON file.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.JsonFileFormat.JsonCompression compression = 2;</code>
     */
    protected $compression = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $schema_file_format
     *           The schema file format along JSON data files.
     *     @type int $compression
     *           Compression of the loaded JSON file.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * The schema file format along JSON data files.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat schema_file_format = 1;</code>
     * @return int
     */
    public function getSchemaFileFormat()
    {
        return $this->schema_file_format;
    }

    /**
     * The schema file format along JSON data files.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat schema_file_format = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setSchemaFileFormat($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\JsonFileFormat\SchemaFileFormat::class);
        $this->schema_file_format = $var;

        return $this;
    }

    /**
     * Compression of the loaded JSON file.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.JsonFileFormat.JsonCompression compression = 2;</code>
     * @return int
     */
    public function getCompression()
    {
        return $this->compression;
    }

    /**
     * Compression of the loaded JSON file.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.JsonFileFormat.JsonCompression compression = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setCompression($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\JsonFileFormat\JsonCompression::class);
        $this->compression = $var;

        return $this;
    }

}

