Sets the priority of the message. Valid values are "normal" and "high."
By default, messages are sent with normal priority.

@param string $priority

@return \LaravelFCM\Message\OptionsBuilder

@throws InvalidOptionsException
19027
public function setPriority($priority)
    {
        if (!OptionsPriorities::isValid($priority)) {
            throw new InvalidOptionsException('priority is not valid, please refer to the documentation or use the constants of the class "OptionsPriorities"');
        }
        $this->priority = $priority;

        return $this;
    }
1289740
public function setPriority(int $priority): void
    {
        if ($priority < 0 || $priority > static::MAX_PRIORITY) {
            throw new \InvalidArgumentException('Priority must be an unsigned integer on the range [0-65535]');
        }

        $this->priority = $priority;
    }
655507
public function setPriority($priority)
	{
		if (is_string($priority))
		{
			switch (strtolower($priority))
			{
				case 'high':
					$priority = 1;
					break;

				case 'normal':
					$priority = 3;
					break;

				case 'low':
					$priority = 5;
					break;

				default:
					$priority = 3;
					break;
			}
		}
		return parent::setPriority($priority);
	}
337321
public function priority($priority = null) {
		if ($priority === null) {
			return $this->_priority;
		}
		$this->_priority = $priority;
		return $this;
	}
486294
protected function createQueue($priority)
    {
        if (!$this->queues[$priority]) {
            $config = $this->getOptions();
            $config['key'] = $this->intChannels[$priority];
            $this->queues[$priority] = new ShmMap($config);
        }

        return $this->queues[$priority];
    }
497179
public function setOption($option, $value)
    {
        if (!$this->isValidOption($option)) {
            throw new InvalidOptionException(sprintf("Invalid encoder option '%s'", $option));
        }

        $this->options[$option] = $value;
    }
1186496
public function setOptions(array $options)
    {
        $availableOptions = [
            'default',
            'group',
            'key',
            'message',
            'messages',
            'rules'
        ];

        foreach ($availableOptions as $option) {
            if (isset($options[$option])) {
                $this->$option = $options[$option];
            }
        }
    }
1041049
public function insert($value, $priority)
    {
        if (! is_int($priority)) {
            throw new Exception\InvalidArgumentException('The priority must be an integer');
        }
        $this->values[$priority][] = $value;
        if (! isset($this->priorities[$priority])) {
            $this->priorities[$priority] = $priority;
            $this->maxPriority           = max($priority, $this->maxPriority);
        }
        ++$this->count;
    }
1314391
public function setAlias($alias) {
        if ($alias !== null && ! $this->argumentsParser->isOptionAlias($alias)) {
            throw new InvalidOptionAliasException(s(
                'A option alias must have this format: "-f", got: "%s"', $alias
            ));
        }

        $this->alias = $alias;

        return $this;
    }
315259
public function setOptions($options)
    {
        if ($this->step !== null) {
            throw new \RuntimeException('Cannot change encoding options during encoding');
        }

        $this->options = (int) $options;
        return $this;
    }
513355
public function prettyPrintPriority($priority)
    {
        $map = [
            MessagePriority::VERY_LOW => 'very low',
            MessagePriority::LOW => 'low',
            MessagePriority::NORMAL => 'normal',
            MessagePriority::HIGH => 'high',
            MessagePriority::VERY_HIGH => 'very high',
        ];

        return isset($map[$priority]) ? $map[$priority] : $priority;
    }
655102
public function setHandlerPriority(KCommandHandlerInterface $handler, $priority)
    {
        $this->__queue->setPriority($handler, $priority);
        return $this;
    }
1042356
protected function setOptions($options = null)
    {
        if (null !== $options) {
            $options = (array) $options;

            if (isset($options['label'])) {
                $this->setLabel($options['label']);
            }
        }

        return $this;
    }
397497
public function setPriority($p)
    {
        $this->priority = $p;
        if ($this->ev !== null) {
            $this->ev->priority = $p;
        }
    }
1253455
public function setStatus($status)
    {
        if (!in_array($status, $this->statusList)) {
            throw new \InvalidArgumentException(sprintf('Invalid status for %s.', __CLASS__));
        }
        $this->status = $status;

        return $this;
    }
487798
public function setPriority($priority = '')
    {
        if ('' == $priority) {
            $priority = 'normal';
        }

        switch ($priority) {
            case 'low':
                $priority = Net_Growl::PRIORITY_LOW;
                break;
            case 'moderate':
                $priority = Net_Growl::PRIORITY_MODERATE;
                break;
            case 'normal':
                $priority = Net_Growl::PRIORITY_NORMAL;
                break;
            case 'high':
                $priority = Net_Growl::PRIORITY_HIGH;
                break;
            case 'emergency':
                $priority = Net_Growl::PRIORITY_EMERGENCY;
                break;
            default:
                throw new BuildException(
                    '"priority" attribute is invalid.'
                );
        }

        $this->priority = $priority;
    }
1195080
public function setOptions()
    {
        $options = array('delivery_mode' => $this->persistent);

        // if priority is set
        if ($this->priority) {
            $options['priority'] = $this->priority;
        }

        // if expiration is set
        if ($this->expiration) {
            $options['expiration'] = $this->expiration;
        }

        // if content type is set
        if ($this->contentType) {
            $options['content_type'] = $this->contentType;
        }

        // if content encoding is set
        if ($this->contentEncoding) {
            $options['content_encoding'] = $this->contentEncoding;
        }

        // if application id is set
        if ($this->appId) {
            $options['app_id'] = $this->appId;
        }

        // if user id is set
        if ($this->user) {
            $options['user_id'] = $this->user;
        }

        // if timestamp is set
        if ($this->timestamp) {
            $options['timestamp'] = $this->timestamp;
        }

        // if type is set
        if ($this->type) {
            $options['type'] = $this->type;
        }

        // if correlation id is set
        if ($this->corrId) {
            $options['correlation_id'] = $this->corrId;
        }

        // if correlation id is set
        if ($this->replyTo) {
            $options['reply_to'] = $this->replyTo;
        }

        // if delay is set
        if ($this->delay) {
            $options['x-delay'] = $this->delay;
        }

        return $options;
    }