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

namespace Google\Apps\Script\Type;

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

/**
 * Common format for declaring a  menu item, or button, that appears within a
 * host app.
 *
 * Generated from protobuf message <code>google.apps.script.type.MenuItemExtensionPoint</code>
 */
class MenuItemExtensionPoint extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The endpoint to execute when this extension point is
     * activated.
     *
     * Generated from protobuf field <code>string run_function = 1;</code>
     */
    protected $run_function = '';
    /**
     * Required. User-visible text describing the action taken by activating this
     * extension point. For example, "Insert invoice".
     *
     * Generated from protobuf field <code>string label = 2;</code>
     */
    protected $label = '';
    /**
     * The URL for the logo image shown in the add-on toolbar.
     * If not set, defaults to the add-on's primary logo URL.
     *
     * Generated from protobuf field <code>string logo_url = 3;</code>
     */
    protected $logo_url = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $run_function
     *           Required. The endpoint to execute when this extension point is
     *           activated.
     *     @type string $label
     *           Required. User-visible text describing the action taken by activating this
     *           extension point. For example, "Insert invoice".
     *     @type string $logo_url
     *           The URL for the logo image shown in the add-on toolbar.
     *           If not set, defaults to the add-on's primary logo URL.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Apps\Script\Type\ExtensionPoint::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The endpoint to execute when this extension point is
     * activated.
     *
     * Generated from protobuf field <code>string run_function = 1;</code>
     * @return string
     */
    public function getRunFunction()
    {
        return $this->run_function;
    }

    /**
     * Required. The endpoint to execute when this extension point is
     * activated.
     *
     * Generated from protobuf field <code>string run_function = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setRunFunction($var)
    {
        GPBUtil::checkString($var, True);
        $this->run_function = $var;

        return $this;
    }

    /**
     * Required. User-visible text describing the action taken by activating this
     * extension point. For example, "Insert invoice".
     *
     * Generated from protobuf field <code>string label = 2;</code>
     * @return string
     */
    public function getLabel()
    {
        return $this->label;
    }

    /**
     * Required. User-visible text describing the action taken by activating this
     * extension point. For example, "Insert invoice".
     *
     * Generated from protobuf field <code>string label = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setLabel($var)
    {
        GPBUtil::checkString($var, True);
        $this->label = $var;

        return $this;
    }

    /**
     * The URL for the logo image shown in the add-on toolbar.
     * If not set, defaults to the add-on's primary logo URL.
     *
     * Generated from protobuf field <code>string logo_url = 3;</code>
     * @return string
     */
    public function getLogoUrl()
    {
        return $this->logo_url;
    }

    /**
     * The URL for the logo image shown in the add-on toolbar.
     * If not set, defaults to the add-on's primary logo URL.
     *
     * Generated from protobuf field <code>string logo_url = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setLogoUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->logo_url = $var;

        return $this;
    }

}

