func (c *Client) DeleteService(id string) error {
	_, err := c.delete("/services/" + id)
	return err
}
DeleteService deletes an existing service.
package pagerduty
import (
	"fmt"
	"net/http"
	"github.com/google/go-querystring/query"
)
type Integration struct {
	APIObject
	Name             string     `json:"name,omitempty"`
	Service          *APIObject `json:"service,omitempty"`
	CreatedAt        string     `json:"created_at,omitempty"`
	Vendor           *APIObject `json:"vendor,omitempty"`
	Type             string     `json:"type,omitempty"`
	IntegrationKey   string     `json:"integration_key,omitempty"`
	IntegrationEmail string     `json:"integration_email,omitempty"`
}
type InlineModel struct {
	Type string `json:"type,omitempty"`
	Name string `json:"name,omitempty"`
}
type ScheduledAction struct {
	Type      string      `json:"type,omitempty"`
	At        InlineModel `json:"at,omitempty"`
	ToUrgency string      `json:"to_urgency"`
}
type IncidentUrgencyType struct {
	Type    string `json:"type,omitempty"`
	Urgency string `json:"urgency,omitempty"`
}
type SupportHours struct {
	Type       string `json:"type,omitempty"`
	Timezone   string `json:"time_zone,omitempty"`
	StartTime  string `json:"start_time,omitempty"`
	EndTime    string `json:"end_time,omitempty"`
	DaysOfWeek []uint `json:"days_of_week,omitempty"`
}
type IncidentUrgencyRule struct {
	Type                string               `json:"type,omitempty"`
	Urgency             string               `json:"urgency,omitempty"`
	DuringSupportHours  *IncidentUrgencyType `json:"during_support_hours,omitempty"`
	OutsideSupportHours *IncidentUrgencyType `json:"outside_support_hours,omitempty"`
}
type Service struct {
	APIObject
	Name                   string               `json:"name,omitempty"`
	Description            string               `json:"description,omitempty"`
	AutoResolveTimeout     *uint                `json:"auto_resolve_timeout"`
	AcknowledgementTimeout *uint                `json:"acknowledgement_timeout"`
	CreateAt               string               `json:"created_at,omitempty"`
	Status                 string               `json:"status,omitempty"`
	LastIncidentTimestamp  string               `json:"last_incident_timestamp,omitempty"`
	Integrations           []Integration        `json:"integrations,omitempty"`
	EscalationPolicy       EscalationPolicy     `json:"escalation_policy,omitempty"`
	Teams                  []Team               `json:"teams,omitempty"`
	IncidentUrgencyRule    *IncidentUrgencyRule `json:"incident_urgency_rule,omitempty"`
	SupportHours           *SupportHours        `json:"support_hours,omitempty"`
	ScheduledActions       []ScheduledAction    `json:"scheduled_actions,omitempty"`
}
type ListServiceOptions struct {
	APIListObject
	TeamIDs  []string `url:"team_ids,omitempty,brackets"`
	TimeZone string   `url:"time_zone,omitempty"`
	SortBy   string   `url:"sort_by,omitempty"`
	Query    string   `url:"query,omitempty"`
	Includes []string `url:"include,omitempty,brackets"`
}
type ListServiceResponse struct {
	APIListObject
	Services []Service
}
func (c *Client) ListServices(o ListServiceOptions) (*ListServiceResponse, error) {
	v, err := query.Values(o)
	if err != nil {
		return nil, err
	}
	resp, err := c.get("/services?" + v.Encode())
	if err != nil {
		return nil, err
	}
	var result ListServiceResponse
	return &result, c.decodeJSON(resp, &result)
}
type GetServiceOptions struct {
	Includes []string `url:"include,brackets,omitempty"`
}
func (c *Client) GetService(id string, o *GetServiceOptions) (*Service, error) {
	v, err := query.Values(o)
	resp, err := c.get("/services/" + id + "?" + v.Encode())
	return getServiceFromResponse(c, resp, err)
}
func (c *Client) CreateService(s Service) (*Service, error) {
	data := make(map[string]Service)
	data["service"] = s
	resp, err := c.post("/services", data)
	return getServiceFromResponse(c, resp, err)
}
func (c *Client) UpdateService(s Service) (*Service, error) {
	resp, err := c.put("/services/"+s.ID, s, nil)
	return getServiceFromResponse(c, resp, err)
}