google.api.servicecontrol.v1.QuotaError
*/
class QuotaError extends \Google\Protobuf\Internal\Message
{
/**
* Error code.
*
* Generated from protobuf field .google.api.servicecontrol.v1.QuotaError.Code code = 1;
*/
private $code = 0;
/**
* Subject to whom this error applies. See the specific enum for more details
* on this field. For example, "clientip:" or
* "project:".
*
* Generated from protobuf field string subject = 2;
*/
private $subject = '';
/**
* Free-form text that provides details on the cause of the error.
*
* Generated from protobuf field string description = 3;
*/
private $description = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $code
* Error code.
* @type string $subject
* Subject to whom this error applies. See the specific enum for more details
* on this field. For example, "clientip:" or
* "project:".
* @type string $description
* Free-form text that provides details on the cause of the error.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Api\Servicecontrol\V1\QuotaController::initOnce();
parent::__construct($data);
}
/**
* Error code.
*
* Generated from protobuf field .google.api.servicecontrol.v1.QuotaError.Code code = 1;
* @return int
*/
public function getCode()
{
return $this->code;
}
/**
* Error code.
*
* Generated from protobuf field .google.api.servicecontrol.v1.QuotaError.Code code = 1;
* @param int $var
* @return $this
*/
public function setCode($var)
{
GPBUtil::checkEnum($var, \Google\Api\Servicecontrol\V1\QuotaError_Code::class);
$this->code = $var;
return $this;
}
/**
* Subject to whom this error applies. See the specific enum for more details
* on this field. For example, "clientip:" or
* "project:".
*
* Generated from protobuf field string subject = 2;
* @return string
*/
public function getSubject()
{
return $this->subject;
}
/**
* Subject to whom this error applies. See the specific enum for more details
* on this field. For example, "clientip:" or
* "project:".
*
* Generated from protobuf field string subject = 2;
* @param string $var
* @return $this
*/
public function setSubject($var)
{
GPBUtil::checkString($var, True);
$this->subject = $var;
return $this;
}
/**
* Free-form text that provides details on the cause of the error.
*
* Generated from protobuf field string description = 3;
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Free-form text that provides details on the cause of the error.
*
* Generated from protobuf field string description = 3;
* @param string $var
* @return $this
*/
public function setDescription($var)
{
GPBUtil::checkString($var, True);
$this->description = $var;
return $this;
}
}