<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/apihub/v1/plugin_service.proto

namespace Google\Cloud\ApiHub\V1;

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

/**
 * PluginActionConfig represents the configuration of an action supported by a
 * plugin.
 *
 * Generated from protobuf message <code>google.cloud.apihub.v1.PluginActionConfig</code>
 */
class PluginActionConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The id of the action.
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $id = '';
    /**
     * Required. The display name of the action.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $display_name = '';
    /**
     * Required. The description of the operation performed by the action.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $description = '';
    /**
     * Required. The trigger mode supported by the action.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.PluginActionConfig.TriggerMode trigger_mode = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $trigger_mode = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Required. The id of the action.
     *     @type string $display_name
     *           Required. The display name of the action.
     *     @type string $description
     *           Required. The description of the operation performed by the action.
     *     @type int $trigger_mode
     *           Required. The trigger mode supported by the action.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apihub\V1\PluginService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The id of the action.
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Required. The id of the action.
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Required. The display name of the action.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Required. The display name of the action.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Required. The description of the operation performed by the action.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Required. The description of the operation performed by the action.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Required. The trigger mode supported by the action.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.PluginActionConfig.TriggerMode trigger_mode = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getTriggerMode()
    {
        return $this->trigger_mode;
    }

    /**
     * Required. The trigger mode supported by the action.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.PluginActionConfig.TriggerMode trigger_mode = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setTriggerMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ApiHub\V1\PluginActionConfig\TriggerMode::class);
        $this->trigger_mode = $var;

        return $this;
    }

}

