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

namespace Rv\Data\TestPatternDefinition;

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

/**
 * Generated from protobuf message <code>rv.data.TestPatternDefinition.ColorProperty</code>
 */
class ColorProperty extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.rv.data.Color value = 1;</code>
     */
    protected $value = null;
    /**
     * Generated from protobuf field <code>bool allow_alpha = 2;</code>
     */
    protected $allow_alpha = false;
    /**
     * Generated from protobuf field <code>repeated .rv.data.Color default_colors = 3;</code>
     */
    private $default_colors;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\Color $value
     *     @type bool $allow_alpha
     *     @type array<\Rv\Data\Color>|\Google\Protobuf\Internal\RepeatedField $default_colors
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\TestPattern::initOnce();
        parent::__construct($data);
    }

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

    public function hasValue()
    {
        return isset($this->value);
    }

    public function clearValue()
    {
        unset($this->value);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool allow_alpha = 2;</code>
     * @return bool
     */
    public function getAllowAlpha()
    {
        return $this->allow_alpha;
    }

    /**
     * Generated from protobuf field <code>bool allow_alpha = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setAllowAlpha($var)
    {
        GPBUtil::checkBool($var);
        $this->allow_alpha = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Color default_colors = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDefaultColors()
    {
        return $this->default_colors;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.Color default_colors = 3;</code>
     * @param array<\Rv\Data\Color>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDefaultColors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Rv\Data\Color::class);
        $this->default_colors = $arr;

        return $this;
    }

}

