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

namespace Google\Cloud\Dataplex\V1\StorageFormat;

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

/**
 * Describes JSON data format.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.StorageFormat.JsonOptions</code>
 */
class JsonOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8"
     * and "ISO-8859-1". Defaults to UTF-8 if not specified.
     *
     * Generated from protobuf field <code>string encoding = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $encoding = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $encoding
     *           Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8"
     *           and "ISO-8859-1". Defaults to UTF-8 if not specified.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8"
     * and "ISO-8859-1". Defaults to UTF-8 if not specified.
     *
     * 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. Accepts "US-ASCII", "UTF-8"
     * and "ISO-8859-1". Defaults to UTF-8 if not specified.
     *
     * 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;
    }

}


