<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: dy.proto

namespace Douyin;

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

/**
 * Generated from protobuf message <code>douyin.TextPiecePatternRef</code>
 */
class TextPiecePatternRef extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string key = 1;</code>
     */
    protected $key = '';
    /**
     * Generated from protobuf field <code>string defaultPattern = 2;</code>
     */
    protected $defaultPattern = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $key
     *     @type string $defaultPattern
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Dy::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string key = 1;</code>
     * @return string
     */
    public function getKey()
    {
        return $this->key;
    }

    /**
     * Generated from protobuf field <code>string key = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->key = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string defaultPattern = 2;</code>
     * @return string
     */
    public function getDefaultPattern()
    {
        return $this->defaultPattern;
    }

    /**
     * Generated from protobuf field <code>string defaultPattern = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDefaultPattern($var)
    {
        GPBUtil::checkString($var, True);
        $this->defaultPattern = $var;

        return $this;
    }

}

