google.api.HttpBody
*/
class HttpBody extends \DeliciousBrains\WP_Offload_Media\Gcp\Google\Protobuf\Internal\Message
{
/**
* The HTTP Content-Type header value specifying the content type of the body.
*
* Generated from protobuf field string content_type = 1;
*/
protected $content_type = '';
/**
* The HTTP request/response body as raw binary.
*
* Generated from protobuf field bytes data = 2;
*/
protected $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 header value specifying the content type of the body.
* @type string $data
* The HTTP request/response body as raw binary.
* @type array<\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)
{
\DeliciousBrains\WP_Offload_Media\Gcp\GPBMetadata\Google\Api\Httpbody::initOnce();
parent::__construct($data);
}
/**
* The HTTP Content-Type header value specifying 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 header value specifying 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;
}
/**
* The HTTP request/response body as raw binary.
*
* Generated from protobuf field bytes data = 2;
* @return string
*/
public function getData()
{
return $this->data;
}
/**
* The HTTP request/response body as raw binary.
*
* 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 array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setExtensions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \DeliciousBrains\WP_Offload_Media\Gcp\Google\Protobuf\Internal\GPBType::MESSAGE, \DeliciousBrains\WP_Offload_Media\Gcp\Google\Protobuf\Any::class);
$this->extensions = $arr;
return $this;
}
}