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

namespace PhpWA\Protocol\Proto\ClientPayload;

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

/**
 * Generated from protobuf message <code>proto.ClientPayload.DNSSource</code>
 */
class DNSSource extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.ClientPayload.DNSSource.DNSResolutionMethod dnsMethod = 15;</code>
     */
    protected $dnsMethod = null;
    /**
     * Generated from protobuf field <code>optional bool appCached = 16;</code>
     */
    protected $appCached = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $dnsMethod
     *     @type bool $appCached
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.ClientPayload.DNSSource.DNSResolutionMethod dnsMethod = 15;</code>
     * @return int
     */
    public function getDnsMethod()
    {
        return isset($this->dnsMethod) ? $this->dnsMethod : 0;
    }

    public function hasDnsMethod()
    {
        return isset($this->dnsMethod);
    }

    public function clearDnsMethod()
    {
        unset($this->dnsMethod);
    }

    /**
     * Generated from protobuf field <code>optional .proto.ClientPayload.DNSSource.DNSResolutionMethod dnsMethod = 15;</code>
     * @param int $var
     * @return $this
     */
    public function setDnsMethod($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\ClientPayload\DNSSource\DNSResolutionMethod::class);
        $this->dnsMethod = $var;

        return $this;
    }

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

    public function hasAppCached()
    {
        return isset($this->appCached);
    }

    public function clearAppCached()
    {
        unset($this->appCached);
    }

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

        return $this;
    }

}

