<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2/dlp.proto

namespace Google\Cloud\Dlp\V2;

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

/**
 * Represents a color in the RGB color space.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.Color</code>
 */
class Color extends \Google\Protobuf\Internal\Message
{
    /**
     * The amount of red in the color as a value in the interval [0, 1].
     *
     * Generated from protobuf field <code>float red = 1;</code>
     */
    private $red = 0.0;
    /**
     * The amount of green in the color as a value in the interval [0, 1].
     *
     * Generated from protobuf field <code>float green = 2;</code>
     */
    private $green = 0.0;
    /**
     * The amount of blue in the color as a value in the interval [0, 1].
     *
     * Generated from protobuf field <code>float blue = 3;</code>
     */
    private $blue = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $red
     *           The amount of red in the color as a value in the interval [0, 1].
     *     @type float $green
     *           The amount of green in the color as a value in the interval [0, 1].
     *     @type float $blue
     *           The amount of blue in the color as a value in the interval [0, 1].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * The amount of red in the color as a value in the interval [0, 1].
     *
     * Generated from protobuf field <code>float red = 1;</code>
     * @return float
     */
    public function getRed()
    {
        return $this->red;
    }

    /**
     * The amount of red in the color as a value in the interval [0, 1].
     *
     * Generated from protobuf field <code>float red = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setRed($var)
    {
        GPBUtil::checkFloat($var);
        $this->red = $var;

        return $this;
    }

    /**
     * The amount of green in the color as a value in the interval [0, 1].
     *
     * Generated from protobuf field <code>float green = 2;</code>
     * @return float
     */
    public function getGreen()
    {
        return $this->green;
    }

    /**
     * The amount of green in the color as a value in the interval [0, 1].
     *
     * Generated from protobuf field <code>float green = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setGreen($var)
    {
        GPBUtil::checkFloat($var);
        $this->green = $var;

        return $this;
    }

    /**
     * The amount of blue in the color as a value in the interval [0, 1].
     *
     * Generated from protobuf field <code>float blue = 3;</code>
     * @return float
     */
    public function getBlue()
    {
        return $this->blue;
    }

    /**
     * The amount of blue in the color as a value in the interval [0, 1].
     *
     * Generated from protobuf field <code>float blue = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setBlue($var)
    {
        GPBUtil::checkFloat($var);
        $this->blue = $var;

        return $this;
    }

}

