google-cloud-dialogflow-v2 0.32.0 → 0.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/v2/agents/client.rb +7 -7
  3. data/lib/google/cloud/dialogflow/v2/agents/rest/client.rb +8 -8
  4. data/lib/google/cloud/dialogflow/v2/agents/rest/service_stub.rb +9 -0
  5. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +7 -7
  6. data/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb +8 -8
  7. data/lib/google/cloud/dialogflow/v2/answer_records/rest/service_stub.rb +9 -0
  8. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +7 -7
  9. data/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb +8 -8
  10. data/lib/google/cloud/dialogflow/v2/contexts/rest/service_stub.rb +9 -0
  11. data/lib/google/cloud/dialogflow/v2/conversation_datasets/client.rb +7 -7
  12. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb +8 -8
  13. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/service_stub.rb +9 -0
  14. data/lib/google/cloud/dialogflow/v2/conversation_models/client.rb +7 -7
  15. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb +8 -8
  16. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/service_stub.rb +9 -0
  17. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +7 -7
  18. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb +8 -8
  19. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/service_stub.rb +9 -0
  20. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +7 -7
  21. data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +8 -8
  22. data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +9 -0
  23. data/lib/google/cloud/dialogflow/v2/documents/client.rb +7 -7
  24. data/lib/google/cloud/dialogflow/v2/documents/rest/client.rb +8 -8
  25. data/lib/google/cloud/dialogflow/v2/documents/rest/service_stub.rb +9 -0
  26. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +7 -7
  27. data/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb +8 -8
  28. data/lib/google/cloud/dialogflow/v2/entity_types/rest/service_stub.rb +9 -0
  29. data/lib/google/cloud/dialogflow/v2/environments/client.rb +7 -7
  30. data/lib/google/cloud/dialogflow/v2/environments/rest/client.rb +8 -8
  31. data/lib/google/cloud/dialogflow/v2/environments/rest/service_stub.rb +9 -0
  32. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +7 -7
  33. data/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb +8 -8
  34. data/lib/google/cloud/dialogflow/v2/fulfillments/rest/service_stub.rb +9 -0
  35. data/lib/google/cloud/dialogflow/v2/intents/client.rb +7 -7
  36. data/lib/google/cloud/dialogflow/v2/intents/rest/client.rb +8 -8
  37. data/lib/google/cloud/dialogflow/v2/intents/rest/service_stub.rb +9 -0
  38. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +7 -7
  39. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb +8 -8
  40. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/service_stub.rb +9 -0
  41. data/lib/google/cloud/dialogflow/v2/participants/client.rb +7 -7
  42. data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +8 -8
  43. data/lib/google/cloud/dialogflow/v2/participants/rest/service_stub.rb +9 -0
  44. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +7 -7
  45. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb +8 -8
  46. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/service_stub.rb +9 -0
  47. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +7 -7
  48. data/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb +8 -8
  49. data/lib/google/cloud/dialogflow/v2/sessions/rest/service_stub.rb +9 -0
  50. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  51. data/lib/google/cloud/dialogflow/v2/versions/client.rb +7 -7
  52. data/lib/google/cloud/dialogflow/v2/versions/rest/client.rb +8 -8
  53. data/lib/google/cloud/dialogflow/v2/versions/rest/service_stub.rb +9 -0
  54. metadata +2 -2
@@ -156,20 +156,20 @@ module Google
156
156
  config.universe_domain = @config.universe_domain
157
157
  end
158
158
 
159
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
160
- config.credentials = credentials
161
- config.quota_project = @quota_project_id
162
- config.endpoint = @config.endpoint
163
- config.universe_domain = @config.universe_domain
164
- config.bindings_override = @config.bindings_override
165
- end
166
-
167
159
  @entity_types_stub = ::Google::Cloud::Dialogflow::V2::EntityTypes::Rest::ServiceStub.new(
168
160
  endpoint: @config.endpoint,
169
161
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
170
162
  universe_domain: @config.universe_domain,
171
163
  credentials: credentials
172
164
  )
165
+
166
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
167
+ config.credentials = credentials
168
+ config.quota_project = @quota_project_id
169
+ config.endpoint = @entity_types_stub.endpoint
170
+ config.universe_domain = @entity_types_stub.universe_domain
171
+ config.bindings_override = @config.bindings_override
172
+ end
173
173
  end
174
174
 
175
175
  ##
@@ -52,6 +52,15 @@ module Google
52
52
  @client_stub.universe_domain
53
53
  end
54
54
 
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
55
64
  ##
56
65
  # Baseline implementation for the list_entity_types REST call
