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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.DeviceProps</code>
 */
class DeviceProps extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string os = 1;</code>
     */
    protected $os = null;
    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.AppVersion version = 2;</code>
     */
    protected $version = null;
    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.PlatformType platformType = 3;</code>
     */
    protected $platformType = null;
    /**
     * Generated from protobuf field <code>optional bool requireFullSync = 4;</code>
     */
    protected $requireFullSync = null;
    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.HistorySyncConfig historySyncConfig = 5;</code>
     */
    protected $historySyncConfig = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $os
     *     @type \PhpWA\Protocol\Proto\DeviceProps\AppVersion $version
     *     @type int $platformType
     *     @type bool $requireFullSync
     *     @type \PhpWA\Protocol\Proto\DeviceProps\HistorySyncConfig $historySyncConfig
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string os = 1;</code>
     * @return string
     */
    public function getOs()
    {
        return isset($this->os) ? $this->os : '';
    }

    public function hasOs()
    {
        return isset($this->os);
    }

    public function clearOs()
    {
        unset($this->os);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.AppVersion version = 2;</code>
     * @return \PhpWA\Protocol\Proto\DeviceProps\AppVersion|null
     */
    public function getVersion()
    {
        return $this->version;
    }

    public function hasVersion()
    {
        return isset($this->version);
    }

    public function clearVersion()
    {
        unset($this->version);
    }

    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.AppVersion version = 2;</code>
     * @param \PhpWA\Protocol\Proto\DeviceProps\AppVersion $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\DeviceProps\AppVersion::class);
        $this->version = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.PlatformType platformType = 3;</code>
     * @return int
     */
    public function getPlatformType()
    {
        return isset($this->platformType) ? $this->platformType : 0;
    }

    public function hasPlatformType()
    {
        return isset($this->platformType);
    }

    public function clearPlatformType()
    {
        unset($this->platformType);
    }

    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.PlatformType platformType = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setPlatformType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\DeviceProps\PlatformType::class);
        $this->platformType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool requireFullSync = 4;</code>
     * @return bool
     */
    public function getRequireFullSync()
    {
        return isset($this->requireFullSync) ? $this->requireFullSync : false;
    }

    public function hasRequireFullSync()
    {
        return isset($this->requireFullSync);
    }

    public function clearRequireFullSync()
    {
        unset($this->requireFullSync);
    }

    /**
     * Generated from protobuf field <code>optional bool requireFullSync = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setRequireFullSync($var)
    {
        GPBUtil::checkBool($var);
        $this->requireFullSync = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.HistorySyncConfig historySyncConfig = 5;</code>
     * @return \PhpWA\Protocol\Proto\DeviceProps\HistorySyncConfig|null
     */
    public function getHistorySyncConfig()
    {
        return $this->historySyncConfig;
    }

    public function hasHistorySyncConfig()
    {
        return isset($this->historySyncConfig);
    }

    public function clearHistorySyncConfig()
    {
        unset($this->historySyncConfig);
    }

    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.HistorySyncConfig historySyncConfig = 5;</code>
     * @param \PhpWA\Protocol\Proto\DeviceProps\HistorySyncConfig $var
     * @return $this
     */
    public function setHistorySyncConfig($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\DeviceProps\HistorySyncConfig::class);
        $this->historySyncConfig = $var;

        return $this;
    }

}

