<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: core/contract/account_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.AccountPermissionUpdateContract</code>
 */
class AccountPermissionUpdateContract extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bytes owner_address = 1;</code>
     */
    protected $owner_address = '';
    /**
     *Empty is invalidate
     *
     * Generated from protobuf field <code>.protocol.Permission owner = 2;</code>
     */
    protected $owner = null;
    /**
     *Can be empty
     *
     * Generated from protobuf field <code>.protocol.Permission witness = 3;</code>
     */
    protected $witness = null;
    /**
     *Empty is invalidate
     *
     * Generated from protobuf field <code>repeated .protocol.Permission actives = 4;</code>
     */
    private $actives;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $owner_address
     *     @type \Protocol\Permission $owner
     *          Empty is invalidate
     *     @type \Protocol\Permission $witness
     *          Can be empty
     *     @type \Protocol\Permission[]|\Google\Protobuf\Internal\RepeatedField $actives
     *          Empty is invalidate
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Core\Contract\AccountContract::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;
    }

    /**
     *Empty is invalidate
     *
     * Generated from protobuf field <code>.protocol.Permission owner = 2;</code>
     * @return \Protocol\Permission
     */
    public function getOwner()
    {
        return isset($this->owner) ? $this->owner : null;
    }

    public function hasOwner()
    {
        return isset($this->owner);
    }

    public function clearOwner()
    {
        unset($this->owner);
    }

    /**
     *Empty is invalidate
     *
     * Generated from protobuf field <code>.protocol.Permission owner = 2;</code>
     * @param \Protocol\Permission $var
     * @return $this
     */
    public function setOwner($var)
    {
        GPBUtil::checkMessage($var, \Protocol\Permission::class);
        $this->owner = $var;

        return $this;
    }

    /**
     *Can be empty
     *
     * Generated from protobuf field <code>.protocol.Permission witness = 3;</code>
     * @return \Protocol\Permission
     */
    public function getWitness()
    {
        return isset($this->witness) ? $this->witness : null;
    }

    public function hasWitness()
    {
        return isset($this->witness);
    }

    public function clearWitness()
    {
        unset($this->witness);
    }

    /**
     *Can be empty
     *
     * Generated from protobuf field <code>.protocol.Permission witness = 3;</code>
     * @param \Protocol\Permission $var
     * @return $this
     */
    public function setWitness($var)
    {
        GPBUtil::checkMessage($var, \Protocol\Permission::class);
        $this->witness = $var;

        return $this;
    }

    /**
     *Empty is invalidate
     *
     * Generated from protobuf field <code>repeated .protocol.Permission actives = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getActives()
    {
        return $this->actives;
    }

    /**
     *Empty is invalidate
     *
     * Generated from protobuf field <code>repeated .protocol.Permission actives = 4;</code>
     * @param \Protocol\Permission[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setActives($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Protocol\Permission::class);
        $this->actives = $arr;

        return $this;
    }

}

