google-cloud-dialogflow-v2 0.24.0 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/v2/agent_pb.rb +25 -82
  3. data/lib/google/cloud/dialogflow/v2/agents/client.rb +4 -2
  4. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +3 -1
  5. data/lib/google/cloud/dialogflow/v2/agents/rest/client.rb +4 -2
  6. data/lib/google/cloud/dialogflow/v2/agents/rest/operations.rb +7 -5
  7. data/lib/google/cloud/dialogflow/v2/agents/rest/service_stub.rb +9 -9
  8. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +27 -70
  9. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +4 -2
  10. data/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb +4 -2
  11. data/lib/google/cloud/dialogflow/v2/answer_records/rest/service_stub.rb +2 -2
  12. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +25 -96
  13. data/lib/google/cloud/dialogflow/v2/context_pb.rb +26 -32
  14. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +4 -2
  15. data/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb +4 -2
  16. data/lib/google/cloud/dialogflow/v2/contexts/rest/service_stub.rb +6 -6
  17. data/lib/google/cloud/dialogflow/v2/conversation_dataset_pb.rb +27 -55
  18. data/lib/google/cloud/dialogflow/v2/conversation_datasets/client.rb +4 -2
  19. data/lib/google/cloud/dialogflow/v2/conversation_datasets/operations.rb +3 -1
  20. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb +4 -2
  21. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/operations.rb +7 -5
  22. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/service_stub.rb +5 -5
  23. data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +26 -17
  24. data/lib/google/cloud/dialogflow/v2/conversation_model_pb.rb +25 -153
  25. data/lib/google/cloud/dialogflow/v2/conversation_models/client.rb +4 -2
  26. data/lib/google/cloud/dialogflow/v2/conversation_models/operations.rb +3 -1
  27. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb +4 -2
  28. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/operations.rb +7 -5
  29. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/service_stub.rb +9 -9
  30. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +27 -89
  31. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +27 -159
  32. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +4 -2
  33. data/lib/google/cloud/dialogflow/v2/conversation_profiles/operations.rb +3 -1
  34. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb +4 -2
  35. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/operations.rb +7 -5
  36. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/service_stub.rb +7 -7
  37. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +4 -2
  38. data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +4 -2
  39. data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +7 -7
  40. data/lib/google/cloud/dialogflow/v2/document_pb.rb +28 -106
  41. data/lib/google/cloud/dialogflow/v2/documents/client.rb +4 -2
  42. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +3 -1
  43. data/lib/google/cloud/dialogflow/v2/documents/rest/client.rb +4 -2
  44. data/lib/google/cloud/dialogflow/v2/documents/rest/operations.rb +7 -5
  45. data/lib/google/cloud/dialogflow/v2/documents/rest/service_stub.rb +8 -8
  46. data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +25 -85
  47. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +4 -2
  48. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +3 -1
  49. data/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb +4 -2
  50. data/lib/google/cloud/dialogflow/v2/entity_types/rest/operations.rb +7 -5
  51. data/lib/google/cloud/dialogflow/v2/entity_types/rest/service_stub.rb +10 -10
  52. data/lib/google/cloud/dialogflow/v2/environment_pb.rb +28 -62
  53. data/lib/google/cloud/dialogflow/v2/environments/client.rb +4 -2
  54. data/lib/google/cloud/dialogflow/v2/environments/rest/client.rb +4 -2
  55. data/lib/google/cloud/dialogflow/v2/environments/rest/service_stub.rb +6 -6
  56. data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +25 -31
  57. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +4 -2
  58. data/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb +4 -2
  59. data/lib/google/cloud/dialogflow/v2/fulfillments/rest/service_stub.rb +2 -2
  60. data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +24 -7
  61. data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +25 -6
  62. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +27 -291
  63. data/lib/google/cloud/dialogflow/v2/intents/client.rb +4 -2
  64. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +3 -1
  65. data/lib/google/cloud/dialogflow/v2/intents/rest/client.rb +4 -2
  66. data/lib/google/cloud/dialogflow/v2/intents/rest/operations.rb +7 -5
  67. data/lib/google/cloud/dialogflow/v2/intents/rest/service_stub.rb +7 -7
  68. data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +25 -31
  69. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +4 -2
  70. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb +4 -2
  71. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/service_stub.rb +5 -5
  72. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +30 -190
  73. data/lib/google/cloud/dialogflow/v2/participants/client.rb +4 -2
  74. data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +4 -2
  75. data/lib/google/cloud/dialogflow/v2/participants/rest/service_stub.rb +8 -8
  76. data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +26 -34
  77. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +4 -2
  78. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb +4 -2
  79. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/service_stub.rb +5 -5
  80. data/lib/google/cloud/dialogflow/v2/session_pb.rb +33 -122
  81. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +4 -2
  82. data/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb +4 -2
  83. data/lib/google/cloud/dialogflow/v2/sessions/rest/service_stub.rb +1 -1
  84. data/lib/google/cloud/dialogflow/v2/validation_result_pb.rb +24 -16
  85. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  86. data/lib/google/cloud/dialogflow/v2/version_pb.rb +26 -37
  87. data/lib/google/cloud/dialogflow/v2/versions/client.rb +4 -2
  88. data/lib/google/cloud/dialogflow/v2/versions/rest/client.rb +4 -2
  89. data/lib/google/cloud/dialogflow/v2/versions/rest/service_stub.rb +5 -5
  90. data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +29 -21
  91. data/proto_docs/google/protobuf/any.rb +7 -4
  92. data/proto_docs/google/protobuf/struct.rb +1 -1
  93. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  94. metadata +4 -4
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/dialogflow/v2/session.proto
3
4
 
