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

namespace PhpWA\Protocol\Proto\ContextInfo;

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

/**
 * Generated from protobuf message <code>proto.ContextInfo.DataSharingContext</code>
 */
class DataSharingContext extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bool showMmDisclosure = 1;</code>
     */
    protected $showMmDisclosure = null;
    /**
     * Generated from protobuf field <code>optional string encryptedSignalTokenConsented = 2;</code>
     */
    protected $encryptedSignalTokenConsented = null;
    /**
     * Generated from protobuf field <code>repeated .proto.ContextInfo.DataSharingContext.Parameters parameters = 3;</code>
     */
    private $parameters;
    /**
     * Generated from protobuf field <code>optional int32 dataSharingFlags = 4;</code>
     */
    protected $dataSharingFlags = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $showMmDisclosure
     *     @type string $encryptedSignalTokenConsented
     *     @type \PhpWA\Protocol\Proto\ContextInfo\DataSharingContext\Parameters[] $parameters
     *     @type int $dataSharingFlags
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasShowMmDisclosure()
    {
        return isset($this->showMmDisclosure);
    }

    public function clearShowMmDisclosure()
    {
        unset($this->showMmDisclosure);
    }

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

        return $this;
    }

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

    public function hasEncryptedSignalTokenConsented()
    {
        return isset($this->encryptedSignalTokenConsented);
    }

    public function clearEncryptedSignalTokenConsented()
    {
        unset($this->encryptedSignalTokenConsented);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.ContextInfo.DataSharingContext.Parameters parameters = 3;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\ContextInfo\DataSharingContext\Parameters>
     */
    public function getParameters()
    {
        return $this->parameters;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.ContextInfo.DataSharingContext.Parameters parameters = 3;</code>
     * @param \PhpWA\Protocol\Proto\ContextInfo\DataSharingContext\Parameters[] $var
     * @return $this
     */
    public function setParameters($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\ContextInfo\DataSharingContext\Parameters::class);
        $this->parameters = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int32 dataSharingFlags = 4;</code>
     * @return int
     */
    public function getDataSharingFlags()
    {
        return isset($this->dataSharingFlags) ? $this->dataSharingFlags : 0;
    }

    public function hasDataSharingFlags()
    {
        return isset($this->dataSharingFlags);
    }

    public function clearDataSharingFlags()
    {
        unset($this->dataSharingFlags);
    }

    /**
     * Generated from protobuf field <code>optional int32 dataSharingFlags = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setDataSharingFlags($var)
    {
        GPBUtil::checkInt32($var);
        $this->dataSharingFlags = $var;

        return $this;
    }

}

