rv.data.Graphics.Gradient */ class Gradient extends \Google\Protobuf\Internal\Message { /** * Generated from protobuf field .rv.data.Graphics.Gradient.Type type = 1; */ protected $type = 0; /** * Generated from protobuf field double angle = 2; */ protected $angle = 0.0; /** * Generated from protobuf field double length = 3; */ protected $length = 0.0; /** * Generated from protobuf field repeated .rv.data.Graphics.Gradient.ColorStop stops = 4; */ private $stops; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type int $type * @type float $angle * @type float $length * @type array<\Rv\Data\Graphics\Gradient\ColorStop>|\Google\Protobuf\Internal\RepeatedField $stops * } */ public function __construct($data = NULL) { \GPBMetadata\GraphicsData::initOnce(); parent::__construct($data); } /** * Generated from protobuf field .rv.data.Graphics.Gradient.Type type = 1; * @return int */ public function getType() { return $this->type; } /** * Generated from protobuf field .rv.data.Graphics.Gradient.Type type = 1; * @param int $var * @return $this */ public function setType($var) { GPBUtil::checkEnum($var, \Rv\Data\Graphics\Gradient\Type::class); $this->type = $var; return $this; } /** * Generated from protobuf field double angle = 2; * @return float */ public function getAngle() { return $this->angle; } /** * Generated from protobuf field double angle = 2; * @param float $var * @return $this */ public function setAngle($var) { GPBUtil::checkDouble($var); $this->angle = $var; return $this; } /** * Generated from protobuf field double length = 3; * @return float */ public function getLength() { return $this->length; } /** * Generated from protobuf field double length = 3; * @param float $var * @return $this */ public function setLength($var) { GPBUtil::checkDouble($var); $this->length = $var; return $this; } /** * Generated from protobuf field repeated .rv.data.Graphics.Gradient.ColorStop stops = 4; * @return \Google\Protobuf\Internal\RepeatedField */ public function getStops() { return $this->stops; } /** * Generated from protobuf field repeated .rv.data.Graphics.Gradient.ColorStop stops = 4; * @param array<\Rv\Data\Graphics\Gradient\ColorStop>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setStops($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Rv\Data\Graphics\Gradient\ColorStop::class); $this->stops = $arr; return $this; } }