@@ -17,130 +18,40 @@ require 'google/protobuf/struct_pb'
17
18
  require 'google/rpc/status_pb'
18
19
  require 'google/type/latlng_pb'
19
20
 
20
- Google::Protobuf::DescriptorPool.generated_pool.build do
21
- add_file("google/cloud/dialogflow/v2/session.proto", :syntax => :proto3) do
22
- add_message "google.cloud.dialogflow.v2.DetectIntentRequest" do
23
- optional :session, :string, 1
24
- optional :query_params, :message, 2, "google.cloud.dialogflow.v2.QueryParameters"
25
- optional :query_input, :message, 3, "google.cloud.dialogflow.v2.QueryInput"
26
- optional :output_audio_config, :message, 4, "google.cloud.dialogflow.v2.OutputAudioConfig"
27
- optional :output_audio_config_mask, :message, 7, "google.protobuf.FieldMask"
28
- optional :input_audio, :bytes, 5
29
- end
30
- add_message "google.cloud.dialogflow.v2.DetectIntentResponse" do
31
- optional :response_id, :string, 1
32
- optional :query_result, :message, 2, "google.cloud.dialogflow.v2.QueryResult"
33
- optional :webhook_status, :message, 3, "google.rpc.Status"
34
- optional :output_audio, :bytes, 4
35
- optional :output_audio_config, :message, 6, "google.cloud.dialogflow.v2.OutputAudioConfig"
36
- end
37
- add_message "google.cloud.dialogflow.v2.QueryParameters" do
38
- optional :time_zone, :string, 1
39
- optional :geo_location, :message, 2, "google.type.LatLng"
40
- repeated :contexts, :message, 3, "google.cloud.dialogflow.v2.Context"
41
- optional :reset_contexts, :bool, 4
42
- repeated :session_entity_types, :message, 5, "google.cloud.dialogflow.v2.SessionEntityType"
43
- optional :payload, :message, 6, "google.protobuf.Struct"
44
- optional :sentiment_analysis_request_config, :message, 10, "google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig"
45
- map :webhook_headers, :string, :string, 14
46
- end
47
- add_message "google.cloud.dialogflow.v2.QueryInput" do
48
- oneof :input do
49
- optional :audio_config, :message, 1, "google.cloud.dialogflow.v2.InputAudioConfig"
50
- optional :text, :message, 2, "google.cloud.dialogflow.v2.TextInput"
51
- optional :event, :message, 3, "google.cloud.dialogflow.v2.EventInput"
52
- end
53
- end
54
- add_message "google.cloud.dialogflow.v2.QueryResult" do
55
- optional :query_text, :string, 1
56
- optional :language_code, :string, 15
57
- optional :speech_recognition_confidence, :float, 2
58
- optional :action, :string, 3
59
- optional :parameters, :message, 4, "google.protobuf.Struct"
60
- optional :all_required_params_present, :bool, 5
61
- optional :cancels_slot_filling, :bool, 21
62
- optional :fulfillment_text, :string, 6
63
- repeated :fulfillment_messages, :message, 7, "google.cloud.dialogflow.v2.Intent.Message"
64
- optional :webhook_source, :string, 8
65
- optional :webhook_payload, :message, 9, "google.protobuf.Struct"
66
- repeated :output_contexts, :message, 10, "google.cloud.dialogflow.v2.Context"
67
- optional :intent, :message, 11, "google.cloud.dialogflow.v2.Intent"
68
- optional :intent_detection_confidence, :float, 12
69
- optional :diagnostic_info, :message, 14, "google.protobuf.Struct"
70
- optional :sentiment_analysis_result, :message, 17, "google.cloud.dialogflow.v2.SentimentAnalysisResult"
71
- end
72
- add_message "google.cloud.dialogflow.v2.StreamingDetectIntentRequest" do
73
- optional :session, :string, 1
74
- optional :query_params, :message, 2, "google.cloud.dialogflow.v2.QueryParameters"
75
- optional :query_input, :message, 3, "google.cloud.dialogflow.v2.QueryInput"
76
- optional :single_utterance, :bool, 4
77
- optional :output_audio_config, :message, 5, "google.cloud.dialogflow.v2.OutputAudioConfig"
78
- optional :output_audio_config_mask, :message, 7, "google.protobuf.FieldMask"
79
- optional :input_audio, :bytes, 6
80
- optional :enable_debugging_info, :bool, 8
81
- end
82
- add_message "google.cloud.dialogflow.v2.CloudConversationDebuggingInfo" do
83
- optional :audio_data_chunks, :int32, 1
84
- optional :result_end_time_offset, :message, 2, "google.protobuf.Duration"
85
- optional :first_audio_duration, :message, 3, "google.protobuf.Duration"
86
- optional :single_utterance, :bool, 5
87
- repeated :speech_partial_results_end_times, :message, 6, "google.protobuf.Duration"
88
- repeated :speech_final_results_end_times, :message, 7, "google.protobuf.Duration"
89
- optional :partial_responses, :int32, 8
90
- optional :speaker_id_passive_latency_ms_offset, :int32, 9
91
- optional :bargein_event_triggered, :bool, 10
92
- optional :speech_single_utterance, :bool, 11
93
- repeated :dtmf_partial_results_times, :message, 12, "google.protobuf.Duration"
94
- repeated :dtmf_final_results_times, :message, 13, "google.protobuf.Duration"
95
- optional :single_utterance_end_time_offset, :message, 14, "google.protobuf.Duration"
96
- optional :no_speech_timeout, :message, 15, "google.protobuf.Duration"
97
- optional :is_input_text, :bool, 16
98
- optional :client_half_close_time_offset, :message, 17, "google.protobuf.Duration"
99
- optional :client_half_close_streaming_time_offset, :message, 18, "google.protobuf.Duration"
100
- end
101
- add_message "google.cloud.dialogflow.v2.StreamingDetectIntentResponse" do
102
- optional :response_id, :string, 1
103
- optional :recognition_result, :message, 2, "google.cloud.dialogflow.v2.StreamingRecognitionResult"
104
- optional :query_result, :message, 3, "google.cloud.dialogflow.v2.QueryResult"
105
- optional :webhook_status, :message, 4, "google.rpc.Status"
106
- optional :output_audio, :bytes, 5
107
- optional :output_audio_config, :message, 6, "google.cloud.dialogflow.v2.OutputAudioConfig"
108
- optional :debugging_info, :message, 8, "google.cloud.dialogflow.v2.CloudConversationDebuggingInfo"
109
- end
110
- add_message "google.cloud.dialogflow.v2.StreamingRecognitionResult" do
111
- optional :message_type, :enum, 1, "google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType"
112
- optional :transcript, :string, 2
113
- optional :is_final, :bool, 3
114
- optional :confidence, :float, 4
115
- repeated :speech_word_info, :message, 7, "google.cloud.dialogflow.v2.SpeechWordInfo"
116
- optional :speech_end_offset, :message, 8, "google.protobuf.Duration"
117
- optional :language_code, :string, 10
118
- end
119
- add_enum "google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType" do
120
- value :MESSAGE_TYPE_UNSPECIFIED, 0
121
- value :TRANSCRIPT, 1
122
- value :END_OF_SINGLE_UTTERANCE, 2
123
- end
124
- add_message "google.cloud.dialogflow.v2.TextInput" do
125
- optional :text, :string, 1
126
- optional :language_code, :string, 2
127
- end
128
- add_message "google.cloud.dialogflow.v2.EventInput" do
129
- optional :name, :string, 1
130
- optional :parameters, :message, 2, "google.protobuf.Struct"
131
- optional :language_code, :string, 3
132
- end
133
- add_message "google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig" do
134
- optional :analyze_query_text_sentiment, :bool, 1
135
- end
136
- add_message "google.cloud.dialogflow.v2.SentimentAnalysisResult" do
137
- optional :query_text_sentiment, :message, 1, "google.cloud.dialogflow.v2.Sentiment"
138
- end
139
- add_message "google.cloud.dialogflow.v2.Sentiment" do
140
- optional :score, :float, 1
141
- optional :magnitude, :float, 2
21
+
22
+ descriptor_data = "\n(google/cloud/dialogflow/v2/session.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/dialogflow/v2/audio_config.proto\x1a(google/cloud/dialogflow/v2/context.proto\x1a\'google/cloud/dialogflow/v2/intent.proto\x1a\x34google/cloud/dialogflow/v2/session_entity_type.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x18google/type/latlng.proto\"\xf5\x02\n\x13\x44\x65tectIntentRequest\x12:\n\x07session\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Session\x12\x41\n\x0cquery_params\x18\x02 \x01(\x0b\x32+.google.cloud.dialogflow.v2.QueryParameters\x12@\n\x0bquery_input\x18\x03 \x01(\x0b\x32&.google.cloud.dialogflow.v2.QueryInputB\x03\xe0\x41\x02\x12J\n\x13output_audio_config\x18\x04 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig\x12<\n\x18output_audio_config_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0binput_audio\x18\x05 \x01(\x0c\"\xf8\x01\n\x14\x44\x65tectIntentResponse\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12=\n\x0cquery_result\x18\x02 \x01(\x0b\x32\'.google.cloud.dialogflow.v2.QueryResult\x12*\n\x0ewebhook_status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0coutput_audio\x18\x04 \x01(\x0c\x12J\n\x13output_audio_config\x18\x06 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig\"\x8d\x04\n\x0fQueryParameters\x12\x11\n\ttime_zone\x18\x01 \x01(\t\x12)\n\x0cgeo_location\x18\x02 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x08\x63ontexts\x18\x03 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x16\n\x0ereset_contexts\x18\x04 \x01(\x08\x12K\n\x14session_entity_types\x18\x05 \x03(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityType\x12(\n\x07payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x65\n!sentiment_analysis_request_config\x18\n \x01(\x0b\x32:.google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig\x12X\n\x0fwebhook_headers\x18\x0e \x03(\x0b\x32?.google.cloud.dialogflow.v2.QueryParameters.WebhookHeadersEntry\x1a\x35\n\x13WebhookHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcb\x01\n\nQueryInput\x12\x44\n\x0c\x61udio_config\x18\x01 \x01(\x0b\x32,.google.cloud.dialogflow.v2.InputAudioConfigH\x00\x12\x35\n\x04text\x18\x02 \x01(\x0b\x32%.google.cloud.dialogflow.v2.TextInputH\x00\x12\x37\n\x05\x65vent\x18\x03 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EventInputH\x00\x42\x07\n\x05input\"\xae\x05\n\x0bQueryResult\x12\x12\n\nquery_text\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x0f \x01(\t\x12%\n\x1dspeech_recognition_confidence\x18\x02 \x01(\x02\x12\x0e\n\x06\x61\x63tion\x18\x03 \x01(\t\x12+\n\nparameters\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12#\n\x1b\x61ll_required_params_present\x18\x05 \x01(\x08\x12\x1c\n\x14\x63\x61ncels_slot_filling\x18\x15 \x01(\x08\x12\x18\n\x10\x66ulfillment_text\x18\x06 \x01(\t\x12H\n\x14\x66ulfillment_messages\x18\x07 \x03(\x0b\x32*.google.cloud.dialogflow.v2.Intent.Message\x12\x16\n\x0ewebhook_source\x18\x08 \x01(\t\x12\x30\n\x0fwebhook_payload\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12<\n\x0foutput_contexts\x18\n \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x32\n\x06intent\x18\x0b \x01(\x0b\x32\".google.cloud.dialogflow.v2.Intent\x12#\n\x1bintent_detection_confidence\x18\x0c \x01(\x02\x12\x30\n\x0f\x64iagnostic_info\x18\x0e \x01(\x0b\x32\x17.google.protobuf.Struct\x12V\n\x19sentiment_analysis_result\x18\x11 \x01(\x0b\x32\x33.google.cloud.dialogflow.v2.SentimentAnalysisResult\"\xbb\x03\n\x1cStreamingDetectIntentRequest\x12:\n\x07session\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Session\x12\x41\n\x0cquery_params\x18\x02 \x01(\x0b\x32+.google.cloud.dialogflow.v2.QueryParameters\x12@\n\x0bquery_input\x18\x03 \x01(\x0b\x32&.google.cloud.dialogflow.v2.QueryInputB\x03\xe0\x41\x02\x12\x1c\n\x10single_utterance\x18\x04 \x01(\x08\x42\x02\x18\x01\x12J\n\x13output_audio_config\x18\x05 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig\x12<\n\x18output_audio_config_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0binput_audio\x18\x06 \x01(\x0c\x12\x1d\n\x15\x65nable_debugging_info\x18\x08 \x01(\x08\"\xf8\x06\n\x1e\x43loudConversationDebuggingInfo\x12\x19\n\x11\x61udio_data_chunks\x18\x01 \x01(\x05\x12\x39\n\x16result_end_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14\x66irst_audio_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x10single_utterance\x18\x05 \x01(\x08\x12\x43\n speech_partial_results_end_times\x18\x06 \x03(\x0b\x32\x19.google.protobuf.Duration\x12\x41\n\x1espeech_final_results_end_times\x18\x07 \x03(\x0b\x32\x19.google.protobuf.Duration\x12\x19\n\x11partial_responses\x18\x08 \x01(\x05\x12,\n$speaker_id_passive_latency_ms_offset\x18\t \x01(\x05\x12\x1f\n\x17\x62\x61rgein_event_triggered\x18\n \x01(\x08\x12\x1f\n\x17speech_single_utterance\x18\x0b \x01(\x08\x12=\n\x1a\x64tmf_partial_results_times\x18\x0c \x03(\x0b\x32\x19.google.protobuf.Duration\x12;\n\x18\x64tmf_final_results_times\x18\r \x03(\x0b\x32\x19.google.protobuf.Duration\x12\x43\n single_utterance_end_time_offset\x18\x0e \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11no_speech_timeout\x18\x0f \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\ris_input_text\x18\x10 \x01(\x08\x12@\n\x1d\x63lient_half_close_time_offset\x18\x11 \x01(\x0b\x32\x19.google.protobuf.Duration\x12J\n\'client_half_close_streaming_time_offset\x18\x12 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xa9\x03\n\x1dStreamingDetectIntentResponse\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12R\n\x12recognition_result\x18\x02 \x01(\x0b\x32\x36.google.cloud.dialogflow.v2.StreamingRecognitionResult\x12=\n\x0cquery_result\x18\x03 \x01(\x0b\x32\'.google.cloud.dialogflow.v2.QueryResult\x12*\n\x0ewebhook_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0coutput_audio\x18\x05 \x01(\x0c\x12J\n\x13output_audio_config\x18\x06 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig\x12R\n\x0e\x64\x65\x62ugging_info\x18\x08 \x01(\x0b\x32:.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo\"\x9d\x03\n\x1aStreamingRecognitionResult\x12X\n\x0cmessage_type\x18\x01 \x01(\x0e\x32\x42.google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType\x12\x12\n\ntranscript\x18\x02 \x01(\t\x12\x10\n\x08is_final\x18\x03 \x01(\x08\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x44\n\x10speech_word_info\x18\x07 \x03(\x0b\x32*.google.cloud.dialogflow.v2.SpeechWordInfo\x12\x34\n\x11speech_end_offset\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rlanguage_code\x18\n \x01(\t\"X\n\x0bMessageType\x12\x1c\n\x18MESSAGE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTRANSCRIPT\x10\x01\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x02\":\n\tTextInput\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"h\n\nEventInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12+\n\nparameters\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\"F\n\x1eSentimentAnalysisRequestConfig\x12$\n\x1c\x61nalyze_query_text_sentiment\x18\x01 \x01(\x08\"^\n\x17SentimentAnalysisResult\x12\x43\n\x14query_text_sentiment\x18\x01 \x01(\x0b\x32%.google.cloud.dialogflow.v2.Sentiment\"-\n\tSentiment\x12\r\n\x05score\x18\x01 \x01(\x02\x12\x11\n\tmagnitude\x18\x02 \x01(\x02\x32\xe5\x05\n\x08Sessions\x12\xc9\x03\n\x0c\x44\x65tectIntent\x12/.google.cloud.dialogflow.v2.DetectIntentRequest\x1a\x30.google.cloud.dialogflow.v2.DetectIntentResponse\"\xd5\x02\x82\xd3\xe4\x93\x02\xb8\x02\"6/v2/{session=projects/*/agent/sessions/*}:detectIntent:\x01*ZR\"M/v2/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent:\x01*ZG\"B/v2/{session=projects/*/locations/*/agent/sessions/*}:detectIntent:\x01*Z^\"Y/v2/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent:\x01*\xda\x41\x13session,query_input\x12\x92\x01\n\x15StreamingDetectIntent\x12\x38.google.cloud.dialogflow.v2.StreamingDetectIntentRequest\x1a\x39.google.cloud.dialogflow.v2.StreamingDetectIntentResponse\"\x00(\x01\x30\x01\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xea\x03\n\x1e\x63om.google.cloud.dialogflow.v2B\x0cSessionProtoP\x01Z>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2\xea\x41\xd1\x02\n!dialogflow.googleapis.com/Session\x12+projects/{project}/agent/sessions/{session}\x12Sprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}\x12@projects/{project}/locations/{location}/agent/sessions/{session}\x12hprojects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}b\x06proto3"
23
+
24
+ pool = Google::Protobuf::DescriptorPool.generated_pool
25
+
26
+ begin
27
+ pool.add_serialized_file(descriptor_data)
28
+ rescue TypeError => e
29
+ # Compatibility code: will be removed in the next major version.
30
+ require 'google/protobuf/descriptor_pb'
31
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
32
+ parsed.clear_dependency
33
+ serialized = parsed.class.encode(parsed)
34
+ file = pool.add_serialized_file(serialized)
35
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
36
+ imports = [
37
+ ["google.cloud.dialogflow.v2.OutputAudioConfig", "google/cloud/dialogflow/v2/audio_config.proto"],
38
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
39
+ ["google.rpc.Status", "google/rpc/status.proto"],
40
+ ["google.type.LatLng", "google/type/latlng.proto"],
41
+ ["google.cloud.dialogflow.v2.Context", "google/cloud/dialogflow/v2/context.proto"],
42
+ ["google.cloud.dialogflow.v2.SessionEntityType", "google/cloud/dialogflow/v2/session_entity_type.proto"],
43
+ ["google.protobuf.Struct", "google/protobuf/struct.proto"],
44
+ ["google.cloud.dialogflow.v2.Intent.Message", "google/cloud/dialogflow/v2/intent.proto"],
45
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
46
+ ]
47
+ imports.each do |type_name, expected_filename|
48
+ import_file = pool.lookup(type_name).file_descriptor
49
+ if import_file.name != expected_filename
50
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
142
51
  end
