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

namespace Messages;

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

/**
 * Generated from protobuf message <code>Messages.Script</code>
 */
class Script extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>string msg = 2;</code>
     */
    protected $msg = '';
    /**
     * Generated from protobuf field <code>string source_code = 3;</code>
     */
    protected $source_code = '';
    /**
     * same as system uid, if assigned
     *
     * Generated from protobuf field <code>int64 uid = 4;</code>
     */
    protected $uid = 0;
    /**
     * Generated from protobuf field <code>uint32 device = 5;</code>
     */
    protected $device = 0;
    /**
     * Generated from protobuf field <code>uint32 status = 6;</code>
     */
    protected $status = 0;
    /**
     * Generated from protobuf field <code>uint32 order = 7;</code>
     */
    protected $order = 0;
    /**
     * Generated from protobuf field <code>float progress = 8;</code>
     */
    protected $progress = 0.0;
    /**
     *reserved
     *
     * Generated from protobuf field <code>.Messages.Variables variables = 10;</code>
     */
    protected $variables = null;
    /**
     *reserved  
     *
     * Generated from protobuf field <code>repeated .Messages.Command Sequence = 12;</code>
     */
    private $Sequence;
    /**
     *reserved
     *
     * Generated from protobuf field <code>.Messages.Script before = 14;</code>
     */
    protected $before = null;
    /**
     * Generated from protobuf field <code>.Messages.Script after = 15;</code>
     */
    protected $after = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *     @type string $msg
     *     @type string $source_code
     *     @type int|string $uid
     *           same as system uid, if assigned
     *     @type int $device
     *     @type int $status
     *     @type int $order
     *     @type float $progress
     *     @type \Messages\Variables $variables
     *          reserved
     *     @type \Messages\Command[]|\Google\Protobuf\Internal\RepeatedField $Sequence
     *          reserved  
     *     @type \Messages\Script $before
     *          reserved
     *     @type \Messages\Script $after
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Concept::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string source_code = 3;</code>
     * @return string
     */
    public function getSourceCode()
    {
        return $this->source_code;
    }

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

        return $this;
    }

    /**
     * same as system uid, if assigned
     *
     * Generated from protobuf field <code>int64 uid = 4;</code>
     * @return int|string
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * same as system uid, if assigned
     *
     * Generated from protobuf field <code>int64 uid = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setUid($var)
    {
        GPBUtil::checkInt64($var);
        $this->uid = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 device = 5;</code>
     * @return int
     */
    public function getDevice()
    {
        return $this->device;
    }

    /**
     * Generated from protobuf field <code>uint32 device = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setDevice($var)
    {
        GPBUtil::checkUint32($var);
        $this->device = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 status = 6;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Generated from protobuf field <code>uint32 status = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkUint32($var);
        $this->status = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 order = 7;</code>
     * @return int
     */
    public function getOrder()
    {
        return $this->order;
    }

    /**
     * Generated from protobuf field <code>uint32 order = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setOrder($var)
    {
        GPBUtil::checkUint32($var);
        $this->order = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>float progress = 8;</code>
     * @return float
     */
    public function getProgress()
    {
        return $this->progress;
    }

    /**
     * Generated from protobuf field <code>float progress = 8;</code>
     * @param float $var
     * @return $this
     */
    public function setProgress($var)
    {
        GPBUtil::checkFloat($var);
        $this->progress = $var;

        return $this;
    }

    /**
     *reserved
     *
     * Generated from protobuf field <code>.Messages.Variables variables = 10;</code>
     * @return \Messages\Variables|null
     */
    public function getVariables()
    {
        return $this->variables;
    }

    public function hasVariables()
    {
        return isset($this->variables);
    }

    public function clearVariables()
    {
        unset($this->variables);
    }

    /**
     *reserved
     *
     * Generated from protobuf field <code>.Messages.Variables variables = 10;</code>
     * @param \Messages\Variables $var
     * @return $this
     */
    public function setVariables($var)
    {
        GPBUtil::checkMessage($var, \Messages\Variables::class);
        $this->variables = $var;

        return $this;
    }

    /**
     *reserved  
     *
     * Generated from protobuf field <code>repeated .Messages.Command Sequence = 12;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSequence()
    {
        return $this->Sequence;
    }

    /**
     *reserved  
     *
     * Generated from protobuf field <code>repeated .Messages.Command Sequence = 12;</code>
     * @param \Messages\Command[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSequence($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Messages\Command::class);
        $this->Sequence = $arr;

        return $this;
    }

    /**
     *reserved
     *
     * Generated from protobuf field <code>.Messages.Script before = 14;</code>
     * @return \Messages\Script|null
     */
    public function getBefore()
    {
        return $this->before;
    }

    public function hasBefore()
    {
        return isset($this->before);
    }

    public function clearBefore()
    {
        unset($this->before);
    }

    /**
     *reserved
     *
     * Generated from protobuf field <code>.Messages.Script before = 14;</code>
     * @param \Messages\Script $var
     * @return $this
     */
    public function setBefore($var)
    {
        GPBUtil::checkMessage($var, \Messages\Script::class);
        $this->before = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.Messages.Script after = 15;</code>
     * @return \Messages\Script|null
     */
    public function getAfter()
    {
        return $this->after;
    }

    public function hasAfter()
    {
        return isset($this->after);
    }

    public function clearAfter()
    {
        unset($this->after);
    }

    /**
     * Generated from protobuf field <code>.Messages.Script after = 15;</code>
     * @param \Messages\Script $var
     * @return $this
     */
    public function setAfter($var)
    {
        GPBUtil::checkMessage($var, \Messages\Script::class);
        $this->after = $var;

        return $this;
    }

}

