forked from googleapis/java-spanner
/
session.pb.go
3250 lines (2943 loc) · 144 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
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.13.0
// source: google/cloud/dialogflow/cx/v3/session.proto
package cx
import (
context "context"
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
_ "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"
codes "google.golang.org/grpc/codes"
status1 "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
structpb "google.golang.org/protobuf/types/known/structpb"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// 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`][google.cloud.dialogflow.cx.v3.InputAudioConfig.single_utterance] was set to
// `true`, and is not used otherwise.
StreamingRecognitionResult_END_OF_SINGLE_UTTERANCE StreamingRecognitionResult_MessageType = 2
)
// Enum value maps for StreamingRecognitionResult_MessageType.
var (
StreamingRecognitionResult_MessageType_name = map[int32]string{
0: "MESSAGE_TYPE_UNSPECIFIED",
1: "TRANSCRIPT",
2: "END_OF_SINGLE_UTTERANCE",
}
StreamingRecognitionResult_MessageType_value = map[string]int32{
"MESSAGE_TYPE_UNSPECIFIED": 0,
"TRANSCRIPT": 1,
"END_OF_SINGLE_UTTERANCE": 2,
}
)
func (x StreamingRecognitionResult_MessageType) Enum() *StreamingRecognitionResult_MessageType {
p := new(StreamingRecognitionResult_MessageType)
*p = x
return p
}
func (x StreamingRecognitionResult_MessageType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (StreamingRecognitionResult_MessageType) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_dialogflow_cx_v3_session_proto_enumTypes[0].Descriptor()
}
func (StreamingRecognitionResult_MessageType) Type() protoreflect.EnumType {
return &file_google_cloud_dialogflow_cx_v3_session_proto_enumTypes[0]
}
func (x StreamingRecognitionResult_MessageType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use StreamingRecognitionResult_MessageType.Descriptor instead.
func (StreamingRecognitionResult_MessageType) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_cx_v3_session_proto_rawDescGZIP(), []int{4, 0}
}
// Type of a Match.
type Match_MatchType int32
const (
// Not specified. Should never be used.
Match_MATCH_TYPE_UNSPECIFIED Match_MatchType = 0
// The query was matched to an intent.
Match_INTENT Match_MatchType = 1
// The query directly triggered an intent.
Match_DIRECT_INTENT Match_MatchType = 2
// The query was used for parameter filling.
Match_PARAMETER_FILLING Match_MatchType = 3
// No match was found for the query.
Match_NO_MATCH Match_MatchType = 4
// Indicates an empty query.
Match_NO_INPUT Match_MatchType = 5
// The query directly triggered an event.
Match_EVENT Match_MatchType = 6
)
// Enum value maps for Match_MatchType.
var (
Match_MatchType_name = map[int32]string{
0: "MATCH_TYPE_UNSPECIFIED",
1: "INTENT",
2: "DIRECT_INTENT",
3: "PARAMETER_FILLING",
4: "NO_MATCH",
5: "NO_INPUT",
6: "EVENT",
}
Match_MatchType_value = map[string]int32{
"MATCH_TYPE_UNSPECIFIED": 0,
"INTENT": 1,
"DIRECT_INTENT": 2,
"PARAMETER_FILLING": 3,
"NO_MATCH": 4,
"NO_INPUT": 5,
"EVENT": 6,
}
)
func (x Match_MatchType) Enum() *Match_MatchType {
p := new(Match_MatchType)
*p = x
return p
}
func (x Match_MatchType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Match_MatchType) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_dialogflow_cx_v3_session_proto_enumTypes[1].Descriptor()
}
func (Match_MatchType) Type() protoreflect.EnumType {
return &file_google_cloud_dialogflow_cx_v3_session_proto_enumTypes[1]
}
func (x Match_MatchType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Match_MatchType.Descriptor instead.
func (Match_MatchType) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_cx_v3_session_proto_rawDescGZIP(), []int{13, 0}
}
// The request to detect user's intent.
type DetectIntentRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The name of the session this query is sent to.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
// If `Environment ID` is not specified, we assume default 'draft'
// environment.
// It's up to the API caller to choose an appropriate `Session ID`. It can be
// a random number or some type of session identifiers (preferably hashed).
// The length of the `Session ID` must not exceed 36 characters.
//
// For more information, see the [sessions
// guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
//
// Note: Always use agent versions for production traffic.
// See [Versions and
// environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
// 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.
QueryInput *QueryInput `protobuf:"bytes,3,opt,name=query_input,json=queryInput,proto3" json:"query_input,omitempty"`
// Instructs the speech synthesizer how to generate the output audio.
OutputAudioConfig *OutputAudioConfig `protobuf:"bytes,4,opt,name=output_audio_config,json=outputAudioConfig,proto3" json:"output_audio_config,omitempty"`
}
func (x *DetectIntentRequest) Reset() {
*x = DetectIntentRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DetectIntentRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DetectIntentRequest) ProtoMessage() {}
func (x *DetectIntentRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DetectIntentRequest.ProtoReflect.Descriptor instead.
func (*DetectIntentRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_cx_v3_session_proto_rawDescGZIP(), []int{0}
}
func (x *DetectIntentRequest) GetSession() string {
if x != nil {
return x.Session
}
return ""
}
func (x *DetectIntentRequest) GetQueryParams() *QueryParameters {
if x != nil {
return x.QueryParams
}
return nil
}
func (x *DetectIntentRequest) GetQueryInput() *QueryInput {
if x != nil {
return x.QueryInput
}
return nil
}
func (x *DetectIntentRequest) GetOutputAudioConfig() *OutputAudioConfig {
if x != nil {
return x.OutputAudioConfig
}
return nil
}
// The message returned from the DetectIntent method.
type DetectIntentResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Output only. 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 result of the conversational query.
QueryResult *QueryResult `protobuf:"bytes,2,opt,name=query_result,json=queryResult,proto3" json:"query_result,omitempty"`
// The audio data bytes encoded as specified in the request.
// Note: The output audio is generated based on the values of default platform
// text responses found in the
// [`query_result.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_messages] field. If
// multiple default text responses exist, they will be concatenated when
// generating audio. If no default platform text responses exist, the
// generated audio content will be empty.
//
// In some scenarios, multiple output audio fields may be present in the
// response structure. In these cases, only the top-most-level audio output
// has content.
OutputAudio []byte `protobuf:"bytes,4,opt,name=output_audio,json=outputAudio,proto3" json:"output_audio,omitempty"`
// The config used by the speech synthesizer to generate the output audio.
OutputAudioConfig *OutputAudioConfig `protobuf:"bytes,5,opt,name=output_audio_config,json=outputAudioConfig,proto3" json:"output_audio_config,omitempty"`
}
func (x *DetectIntentResponse) Reset() {
*x = DetectIntentResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DetectIntentResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DetectIntentResponse) ProtoMessage() {}
func (x *DetectIntentResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DetectIntentResponse.ProtoReflect.Descriptor instead.
func (*DetectIntentResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_cx_v3_session_proto_rawDescGZIP(), []int{1}
}
func (x *DetectIntentResponse) GetResponseId() string {
if x != nil {
return x.ResponseId
}
return ""
}
func (x *DetectIntentResponse) GetQueryResult() *QueryResult {
if x != nil {
return x.QueryResult
}
return nil
}
func (x *DetectIntentResponse) GetOutputAudio() []byte {
if x != nil {
return x.OutputAudio
}
return nil
}
func (x *DetectIntentResponse) GetOutputAudioConfig() *OutputAudioConfig {
if x != nil {
return x.OutputAudioConfig
}
return nil
}
// The top-level message sent by the client to the
// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent] method.
//
// Multiple request messages should be sent in order:
//
// 1. The first message must contain
// [session][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.session],
// [query_input][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_input] plus optionally
// [query_params][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_params]. If the client
// wants to receive an audio response, it should also contain
// [output_audio_config][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.output_audio_config].
//
// 2. If [query_input][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_input] was set to
// [query_input.audio.config][google.cloud.dialogflow.cx.v3.AudioInput.config], all subsequent messages
// must contain [query_input.audio.audio][google.cloud.dialogflow.cx.v3.AudioInput.audio] to continue with
// Speech recognition.
// If you decide to rather detect an intent from text
// input after you already started Speech recognition, please send a message
// with [query_input.text][google.cloud.dialogflow.cx.v3.QueryInput.text].
//
// However, note that:
//
// * Dialogflow will bill you for the audio duration so far.
// * Dialogflow discards all Speech recognition results in favor of the
// input text.
// * Dialogflow will use the language code from the first message.
//
// After you sent all input, you must half-close or abort the request stream.
type StreamingDetectIntentRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The name of the session this query is sent to.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
// If `Environment ID` is not specified, we assume default 'draft'
// environment.
// It's up to the API caller to choose an appropriate `Session ID`. It can be
// a random number or some type of session identifiers (preferably hashed).
// The length of the `Session ID` must not exceed 36 characters.
// Note: session must be set in the first request.
//
// For more information, see the [sessions
// guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
//
// Note: Always use agent versions for production traffic.
// See [Versions and
// environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
// 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.
QueryInput *QueryInput `protobuf:"bytes,3,opt,name=query_input,json=queryInput,proto3" json:"query_input,omitempty"`
// Instructs the speech synthesizer how to generate the output audio.
OutputAudioConfig *OutputAudioConfig `protobuf:"bytes,4,opt,name=output_audio_config,json=outputAudioConfig,proto3" json:"output_audio_config,omitempty"`
}
func (x *StreamingDetectIntentRequest) Reset() {
*x = StreamingDetectIntentRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StreamingDetectIntentRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StreamingDetectIntentRequest) ProtoMessage() {}
func (x *StreamingDetectIntentRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StreamingDetectIntentRequest.ProtoReflect.Descriptor instead.
func (*StreamingDetectIntentRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_cx_v3_session_proto_rawDescGZIP(), []int{2}
}
func (x *StreamingDetectIntentRequest) GetSession() string {
if x != nil {
return x.Session
}
return ""
}
func (x *StreamingDetectIntentRequest) GetQueryParams() *QueryParameters {
if x != nil {
return x.QueryParams
}
return nil
}
func (x *StreamingDetectIntentRequest) GetQueryInput() *QueryInput {
if x != nil {
return x.QueryInput
}
return nil
}
func (x *StreamingDetectIntentRequest) GetOutputAudioConfig() *OutputAudioConfig {
if x != nil {
return x.OutputAudioConfig
}
return nil
}
// The top-level message returned from the `StreamingDetectIntent` method.
//
// Multiple response messages can be returned in order:
//
// 1. If the input was set to streaming audio, the first one or more messages
// contain `recognition_result`. Each `recognition_result` represents a more
// complete transcript of what the user said. The last `recognition_result`
// has `is_final` set to `true`.
//
// 2. The last message contains `detect_intent_response`.
type StreamingDetectIntentResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The output response.
//
// Types that are assignable to Response:
// *StreamingDetectIntentResponse_RecognitionResult
// *StreamingDetectIntentResponse_DetectIntentResponse
Response isStreamingDetectIntentResponse_Response `protobuf_oneof:"response"`
}
func (x *StreamingDetectIntentResponse) Reset() {
*x = StreamingDetectIntentResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StreamingDetectIntentResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StreamingDetectIntentResponse) ProtoMessage() {}
func (x *StreamingDetectIntentResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StreamingDetectIntentResponse.ProtoReflect.Descriptor instead.
func (*StreamingDetectIntentResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_cx_v3_session_proto_rawDescGZIP(), []int{3}
}
func (m *StreamingDetectIntentResponse) GetResponse() isStreamingDetectIntentResponse_Response {
if m != nil {
return m.Response
}
return nil
}
func (x *StreamingDetectIntentResponse) GetRecognitionResult() *StreamingRecognitionResult {
if x, ok := x.GetResponse().(*StreamingDetectIntentResponse_RecognitionResult); ok {
return x.RecognitionResult
}
return nil
}
func (x *StreamingDetectIntentResponse) GetDetectIntentResponse() *DetectIntentResponse {
if x, ok := x.GetResponse().(*StreamingDetectIntentResponse_DetectIntentResponse); ok {
return x.DetectIntentResponse
}
return nil
}
type isStreamingDetectIntentResponse_Response interface {
isStreamingDetectIntentResponse_Response()
}
type StreamingDetectIntentResponse_RecognitionResult struct {
// The result of speech recognition.
RecognitionResult *StreamingRecognitionResult `protobuf:"bytes,1,opt,name=recognition_result,json=recognitionResult,proto3,oneof"`
}
type StreamingDetectIntentResponse_DetectIntentResponse struct {
// The response from detect intent.
DetectIntentResponse *DetectIntentResponse `protobuf:"bytes,2,opt,name=detect_intent_response,json=detectIntentResponse,proto3,oneof"`
}
func (*StreamingDetectIntentResponse_RecognitionResult) isStreamingDetectIntentResponse_Response() {}
func (*StreamingDetectIntentResponse_DetectIntentResponse) isStreamingDetectIntentResponse_Response() {
}
// Contains a speech recognition result corresponding to a portion of the audio
// that is currently being processed or an indication that this is the end
// of the single requested utterance.
//
// Example:
//
// 1. transcript: "tube"
//
// 2. transcript: "to be a"
//
// 3. transcript: "to be"
//
// 4. transcript: "to be or not to be"
// is_final: true
//
// 5. transcript: " that's"
//
// 6. transcript: " that is"
//
// 7. message_type: `END_OF_SINGLE_UTTERANCE`
//
// 8. transcript: " that is the question"
// is_final: true
//
// Only two of the responses contain final results (#4 and #8 indicated by
// `is_final: true`). Concatenating these generates the full transcript: "to be
// or not to be that is the question".
//
// In each response we populate:
//
// * for `TRANSCRIPT`: `transcript` and possibly `is_final`.
//
// * for `END_OF_SINGLE_UTTERANCE`: only `message_type`.
type StreamingRecognitionResult struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Type of the result message.
MessageType StreamingRecognitionResult_MessageType `protobuf:"varint,1,opt,name=message_type,json=messageType,proto3,enum=google.cloud.dialogflow.cx.v3.StreamingRecognitionResult_MessageType" json:"message_type,omitempty"`
// Transcript text representing the words that the user spoke.
// Populated if and only if `message_type` = `TRANSCRIPT`.
Transcript string `protobuf:"bytes,2,opt,name=transcript,proto3" json:"transcript,omitempty"`
// If `false`, the `StreamingRecognitionResult` represents an
// interim result that may change. If `true`, the recognizer will not return
// any further hypotheses about this piece of the audio. May only be populated
// for `message_type` = `TRANSCRIPT`.
IsFinal bool `protobuf:"varint,3,opt,name=is_final,json=isFinal,proto3" json:"is_final,omitempty"`
// The Speech confidence between 0.0 and 1.0 for the current portion of audio.
// 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 typically only provided if `is_final` is true and you should
// not rely on it being accurate or even set.
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
// An estimate of the likelihood that the speech recognizer will
// not change its guess about this interim recognition result:
// * If the value is unspecified or 0.0, Dialogflow didn't compute the
// stability. In particular, Dialogflow will only provide stability for
// `TRANSCRIPT` results with `is_final = false`.
// * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely
// unstable and 1.0 means completely stable.
Stability float32 `protobuf:"fixed32,6,opt,name=stability,proto3" json:"stability,omitempty"`
// Word-specific information for the words recognized by Speech in
// [transcript][google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and
// [InputAudioConfig.enable_word_info] is set.
SpeechWordInfo []*SpeechWordInfo `protobuf:"bytes,7,rep,name=speech_word_info,json=speechWordInfo,proto3" json:"speech_word_info,omitempty"`
// Time offset of the end of this Speech recognition result relative to the
// beginning of the audio. Only populated for `message_type` =
// `TRANSCRIPT`.
SpeechEndOffset *durationpb.Duration `protobuf:"bytes,8,opt,name=speech_end_offset,json=speechEndOffset,proto3" json:"speech_end_offset,omitempty"`
}
func (x *StreamingRecognitionResult) Reset() {
*x = StreamingRecognitionResult{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StreamingRecognitionResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StreamingRecognitionResult) ProtoMessage() {}
func (x *StreamingRecognitionResult) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StreamingRecognitionResult.ProtoReflect.Descriptor instead.
func (*StreamingRecognitionResult) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_cx_v3_session_proto_rawDescGZIP(), []int{4}
}
func (x *StreamingRecognitionResult) GetMessageType() StreamingRecognitionResult_MessageType {
if x != nil {
return x.MessageType
}
return StreamingRecognitionResult_MESSAGE_TYPE_UNSPECIFIED
}
func (x *StreamingRecognitionResult) GetTranscript() string {
if x != nil {
return x.Transcript
}
return ""
}
func (x *StreamingRecognitionResult) GetIsFinal() bool {
if x != nil {
return x.IsFinal
}
return false
}
func (x *StreamingRecognitionResult) GetConfidence() float32 {
if x != nil {
return x.Confidence
}
return 0
}
func (x *StreamingRecognitionResult) GetStability() float32 {
if x != nil {
return x.Stability
}
return 0
}
func (x *StreamingRecognitionResult) GetSpeechWordInfo() []*SpeechWordInfo {
if x != nil {
return x.SpeechWordInfo
}
return nil
}
func (x *StreamingRecognitionResult) GetSpeechEndOffset() *durationpb.Duration {
if x != nil {
return x.SpeechEndOffset
}
return nil
}
// Represents the parameters of a conversational query.
type QueryParameters struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 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 the agent is
// used.
TimeZone string `protobuf:"bytes,1,opt,name=time_zone,json=timeZone,proto3" json:"time_zone,omitempty"`
// The geo location of this conversational query.
GeoLocation *latlng.LatLng `protobuf:"bytes,2,opt,name=geo_location,json=geoLocation,proto3" json:"geo_location,omitempty"`
// Additional session entity types to replace or extend developer entity types
// with. The entity synonyms apply to all languages and persist for the
// session of this query.
SessionEntityTypes []*SessionEntityType `protobuf:"bytes,3,rep,name=session_entity_types,json=sessionEntityTypes,proto3" json:"session_entity_types,omitempty"`
// This field can be used to pass custom data into the webhook associated with
// the agent. Arbitrary JSON objects are supported.
Payload *structpb.Struct `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
// Additional parameters to be put into [session
// parameters][SessionInfo.parameters]. To remove a
// parameter from the session, clients should explicitly set the parameter
// value to null.
//
// Depending on your protocol or client library language, this is a
// map, associative array, symbol table, dictionary, or JSON object
// composed of a collection of (MapKey, MapValue) pairs:
//
// - MapKey type: string
// - MapKey value: parameter name
// - MapValue type:
// - If parameter's entity type is a composite entity: map
// - Else: depending on parameter value type, could be one of string,
// number, boolean, null, list or map
// - MapValue value:
// - If parameter's entity type is a composite entity:
// map from composite entity property names to property values
// - Else: parameter value
Parameters *structpb.Struct `protobuf:"bytes,5,opt,name=parameters,proto3" json:"parameters,omitempty"`
// Configures whether sentiment analysis should be performed. If not
// provided, sentiment analysis is not performed.
AnalyzeQueryTextSentiment bool `protobuf:"varint,8,opt,name=analyze_query_text_sentiment,json=analyzeQueryTextSentiment,proto3" json:"analyze_query_text_sentiment,omitempty"`
// This field can be used to pass HTTP headers for a webhook
// call. These headers will be sent to webhook along with the headers that
// have been configured through Dialogflow web console. The headers defined
// within this field will overwrite the headers configured through Dialogflow
// console if there is a conflict. Header names are case-insensitive.
// Google's specified headers are not allowed. Including: "Host",
// "Content-Length", "Connection", "From", "User-Agent", "Accept-Encoding",
// "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc.
WebhookHeaders map[string]string `protobuf:"bytes,10,rep,name=webhook_headers,json=webhookHeaders,proto3" json:"webhook_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *QueryParameters) Reset() {
*x = QueryParameters{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryParameters) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryParameters) ProtoMessage() {}
func (x *QueryParameters) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryParameters.ProtoReflect.Descriptor instead.
func (*QueryParameters) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_cx_v3_session_proto_rawDescGZIP(), []int{5}
}
func (x *QueryParameters) GetTimeZone() string {
if x != nil {
return x.TimeZone
}
return ""
}
func (x *QueryParameters) GetGeoLocation() *latlng.LatLng {
if x != nil {
return x.GeoLocation
}
return nil
}
func (x *QueryParameters) GetSessionEntityTypes() []*SessionEntityType {
if x != nil {
return x.SessionEntityTypes
}
return nil
}
func (x *QueryParameters) GetPayload() *structpb.Struct {
if x != nil {
return x.Payload
}
return nil
}
func (x *QueryParameters) GetParameters() *structpb.Struct {
if x != nil {
return x.Parameters
}
return nil
}
func (x *QueryParameters) GetAnalyzeQueryTextSentiment() bool {
if x != nil {
return x.AnalyzeQueryTextSentiment
}
return false
}
func (x *QueryParameters) GetWebhookHeaders() map[string]string {
if x != nil {
return x.WebhookHeaders
}
return nil
}
// Represents the query input. It can contain one of:
//
// 1. A conversational query in the form of text.
//
// 2. An intent query that specifies which intent to trigger.
//
// 3. Natural language speech audio to be processed.
//
// 4. An event to be triggered.
//
type QueryInput struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The input specification.
//
// Types that are assignable to Input:
// *QueryInput_Text
// *QueryInput_Intent
// *QueryInput_Audio
// *QueryInput_Event
// *QueryInput_Dtmf
Input isQueryInput_Input `protobuf_oneof:"input"`
// Required. The language of the input. See [Language
// Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
// for a list of the currently supported language codes. Note that queries in
// the same session do not necessarily need to specify the same language.
LanguageCode string `protobuf:"bytes,4,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
}
func (x *QueryInput) Reset() {
*x = QueryInput{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryInput) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryInput) ProtoMessage() {}
func (x *QueryInput) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryInput.ProtoReflect.Descriptor instead.
func (*QueryInput) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_cx_v3_session_proto_rawDescGZIP(), []int{6}
}
func (m *QueryInput) GetInput() isQueryInput_Input {
if m != nil {
return m.Input
}
return nil
}
func (x *QueryInput) GetText() *TextInput {
if x, ok := x.GetInput().(*QueryInput_Text); ok {
return x.Text
}
return nil
}
func (x *QueryInput) GetIntent() *IntentInput {
if x, ok := x.GetInput().(*QueryInput_Intent); ok {
return x.Intent
}
return nil
}
func (x *QueryInput) GetAudio() *AudioInput {
if x, ok := x.GetInput().(*QueryInput_Audio); ok {
return x.Audio
}
return nil
}
func (x *QueryInput) GetEvent() *EventInput {
if x, ok := x.GetInput().(*QueryInput_Event); ok {
return x.Event
}
return nil
}
func (x *QueryInput) GetDtmf() *DtmfInput {
if x, ok := x.GetInput().(*QueryInput_Dtmf); ok {
return x.Dtmf
}
return nil
}
func (x *QueryInput) GetLanguageCode() string {
if x != nil {
return x.LanguageCode
}
return ""
}
type isQueryInput_Input interface {
isQueryInput_Input()
}
type QueryInput_Text struct {
// The natural language text to be processed.
Text *TextInput `protobuf:"bytes,2,opt,name=text,proto3,oneof"`
}
type QueryInput_Intent struct {
// The intent to be triggered.
Intent *IntentInput `protobuf:"bytes,3,opt,name=intent,proto3,oneof"`
}
type QueryInput_Audio struct {
// The natural language speech audio to be processed.
Audio *AudioInput `protobuf:"bytes,5,opt,name=audio,proto3,oneof"`
}
type QueryInput_Event struct {
// The event to be triggered.
Event *EventInput `protobuf:"bytes,6,opt,name=event,proto3,oneof"`
}
type QueryInput_Dtmf struct {
// The DTMF event to be handled.