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

namespace Google\Cloud\SecurityCenter\V1\CustomConfig\CustomOutputSpec;

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

/**
 * An individual name-value pair that defines a custom source property.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property</code>
 */
class Property extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the property for the custom output.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The CEL expression for the custom output. A resource property can be
     * specified to return the value of the property or a text string enclosed
     * in quotation marks.
     *
     * Generated from protobuf field <code>.google.type.Expr value_expression = 2;</code>
     */
    private $value_expression = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Name of the property for the custom output.
     *     @type \Google\Type\Expr $value_expression
     *           The CEL expression for the custom output. A resource property can be
     *           specified to return the value of the property or a text string enclosed
     *           in quotation marks.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\SecurityHealthAnalyticsCustomConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of the property for the custom output.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Name of the property for the custom output.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The CEL expression for the custom output. A resource property can be
     * specified to return the value of the property or a text string enclosed
     * in quotation marks.
     *
     * Generated from protobuf field <code>.google.type.Expr value_expression = 2;</code>
     * @return \Google\Type\Expr|null
     */
    public function getValueExpression()
    {
        return $this->value_expression;
    }

    public function hasValueExpression()
    {
        return isset($this->value_expression);
    }

    public function clearValueExpression()
    {
        unset($this->value_expression);
    }

    /**
     * The CEL expression for the custom output. A resource property can be
     * specified to return the value of the property or a text string enclosed
     * in quotation marks.
     *
     * Generated from protobuf field <code>.google.type.Expr value_expression = 2;</code>
     * @param \Google\Type\Expr $var
     * @return $this
     */
    public function setValueExpression($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Expr::class);
        $this->value_expression = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Property::class, \Google\Cloud\SecurityCenter\V1\CustomConfig_CustomOutputSpec_Property::class);

