<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v16/common/text_label.proto

namespace Google\Ads\GoogleAds\V16\Common;

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

/**
 * A type of label displaying text on a colored background.
 *
 * Generated from protobuf message <code>google.ads.googleads.v16.common.TextLabel</code>
 */
class TextLabel extends \Google\Protobuf\Internal\Message
{
    /**
     * Background color of the label in RGB format. This string must match the
     * regular expression '^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'.
     * Note: The background color may not be visible for manager accounts.
     *
     * Generated from protobuf field <code>optional string background_color = 3;</code>
     */
    protected $background_color = null;
    /**
     * A short description of the label. The length must be no more than 200
     * characters.
     *
     * Generated from protobuf field <code>optional string description = 4;</code>
     */
    protected $description = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $background_color
     *           Background color of the label in RGB format. This string must match the
     *           regular expression '^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'.
     *           Note: The background color may not be visible for manager accounts.
     *     @type string $description
     *           A short description of the label. The length must be no more than 200
     *           characters.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V16\Common\TextLabel::initOnce();
        parent::__construct($data);
    }

    /**
     * Background color of the label in RGB format. This string must match the
     * regular expression '^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'.
     * Note: The background color may not be visible for manager accounts.
     *
     * Generated from protobuf field <code>optional string background_color = 3;</code>
     * @return string
     */
    public function getBackgroundColor()
    {
        return isset($this->background_color) ? $this->background_color : '';
    }

    public function hasBackgroundColor()
    {
        return isset($this->background_color);
    }

    public function clearBackgroundColor()
    {
        unset($this->background_color);
    }

    /**
     * Background color of the label in RGB format. This string must match the
     * regular expression '^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'.
     * Note: The background color may not be visible for manager accounts.
     *
     * Generated from protobuf field <code>optional string background_color = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setBackgroundColor($var)
    {
        GPBUtil::checkString($var, True);
        $this->background_color = $var;

        return $this;
    }

    /**
     * A short description of the label. The length must be no more than 200
     * characters.
     *
     * Generated from protobuf field <code>optional string description = 4;</code>
     * @return string
     */
    public function getDescription()
    {
        return isset($this->description) ? $this->description : '';
    }

    public function hasDescription()
    {
        return isset($this->description);
    }

    public function clearDescription()
    {
        unset($this->description);
    }

    /**
     * A short description of the label. The length must be no more than 200
     * characters.
     *
     * Generated from protobuf field <code>optional string description = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

}

