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

namespace PhpWA\Protocol\Proto\ContextInfo\DataSharingContext;

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

/**
 * Generated from protobuf message <code>proto.ContextInfo.DataSharingContext.Parameters</code>
 */
class Parameters extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string key = 1;</code>
     */
    protected $key = null;
    /**
     * Generated from protobuf field <code>optional string stringData = 2;</code>
     */
    protected $stringData = null;
    /**
     * Generated from protobuf field <code>optional int64 intData = 3;</code>
     */
    protected $intData = null;
    /**
     * Generated from protobuf field <code>optional float floatData = 4;</code>
     */
    protected $floatData = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo.DataSharingContext.Parameters contents = 5;</code>
     */
    protected $contents = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $key
     *     @type string $stringData
     *     @type int|string $intData
     *     @type float $floatData
     *     @type \PhpWA\Protocol\Proto\ContextInfo\DataSharingContext\Parameters $contents
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasKey()
    {
        return isset($this->key);
    }

    public function clearKey()
    {
        unset($this->key);
    }

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

        return $this;
    }

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

    public function hasStringData()
    {
        return isset($this->stringData);
    }

    public function clearStringData()
    {
        unset($this->stringData);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 intData = 3;</code>
     * @return int|string
     */
    public function getIntData()
    {
        return isset($this->intData) ? $this->intData : 0;
    }

    public function hasIntData()
    {
        return isset($this->intData);
    }

    public function clearIntData()
    {
        unset($this->intData);
    }

    /**
     * Generated from protobuf field <code>optional int64 intData = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setIntData($var)
    {
        GPBUtil::checkInt64($var);
        $this->intData = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional float floatData = 4;</code>
     * @return float
     */
    public function getFloatData()
    {
        return isset($this->floatData) ? $this->floatData : 0.0;
    }

    public function hasFloatData()
    {
        return isset($this->floatData);
    }

    public function clearFloatData()
    {
        unset($this->floatData);
    }

    /**
     * Generated from protobuf field <code>optional float floatData = 4;</code>
     * @param float $var
     * @return $this
     */
    public function setFloatData($var)
    {
        GPBUtil::checkFloat($var);
        $this->floatData = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo.DataSharingContext.Parameters contents = 5;</code>
     * @return \PhpWA\Protocol\Proto\ContextInfo\DataSharingContext\Parameters|null
     */
    public function getContents()
    {
        return $this->contents;
    }

    public function hasContents()
    {
        return isset($this->contents);
    }

    public function clearContents()
    {
        unset($this->contents);
    }

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

        return $this;
    }

}

