Metadata.
*/
class Metadata extends Message
{
/**
* Generated from protobuf field string type = 3;.
*/
protected $type = '';
/**
* Generated from protobuf field string clientIp = 8;.
*/
protected $clientIp = '';
/**
* Generated from protobuf field map headers = 7;.
*/
private $headers;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @var string $type
* @var string $clientIp
* @var array|MapField $headers
* }
*/
public function __construct($data = null)
{
GPBMetadata\Nacos::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field string type = 3;.
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Generated from protobuf field string type = 3;.
* @param string $var
* @return $this
*/
public function setType($var)
{
GPBUtil::checkString($var, true);
$this->type = $var;
return $this;
}
/**
* Generated from protobuf field string clientIp = 8;.
* @return string
*/
public function getClientIp()
{
return $this->clientIp;
}
/**
* Generated from protobuf field string clientIp = 8;.
* @param string $var
* @return $this
*/
public function setClientIp($var)
{
GPBUtil::checkString($var, true);
$this->clientIp = $var;
return $this;
}
/**
* Generated from protobuf field map headers = 7;.
* @return MapField
*/
public function getHeaders()
{
return $this->headers;
}
/**
* Generated from protobuf field map headers = 7;.
* @param array|MapField $var
* @return $this
*/
public function setHeaders($var)
{
$arr = GPBUtil::checkMapField($var, GPBType::STRING, GPBType::STRING);
$this->headers = $arr;
return $this;
}
}