143
52
  end
53
+ warn "Each proto file must use a consistent fully-qualified name."
54
+ warn "This will become an error in the next major version."
144
55
  end
145
56
 
146
57
  module Google
@@ -139,7 +139,7 @@ module Google
139
139
  credentials = @config.credentials
140
140
  # Use self-signed JWT if the endpoint is unchanged from default,
141
141
  # but only if the default endpoint does not have a region prefix.
142
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
142
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
143
143
  !@config.endpoint.split(".").first.include?("-")
144
144
  credentials ||= Credentials.default scope: @config.scope,
145
145
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -489,7 +489,9 @@ module Google
489
489
  class Configuration
490
490
  extend ::Gapic::Config
491
491
 
492
- config_attr :endpoint, "dialogflow.googleapis.com", ::String
492
+ DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
493
+
494
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
493
495
  config_attr :credentials, nil do |value|
494
496
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
495
497
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -133,7 +133,7 @@ module Google
133
133
  credentials = @config.credentials
134
134
  # Use self-signed JWT if the endpoint is unchanged from default,
135
135
  # but only if the default endpoint does not have a region prefix.
136
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
136
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
137
137
  !@config.endpoint.split(".").first.include?("-")
138
138
  credentials ||= Credentials.default scope: @config.scope,
139
139
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -356,7 +356,9 @@ module Google
356
356
  class Configuration
