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

namespace Google\Cloud\Spanner\V1;

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

/**
 * Common request options for various APIs.
 *
 * Generated from protobuf message <code>google.spanner.v1.RequestOptions</code>
 */
class RequestOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Priority for the request.
     *
     * Generated from protobuf field <code>.google.spanner.v1.RequestOptions.Priority priority = 1;</code>
     */
    private $priority = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $priority
     *           Priority for the request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Spanner\V1\Spanner::initOnce();
        parent::__construct($data);
    }

    /**
     * Priority for the request.
     *
     * Generated from protobuf field <code>.google.spanner.v1.RequestOptions.Priority priority = 1;</code>
     * @return int
     */
    public function getPriority()
    {
        return $this->priority;
    }

    /**
     * Priority for the request.
     *
     * Generated from protobuf field <code>.google.spanner.v1.RequestOptions.Priority priority = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setPriority($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Spanner\V1\RequestOptions\Priority::class);
        $this->priority = $var;

        return $this;
    }

}

