-
Notifications
You must be signed in to change notification settings - Fork 2
/
enum_attorneysact.go
73 lines (60 loc) · 1.93 KB
/
enum_attorneysact.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Code generated by "enumerator -type AttorneysAct -linecomment -empty"; DO NOT EDIT.
package actor
import (
"fmt"
"strconv"
)
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[Jointly-1]
_ = x[JointlyAndSeverally-2]
_ = x[JointlyForSomeSeverallyForOthers-3]
}
const _AttorneysAct_name = "jointlyjointly-and-severallyjointly-for-some-severally-for-others"
var _AttorneysAct_index = [...]uint8{0, 7, 28, 65}
func (i AttorneysAct) String() string {
i -= 1
if i >= AttorneysAct(len(_AttorneysAct_index)-1) {
return "AttorneysAct(" + strconv.FormatInt(int64(i+1), 10) + ")"
}
return _AttorneysAct_name[_AttorneysAct_index[i]:_AttorneysAct_index[i+1]]
}
func (i AttorneysAct) MarshalText() ([]byte, error) {
return []byte(i.String()), nil
}
func (i AttorneysAct) IsJointly() bool {
return i == Jointly
}
func (i AttorneysAct) IsJointlyAndSeverally() bool {
return i == JointlyAndSeverally
}
func (i AttorneysAct) IsJointlyForSomeSeverallyForOthers() bool {
return i == JointlyForSomeSeverallyForOthers
}
func ParseAttorneysAct(s string) (AttorneysAct, error) {
switch s {
case "jointly":
return Jointly, nil
case "jointly-and-severally":
return JointlyAndSeverally, nil
case "jointly-for-some-severally-for-others":
return JointlyForSomeSeverallyForOthers, nil
default:
return AttorneysAct(0), fmt.Errorf("invalid AttorneysAct '%s'", s)
}
}
type AttorneysActOptions struct {
Jointly AttorneysAct
JointlyAndSeverally AttorneysAct
JointlyForSomeSeverallyForOthers AttorneysAct
}
var AttorneysActValues = AttorneysActOptions{
Jointly: Jointly,
JointlyAndSeverally: JointlyAndSeverally,
JointlyForSomeSeverallyForOthers: JointlyForSomeSeverallyForOthers,
}
func (i AttorneysAct) Empty() bool {
return i == AttorneysAct(0)
}