/
session.pb.go
2052 lines (1856 loc) · 85.1 KB
/
session.pb.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dialogflow/v2beta1/session.proto
package dialogflow
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_struct "github.com/golang/protobuf/ptypes/struct"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
latlng "google.golang.org/genproto/googleapis/type/latlng"
grpc "google.golang.org/grpc"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Audio encoding of the audio content sent in the conversational query request.
// Refer to the
// [Cloud Speech API
// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more
// details.
type AudioEncoding int32
const (
// Not specified.
AudioEncoding_AUDIO_ENCODING_UNSPECIFIED AudioEncoding = 0
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
AudioEncoding_AUDIO_ENCODING_LINEAR_16 AudioEncoding = 1
// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
// Codec) is the recommended encoding because it is lossless (therefore
// recognition is not compromised) and requires only about half the
// bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and
// 24-bit samples, however, not all fields in `STREAMINFO` are supported.
AudioEncoding_AUDIO_ENCODING_FLAC AudioEncoding = 2
// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
AudioEncoding_AUDIO_ENCODING_MULAW AudioEncoding = 3
// Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
AudioEncoding_AUDIO_ENCODING_AMR AudioEncoding = 4
// Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
AudioEncoding_AUDIO_ENCODING_AMR_WB AudioEncoding = 5
// Opus encoded audio frames in Ogg container
// ([OggOpus](https://wiki.xiph.org/OggOpus)).
// `sample_rate_hertz` must be 16000.
AudioEncoding_AUDIO_ENCODING_OGG_OPUS AudioEncoding = 6
// Although the use of lossy encodings is not recommended, if a very low
// bitrate encoding is required, `OGG_OPUS` is highly preferred over
// Speex encoding. The [Speex](https://speex.org/) encoding supported by
// Dialogflow API has a header byte in each block, as in MIME type
// `audio/x-speex-with-header-byte`.
// It is a variant of the RTP Speex encoding defined in
// [RFC 5574](https://tools.ietf.org/html/rfc5574).
// The stream is a sequence of blocks, one block per RTP packet. Each block
// starts with a byte containing the length of the block, in bytes, followed
// by one or more frames of Speex data, padded to an integral number of
// bytes (octets) as specified in RFC 5574. In other words, each RTP header
// is replaced with a single byte containing the block length. Only Speex
// wideband is supported. `sample_rate_hertz` must be 16000.
AudioEncoding_AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE AudioEncoding = 7
)
var AudioEncoding_name = map[int32]string{
0: "AUDIO_ENCODING_UNSPECIFIED",
1: "AUDIO_ENCODING_LINEAR_16",
2: "AUDIO_ENCODING_FLAC",
3: "AUDIO_ENCODING_MULAW",
4: "AUDIO_ENCODING_AMR",
5: "AUDIO_ENCODING_AMR_WB",
6: "AUDIO_ENCODING_OGG_OPUS",
7: "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE",
}
var AudioEncoding_value = map[string]int32{
"AUDIO_ENCODING_UNSPECIFIED": 0,
"AUDIO_ENCODING_LINEAR_16": 1,
"AUDIO_ENCODING_FLAC": 2,
"AUDIO_ENCODING_MULAW": 3,
"AUDIO_ENCODING_AMR": 4,
"AUDIO_ENCODING_AMR_WB": 5,
"AUDIO_ENCODING_OGG_OPUS": 6,
"AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": 7,
}
func (x AudioEncoding) String() string {
return proto.EnumName(AudioEncoding_name, int32(x))
}
func (AudioEncoding) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_40a53f854d709740, []int{0}
}
// Represents the system's confidence that this knowledge answer is a good
// match for this conversational query.
type KnowledgeAnswers_Answer_MatchConfidenceLevel int32
const (
// Not specified.
KnowledgeAnswers_Answer_MATCH_CONFIDENCE_LEVEL_UNSPECIFIED KnowledgeAnswers_Answer_MatchConfidenceLevel = 0
// Indicates that the confidence is low.
KnowledgeAnswers_Answer_LOW KnowledgeAnswers_Answer_MatchConfidenceLevel = 1
// Indicates our confidence is medium.
KnowledgeAnswers_Answer_MEDIUM KnowledgeAnswers_Answer_MatchConfidenceLevel = 2
// Indicates our confidence is high.
KnowledgeAnswers_Answer_HIGH KnowledgeAnswers_Answer_MatchConfidenceLevel = 3
)
var KnowledgeAnswers_Answer_MatchConfidenceLevel_name = map[int32]string{
0: "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED",
1: "LOW",
2: "MEDIUM",
3: "HIGH",
}
var KnowledgeAnswers_Answer_MatchConfidenceLevel_value = map[string]int32{
"MATCH_CONFIDENCE_LEVEL_UNSPECIFIED": 0,
"LOW": 1,
"MEDIUM": 2,
"HIGH": 3,
}
func (x KnowledgeAnswers_Answer_MatchConfidenceLevel) String() string {
return proto.EnumName(KnowledgeAnswers_Answer_MatchConfidenceLevel_name, int32(x))
}
func (KnowledgeAnswers_Answer_MatchConfidenceLevel) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_40a53f854d709740, []int{5, 0, 0}
}
// Type of the response message.
type StreamingRecognitionResult_MessageType int32
const (
// Not specified. Should never be used.
StreamingRecognitionResult_MESSAGE_TYPE_UNSPECIFIED StreamingRecognitionResult_MessageType = 0
// Message contains a (possibly partial) transcript.
StreamingRecognitionResult_TRANSCRIPT StreamingRecognitionResult_MessageType = 1
// Event indicates that the server has detected the end of the user's speech
// utterance and expects no additional speech. Therefore, the server will
// not process additional audio (although it may subsequently return
// additional results). The client should stop sending additional audio
// data, half-close the gRPC connection, and wait for any additional results
// until the server closes the gRPC connection. This message is only sent if
// `single_utterance` was set to `true`, and is not used otherwise.
StreamingRecognitionResult_END_OF_SINGLE_UTTERANCE StreamingRecognitionResult_MessageType = 2
)
var StreamingRecognitionResult_MessageType_name = map[int32]string{
0: "MESSAGE_TYPE_UNSPECIFIED",
1: "TRANSCRIPT",
2: "END_OF_SINGLE_UTTERANCE",
}
var StreamingRecognitionResult_MessageType_value = map[string]int32{
"MESSAGE_TYPE_UNSPECIFIED": 0,
"TRANSCRIPT": 1,
"END_OF_SINGLE_UTTERANCE": 2,
}
func (x StreamingRecognitionResult_MessageType) String() string {
return proto.EnumName(StreamingRecognitionResult_MessageType_name, int32(x))
}
func (StreamingRecognitionResult_MessageType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_40a53f854d709740, []int{8, 0}
}
// The request to detect user's intent.
type DetectIntentRequest struct {
// Required. The name of the session this query is sent to. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>`, or
// `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
// ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume
// default 'draft' environment. If `User ID` is not specified, we are using
// "-". It’s up to the API caller to choose an appropriate `Session ID` and
// `User Id`. They can be a random numbers or some type of user and session
// identifiers (preferably hashed). The length of the `Session ID` and
// `User ID` must not exceed 36 characters.
Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
// Optional. The parameters of this query.
QueryParams *QueryParameters `protobuf:"bytes,2,opt,name=query_params,json=queryParams,proto3" json:"query_params,omitempty"`
// Required. The input specification. It can be set to:
//
// 1. an audio config
// which instructs the speech recognizer how to process the speech audio,
//
// 2. a conversational query in the form of text, or
//
// 3. an event that specifies which intent to trigger.
QueryInput *QueryInput `protobuf:"bytes,3,opt,name=query_input,json=queryInput,proto3" json:"query_input,omitempty"`
// Optional. Instructs the speech synthesizer how to generate the output
// audio. If this field is not set and agent-level speech synthesizer is not
// configured, no output audio is generated.
OutputAudioConfig *OutputAudioConfig `protobuf:"bytes,4,opt,name=output_audio_config,json=outputAudioConfig,proto3" json:"output_audio_config,omitempty"`
// Optional. The natural language speech audio to be processed. This field
// should be populated iff `query_input` is set to an input audio config.
// A single request can contain up to 1 minute of speech audio data.
InputAudio []byte `protobuf:"bytes,5,opt,name=input_audio,json=inputAudio,proto3" json:"input_audio,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DetectIntentRequest) Reset() { *m = DetectIntentRequest{} }
func (m *DetectIntentRequest) String() string { return proto.CompactTextString(m) }
func (*DetectIntentRequest) ProtoMessage() {}
func (*DetectIntentRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_40a53f854d709740, []int{0}
}
func (m *DetectIntentRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DetectIntentRequest.Unmarshal(m, b)
}
func (m *DetectIntentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DetectIntentRequest.Marshal(b, m, deterministic)
}
func (m *DetectIntentRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DetectIntentRequest.Merge(m, src)
}
func (m *DetectIntentRequest) XXX_Size() int {
return xxx_messageInfo_DetectIntentRequest.Size(m)
}
func (m *DetectIntentRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DetectIntentRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DetectIntentRequest proto.InternalMessageInfo
func (m *DetectIntentRequest) GetSession() string {
if m != nil {
return m.Session
}
return ""
}
func (m *DetectIntentRequest) GetQueryParams() *QueryParameters {
if m != nil {
return m.QueryParams
}
return nil
}
func (m *DetectIntentRequest) GetQueryInput() *QueryInput {
if m != nil {
return m.QueryInput
}
return nil
}
func (m *DetectIntentRequest) GetOutputAudioConfig() *OutputAudioConfig {
if m != nil {
return m.OutputAudioConfig
}
return nil
}
func (m *DetectIntentRequest) GetInputAudio() []byte {
if m != nil {
return m.InputAudio
}
return nil
}
// The message returned from the DetectIntent method.
type DetectIntentResponse struct {
// The unique identifier of the response. It can be used to
// locate a response in the training example set or for reporting issues.
ResponseId string `protobuf:"bytes,1,opt,name=response_id,json=responseId,proto3" json:"response_id,omitempty"`
// The selected results of the conversational query or event processing.
// See `alternative_query_results` for additional potential results.
QueryResult *QueryResult `protobuf:"bytes,2,opt,name=query_result,json=queryResult,proto3" json:"query_result,omitempty"`
// If Knowledge Connectors are enabled, there could be more than one result
// returned for a given query or event, and this field will contain all
// results except for the top one, which is captured in query_result. The
// alternative results are ordered by decreasing
// `QueryResult.intent_detection_confidence`. If Knowledge Connectors are
// disabled, this field will be empty until multiple responses for regular
// intents are supported, at which point those additional results will be
// surfaced here.
AlternativeQueryResults []*QueryResult `protobuf:"bytes,5,rep,name=alternative_query_results,json=alternativeQueryResults,proto3" json:"alternative_query_results,omitempty"`
// Specifies the status of the webhook request. `webhook_status`
// is never populated in webhook requests.
WebhookStatus *status.Status `protobuf:"bytes,3,opt,name=webhook_status,json=webhookStatus,proto3" json:"webhook_status,omitempty"`
// The audio data bytes encoded as specified in the request.
OutputAudio []byte `protobuf:"bytes,4,opt,name=output_audio,json=outputAudio,proto3" json:"output_audio,omitempty"`
// Instructs the speech synthesizer how to generate the output audio. This
// field is populated from the agent-level speech synthesizer configuration,
// if enabled.
OutputAudioConfig *OutputAudioConfig `protobuf:"bytes,6,opt,name=output_audio_config,json=outputAudioConfig,proto3" json:"output_audio_config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DetectIntentResponse) Reset() { *m = DetectIntentResponse{} }
func (m *DetectIntentResponse) String() string { return proto.CompactTextString(m) }
func (*DetectIntentResponse) ProtoMessage() {}
func (*DetectIntentResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_40a53f854d709740, []int{1}
}
func (m *DetectIntentResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DetectIntentResponse.Unmarshal(m, b)
}
func (m *DetectIntentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DetectIntentResponse.Marshal(b, m, deterministic)
}
func (m *DetectIntentResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DetectIntentResponse.Merge(m, src)
}
func (m *DetectIntentResponse) XXX_Size() int {
return xxx_messageInfo_DetectIntentResponse.Size(m)
}
func (m *DetectIntentResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DetectIntentResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DetectIntentResponse proto.InternalMessageInfo
func (m *DetectIntentResponse) GetResponseId() string {
if m != nil {
return m.ResponseId
}
return ""
}
func (m *DetectIntentResponse) GetQueryResult() *QueryResult {
if m != nil {
return m.QueryResult
}
return nil
}
func (m *DetectIntentResponse) GetAlternativeQueryResults() []*QueryResult {
if m != nil {
return m.AlternativeQueryResults
}
return nil
}
func (m *DetectIntentResponse) GetWebhookStatus() *status.Status {
if m != nil {
return m.WebhookStatus
}
return nil
}
func (m *DetectIntentResponse) GetOutputAudio() []byte {
if m != nil {
return m.OutputAudio
}
return nil
}
func (m *DetectIntentResponse) GetOutputAudioConfig() *OutputAudioConfig {
if m != nil {
return m.OutputAudioConfig
}
return nil
}
// Represents the parameters of the conversational query.
type QueryParameters struct {
// Optional. The time zone of this conversational query from the
// [time zone database](https://www.iana.org/time-zones), e.g.,
// America/New_York, Europe/Paris. If not provided, the time zone specified in
// agent settings is used.
TimeZone string `protobuf:"bytes,1,opt,name=time_zone,json=timeZone,proto3" json:"time_zone,omitempty"`
// Optional. The geo location of this conversational query.
GeoLocation *latlng.LatLng `protobuf:"bytes,2,opt,name=geo_location,json=geoLocation,proto3" json:"geo_location,omitempty"`
// Optional. The collection of contexts to be activated before this query is
// executed.
Contexts []*Context `protobuf:"bytes,3,rep,name=contexts,proto3" json:"contexts,omitempty"`
// Optional. Specifies whether to delete all contexts in the current session
// before the new ones are activated.
ResetContexts bool `protobuf:"varint,4,opt,name=reset_contexts,json=resetContexts,proto3" json:"reset_contexts,omitempty"`
// Optional. The collection of session entity types to replace or extend
// developer entities with for this query only. The entity synonyms apply
// to all languages.
SessionEntityTypes []*SessionEntityType `protobuf:"bytes,5,rep,name=session_entity_types,json=sessionEntityTypes,proto3" json:"session_entity_types,omitempty"`
// Optional. This field can be used to pass custom data into the webhook
// associated with the agent. Arbitrary JSON objects are supported.
Payload *_struct.Struct `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"`
// Optional. KnowledgeBases to get alternative results from. If not set, the
// KnowledgeBases enabled in the agent (through UI) will be used.
// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
//
// Note: This field is `repeated` for forward compatibility, currently only
// the first one is supported, we may return an error if multiple
// KnowledgeBases are specified.
KnowledgeBaseNames []string `protobuf:"bytes,12,rep,name=knowledge_base_names,json=knowledgeBaseNames,proto3" json:"knowledge_base_names,omitempty"`
// Optional. Configures the type of sentiment analysis to perform. If not
// provided, sentiment analysis is not performed.
// Note: Sentiment Analysis is only currently available for Enterprise Edition
// agents.
SentimentAnalysisRequestConfig *SentimentAnalysisRequestConfig `protobuf:"bytes,10,opt,name=sentiment_analysis_request_config,json=sentimentAnalysisRequestConfig,proto3" json:"sentiment_analysis_request_config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryParameters) Reset() { *m = QueryParameters{} }
func (m *QueryParameters) String() string { return proto.CompactTextString(m) }
func (*QueryParameters) ProtoMessage() {}
func (*QueryParameters) Descriptor() ([]byte, []int) {
return fileDescriptor_40a53f854d709740, []int{2}
}
func (m *QueryParameters) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryParameters.Unmarshal(m, b)
}
func (m *QueryParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryParameters.Marshal(b, m, deterministic)
}
func (m *QueryParameters) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryParameters.Merge(m, src)
}
func (m *QueryParameters) XXX_Size() int {
return xxx_messageInfo_QueryParameters.Size(m)
}
func (m *QueryParameters) XXX_DiscardUnknown() {
xxx_messageInfo_QueryParameters.DiscardUnknown(m)
}
var xxx_messageInfo_QueryParameters proto.InternalMessageInfo
func (m *QueryParameters) GetTimeZone() string {
if m != nil {
return m.TimeZone
}
return ""
}
func (m *QueryParameters) GetGeoLocation() *latlng.LatLng {
if m != nil {
return m.GeoLocation
}
return nil
}
func (m *QueryParameters) GetContexts() []*Context {
if m != nil {
return m.Contexts
}
return nil
}
func (m *QueryParameters) GetResetContexts() bool {
if m != nil {
return m.ResetContexts
}
return false
}
func (m *QueryParameters) GetSessionEntityTypes() []*SessionEntityType {
if m != nil {
return m.SessionEntityTypes
}
return nil
}
func (m *QueryParameters) GetPayload() *_struct.Struct {
if m != nil {
return m.Payload
}
return nil
}
func (m *QueryParameters) GetKnowledgeBaseNames() []string {
if m != nil {
return m.KnowledgeBaseNames
}
return nil
}
func (m *QueryParameters) GetSentimentAnalysisRequestConfig() *SentimentAnalysisRequestConfig {
if m != nil {
return m.SentimentAnalysisRequestConfig
}
return nil
}
// Represents the query input. It can contain either:
//
// 1. An audio config which
// instructs the speech recognizer how to process the speech audio.
//
// 2. A conversational query in the form of text,.
//
// 3. An event that specifies which intent to trigger.
type QueryInput struct {
// Required. The input specification.
//
// Types that are valid to be assigned to Input:
// *QueryInput_AudioConfig
// *QueryInput_Text
// *QueryInput_Event
Input isQueryInput_Input `protobuf_oneof:"input"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryInput) Reset() { *m = QueryInput{} }
func (m *QueryInput) String() string { return proto.CompactTextString(m) }
func (*QueryInput) ProtoMessage() {}
func (*QueryInput) Descriptor() ([]byte, []int) {
return fileDescriptor_40a53f854d709740, []int{3}
}
func (m *QueryInput) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryInput.Unmarshal(m, b)
}
func (m *QueryInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryInput.Marshal(b, m, deterministic)
}
func (m *QueryInput) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryInput.Merge(m, src)
}
func (m *QueryInput) XXX_Size() int {
return xxx_messageInfo_QueryInput.Size(m)
}
func (m *QueryInput) XXX_DiscardUnknown() {
xxx_messageInfo_QueryInput.DiscardUnknown(m)
}
var xxx_messageInfo_QueryInput proto.InternalMessageInfo
type isQueryInput_Input interface {
isQueryInput_Input()
}
type QueryInput_AudioConfig struct {
AudioConfig *InputAudioConfig `protobuf:"bytes,1,opt,name=audio_config,json=audioConfig,proto3,oneof"`
}
type QueryInput_Text struct {
Text *TextInput `protobuf:"bytes,2,opt,name=text,proto3,oneof"`
}
type QueryInput_Event struct {
Event *EventInput `protobuf:"bytes,3,opt,name=event,proto3,oneof"`
}
func (*QueryInput_AudioConfig) isQueryInput_Input() {}
func (*QueryInput_Text) isQueryInput_Input() {}
func (*QueryInput_Event) isQueryInput_Input() {}
func (m *QueryInput) GetInput() isQueryInput_Input {
if m != nil {
return m.Input
}
return nil
}
func (m *QueryInput) GetAudioConfig() *InputAudioConfig {
if x, ok := m.GetInput().(*QueryInput_AudioConfig); ok {
return x.AudioConfig
}
return nil
}
func (m *QueryInput) GetText() *TextInput {
if x, ok := m.GetInput().(*QueryInput_Text); ok {
return x.Text
}
return nil
}
func (m *QueryInput) GetEvent() *EventInput {
if x, ok := m.GetInput().(*QueryInput_Event); ok {
return x.Event
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*QueryInput) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _QueryInput_OneofMarshaler, _QueryInput_OneofUnmarshaler, _QueryInput_OneofSizer, []interface{}{
(*QueryInput_AudioConfig)(nil),
(*QueryInput_Text)(nil),
(*QueryInput_Event)(nil),
}
}
func _QueryInput_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*QueryInput)
// input
switch x := m.Input.(type) {
case *QueryInput_AudioConfig:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.AudioConfig); err != nil {
return err
}
case *QueryInput_Text:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Text); err != nil {
return err
}
case *QueryInput_Event:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Event); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("QueryInput.Input has unexpected type %T", x)
}
return nil
}
func _QueryInput_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*QueryInput)
switch tag {
case 1: // input.audio_config
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(InputAudioConfig)
err := b.DecodeMessage(msg)
m.Input = &QueryInput_AudioConfig{msg}
return true, err
case 2: // input.text
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TextInput)
err := b.DecodeMessage(msg)
m.Input = &QueryInput_Text{msg}
return true, err
case 3: // input.event
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(EventInput)
err := b.DecodeMessage(msg)
m.Input = &QueryInput_Event{msg}
return true, err
default:
return false, nil
}
}
func _QueryInput_OneofSizer(msg proto.Message) (n int) {
m := msg.(*QueryInput)
// input
switch x := m.Input.(type) {
case *QueryInput_AudioConfig:
s := proto.Size(x.AudioConfig)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *QueryInput_Text:
s := proto.Size(x.Text)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *QueryInput_Event:
s := proto.Size(x.Event)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Represents the result of conversational query or event processing.
type QueryResult struct {
// The original conversational query text:
// - If natural language text was provided as input, `query_text` contains
// a copy of the input.
// - If natural language speech audio was provided as input, `query_text`
// contains the speech recognition result. If speech recognizer produced
// multiple alternatives, a particular one is picked.
// - If an event was provided as input, `query_text` is not set.
QueryText string `protobuf:"bytes,1,opt,name=query_text,json=queryText,proto3" json:"query_text,omitempty"`
// The language that was triggered during intent detection.
// See [Language Support](https://dialogflow.com/docs/reference/language)
// for a list of the currently supported language codes.
LanguageCode string `protobuf:"bytes,15,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// The Speech recognition confidence between 0.0 and 1.0. A higher number
// indicates an estimated greater likelihood that the recognized words are
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
// This field is not guaranteed to be accurate or set. In particular this
// field isn't set for StreamingDetectIntent since the streaming endpoint has
// separate confidence estimates per portion of the audio in
// StreamingRecognitionResult.
SpeechRecognitionConfidence float32 `protobuf:"fixed32,2,opt,name=speech_recognition_confidence,json=speechRecognitionConfidence,proto3" json:"speech_recognition_confidence,omitempty"`
// The action name from the matched intent.
Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"`
// The collection of extracted parameters.
Parameters *_struct.Struct `protobuf:"bytes,4,opt,name=parameters,proto3" json:"parameters,omitempty"`
// This field is set to:
// - `false` if the matched intent has required parameters and not all of
// the required parameter values have been collected.
// - `true` if all required parameter values have been collected, or if the
// matched intent doesn't contain any required parameters.
AllRequiredParamsPresent bool `protobuf:"varint,5,opt,name=all_required_params_present,json=allRequiredParamsPresent,proto3" json:"all_required_params_present,omitempty"`
// The text to be pronounced to the user or shown on the screen.
FulfillmentText string `protobuf:"bytes,6,opt,name=fulfillment_text,json=fulfillmentText,proto3" json:"fulfillment_text,omitempty"`
// The collection of rich messages to present to the user.
FulfillmentMessages []*Intent_Message `protobuf:"bytes,7,rep,name=fulfillment_messages,json=fulfillmentMessages,proto3" json:"fulfillment_messages,omitempty"`
// If the query was fulfilled by a webhook call, this field is set to the
// value of the `source` field returned in the webhook response.
WebhookSource string `protobuf:"bytes,8,opt,name=webhook_source,json=webhookSource,proto3" json:"webhook_source,omitempty"`
// If the query was fulfilled by a webhook call, this field is set to the
// value of the `payload` field returned in the webhook response.
WebhookPayload *_struct.Struct `protobuf:"bytes,9,opt,name=webhook_payload,json=webhookPayload,proto3" json:"webhook_payload,omitempty"`
// The collection of output contexts. If applicable,
// `output_contexts.parameters` contains entries with name
// `<parameter name>.original` containing the original parameter values
// before the query.
OutputContexts []*Context `protobuf:"bytes,10,rep,name=output_contexts,json=outputContexts,proto3" json:"output_contexts,omitempty"`
// The intent that matched the conversational query. Some, not
// all fields are filled in this message, including but not limited to:
// `name`, `display_name` and `webhook_state`.
Intent *Intent `protobuf:"bytes,11,opt,name=intent,proto3" json:"intent,omitempty"`
// The intent detection confidence. Values range from 0.0
// (completely uncertain) to 1.0 (completely certain).
// If there are `multiple knowledge_answers` messages, this value is set to
// the greatest `knowledgeAnswers.match_confidence` value in the list.
IntentDetectionConfidence float32 `protobuf:"fixed32,12,opt,name=intent_detection_confidence,json=intentDetectionConfidence,proto3" json:"intent_detection_confidence,omitempty"`
// The free-form diagnostic info. For example, this field
// could contain webhook call latency.
DiagnosticInfo *_struct.Struct `protobuf:"bytes,14,opt,name=diagnostic_info,json=diagnosticInfo,proto3" json:"diagnostic_info,omitempty"`
// The sentiment analysis result, which depends on the
// `sentiment_analysis_request_config` specified in the request.
SentimentAnalysisResult *SentimentAnalysisResult `protobuf:"bytes,17,opt,name=sentiment_analysis_result,json=sentimentAnalysisResult,proto3" json:"sentiment_analysis_result,omitempty"`
// The result from Knowledge Connector (if any), ordered by decreasing
// `KnowledgeAnswers.match_confidence`.
KnowledgeAnswers *KnowledgeAnswers `protobuf:"bytes,18,opt,name=knowledge_answers,json=knowledgeAnswers,proto3" json:"knowledge_answers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryResult) Reset() { *m = QueryResult{} }
func (m *QueryResult) String() string { return proto.CompactTextString(m) }
func (*QueryResult) ProtoMessage() {}
func (*QueryResult) Descriptor() ([]byte, []int) {
return fileDescriptor_40a53f854d709740, []int{4}
}
func (m *QueryResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryResult.Unmarshal(m, b)
}
func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic)
}
func (m *QueryResult) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryResult.Merge(m, src)
}
func (m *QueryResult) XXX_Size() int {
return xxx_messageInfo_QueryResult.Size(m)
}
func (m *QueryResult) XXX_DiscardUnknown() {
xxx_messageInfo_QueryResult.DiscardUnknown(m)
}
var xxx_messageInfo_QueryResult proto.InternalMessageInfo
func (m *QueryResult) GetQueryText() string {
if m != nil {
return m.QueryText
}
return ""
}
func (m *QueryResult) GetLanguageCode() string {
if m != nil {
return m.LanguageCode
}
return ""
}
func (m *QueryResult) GetSpeechRecognitionConfidence() float32 {
if m != nil {
return m.SpeechRecognitionConfidence
}
return 0
}
func (m *QueryResult) GetAction() string {
if m != nil {
return m.Action
}
return ""
}
func (m *QueryResult) GetParameters() *_struct.Struct {
if m != nil {
return m.Parameters
}
return nil
}
func (m *QueryResult) GetAllRequiredParamsPresent() bool {
if m != nil {
return m.AllRequiredParamsPresent
}
return false
}
func (m *QueryResult) GetFulfillmentText() string {
if m != nil {
return m.FulfillmentText
}
return ""
}
func (m *QueryResult) GetFulfillmentMessages() []*Intent_Message {
if m != nil {
return m.FulfillmentMessages
}
return nil
}
func (m *QueryResult) GetWebhookSource() string {
if m != nil {
return m.WebhookSource
}
return ""
}
func (m *QueryResult) GetWebhookPayload() *_struct.Struct {
if m != nil {
return m.WebhookPayload
}
return nil
}
func (m *QueryResult) GetOutputContexts() []*Context {
if m != nil {
return m.OutputContexts
}
return nil
}
func (m *QueryResult) GetIntent() *Intent {
if m != nil {
return m.Intent
}
return nil
}
func (m *QueryResult) GetIntentDetectionConfidence() float32 {
if m != nil {
return m.IntentDetectionConfidence
}
return 0
}
func (m *QueryResult) GetDiagnosticInfo() *_struct.Struct {
if m != nil {
return m.DiagnosticInfo
}
return nil
}
func (m *QueryResult) GetSentimentAnalysisResult() *SentimentAnalysisResult {
if m != nil {
return m.SentimentAnalysisResult
}
return nil
}
func (m *QueryResult) GetKnowledgeAnswers() *KnowledgeAnswers {
if m != nil {
return m.KnowledgeAnswers
}
return nil
}
// Represents the result of querying a Knowledge base.
type KnowledgeAnswers struct {
// A list of answers from Knowledge Connector.
Answers []*KnowledgeAnswers_Answer `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *KnowledgeAnswers) Reset() { *m = KnowledgeAnswers{} }
func (m *KnowledgeAnswers) String() string { return proto.CompactTextString(m) }
func (*KnowledgeAnswers) ProtoMessage() {}
func (*KnowledgeAnswers) Descriptor() ([]byte, []int) {
return fileDescriptor_40a53f854d709740, []int{5}
}
func (m *KnowledgeAnswers) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KnowledgeAnswers.Unmarshal(m, b)
}
func (m *KnowledgeAnswers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KnowledgeAnswers.Marshal(b, m, deterministic)
}
func (m *KnowledgeAnswers) XXX_Merge(src proto.Message) {
xxx_messageInfo_KnowledgeAnswers.Merge(m, src)
}
func (m *KnowledgeAnswers) XXX_Size() int {
return xxx_messageInfo_KnowledgeAnswers.Size(m)
}
func (m *KnowledgeAnswers) XXX_DiscardUnknown() {
xxx_messageInfo_KnowledgeAnswers.DiscardUnknown(m)
}
var xxx_messageInfo_KnowledgeAnswers proto.InternalMessageInfo
func (m *KnowledgeAnswers) GetAnswers() []*KnowledgeAnswers_Answer {
if m != nil {
return m.Answers
}
return nil
}
// An answer from Knowledge Connector.
type KnowledgeAnswers_Answer struct {
// Indicates which Knowledge Document this answer was extracted from.
// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base
// ID>/documents/<Document ID>`.
Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
// The corresponding FAQ question if the answer was extracted from a FAQ
// Document, empty otherwise.
FaqQuestion string `protobuf:"bytes,2,opt,name=faq_question,json=faqQuestion,proto3" json:"faq_question,omitempty"`
// The piece of text from the `source` knowledge base document that answers
// this conversational query.
Answer string `protobuf:"bytes,3,opt,name=answer,proto3" json:"answer,omitempty"`
// The system's confidence level that this knowledge answer is a good match
// for this conversational query.
// NOTE: The confidence level for a given `<query, answer>` pair may change
// without notice, as it depends on models that are constantly being
// improved. However, it will change less frequently than the confidence
// score below, and should be preferred for referencing the quality of an
// answer.
MatchConfidenceLevel KnowledgeAnswers_Answer_MatchConfidenceLevel `protobuf:"varint,4,opt,name=match_confidence_level,json=matchConfidenceLevel,proto3,enum=google.cloud.dialogflow.v2beta1.KnowledgeAnswers_Answer_MatchConfidenceLevel" json:"match_confidence_level,omitempty"`
// The system's confidence score that this Knowledge answer is a good match
// for this converstational query, range from 0.0 (completely uncertain)
// to 1.0 (completely certain).
// Note: The confidence score is likely to vary somewhat (possibly even for
// identical requests), as the underlying model is under constant
// improvement, we may deprecate it in the future. We recommend using
// `match_confidence_level` which should be generally more stable.
MatchConfidence float32 `protobuf:"fixed32,5,opt,name=match_confidence,json=matchConfidence,proto3" json:"match_confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *KnowledgeAnswers_Answer) Reset() { *m = KnowledgeAnswers_Answer{} }
func (m *KnowledgeAnswers_Answer) String() string { return proto.CompactTextString(m) }
func (*KnowledgeAnswers_Answer) ProtoMessage() {}
func (*KnowledgeAnswers_Answer) Descriptor() ([]byte, []int) {
return fileDescriptor_40a53f854d709740, []int{5, 0}
}
func (m *KnowledgeAnswers_Answer) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KnowledgeAnswers_Answer.Unmarshal(m, b)
}
func (m *KnowledgeAnswers_Answer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KnowledgeAnswers_Answer.Marshal(b, m, deterministic)
}
func (m *KnowledgeAnswers_Answer) XXX_Merge(src proto.Message) {
xxx_messageInfo_KnowledgeAnswers_Answer.Merge(m, src)
}
func (m *KnowledgeAnswers_Answer) XXX_Size() int {
return xxx_messageInfo_KnowledgeAnswers_Answer.Size(m)
}
func (m *KnowledgeAnswers_Answer) XXX_DiscardUnknown() {
xxx_messageInfo_KnowledgeAnswers_Answer.DiscardUnknown(m)
}
var xxx_messageInfo_KnowledgeAnswers_Answer proto.InternalMessageInfo
func (m *KnowledgeAnswers_Answer) GetSource() string {
if m != nil {
return m.Source
}
return ""
}
func (m *KnowledgeAnswers_Answer) GetFaqQuestion() string {
if m != nil {
return m.FaqQuestion
}