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

namespace Google\Cloud\Eventarc\V1;

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

/**
 * A representation of the FilteringAttribute resource.
 * Filtering attributes are per event type.
 *
 * Generated from protobuf message <code>google.cloud.eventarc.v1.FilteringAttribute</code>
 */
class FilteringAttribute extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Attribute used for filtering the event type.
     *
     * Generated from protobuf field <code>string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $attribute = '';
    /**
     * Output only. Description of the purpose of the attribute.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $description = '';
    /**
     * Output only. If true, the triggers for this provider should always specify a filter
     * on these attributes. Trigger creation will fail otherwise.
     *
     * Generated from protobuf field <code>bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $required = false;
    /**
     * Output only. If true, the attribute accepts matching expressions in the Eventarc
     * PathPattern format.
     *
     * Generated from protobuf field <code>bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $path_pattern_supported = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $attribute
     *           Output only. Attribute used for filtering the event type.
     *     @type string $description
     *           Output only. Description of the purpose of the attribute.
     *     @type bool $required
     *           Output only. If true, the triggers for this provider should always specify a filter
     *           on these attributes. Trigger creation will fail otherwise.
     *     @type bool $path_pattern_supported
     *           Output only. If true, the attribute accepts matching expressions in the Eventarc
     *           PathPattern format.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Eventarc\V1\Discovery::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Attribute used for filtering the event type.
     *
     * Generated from protobuf field <code>string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getAttribute()
    {
        return $this->attribute;
    }

    /**
     * Output only. Attribute used for filtering the event type.
     *
     * Generated from protobuf field <code>string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setAttribute($var)
    {
        GPBUtil::checkString($var, True);
        $this->attribute = $var;

        return $this;
    }

    /**
     * Output only. Description of the purpose of the attribute.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Output only. Description of the purpose of the attribute.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Output only. If true, the triggers for this provider should always specify a filter
     * on these attributes. Trigger creation will fail otherwise.
     *
     * Generated from protobuf field <code>bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getRequired()
    {
        return $this->required;
    }

    /**
     * Output only. If true, the triggers for this provider should always specify a filter
     * on these attributes. Trigger creation will fail otherwise.
     *
     * Generated from protobuf field <code>bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setRequired($var)
    {
        GPBUtil::checkBool($var);
        $this->required = $var;

        return $this;
    }

    /**
     * Output only. If true, the attribute accepts matching expressions in the Eventarc
     * PathPattern format.
     *
     * Generated from protobuf field <code>bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getPathPatternSupported()
    {
        return $this->path_pattern_supported;
    }

    /**
     * Output only. If true, the attribute accepts matching expressions in the Eventarc
     * PathPattern format.
     *
     * Generated from protobuf field <code>bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setPathPatternSupported($var)
    {
        GPBUtil::checkBool($var);
        $this->path_pattern_supported = $var;

        return $this;
    }

}