357
357
  extend ::Gapic::Config
358
358
 
359
- config_attr :endpoint, "dialogflow.googleapis.com", ::String
359
+ DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
360
+
361
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
360
362
  config_attr :credentials, nil do |value|
361
363
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
362
364
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_detect_intent_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -1,26 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/dialogflow/v2/validation_result.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/cloud/dialogflow/v2/validation_result.proto", :syntax => :proto3) do
8
- add_message "google.cloud.dialogflow.v2.ValidationError" do
9
- optional :severity, :enum, 1, "google.cloud.dialogflow.v2.ValidationError.Severity"
10
- repeated :entries, :string, 3
11
- optional :error_message, :string, 4
12
- end
13
- add_enum "google.cloud.dialogflow.v2.ValidationError.Severity" do
14
- value :SEVERITY_UNSPECIFIED, 0
15
- value :INFO, 1
16
- value :WARNING, 2
17
- value :ERROR, 3
18
- value :CRITICAL, 4
19
- end
20
- add_message "google.cloud.dialogflow.v2.ValidationResult" do
21
- repeated :validation_errors, :message, 1, "google.cloud.dialogflow.v2.ValidationError"
7
+
8
+ descriptor_data = "\n2google/cloud/dialogflow/v2/validation_result.proto\x12\x1agoogle.cloud.dialogflow.v2\"\xd7\x01\n\x0fValidationError\x12\x46\n\x08severity\x18\x01 \x01(\x0e\x32\x34.google.cloud.dialogflow.v2.ValidationError.Severity\x12\x0f\n\x07\x65ntries\x18\x03 \x03(\t\x12\x15\n\rerror_message\x18\x04 \x01(\t\"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04\"Z\n\x10ValidationResult\x12\x46\n\x11validation_errors\x18\x01 \x03(\x0b\x32+.google.cloud.dialogflow.v2.ValidationErrorB\x9e\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x15ValidationResultProtoP\x01Z>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
22
28
  end
