google.api.HttpBody
*/
class HttpBody extends \Google\Protobuf\Internal\Message
{
/**
* The HTTP Content-Type string representing the content type of the body.
*
* Generated from protobuf field string content_type = 1;
*/
private $content_type = '';
/**
* HTTP body binary data.
*
* Generated from protobuf field bytes data = 2;
*/
private $data = '';
/**
* Application specific response metadata. Must be set in the first response
* for streaming APIs.
*
* Generated from protobuf field repeated .google.protobuf.Any extensions = 3;
*/
private $extensions;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $content_type
* The HTTP Content-Type string representing the content type of the body.
* @type string $data
* HTTP body binary data.
* @type \Google\Protobuf\Any[]|\Google\Protobuf\Internal\RepeatedField $extensions
* Application specific response metadata. Must be set in the first response
* for streaming APIs.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Api\Httpbody::initOnce();
parent::__construct($data);
}
/**
* The HTTP Content-Type string representing the content type of the body.
*
* Generated from protobuf field string content_type = 1;
* @return string
*/
public function getContentType()
{
return $this->content_type;
}
/**
* The HTTP Content-Type string representing the content type of the body.
*
* Generated from protobuf field string content_type = 1;
* @param string $var
* @return $this
*/
public function setContentType($var)
{
GPBUtil::checkString($var, True);
$this->content_type = $var;
return $this;
}
/**
* HTTP body binary data.
*
* Generated from protobuf field bytes data = 2;
* @return string
*/
public function getData()
{
return $this->data;
}
/**
* HTTP body binary data.
*
* Generated from protobuf field bytes data = 2;
* @param string $var
* @return $this
*/
public function setData($var)
{
GPBUtil::checkString($var, False);
$this->data = $var;
return $this;
}
/**
* Application specific response metadata. Must be set in the first response
* for streaming APIs.
*
* Generated from protobuf field repeated .google.protobuf.Any extensions = 3;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getExtensions()
{
return $this->extensions;
}
/**
* Application specific response metadata. Must be set in the first response
* for streaming APIs.
*
* Generated from protobuf field repeated .google.protobuf.Any extensions = 3;
* @param \Google\Protobuf\Any[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setExtensions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class);
$this->extensions = $arr;
return $this;
}
}