57
66
  #
@@ -152,13 +152,6 @@ module Google
152
152
  @quota_project_id = @config.quota_project
153
153
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
154
154
 
155
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
156
- config.credentials = credentials
157
- config.quota_project = @quota_project_id
158
- config.endpoint = @config.endpoint
159
- config.universe_domain = @config.universe_domain
160
- end
161
-
162
155
  @environments_stub = ::Gapic::ServiceStub.new(
163
156
  ::Google::Cloud::Dialogflow::V2::Environments::Stub,
164
157
  credentials: credentials,
@@ -169,6 +162,13 @@ module Google
169
162
  interceptors: @config.interceptors,
170
163
  channel_pool_config: @config.channel_pool
171
164
  )
165
+
166
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
167
+ config.credentials = credentials
168
+ config.quota_project = @quota_project_id
169
+ config.endpoint = @environments_stub.endpoint
170
+ config.universe_domain = @environments_stub.universe_domain
171
+ end
172
172
  end
173
173
 
174
174
  ##
@@ -149,20 +149,20 @@ module Google
149
149
  @quota_project_id = @config.quota_project
150
150
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
151
151
 
152
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
153
- config.credentials = credentials
154
- config.quota_project = @quota_project_id
155
- config.endpoint = @config.endpoint
156
- config.universe_domain = @config.universe_domain
157
- config.bindings_override = @config.bindings_override
158
- end
159
-
160
152
  @environments_stub = ::Google::Cloud::Dialogflow::V2::Environments::Rest::ServiceStub.new(
161
153
  endpoint: @config.endpoint,
162
154
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
155
  universe_domain: @config.universe_domain,
164
156
  credentials: credentials
165
157
  )
158
+
159
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
160
+ config.credentials = credentials
161
+ config.quota_project = @quota_project_id
162
+ config.endpoint = @environments_stub.endpoint
163
+ config.universe_domain = @environments_stub.universe_domain
164
+ config.bindings_override = @config.bindings_override
165
+ end
166
166
  end
167
167
 
168
168
  ##
@@ -52,6 +52,15 @@ module Google
52
52
  @client_stub.universe_domain
53
53
  end
54
54
 
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
55
64
  ##
56
65
  # Baseline implementation for the list_environments REST call
57
66
  #
@@ -152,13 +152,6 @@ module Google
152
152
  @quota_project_id = @config.quota_project
153
153
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
154
154
 
155
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
156
- config.credentials = credentials
157
- config.quota_project = @quota_project_id
158
- config.endpoint = @config.endpoint
159
- config.universe_domain = @config.universe_domain
160
- end
161
-
162
155
  @fulfillments_stub = ::Gapic::ServiceStub.new(
163
156
  ::Google::Cloud::Dialogflow::V2::Fulfillments::Stub,
164
157
  credentials: credentials,
@@ -169,6 +162,13 @@ module Google
169
162
  interceptors: @config.interceptors,
170
163
  channel_pool_config: @config.channel_pool
171
164
  )
165
+
166
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
167
+ config.credentials = credentials
168
+ config.quota_project = @quota_project_id
169
+ config.endpoint = @fulfillments_stub.endpoint
170
+ config.universe_domain = @fulfillments_stub.universe_domain
171
+ end
172
172
  end
173
173
 
174
174
  ##
@@ -149,20 +149,20 @@ module Google
149
149
  @quota_project_id = @config.quota_project
150
150
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
151
151
 
152
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
153
- config.credentials = credentials
154
- config.quota_project = @quota_project_id
155
- config.endpoint = @config.endpoint
156
- config.universe_domain = @config.universe_domain
157
- config.bindings_override = @config.bindings_override
158
- end
159
-
160
152
  @fulfillments_stub = ::Google::Cloud::Dialogflow::V2::Fulfillments::Rest::ServiceStub.new(
161
153
  endpoint: @config.endpoint,
162
154
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
155
  universe_domain: @config.universe_domain,
164
156
  credentials: credentials
165
157
  )
158
+
159
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
160
+ config.credentials = credentials
161
+ config.quota_project = @quota_project_id
162
+ config.endpoint = @fulfillments_stub.endpoint
163
+ config.universe_domain = @fulfillments_stub.universe_domain
164
+ config.bindings_override = @config.bindings_override
165
+ end
166
166
  end
167
167
 
168
168
  ##
@@ -52,6 +52,15 @@ module Google
52
52
  @client_stub.universe_domain
53
53
  end
54
54
 
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
55
64
  ##
56
65
  # Baseline implementation for the get_fulfillment REST call
57
66
  #