23
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
24
32
  end
25
33
 
26
34
  module Google
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Dialogflow
23
23
  module V2
24
- VERSION = "0.24.0"
24
+ VERSION = "0.25.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/dialogflow/v2/version.proto
3
4
 
@@ -11,45 +12,33 @@ require 'google/protobuf/empty_pb'
11
12
  require 'google/protobuf/field_mask_pb'
12
13
  require 'google/protobuf/timestamp_pb'
13
14
 
14
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_file("google/cloud/dialogflow/v2/version.proto", :syntax => :proto3) do
16
- add_message "google.cloud.dialogflow.v2.Version" do
17
- optional :name, :string, 1
18
- optional :description, :string, 2
19
- optional :version_number, :int32, 3
20
- optional :create_time, :message, 4, "google.protobuf.Timestamp"
21
- optional :status, :enum, 6, "google.cloud.dialogflow.v2.Version.VersionStatus"
22
- end
23
- add_enum "google.cloud.dialogflow.v2.Version.VersionStatus" do
24
- value :VERSION_STATUS_UNSPECIFIED, 0
25
- value :IN_PROGRESS, 1
26
- value :READY, 2
27
- value :FAILED, 3
28
- end
29
- add_message "google.cloud.dialogflow.v2.ListVersionsRequest" do
30
- optional :parent, :string, 1
31
- optional :page_size, :int32, 2
32
- optional :page_token, :string, 3
33
- end
34
- add_message "google.cloud.dialogflow.v2.ListVersionsResponse" do
35
- repeated :versions, :message, 1, "google.cloud.dialogflow.v2.Version"
36
- optional :next_page_token, :string, 2
37
- end
38
- add_message "google.cloud.dialogflow.v2.GetVersionRequest" do
39
- optional :name, :string, 1
40
- end
41
- add_message "google.cloud.dialogflow.v2.CreateVersionRequest" do
42
- optional :parent, :string, 1
43
- optional :version, :message, 2, "google.cloud.dialogflow.v2.Version"
44
- end
45
- add_message "google.cloud.dialogflow.v2.UpdateVersionRequest" do
46
- optional :version, :message, 1, "google.cloud.dialogflow.v2.Version"
47
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
48
- end
49
- add_message "google.cloud.dialogflow.v2.DeleteVersionRequest" do
50
- optional :name, :string, 1
15
+
16
+ descriptor_data = "\n(google/cloud/dialogflow/v2/version.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc3\x03\n\x07Version\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eversion_number\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06status\x18\x06 \x01(\x0e\x32\x31.google.cloud.dialogflow.v2.Version.VersionStatusB\x03\xe0\x41\x03\"W\n\rVersionStatus\x12\x1e\n\x1aVERSION_STATUS_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\t\n\x05READY\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03:\x96\x01\xea\x41\x92\x01\n!dialogflow.googleapis.com/Version\x12+projects/{project}/agent/versions/{version}\x12@projects/{project}/locations/{location}/agent/versions/{version}\"\x81\x01\n\x13ListVersionsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Version\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"f\n\x14ListVersionsResponse\x12\x35\n\x08versions\x18\x01 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Version\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x11GetVersionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Version\"\x8c\x01\n\x14\x43reateVersionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Version\x12\x39\n\x07version\x18\x02 \x01(\x0b\x32#.google.cloud.dialogflow.v2.VersionB\x03\xe0\x41\x02\"\x87\x01\n\x14UpdateVersionRequest\x12\x39\n\x07version\x18\x01 \x01(\x0b\x32#.google.cloud.dialogflow.v2.VersionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"O\n\x14\x44\x65leteVersionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Version2\xfc\t\n\x08Versions\x12\xe0\x01\n\x0cListVersions\x12/.google.cloud.dialogflow.v2.ListVersionsRequest\x1a\x30.google.cloud.dialogflow.v2.ListVersionsResponse\"m\x82\xd3\xe4\x93\x02^\x12&/v2/{parent=projects/*/agent}/versionsZ4\x12\x32/v2/{parent=projects/*/locations/*/agent}/versions\xda\x41\x06parent\x12\xcd\x01\n\nGetVersion\x12-.google.cloud.dialogflow.v2.GetVersionRequest\x1a#.google.cloud.dialogflow.v2.Version\"k\x82\xd3\xe4\x93\x02^\x12&/v2/{name=projects/*/agent/versions/*}Z4\x12\x32/v2/{name=projects/*/locations/*/agent/versions/*}\xda\x41\x04name\x12\xf0\x01\n\rCreateVersion\x12\x30.google.cloud.dialogflow.v2.CreateVersionRequest\x1a#.google.cloud.dialogflow.v2.Version\"\x87\x01\x82\xd3\xe4\x93\x02p\"&/v2/{parent=projects/*/agent}/versions:\x07versionZ=\"2/v2/{parent=projects/*/locations/*/agent}/versions:\x07version\xda\x41\x0eparent,version\x12\x86\x02\n\rUpdateVersion\x12\x30.google.cloud.dialogflow.v2.UpdateVersionRequest\x1a#.google.cloud.dialogflow.v2.Version\"\x9d\x01\x82\xd3\xe4\x93\x02\x80\x01\x32./v2/{version.name=projects/*/agent/versions/*}:\x07versionZE2:/v2/{version.name=projects/*/locations/*/agent/versions/*}:\x07version\xda\x41\x13version,update_mask\x12\xc6\x01\n\rDeleteVersion\x12\x30.google.cloud.dialogflow.v2.DeleteVersionRequest\x1a\x16.google.protobuf.Empty\"k\x82\xd3\xe4\x93\x02^*&/v2/{name=projects/*/agent/versions/*}Z4*2/v2/{name=projects/*/locations/*/agent/versions/*}\xda\x41\x04name\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x95\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0cVersionProtoP\x01Z>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3"
17
+
18
+ pool = Google::Protobuf::DescriptorPool.generated_pool
19
+
20
+ begin
21
+ pool.add_serialized_file(descriptor_data)
22
+ rescue TypeError => e
23
+ # Compatibility code: will be removed in the next major version.
24
+ require 'google/protobuf/descriptor_pb'
25
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
26
+ parsed.clear_dependency
27
+ serialized = parsed.class.encode(parsed)
28
+ file = pool.add_serialized_file(serialized)
29
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
30
+ imports = [
31
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
32
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
33
+ ]
34
+ imports.each do |type_name, expected_filename|
35
+ import_file = pool.lookup(type_name).file_descriptor
36
+ if import_file.name != expected_filename
37
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
51
38
  end
