<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: core/contract/witness_contract.proto

namespace Protocol;

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

/**
 * Generated from protobuf message <code>protocol.VoteWitnessContract</code>
 */
class VoteWitnessContract extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bytes owner_address = 1;</code>
     */
    protected $owner_address = '';
    /**
     * Generated from protobuf field <code>repeated .protocol.VoteWitnessContract.Vote votes = 2;</code>
     */
    private $votes;
    /**
     * Generated from protobuf field <code>bool support = 3;</code>
     */
    protected $support = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $owner_address
     *     @type \Protocol\VoteWitnessContract\Vote[]|\Google\Protobuf\Internal\RepeatedField $votes
     *     @type bool $support
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Contract\WitnessContract::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .protocol.VoteWitnessContract.Vote votes = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getVotes()
    {
        return $this->votes;
    }

    /**
     * Generated from protobuf field <code>repeated .protocol.VoteWitnessContract.Vote votes = 2;</code>
     * @param \Protocol\VoteWitnessContract\Vote[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setVotes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Protocol\VoteWitnessContract\Vote::class);
        $this->votes = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool support = 3;</code>
     * @return bool
     */
    public function getSupport()
    {
        return $this->support;
    }

    /**
     * Generated from protobuf field <code>bool support = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setSupport($var)
    {
        GPBUtil::checkBool($var);
        $this->support = $var;

        return $this;
    }

}