@@ -159,13 +159,6 @@ module Google
159
159
  config.universe_domain = @config.universe_domain
160
160
  end
161
161
 
162
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
163
- config.credentials = credentials
164
- config.quota_project = @quota_project_id
165
- config.endpoint = @config.endpoint
166
- config.universe_domain = @config.universe_domain
167
- end
168
-
169
162
  @intents_stub = ::Gapic::ServiceStub.new(
170
163
  ::Google::Cloud::Dialogflow::V2::Intents::Stub,
171
164
  credentials: credentials,
@@ -176,6 +169,13 @@ module Google
176
169
  interceptors: @config.interceptors,
177
170
  channel_pool_config: @config.channel_pool
178
171
  )
172
+
173
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
174
+ config.credentials = credentials
175
+ config.quota_project = @quota_project_id
176
+ config.endpoint = @intents_stub.endpoint
177
+ config.universe_domain = @intents_stub.universe_domain
178
+ end
179
179
  end
180
180
 
181
181
  ##
@@ -156,20 +156,20 @@ module Google
156
156
  config.universe_domain = @config.universe_domain
157
157
  end
158
158
 
159
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
160
- config.credentials = credentials
161
- config.quota_project = @quota_project_id
162
- config.endpoint = @config.endpoint
163
- config.universe_domain = @config.universe_domain
164
- config.bindings_override = @config.bindings_override
165
- end
166
-
167
159
  @intents_stub = ::Google::Cloud::Dialogflow::V2::Intents::Rest::ServiceStub.new(
168
160
  endpoint: @config.endpoint,
169
161
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
170
162
  universe_domain: @config.universe_domain,
171
163
  credentials: credentials
172
164
  )
165
+
166
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
167
+ config.credentials = credentials
168
+ config.quota_project = @quota_project_id
169
+ config.endpoint = @intents_stub.endpoint
170
+ config.universe_domain = @intents_stub.universe_domain
171
+ config.bindings_override = @config.bindings_override
172
+ end
173
173
  end
174
174
 
175
175
  ##
@@ -52,6 +52,15 @@ module Google
52
52
  @client_stub.universe_domain
53
53
  end
54
54
 
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
55
64
  ##
56
65
  # Baseline implementation for the list_intents REST call
57
66
  #
@@ -153,13 +153,6 @@ module Google
153
153
  @quota_project_id = @config.quota_project
154
154
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
155
155
 
156
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
157
- config.credentials = credentials
158
- config.quota_project = @quota_project_id
159
- config.endpoint = @config.endpoint
160
- config.universe_domain = @config.universe_domain
161
- end
162
-
163
156
  @knowledge_bases_stub = ::Gapic::ServiceStub.new(
164
157
  ::Google::Cloud::Dialogflow::V2::KnowledgeBases::Stub,
165
158
  credentials: credentials,
@@ -170,6 +163,13 @@ module Google
170
163
  interceptors: @config.interceptors,
171
164
  channel_pool_config: @config.channel_pool
172
165
  )
166
+
167
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
168
+ config.credentials = credentials
169
+ config.quota_project = @quota_project_id
170
+ config.endpoint = @knowledge_bases_stub.endpoint
171
+ config.universe_domain = @knowledge_bases_stub.universe_domain
172
+ end
173
173
  end
174
174
 
175
175
  ##
@@ -150,20 +150,20 @@ module Google
150
150
  @quota_project_id = @config.quota_project
151
151
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
152
152
 
153
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
154
- config.credentials = credentials
155
- config.quota_project = @quota_project_id
156
- config.endpoint = @config.endpoint
157
- config.universe_domain = @config.universe_domain
158
- config.bindings_override = @config.bindings_override
159
- end
160
-
161
153
  @knowledge_bases_stub = ::Google::Cloud::Dialogflow::V2::KnowledgeBases::Rest::ServiceStub.new(
162
154
  endpoint: @config.endpoint,
163
155
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
164
156
  universe_domain: @config.universe_domain,
165
157
  credentials: credentials
166
158
  )
159
+
160
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
161
+ config.credentials = credentials
162
+ config.quota_project = @quota_project_id
163
+ config.endpoint = @knowledge_bases_stub.endpoint
164
+ config.universe_domain = @knowledge_bases_stub.universe_domain
165
+ config.bindings_override = @config.bindings_override
166
+ end
167
167
  end
168
168
 
169
169
  ##
@@ -52,6 +52,15 @@ module Google
52
52
  @client_stub.universe_domain
53
53
  end
54
54
 
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
55
64
  ##
56
65
  # Baseline implementation for the list_knowledge_bases REST call