52
39
  end
40
+ warn "Each proto file must use a consistent fully-qualified name."
41
+ warn "This will become an error in the next major version."
53
42
  end
54
43
 
55
44
  module Google
@@ -129,7 +129,7 @@ module Google
129
129
  credentials = @config.credentials
130
130
  # Use self-signed JWT if the endpoint is unchanged from default,
131
131
  # but only if the default endpoint does not have a region prefix.
132
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
132
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
133
133
  !@config.endpoint.split(".").first.include?("-")
134
134
  credentials ||= Credentials.default scope: @config.scope,
135
135
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -713,7 +713,9 @@ module Google
713
713
  class Configuration
714
714
  extend ::Gapic::Config
715
715
 
716
- config_attr :endpoint, "dialogflow.googleapis.com", ::String
716
+ DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
717
+
718
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
717
719
  config_attr :credentials, nil do |value|
718
720
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
719
721
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -125,7 +125,7 @@ module Google
125
125
  credentials = @config.credentials
126
126
  # Use self-signed JWT if the endpoint is unchanged from default,
127
127
  # but only if the default endpoint does not have a region prefix.
128
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
128
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
129
129
  !@config.endpoint.split(".").first.include?("-")
130
130
  credentials ||= Credentials.default scope: @config.scope,
131
131
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -577,7 +577,9 @@ module Google
577
577
  class Configuration
