forked from maltegrosse/go-modemmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mmmessageerror_string.go
executable file
·73 lines (67 loc) · 2.9 KB
/
mmmessageerror_string.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 "stringer -type=MMMessageError -trimprefix=MMMessageError"; DO NOT EDIT.
package modemmanager
import "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[MmMessageErrorMeFailure-300]
_ = x[MmMessageErrorSmsServiceReserved-301]
_ = x[MmMessageErrorNotAllowed-302]
_ = x[MmMessageErrorNotSupported-303]
_ = x[MmMessageErrorInvalidPduParameter-304]
_ = x[MmMessageErrorInvalidTextParameter-305]
_ = x[MmMessageErrorSimNotInserted-310]
_ = x[MmMessageErrorSimPin-311]
_ = x[MmMessageErrorPhSimPin-312]
_ = x[MmMessageErrorSimFailure-313]
_ = x[MmMessageErrorSimBusy-314]
_ = x[MmMessageErrorSimWrong-315]
_ = x[MmMessageErrorSimPuk-316]
_ = x[MmMessageErrorSimPin2-317]
_ = x[MmMessageErrorSimPuk2-318]
_ = x[MmMessageErrorMemoryFailure-320]
_ = x[MmMessageErrorInvalidIndex-321]
_ = x[MmMessageErrorMemoryFull-322]
_ = x[MmMessageErrorSmscAddressUnknown-330]
_ = x[MmMessageErrorNoNetwork-331]
_ = x[MmMessageErrorNetworkTimeout-332]
_ = x[MmMessageErrorNoCnmaAckExpected-340]
_ = x[MmMessageErrorUnknown-500]
}
const (
_MMMessageError_name_0 = "MmMessageErrorMeFailureMmMessageErrorSmsServiceReservedMmMessageErrorNotAllowedMmMessageErrorNotSupportedMmMessageErrorInvalidPduParameterMmMessageErrorInvalidTextParameter"
_MMMessageError_name_1 = "MmMessageErrorSimNotInsertedMmMessageErrorSimPinMmMessageErrorPhSimPinMmMessageErrorSimFailureMmMessageErrorSimBusyMmMessageErrorSimWrongMmMessageErrorSimPukMmMessageErrorSimPin2MmMessageErrorSimPuk2"
_MMMessageError_name_2 = "MmMessageErrorMemoryFailureMmMessageErrorInvalidIndexMmMessageErrorMemoryFull"
_MMMessageError_name_3 = "MmMessageErrorSmscAddressUnknownMmMessageErrorNoNetworkMmMessageErrorNetworkTimeout"
_MMMessageError_name_4 = "MmMessageErrorNoCnmaAckExpected"
_MMMessageError_name_5 = "MmMessageErrorUnknown"
)
var (
_MMMessageError_index_0 = [...]uint8{0, 23, 55, 79, 105, 138, 172}
_MMMessageError_index_1 = [...]uint8{0, 28, 48, 70, 94, 115, 137, 157, 178, 199}
_MMMessageError_index_2 = [...]uint8{0, 27, 53, 77}
_MMMessageError_index_3 = [...]uint8{0, 32, 55, 83}
)
func (i MMMessageError) String() string {
switch {
case 300 <= i && i <= 305:
i -= 300
return _MMMessageError_name_0[_MMMessageError_index_0[i]:_MMMessageError_index_0[i+1]]
case 310 <= i && i <= 318:
i -= 310
return _MMMessageError_name_1[_MMMessageError_index_1[i]:_MMMessageError_index_1[i+1]]
case 320 <= i && i <= 322:
i -= 320
return _MMMessageError_name_2[_MMMessageError_index_2[i]:_MMMessageError_index_2[i+1]]
case 330 <= i && i <= 332:
i -= 330
return _MMMessageError_name_3[_MMMessageError_index_3[i]:_MMMessageError_index_3[i+1]]
case i == 340:
return _MMMessageError_name_4
case i == 500:
return _MMMessageError_name_5
default:
return "MMMessageError(" + strconv.FormatInt(int64(i), 10) + ")"
}
}