github.com/blend/go-sdk@v1.20220411.3/pagerduty/escalation_policy.go (about)

     1  /*
     2  
     3  Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file.
     5  
     6  */
     7  
     8  package pagerduty
     9  
    10  // EscalationRule is a rule for an escalation policy to trigger.
    11  type EscalationRule struct {
    12  	ID      string      `json:"id,omitempty"`
    13  	Delay   uint        `json:"escalation_delay_in_minutes,omitempty"`
    14  	Targets []APIObject `json:"targets"`
    15  }
    16  
    17  // EscalationPolicy is a collection of escalation rules.
    18  type EscalationPolicy struct {
    19  	APIObject
    20  	Name            string           `json:"name,omitempty"`
    21  	EscalationRules []EscalationRule `json:"escalation_rules,omitempty"`
    22  	Services        []APIObject      `json:"services,omitempty"`
    23  	NumLoops        uint             `json:"num_loops,omitempty"`
    24  	Teams           []APIReference   `json:"teams"`
    25  	Description     string           `json:"description,omitempty"`
    26  	RepeatEnabled   bool             `json:"repeat_enabled,omitempty"`
    27  }