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

namespace Google\Cloud\Functions\V2;

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

/**
 * Informational messages about the state of the Cloud Function or Operation.
 *
 * Generated from protobuf message <code>google.cloud.functions.v2.StateMessage</code>
 */
class StateMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Severity of the state message.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.StateMessage.Severity severity = 1;</code>
     */
    private $severity = 0;
    /**
     * One-word CamelCase type of the state message.
     *
     * Generated from protobuf field <code>string type = 2;</code>
     */
    private $type = '';
    /**
     * The message.
     *
     * Generated from protobuf field <code>string message = 3;</code>
     */
    private $message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $severity
     *           Severity of the state message.
     *     @type string $type
     *           One-word CamelCase type of the state message.
     *     @type string $message
     *           The message.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce();
        parent::__construct($data);
    }

    /**
     * Severity of the state message.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.StateMessage.Severity severity = 1;</code>
     * @return int
     */
    public function getSeverity()
    {
        return $this->severity;
    }

    /**
     * Severity of the state message.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.StateMessage.Severity severity = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setSeverity($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\StateMessage\Severity::class);
        $this->severity = $var;

        return $this;
    }

    /**
     * One-word CamelCase type of the state message.
     *
     * Generated from protobuf field <code>string type = 2;</code>
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * One-word CamelCase type of the state message.
     *
     * Generated from protobuf field <code>string type = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

    /**
     * The message.
     *
     * Generated from protobuf field <code>string message = 3;</code>
     * @return string
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * The message.
     *
     * Generated from protobuf field <code>string message = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->message = $var;

        return $this;
    }

}

