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

namespace Google\Cloud\Dataplex\V1\Zone\DiscoverySpec;

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

/**
 * Describe JSON data format.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions</code>
 */
class JsonOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The character encoding of the data. The default is UTF-8.
     *
     * Generated from protobuf field <code>string encoding = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $encoding = '';
    /**
     * Optional. Whether to disable the inference of data type for Json data.
     * If true, all columns will be registered as their primitive types
     * (strings, number or boolean).
     *
     * Generated from protobuf field <code>bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $disable_type_inference = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $encoding
     *           Optional. The character encoding of the data. The default is UTF-8.
     *     @type bool $disable_type_inference
     *           Optional. Whether to disable the inference of data type for Json data.
     *           If true, all columns will be registered as their primitive types
     *           (strings, number or boolean).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The character encoding of the data. The default is UTF-8.
     *
     * Generated from protobuf field <code>string encoding = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getEncoding()
    {
        return $this->encoding;
    }

    /**
     * Optional. The character encoding of the data. The default is UTF-8.
     *
     * Generated from protobuf field <code>string encoding = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setEncoding($var)
    {
        GPBUtil::checkString($var, True);
        $this->encoding = $var;

        return $this;
    }

    /**
     * Optional. Whether to disable the inference of data type for Json data.
     * If true, all columns will be registered as their primitive types
     * (strings, number or boolean).
     *
     * Generated from protobuf field <code>bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getDisableTypeInference()
    {
        return $this->disable_type_inference;
    }

    /**
     * Optional. Whether to disable the inference of data type for Json data.
     * If true, all columns will be registered as their primitive types
     * (strings, number or boolean).
     *
     * Generated from protobuf field <code>bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setDisableTypeInference($var)
    {
        GPBUtil::checkBool($var);
        $this->disable_type_inference = $var;

        return $this;
    }

}


