/
result_reason_string.go
53 lines (47 loc) · 1.79 KB
/
result_reason_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
// Code generated by "stringer -type=ResultReason -output=result_reason_string.go"; DO NOT EDIT.
package common
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[NoMatch-0]
_ = x[Canceled-1]
_ = x[RecognizingSpeech-2]
_ = x[RecognizedSpeech-3]
_ = x[RecognizingIntent-4]
_ = x[RecognizedIntent-5]
_ = x[TranslatingSpeech-6]
_ = x[TranslatedSpeech-7]
_ = x[SynthesizingAudio-8]
_ = x[SynthesizingAudioCompleted-9]
_ = x[RecognizingKeyword-10]
_ = x[RecognizedKeyword-11]
_ = x[SynthesizingAudioStarted-12]
_ = x[EnrollingVoiceProfile-17]
_ = x[EnrolledVoiceProfile-18]
_ = x[RecognizedSpeakers-19]
_ = x[RecognizedSpeaker-20]
_ = x[ResetVoiceProfile-21]
_ = x[DeletedVoiceProfile-22]
_ = x[VoicesListRetrieved-23]
}
const (
_ResultReason_name_0 = "NoMatchCanceledRecognizingSpeechRecognizedSpeechRecognizingIntentRecognizedIntentTranslatingSpeechTranslatedSpeechSynthesizingAudioSynthesizingAudioCompletedRecognizingKeywordRecognizedKeywordSynthesizingAudioStarted"
_ResultReason_name_1 = "EnrollingVoiceProfileEnrolledVoiceProfileRecognizedSpeakersRecognizedSpeakerResetVoiceProfileDeletedVoiceProfileVoicesListRetrieved"
)
var (
_ResultReason_index_0 = [...]uint8{0, 7, 15, 32, 48, 65, 81, 98, 114, 131, 157, 175, 192, 216}
_ResultReason_index_1 = [...]uint8{0, 21, 41, 59, 76, 93, 112, 131}
)
func (i ResultReason) String() string {
switch {
case 0 <= i && i <= 12:
return _ResultReason_name_0[_ResultReason_index_0[i]:_ResultReason_index_0[i+1]]
case 17 <= i && i <= 23:
i -= 17
return _ResultReason_name_1[_ResultReason_index_1[i]:_ResultReason_index_1[i+1]]
default:
return "ResultReason(" + strconv.FormatInt(int64(i), 10) + ")"
}
}