<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/apps/script/type/addon_widget_set.proto

namespace Google\Apps\Script\Type;

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

/**
 * The widget subset used by an add-on.
 *
 * Generated from protobuf message <code>google.apps.script.type.AddOnWidgetSet</code>
 */
class AddOnWidgetSet extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of widgets used in an add-on.
     *
     * Generated from protobuf field <code>repeated .google.apps.script.type.AddOnWidgetSet.WidgetType used_widgets = 1;</code>
     */
    private $used_widgets;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $used_widgets
     *           The list of widgets used in an add-on.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Apps\Script\Type\AddonWidgetSet::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of widgets used in an add-on.
     *
     * Generated from protobuf field <code>repeated .google.apps.script.type.AddOnWidgetSet.WidgetType used_widgets = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getUsedWidgets()
    {
        return $this->used_widgets;
    }

    /**
     * The list of widgets used in an add-on.
     *
     * Generated from protobuf field <code>repeated .google.apps.script.type.AddOnWidgetSet.WidgetType used_widgets = 1;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setUsedWidgets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Apps\Script\Type\AddOnWidgetSet\WidgetType::class);
        $this->used_widgets = $arr;

        return $this;
    }

}

