<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: api/EntOrderContract.proto

namespace Proto\Api;

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

/**
 * 订单合同实体
 *
 * Generated from protobuf message <code>proto.api.EntOrderContract</code>
 */
class EntOrderContract extends \Google\Protobuf\Internal\Message
{
    /**
     * 合同对应订单的订单信息
     *EntOrder order_sn = 1;
     * 合同编号
     *
     * Generated from protobuf field <code>string contract_sn = 1;</code>
     */
    protected $contract_sn = '';
    /**
     * 合同标题
     *
     * Generated from protobuf field <code>string contract_title = 2;</code>
     */
    protected $contract_title = '';
    /**
     * 合同详情
     *
     * Generated from protobuf field <code>.proto.api.OrderContractDetail contract_detail = 3;</code>
     */
    protected $contract_detail = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $contract_sn
     *           合同对应订单的订单信息
     *          EntOrder order_sn = 1;
     *           合同编号
     *     @type string $contract_title
     *           合同标题
     *     @type \Proto\Api\OrderContractDetail $contract_detail
     *           合同详情
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Api\EntOrderContract::initOnce();
        parent::__construct($data);
    }

    /**
     * 合同对应订单的订单信息
     *EntOrder order_sn = 1;
     * 合同编号
     *
     * Generated from protobuf field <code>string contract_sn = 1;</code>
     * @return string
     */
    public function getContractSn()
    {
        return $this->contract_sn;
    }

    /**
     * 合同对应订单的订单信息
     *EntOrder order_sn = 1;
     * 合同编号
     *
     * Generated from protobuf field <code>string contract_sn = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setContractSn($var)
    {
        GPBUtil::checkString($var, True);
        $this->contract_sn = $var;

        return $this;
    }

    /**
     * 合同标题
     *
     * Generated from protobuf field <code>string contract_title = 2;</code>
     * @return string
     */
    public function getContractTitle()
    {
        return $this->contract_title;
    }

    /**
     * 合同标题
     *
     * Generated from protobuf field <code>string contract_title = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setContractTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->contract_title = $var;

        return $this;
    }

    /**
     * 合同详情
     *
     * Generated from protobuf field <code>.proto.api.OrderContractDetail contract_detail = 3;</code>
     * @return \Proto\Api\OrderContractDetail|null
     */
    public function getContractDetail()
    {
        return $this->contract_detail;
    }

    public function hasContractDetail()
    {
        return isset($this->contract_detail);
    }

    public function clearContractDetail()
    {
        unset($this->contract_detail);
    }

    /**
     * 合同详情
     *
     * Generated from protobuf field <code>.proto.api.OrderContractDetail contract_detail = 3;</code>
     * @param \Proto\Api\OrderContractDetail $var
     * @return $this
     */
    public function setContractDetail($var)
    {
        GPBUtil::checkMessage($var, \Proto\Api\OrderContractDetail::class);
        $this->contract_detail = $var;

        return $this;
    }

}