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

namespace Google\Cloud\Build\V1\Build;

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

/**
 * A non-fatal problem encountered during the execution of the build.
 *
 * Generated from protobuf message <code>google.devtools.cloudbuild.v1.Build.Warning</code>
 */
class Warning extends \Google\Protobuf\Internal\Message
{
    /**
     * Explanation of the warning generated.
     *
     * Generated from protobuf field <code>string text = 1;</code>
     */
    private $text = '';
    /**
     * The priority for this warning.
     *
     * Generated from protobuf field <code>.google.devtools.cloudbuild.v1.Build.Warning.Priority priority = 2;</code>
     */
    private $priority = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $text
     *           Explanation of the warning generated.
     *     @type int $priority
     *           The priority for this warning.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Cloudbuild\V1\Cloudbuild::initOnce();
        parent::__construct($data);
    }

    /**
     * Explanation of the warning generated.
     *
     * Generated from protobuf field <code>string text = 1;</code>
     * @return string
     */
    public function getText()
    {
        return $this->text;
    }

    /**
     * Explanation of the warning generated.
     *
     * Generated from protobuf field <code>string text = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setText($var)
    {
        GPBUtil::checkString($var, True);
        $this->text = $var;

        return $this;
    }

    /**
     * The priority for this warning.
     *
     * Generated from protobuf field <code>.google.devtools.cloudbuild.v1.Build.Warning.Priority priority = 2;</code>
     * @return int
     */
    public function getPriority()
    {
        return $this->priority;
    }

    /**
     * The priority for this warning.
     *
     * Generated from protobuf field <code>.google.devtools.cloudbuild.v1.Build.Warning.Priority priority = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setPriority($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Build\V1\Build\Warning\Priority::class);
        $this->priority = $var;

        return $this;
    }

}


