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

namespace Grpc\Testing\ClientConfigureRequest;

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

/**
 * Metadata to be attached for the given type of RPCs.
 *
 * Generated from protobuf message <code>grpc.testing.ClientConfigureRequest.Metadata</code>
 */
class Metadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.grpc.testing.ClientConfigureRequest.RpcType type = 1;</code>
     */
    protected $type = 0;
    /**
     * Generated from protobuf field <code>string key = 2;</code>
     */
    protected $key = '';
    /**
     * Generated from protobuf field <code>string value = 3;</code>
     */
    protected $value = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *     @type string $key
     *     @type string $value
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.grpc.testing.ClientConfigureRequest.RpcType type = 1;</code>
     * @return int one of the values in {@see \Grpc\Testing\ClientConfigureRequest\RpcType}
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Generated from protobuf field <code>.grpc.testing.ClientConfigureRequest.RpcType type = 1;</code>
     * @param int $var one of the values in {@see \Grpc\Testing\ClientConfigureRequest\RpcType}
     * @return $this
     */
    public function setType(int $var)
    {
        GPBUtil::checkEnum($var, \Grpc\Testing\ClientConfigureRequest\RpcType::class);
        $this->type = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

}

