<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: graphicsData.proto

namespace Rv\Data\Graphics\Gradient;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Generated from protobuf message <code>rv.data.Graphics.Gradient.ColorStop</code>
 */
class ColorStop extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.rv.data.Color color = 1;</code>
     */
    protected $color = null;
    /**
     * Generated from protobuf field <code>double position = 2;</code>
     */
    protected $position = 0.0;
    /**
     * Generated from protobuf field <code>double blend_point = 3;</code>
     */
    protected $blend_point = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\Color $color
     *     @type float $position
     *     @type float $blend_point
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\GraphicsData::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Color color = 1;</code>
     * @return \Rv\Data\Color|null
     */
    public function getColor()
    {
        return $this->color;
    }

    public function hasColor()
    {
        return isset($this->color);
    }

    public function clearColor()
    {
        unset($this->color);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Color color = 1;</code>
     * @param \Rv\Data\Color $var
     * @return $this
     */
    public function setColor($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Color::class);
        $this->color = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>double position = 2;</code>
     * @return float
     */
    public function getPosition()
    {
        return $this->position;
    }

    /**
     * Generated from protobuf field <code>double position = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setPosition($var)
    {
        GPBUtil::checkDouble($var);
        $this->position = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>double blend_point = 3;</code>
     * @return float
     */
    public function getBlendPoint()
    {
        return $this->blend_point;
    }

    /**
     * Generated from protobuf field <code>double blend_point = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setBlendPoint($var)
    {
        GPBUtil::checkDouble($var);
        $this->blend_point = $var;

        return $this;
    }

}