578
578
  extend ::Gapic::Config
579
579
 
580
- config_attr :endpoint, "dialogflow.googleapis.com", ::String
580
+ DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
581
+
582
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
581
583
  config_attr :credentials, nil do |value|
582
584
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
583
585
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_list_versions_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_get_version_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_create_version_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_update_version_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_version_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/dialogflow/v2/webhook.proto
3
4
 
@@ -9,29 +10,36 @@ require 'google/cloud/dialogflow/v2/session_pb'
9
10
  require 'google/cloud/dialogflow/v2/session_entity_type_pb'
10
11
  require 'google/protobuf/struct_pb'
11
12
 
12
- Google::Protobuf::DescriptorPool.generated_pool.build do
13
- add_file("google/cloud/dialogflow/v2/webhook.proto", :syntax => :proto3) do
14
- add_message "google.cloud.dialogflow.v2.WebhookRequest" do
15
- optional :session, :string, 4
16
- optional :response_id, :string, 1
17
- optional :query_result, :message, 2, "google.cloud.dialogflow.v2.QueryResult"
18
- optional :original_detect_intent_request, :message, 3, "google.cloud.dialogflow.v2.OriginalDetectIntentRequest"
19
- end
20
- add_message "google.cloud.dialogflow.v2.WebhookResponse" do
21
- optional :fulfillment_text, :string, 1
22
- repeated :fulfillment_messages, :message, 2, "google.cloud.dialogflow.v2.Intent.Message"
23
- optional :source, :string, 3
24
- optional :payload, :message, 4, "google.protobuf.Struct"
25
- repeated :output_contexts, :message, 5, "google.cloud.dialogflow.v2.Context"
26
- optional :followup_event_input, :message, 6, "google.cloud.dialogflow.v2.EventInput"
27
- repeated :session_entity_types, :message, 10, "google.cloud.dialogflow.v2.SessionEntityType"
28
- end
29
- add_message "google.cloud.dialogflow.v2.OriginalDetectIntentRequest" do
30
- optional :source, :string, 1
31
- optional :version, :string, 2
32
- optional :payload, :message, 3, "google.protobuf.Struct"
13
+
14
+ descriptor_data = "\n(google/cloud/dialogflow/v2/webhook.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a(google/cloud/dialogflow/v2/context.proto\x1a\'google/cloud/dialogflow/v2/intent.proto\x1a(google/cloud/dialogflow/v2/session.proto\x1a\x34google/cloud/dialogflow/v2/session_entity_type.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xd6\x01\n\x0eWebhookRequest\x12\x0f\n\x07session\x18\x04 \x01(\t\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12=\n\x0cquery_result\x18\x02 \x01(\x0b\x32\'.google.cloud.dialogflow.v2.QueryResult\x12_\n\x1eoriginal_detect_intent_request\x18\x03 \x01(\x0b\x32\x37.google.cloud.dialogflow.v2.OriginalDetectIntentRequest\"\x80\x03\n\x0fWebhookResponse\x12\x18\n\x10\x66ulfillment_text\x18\x01 \x01(\t\x12H\n\x14\x66ulfillment_messages\x18\x02 \x03(\x0b\x32*.google.cloud.dialogflow.v2.Intent.Message\x12\x0e\n\x06source\x18\x03 \x01(\t\x12(\n\x07payload\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12<\n\x0foutput_contexts\x18\x05 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x44\n\x14\x66ollowup_event_input\x18\x06 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EventInput\x12K\n\x14session_entity_types\x18\n \x03(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityType\"h\n\x1bOriginalDetectIntentRequest\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12(\n\x07payload\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x95\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0cWebhookProtoP\x01Z>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3"
15
+
16
+ pool = Google::Protobuf::DescriptorPool.generated_pool
17
+
18
+ begin
19
+ pool.add_serialized_file(descriptor_data)
20
+ rescue TypeError => e
21
+ # Compatibility code: will be removed in the next major version.
22
+ require 'google/protobuf/descriptor_pb'
23
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
24
+ parsed.clear_dependency
25
+ serialized = parsed.class.encode(parsed)
26
+ file = pool.add_serialized_file(serialized)
27
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
28
+ imports = [
29
+ ["google.cloud.dialogflow.v2.QueryResult", "google/cloud/dialogflow/v2/session.proto"],
30
+ ["google.cloud.dialogflow.v2.Intent.Message", "google/cloud/dialogflow/v2/intent.proto"],
31
+ ["google.protobuf.Struct", "google/protobuf/struct.proto"],
32
+ ["google.cloud.dialogflow.v2.Context", "google/cloud/dialogflow/v2/context.proto"],
33
+ ["google.cloud.dialogflow.v2.SessionEntityType", "google/cloud/dialogflow/v2/session_entity_type.proto"],
34
+ ]
35
+ imports.each do |type_name, expected_filename|
36
+ import_file = pool.lookup(type_name).file_descriptor
37
+ if import_file.name != expected_filename
38
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
33
39
  end