57
66
  #
@@ -159,13 +159,6 @@ module Google
159
159
  @quota_project_id = @config.quota_project
160
160
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
161
161
 
162
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
163
- config.credentials = credentials
164
- config.quota_project = @quota_project_id
165
- config.endpoint = @config.endpoint
166
- config.universe_domain = @config.universe_domain
167
- end
168
-
169
162
  @participants_stub = ::Gapic::ServiceStub.new(
170
163
  ::Google::Cloud::Dialogflow::V2::Participants::Stub,
171
164
  credentials: credentials,
@@ -176,6 +169,13 @@ module Google
176
169
  interceptors: @config.interceptors,
177
170
  channel_pool_config: @config.channel_pool
178
171
  )
172
+
173
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
174
+ config.credentials = credentials
175
+ config.quota_project = @quota_project_id
176
+ config.endpoint = @participants_stub.endpoint
177
+ config.universe_domain = @participants_stub.universe_domain
178
+ end
179
179
  end
180
180
 
181
181
  ##
@@ -154,20 +154,20 @@ module Google
154
154
  @quota_project_id = @config.quota_project
155
155
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
156
156
 
157
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
158
- config.credentials = credentials
159
- config.quota_project = @quota_project_id
160
- config.endpoint = @config.endpoint
161
- config.universe_domain = @config.universe_domain
162
- config.bindings_override = @config.bindings_override
163
- end
164
-
165
157
  @participants_stub = ::Google::Cloud::Dialogflow::V2::Participants::Rest::ServiceStub.new(
166
158
  endpoint: @config.endpoint,
167
159
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
168
160
  universe_domain: @config.universe_domain,
169
161
  credentials: credentials
170
162
  )
163
+
164
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
165
+ config.credentials = credentials
166
+ config.quota_project = @quota_project_id
167
+ config.endpoint = @participants_stub.endpoint
168
+ config.universe_domain = @participants_stub.universe_domain
169
+ config.bindings_override = @config.bindings_override
170
+ end
171
171
  end
172
172
 
173
173
  ##
@@ -52,6 +52,15 @@ module Google
52
52
  @client_stub.universe_domain
53
53
  end
54
54
 
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
55
64
  ##
56
65
  # Baseline implementation for the create_participant REST call
57
66
  #
@@ -153,13 +153,6 @@ module Google
153
153
  @quota_project_id = @config.quota_project
154
154
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
155
155
 
156
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
157
- config.credentials = credentials
158
- config.quota_project = @quota_project_id
159
- config.endpoint = @config.endpoint
160
- config.universe_domain = @config.universe_domain
161
- end
162
-
163
156
  @session_entity_types_stub = ::Gapic::ServiceStub.new(
164
157
  ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Stub,
165
158
  credentials: credentials,
@@ -170,6 +163,13 @@ module Google
170
163
  interceptors: @config.interceptors,
171
164
  channel_pool_config: @config.channel_pool
172
165
  )
166
+
167
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
168
+ config.credentials = credentials
169
+ config.quota_project = @quota_project_id
170
+ config.endpoint = @session_entity_types_stub.endpoint
171
+ config.universe_domain = @session_entity_types_stub.universe_domain
172
+ end
173
173
  end
174
174
 
175
175
  ##
@@ -150,20 +150,20 @@ module Google
150
150
  @quota_project_id = @config.quota_project
151
151
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
152
152
 
153
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
154
- config.credentials = credentials
155
- config.quota_project = @quota_project_id
156
- config.endpoint = @config.endpoint
157
- config.universe_domain = @config.universe_domain
158
- config.bindings_override = @config.bindings_override
159
- end
160
-
161
153
  @session_entity_types_stub = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Rest::ServiceStub.new(
162
154
  endpoint: @config.endpoint,
163
155
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
164
156
  universe_domain: @config.universe_domain,
165
157
  credentials: credentials
166
158
  )
159
+
160
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
161
+ config.credentials = credentials
162
+ config.quota_project = @quota_project_id
163
+ config.endpoint = @session_entity_types_stub.endpoint
164
+ config.universe_domain = @session_entity_types_stub.universe_domain
165
+ config.bindings_override = @config.bindings_override
166
+ end
167
167
  end
168
168
 
169
169
  ##
@@ -52,6 +52,15 @@ module Google
52
52
  @client_stub.universe_domain
53
53
  end
54
54
 
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
55
64
  ##
56
65
  # Baseline implementation for the list_session_entity_types REST call
57
66
  #
@@ -162,13 +162,6 @@ module Google
162
162
  @quota_project_id = @config.quota_project
