-
Notifications
You must be signed in to change notification settings - Fork 21
/
type-exception.go
49 lines (40 loc) · 990 Bytes
/
type-exception.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package ga
import "net/url"
//WARNING: This file was generated. Do not edit.
//Exception Hit Type
type Exception struct {
description string
descriptionSet bool
isExceptionFatal bool
isExceptionFatalSet bool
}
// NewException creates a new Exception Hit Type.
func NewException() *Exception {
h := &Exception{}
return h
}
func (h *Exception) addFields(v url.Values) error {
if h.descriptionSet {
v.Add("exd", h.description)
}
if h.isExceptionFatalSet {
v.Add("exf", bool2str(h.isExceptionFatal))
}
return nil
}
// Specifies the description of an exception.
func (h *Exception) Description(description string) *Exception {
h.description = description
h.descriptionSet = true
return h
}
// Specifies whether the exception was fatal.
func (h *Exception) IsExceptionFatal(isExceptionFatal bool) *Exception {
h.isExceptionFatal = isExceptionFatal
h.isExceptionFatalSet = true
return h
}
func (h *Exception) Copy() *Exception {
c := *h
return &c
}