34
40
  end
41
+ warn "Each proto file must use a consistent fully-qualified name."
42
+ warn "This will become an error in the next major version."
35
43
  end
36
44
 
37
45
  module Google
@@ -43,8 +43,12 @@ module Google
43
43
  # if (any.is(Foo.class)) {
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
+ # // or ...
47
+ # if (any.isSameTypeAs(Foo.getDefaultInstance())) {
48
+ # foo = any.unpack(Foo.getDefaultInstance());
49
+ # }
46
50
  #
47
- # Example 3: Pack and unpack a message in Python.
51
+ # Example 3: Pack and unpack a message in Python.
48
52
  #
49
53
  # foo = Foo(...)
50
54
  # any = Any()
@@ -54,7 +58,7 @@ module Google
54
58
  # any.Unpack(foo)
55
59
  # ...
56
60
  #
57
- # Example 4: Pack and unpack a message in Go
61
+ # Example 4: Pack and unpack a message in Go
58
62
  #
59
63
  # foo := &pb.Foo{...}
60
64
  # any, err := anypb.New(foo)
@@ -73,9 +77,8 @@ module Google
73
77
  # in the type URL, for example "foo.bar.com/x/y.z" will yield type
74
78
  # name "y.z".
75
79
  #
76
- #
77
80
  # JSON
78
- #
81
+ # ====
79
82
  # The JSON representation of an `Any` value uses the regular
80
83
  # representation of the deserialized, embedded message, with an
81
84
  # additional field `@type` which contains the type URL. Example:
@@ -87,7 +87,7 @@ module Google
87
87
  # `NullValue` is a singleton enumeration to represent the null value for the
88
88
  # `Value` type union.
89
89
  #
90
- # The JSON representation for `NullValue` is JSON `null`.
90
+ # The JSON representation for `NullValue` is JSON `null`.
91
91
  module NullValue
92
92
  # Null value.
93
93
  NULL_VALUE = 0
@@ -69,7 +69,6 @@ module Google
69
69
  # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
- #
73
72
  # Example 5: Compute Timestamp from Java `Instant.now()`.
74
73
  #
75
74
  # Instant now = Instant.now();
@@ -78,7 +77,6 @@ module Google
78
77
  # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
78
  # .setNanos(now.getNano()).build();
80
79
  #
81
- #
82
80
  # Example 6: Compute Timestamp from current time in Python.
83
81
  #
84
82
  # timestamp = Timestamp()
@@ -108,7 +106,7 @@ module Google
108
106
  # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
109
107
  # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
110
108
  # the Joda Time's [`ISODateTimeFormat.dateTime()`](
111
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
109
+ # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
112
110
  # ) to obtain a formatter capable of generating timestamps in this format.
113
111
  # @!attribute [rw] seconds
114
112
  # @return [::Integer]