163
163
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
164
164
 
165
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
166
- config.credentials = credentials
167
- config.quota_project = @quota_project_id
168
- config.endpoint = @config.endpoint
169
- config.universe_domain = @config.universe_domain
170
- end
171
-
172
165
  @sessions_stub = ::Gapic::ServiceStub.new(
173
166
  ::Google::Cloud::Dialogflow::V2::Sessions::Stub,
174
167
  credentials: credentials,
@@ -179,6 +172,13 @@ module Google
179
172
  interceptors: @config.interceptors,
180
173
  channel_pool_config: @config.channel_pool
181
174
  )
175
+
176
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
177
+ config.credentials = credentials
178
+ config.quota_project = @quota_project_id
179
+ config.endpoint = @sessions_stub.endpoint
180
+ config.universe_domain = @sessions_stub.universe_domain
181
+ end
182
182
  end
183
183
 
184
184
  ##
@@ -157,20 +157,20 @@ module Google
157
157
  @quota_project_id = @config.quota_project
158
158
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
159
159
 
160
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
161
- config.credentials = credentials
162
- config.quota_project = @quota_project_id
163
- config.endpoint = @config.endpoint
164
- config.universe_domain = @config.universe_domain
165
- config.bindings_override = @config.bindings_override
166
- end
167
-
168
160
  @sessions_stub = ::Google::Cloud::Dialogflow::V2::Sessions::Rest::ServiceStub.new(
169
161
  endpoint: @config.endpoint,
170
162
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
171
163
  universe_domain: @config.universe_domain,
172
164
  credentials: credentials
173
165
  )
166
+
167
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
168
+ config.credentials = credentials
169
+ config.quota_project = @quota_project_id
170
+ config.endpoint = @sessions_stub.endpoint
171
+ config.universe_domain = @sessions_stub.universe_domain
172
+ config.bindings_override = @config.bindings_override
173
+ end
174
174
  end
175
175
 
176
176
  ##
@@ -52,6 +52,15 @@ module Google
52
52
  @client_stub.universe_domain
53
53
  end
54
54
 
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
55
64
  ##
56
65
  # Baseline implementation for the detect_intent REST call
57
66
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Dialogflow
23
23
  module V2
24
- VERSION = "0.32.0"
24
+ VERSION = "0.32.1"
25
25
  end
26
26
  end
27
27
  end
@@ -152,13 +152,6 @@ module Google
152
152
  @quota_project_id = @config.quota_project
153
153
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
154
154
 
155
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
156
- config.credentials = credentials
157
- config.quota_project = @quota_project_id
158
- config.endpoint = @config.endpoint
159
- config.universe_domain = @config.universe_domain
160
- end
161
-
162
155
  @versions_stub = ::Gapic::ServiceStub.new(
163
156
  ::Google::Cloud::Dialogflow::V2::Versions::Stub,
164
157
  credentials: credentials,
@@ -169,6 +162,13 @@ module Google
169
162
  interceptors: @config.interceptors,
170
163
  channel_pool_config: @config.channel_pool
171
164
  )
165
+
166
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
167
+ config.credentials = credentials
168
+ config.quota_project = @quota_project_id
169
+ config.endpoint = @versions_stub.endpoint
170
+ config.universe_domain = @versions_stub.universe_domain
171
+ end
172
172
  end
173
173
 
174
174
  ##
@@ -149,20 +149,20 @@ module Google
149
149
  @quota_project_id = @config.quota_project
150
150
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
151
151
 
152
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
153
- config.credentials = credentials
154
- config.quota_project = @quota_project_id
155
- config.endpoint = @config.endpoint
156
- config.universe_domain = @config.universe_domain
157
- config.bindings_override = @config.bindings_override
158
- end
159
-
160
152
  @versions_stub = ::Google::Cloud::Dialogflow::V2::Versions::Rest::ServiceStub.new(
161
153
  endpoint: @config.endpoint,
162
154
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
155
  universe_domain: @config.universe_domain,
164
156
  credentials: credentials
165
157
  )
158
+
159
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
160
+ config.credentials = credentials
161
+ config.quota_project = @quota_project_id
162
+ config.endpoint = @versions_stub.endpoint
163
+ config.universe_domain = @versions_stub.universe_domain
164
+ config.bindings_override = @config.bindings_override
165
+ end
166
166
  end
167
167
 
168
168
  ##
@@ -52,6 +52,15 @@ module Google
52
52
  @client_stub.universe_domain
53
53
  end
54
54
 
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
55
64
  ##
56
65
  # Baseline implementation for the list_versions REST call
57
66
  #