// SetPriority sets the Priority field's value.
327412
func (s *APNSMessage) SetPriority(v string) *APNSMessage {
	s.Priority = &v
	return s
}
455164
func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule {
	s.Priority = &v
	return s
}
538100
func (pq *txPriorityQueue) SetLessFunc(lessFunc txPriorityQueueLessFunc) {
	pq.lessFunc = lessFunc
	heap.Init(pq)
}
110196
func (p *PriorityQueue) UpdatePriority(x interface{}, newPriority float64) {
	item, ok := p.lookup[x]
	if !ok {
		return
	}

	item.priority = newPriority
	heap.Fix(p.itemHeap, item.index)
}
1130901
func (s *JobDescriptor) SetPriority(v int64) *JobDescriptor {
	s.Priority = &v
	return s
}
1177695
func (me *PriorityBitmap) GetPriority(bit int) (prio int, ok bool) {
	prio, ok = me.priorities[bit]
	return
}
1079948
func (s *Event) SetSeverity(v string) *Event {
	s.Severity = &v
	return s
}
811549
func (s *LifecyclePolicyPreviewResult) SetAppliedRulePriority(v int64) *LifecyclePolicyPreviewResult {
	s.AppliedRulePriority = &v
	return s
}
585907
func setSamplingPriority(s *Span, value interface{}) bool {
	val, ok := value.(uint16)
	if !ok {
		return false
	}
	s.Lock()
	defer s.Unlock()
	if val == 0 {
		s.context.flags = s.context.flags & (^flagSampled)
		return true
	}
	if s.tracer.isDebugAllowed(s.operationName) {
		s.context.flags = s.context.flags | flagDebug | flagSampled
		return true
	}
	return false
}
1098625
func (s *WorkflowTypeConfiguration) SetDefaultTaskPriority(v string) *WorkflowTypeConfiguration {
	s.DefaultTaskPriority = &v
	return s
}
609133
func NewPriorityQueue(hint int, allowDuplicates bool) *PriorityQueue {
	return &PriorityQueue{
		items:           make(priorityItems, 0, hint),
		itemMap:         make(map[Item]struct{}, hint),
		allowDuplicates: allowDuplicates,
	}
}
672999
func (s *CreateEventSubscriptionInput) SetSeverity(v string) *CreateEventSubscriptionInput {
	s.Severity = &v
	return s
}
1131928
func (s *UpdateJobPriorityOutput) SetPriority(v int64) *UpdateJobPriorityOutput {
	s.Priority = &v
	return s
}
1060385
func (s *SetRulePrioritiesInput) SetRulePriorities(v []*RulePriorityPair) *SetRulePrioritiesInput {
	s.RulePriorities = v
	return s
}
1200299
func (c *Client) SetPriority(priority, start, end int) error {
	switch {
	case start < 0 && end < 0:
		return errors.New("negative start and end index")
	case start >= 0 && end >= 0:
		// Update the prio for this range of playlist items.
		return c.Command("prio %d %d:%d", priority, start, end).OK()
	case start >= 0 && end < 0:
		// Update the prio for a single playlist item at this position.
		return c.Command("prio %d %d", priority, start).OK()
	case start < 0 && end >= 0:
		return errors.New("negative start index")
	default:
		panic("unreachable")
	}
}
266725
func ParsePriority(buff []byte, cursor *int, l int) (Priority, error) {
	pri := newPriority(0)

	if l <= 0 {
		return pri, ErrPriorityEmpty
	}

	if buff[*cursor] != PRI_PART_START {
		return pri, ErrPriorityNoStart
	}

	i := 1
	priDigit := 0

	for i < l {
		if i >= 5 {
			return pri, ErrPriorityTooLong
		}

		c := buff[i]

		if c == PRI_PART_END {
			if i == 1 {
				return pri, ErrPriorityTooShort
			}

			*cursor = i + 1
			return newPriority(priDigit), nil
		}

		if IsDigit(c) {
			v, e := strconv.Atoi(string(c))
			if e != nil {
				return pri, e
			}

			priDigit = (priDigit * 10) + v
		} else {
			return pri, ErrPriorityNonDigit
		}

		i++
	}

	return pri, ErrPriorityNoEnd
}
150617
func (s *GetMaintenanceWindowExecutionTaskOutput) SetPriority(v int64) *GetMaintenanceWindowExecutionTaskOutput {
	s.Priority = &v
	return s
}