google-cloud-retail-v2 0.18.0 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2/catalog_service/client.rb +7 -7
  3. data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +7 -7
  4. data/lib/google/cloud/retail/v2/catalog_service/rest/service_stub.rb +9 -0
  5. data/lib/google/cloud/retail/v2/completion_service/client.rb +7 -7
  6. data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +7 -7
  7. data/lib/google/cloud/retail/v2/completion_service/rest/service_stub.rb +9 -0
  8. data/lib/google/cloud/retail/v2/control_service/client.rb +7 -7
  9. data/lib/google/cloud/retail/v2/control_service/rest/client.rb +7 -7
  10. data/lib/google/cloud/retail/v2/control_service/rest/service_stub.rb +9 -0
  11. data/lib/google/cloud/retail/v2/model_service/client.rb +7 -7
  12. data/lib/google/cloud/retail/v2/model_service/rest/client.rb +7 -7
  13. data/lib/google/cloud/retail/v2/model_service/rest/service_stub.rb +9 -0
  14. data/lib/google/cloud/retail/v2/prediction_service/client.rb +7 -7
  15. data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +7 -7
  16. data/lib/google/cloud/retail/v2/prediction_service/rest/service_stub.rb +9 -0
  17. data/lib/google/cloud/retail/v2/product_service/client.rb +7 -7
  18. data/lib/google/cloud/retail/v2/product_service/rest/client.rb +7 -7
  19. data/lib/google/cloud/retail/v2/product_service/rest/service_stub.rb +9 -0
  20. data/lib/google/cloud/retail/v2/search_service/client.rb +7 -7
  21. data/lib/google/cloud/retail/v2/search_service/rest/client.rb +7 -7
  22. data/lib/google/cloud/retail/v2/search_service/rest/service_stub.rb +9 -0
  23. data/lib/google/cloud/retail/v2/serving_config_service/client.rb +7 -7
  24. data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +7 -7
  25. data/lib/google/cloud/retail/v2/serving_config_service/rest/service_stub.rb +9 -0
  26. data/lib/google/cloud/retail/v2/user_event_service/client.rb +7 -7
  27. data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +7 -7
  28. data/lib/google/cloud/retail/v2/user_event_service/rest/service_stub.rb +9 -0
  29. data/lib/google/cloud/retail/v2/version.rb +1 -1
  30. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d832bbbddc40079dd5e42f092c498c0940f0175f932bf56f3625b4d21766257
4
- data.tar.gz: e7ba9f26e6b6d784f640ad1a9e736ac6c15f0ec501ff3196832881f9b19a9d4d
3
+ metadata.gz: 90bfaa8a2471537417a342dd060612f216df1800cd5720c9da801ca0707bcc83
4
+ data.tar.gz: b0540d755ec9a2ef70d72214e4d7636d24485ac8636cbadaae0ae6c647a88cdb
5
5
  SHA512:
6
- metadata.gz: 3edf8a4ae00c2d77acb58bb890999506ec2b9a93016f0c71d798d85483e607baceac891c6887bc344d2d617b835f89b96252fe9f7667cf96bf54f604f18d6064
7
- data.tar.gz: a9621fc720251a73b578ea69cedd92d448f50b483fde5182820e32e2911adfbf6feea93c624b55f3fc996f29e936136a598706f887698dc363d991408261fdca
6
+ metadata.gz: d4540a5411d53ab4fa0460462c6a0860cef4130079f384bf552b2d384c8c8fa58b89227fbbc5e669ff05fcfa6540d286eea76ae25b5da74cdbf9a4a0cd367164
7
+ data.tar.gz: 42a259085bea14c76d6d66d4fceb7033be21c5ff9b92c7d4f68a539d585f22d6ce0bea66386ce5712d6c9ecfd3d1dfb17619467b0b1b5b9c2d6eaca4f8ba356f
@@ -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
  @catalog_service_stub = ::Gapic::ServiceStub.new(
163
156
  ::Google::Cloud::Retail::V2::CatalogService::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 = @catalog_service_stub.endpoint
170
+ config.universe_domain = @catalog_service_stub.universe_domain
171
+ end
172
172
  end
173
173
 
174
174
  ##
@@ -149,19 +149,19 @@ 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
- end
158
-
159
152
  @catalog_service_stub = ::Google::Cloud::Retail::V2::CatalogService::Rest::ServiceStub.new(
160
153
  endpoint: @config.endpoint,
161
154
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
162
155
  universe_domain: @config.universe_domain,
163
156
  credentials: credentials
164
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 = @catalog_service_stub.endpoint
163
+ config.universe_domain = @catalog_service_stub.universe_domain
164
+ end
165
165
  end
166
166
 
167
167
  ##
@@ -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_catalogs REST call
57
66
  #
@@ -162,13 +162,6 @@ module Google
162
162
  config.universe_domain = @config.universe_domain
163
163
  end
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
  @completion_service_stub = ::Gapic::ServiceStub.new(
173
166
  ::Google::Cloud::Retail::V2::CompletionService::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 = @completion_service_stub.endpoint
180
+ config.universe_domain = @completion_service_stub.universe_domain
181
+ end
182
182
  end
183
183
 
184
184
  ##
@@ -159,19 +159,19 @@ module Google
159
159
  config.universe_domain = @config.universe_domain
160
160
  end
161
161
 
162
- @location_client = Google::Cloud::Location::Locations::Rest::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
  @completion_service_stub = ::Google::Cloud::Retail::V2::CompletionService::Rest::ServiceStub.new(
170
163
  endpoint: @config.endpoint,
171
164
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
172
165
  universe_domain: @config.universe_domain,
173
166
  credentials: credentials
174
167
  )
168
+
169
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
170
+ config.credentials = credentials
171
+ config.quota_project = @quota_project_id
172
+ config.endpoint = @completion_service_stub.endpoint
173
+ config.universe_domain = @completion_service_stub.universe_domain
174
+ end
175
175
  end
176
176
 
177
177
  ##
@@ -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 complete_query REST call
57
66
  #
@@ -147,13 +147,6 @@ module Google
147
147
  @quota_project_id = @config.quota_project
148
148
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
149
149
 
150
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
151
- config.credentials = credentials
152
- config.quota_project = @quota_project_id
153
- config.endpoint = @config.endpoint
154
- config.universe_domain = @config.universe_domain
155
- end
156
-
157
150
  @control_service_stub = ::Gapic::ServiceStub.new(
158
151
  ::Google::Cloud::Retail::V2::ControlService::Stub,
159
152
  credentials: credentials,
@@ -164,6 +157,13 @@ module Google
164
157
  interceptors: @config.interceptors,
165
158
  channel_pool_config: @config.channel_pool
166
159
  )
160
+
161
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
162
+ config.credentials = credentials
163
+ config.quota_project = @quota_project_id
164
+ config.endpoint = @control_service_stub.endpoint
165
+ config.universe_domain = @control_service_stub.universe_domain
166
+ end
167
167
  end
168
168
 
169
169
  ##
@@ -144,19 +144,19 @@ module Google
144
144
  @quota_project_id = @config.quota_project
145
145
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
146
146
 
147
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
148
- config.credentials = credentials
149
- config.quota_project = @quota_project_id
150
- config.endpoint = @config.endpoint
151
- config.universe_domain = @config.universe_domain
152
- end
153
-
154
147
  @control_service_stub = ::Google::Cloud::Retail::V2::ControlService::Rest::ServiceStub.new(
155
148
  endpoint: @config.endpoint,
156
149
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
157
150
  universe_domain: @config.universe_domain,
158
151
  credentials: credentials
159
152
  )
153
+
154
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
155
+ config.credentials = credentials
156
+ config.quota_project = @quota_project_id
157
+ config.endpoint = @control_service_stub.endpoint
158
+ config.universe_domain = @control_service_stub.universe_domain
159
+ end
160
160
  end
161
161
 
162
162
  ##
@@ -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_control REST call
57
66
  #
@@ -170,13 +170,6 @@ module Google
170
170
  config.universe_domain = @config.universe_domain
171
171
  end
172
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 = @config.endpoint
177
- config.universe_domain = @config.universe_domain
178
- end
179
-
180
173
  @model_service_stub = ::Gapic::ServiceStub.new(
181
174
  ::Google::Cloud::Retail::V2::ModelService::Stub,
182
175
  credentials: credentials,
@@ -187,6 +180,13 @@ module Google
187
180
  interceptors: @config.interceptors,
188
181
  channel_pool_config: @config.channel_pool
189
182
  )
183
+
184
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
185
+ config.credentials = credentials
186
+ config.quota_project = @quota_project_id
187
+ config.endpoint = @model_service_stub.endpoint
188
+ config.universe_domain = @model_service_stub.universe_domain
189
+ end
190
190
  end
191
191
 
192
192
  ##
@@ -167,19 +167,19 @@ module Google
167
167
  config.universe_domain = @config.universe_domain
168
168
  end
169
169
 
170
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
171
- config.credentials = credentials
172
- config.quota_project = @quota_project_id
173
- config.endpoint = @config.endpoint
174
- config.universe_domain = @config.universe_domain
175
- end
176
-
177
170
  @model_service_stub = ::Google::Cloud::Retail::V2::ModelService::Rest::ServiceStub.new(
178
171
  endpoint: @config.endpoint,
179
172
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
180
173
  universe_domain: @config.universe_domain,
181
174
  credentials: credentials
182
175
  )
176
+
177
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
178
+ config.credentials = credentials
179
+ config.quota_project = @quota_project_id
180
+ config.endpoint = @model_service_stub.endpoint
181
+ config.universe_domain = @model_service_stub.universe_domain
182
+ end
183
183
  end
184
184
 
185
185
  ##
@@ -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_model 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
  @prediction_service_stub = ::Gapic::ServiceStub.new(
163
156
  ::Google::Cloud::Retail::V2::PredictionService::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 = @prediction_service_stub.endpoint
170
+ config.universe_domain = @prediction_service_stub.universe_domain
171
+ end
172
172
  end
173
173
 
174
174
  ##
@@ -149,19 +149,19 @@ 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
- end
158
-
159
152
  @prediction_service_stub = ::Google::Cloud::Retail::V2::PredictionService::Rest::ServiceStub.new(
160
153
  endpoint: @config.endpoint,
161
154
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
162
155
  universe_domain: @config.universe_domain,
163
156
  credentials: credentials
164
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 = @prediction_service_stub.endpoint
163
+ config.universe_domain = @prediction_service_stub.universe_domain
164
+ end
165
165
  end
166
166
 
167
167
  ##
@@ -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 predict REST call
57
66
  #
@@ -165,13 +165,6 @@ module Google
165
165
  config.universe_domain = @config.universe_domain
166
166
  end
167
167
 
168
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
169
- config.credentials = credentials
170
- config.quota_project = @quota_project_id
171
- config.endpoint = @config.endpoint
172
- config.universe_domain = @config.universe_domain
173
- end
174
-
175
168
  @product_service_stub = ::Gapic::ServiceStub.new(
176
169
  ::Google::Cloud::Retail::V2::ProductService::Stub,
177
170
  credentials: credentials,
@@ -182,6 +175,13 @@ module Google
182
175
  interceptors: @config.interceptors,
183
176
  channel_pool_config: @config.channel_pool
184
177
  )
178
+
179
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
180
+ config.credentials = credentials
181
+ config.quota_project = @quota_project_id
182
+ config.endpoint = @product_service_stub.endpoint
183
+ config.universe_domain = @product_service_stub.universe_domain
184
+ end
185
185
  end
186
186
 
187
187
  ##
@@ -162,19 +162,19 @@ module Google
162
162
  config.universe_domain = @config.universe_domain
163
163
  end
164
164
 
165
- @location_client = Google::Cloud::Location::Locations::Rest::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
  @product_service_stub = ::Google::Cloud::Retail::V2::ProductService::Rest::ServiceStub.new(
173
166
  endpoint: @config.endpoint,
174
167
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
175
168
  universe_domain: @config.universe_domain,
176
169
  credentials: credentials
177
170
  )
171
+
172
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
173
+ config.credentials = credentials
174
+ config.quota_project = @quota_project_id
175
+ config.endpoint = @product_service_stub.endpoint
176
+ config.universe_domain = @product_service_stub.universe_domain
177
+ end
178
178
  end
179
179
 
180
180
  ##
@@ -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_product REST call
57
66
  #
@@ -155,13 +155,6 @@ module Google
155
155
  @quota_project_id = @config.quota_project
156
156
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
157
157
 
158
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
159
- config.credentials = credentials
160
- config.quota_project = @quota_project_id
161
- config.endpoint = @config.endpoint
162
- config.universe_domain = @config.universe_domain
163
- end
164
-
165
158
  @search_service_stub = ::Gapic::ServiceStub.new(
166
159
  ::Google::Cloud::Retail::V2::SearchService::Stub,
167
160
  credentials: credentials,
@@ -172,6 +165,13 @@ module Google
172
165
  interceptors: @config.interceptors,
173
166
  channel_pool_config: @config.channel_pool
174
167
  )
168
+
169
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
170
+ config.credentials = credentials
171
+ config.quota_project = @quota_project_id
172
+ config.endpoint = @search_service_stub.endpoint
173
+ config.universe_domain = @search_service_stub.universe_domain
174
+ end
175
175
  end
176
176
 
177
177
  ##
@@ -152,19 +152,19 @@ 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::Rest::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
  @search_service_stub = ::Google::Cloud::Retail::V2::SearchService::Rest::ServiceStub.new(
163
156
  endpoint: @config.endpoint,
164
157
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
165
158
  universe_domain: @config.universe_domain,
166
159
  credentials: credentials
167
160
  )
161
+
162
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
163
+ config.credentials = credentials
164
+ config.quota_project = @quota_project_id
165
+ config.endpoint = @search_service_stub.endpoint
166
+ config.universe_domain = @search_service_stub.universe_domain
167
+ end
168
168
  end
169
169
 
170
170
  ##
@@ -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 search REST call
57
66
  #
@@ -147,13 +147,6 @@ module Google
147
147
  @quota_project_id = @config.quota_project
148
148
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
149
149
 
150
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
151
- config.credentials = credentials
152
- config.quota_project = @quota_project_id
153
- config.endpoint = @config.endpoint
154
- config.universe_domain = @config.universe_domain
155
- end
156
-
157
150
  @serving_config_service_stub = ::Gapic::ServiceStub.new(
158
151
  ::Google::Cloud::Retail::V2::ServingConfigService::Stub,
159
152
  credentials: credentials,
@@ -164,6 +157,13 @@ module Google
164
157
  interceptors: @config.interceptors,
165
158
  channel_pool_config: @config.channel_pool
166
159
  )
160
+
161
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
162
+ config.credentials = credentials
163
+ config.quota_project = @quota_project_id
164
+ config.endpoint = @serving_config_service_stub.endpoint
165
+ config.universe_domain = @serving_config_service_stub.universe_domain
166
+ end
167
167
  end
168
168
 
169
169
  ##
@@ -144,19 +144,19 @@ module Google
144
144
  @quota_project_id = @config.quota_project
145
145
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
146
146
 
147
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
148
- config.credentials = credentials
149
- config.quota_project = @quota_project_id
150
- config.endpoint = @config.endpoint
151
- config.universe_domain = @config.universe_domain
152
- end
153
-
154
147
  @serving_config_service_stub = ::Google::Cloud::Retail::V2::ServingConfigService::Rest::ServiceStub.new(
155
148
  endpoint: @config.endpoint,
156
149
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
157
150
  universe_domain: @config.universe_domain,
158
151
  credentials: credentials
159
152
  )
153
+
154
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
155
+ config.credentials = credentials
156
+ config.quota_project = @quota_project_id
157
+ config.endpoint = @serving_config_service_stub.endpoint
158
+ config.universe_domain = @serving_config_service_stub.universe_domain
159
+ end
160
160
  end
161
161
 
162
162
  ##
@@ -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_serving_config REST call
57
66
  #
@@ -169,13 +169,6 @@ module Google
169
169
  config.universe_domain = @config.universe_domain
170
170
  end
171
171
 
172
- @location_client = Google::Cloud::Location::Locations::Client.new do |config|
173
- config.credentials = credentials
174
- config.quota_project = @quota_project_id
175
- config.endpoint = @config.endpoint
176
- config.universe_domain = @config.universe_domain
177
- end
178
-
179
172
  @user_event_service_stub = ::Gapic::ServiceStub.new(
180
173
  ::Google::Cloud::Retail::V2::UserEventService::Stub,
181
174
  credentials: credentials,
@@ -186,6 +179,13 @@ module Google
186
179
  interceptors: @config.interceptors,
187
180
  channel_pool_config: @config.channel_pool
188
181
  )
182
+
183
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
184
+ config.credentials = credentials
185
+ config.quota_project = @quota_project_id
186
+ config.endpoint = @user_event_service_stub.endpoint
187
+ config.universe_domain = @user_event_service_stub.universe_domain
188
+ end
189
189
  end
190
190
 
191
191
  ##
@@ -166,19 +166,19 @@ module Google
166
166
  config.universe_domain = @config.universe_domain
167
167
  end
168
168
 
169
- @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
170
- config.credentials = credentials
171
- config.quota_project = @quota_project_id
172
- config.endpoint = @config.endpoint
173
- config.universe_domain = @config.universe_domain
174
- end
175
-
176
169
  @user_event_service_stub = ::Google::Cloud::Retail::V2::UserEventService::Rest::ServiceStub.new(
177
170
  endpoint: @config.endpoint,
178
171
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
179
172
  universe_domain: @config.universe_domain,
180
173
  credentials: credentials
181
174
  )
175
+
176
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
177
+ config.credentials = credentials
178
+ config.quota_project = @quota_project_id
179
+ config.endpoint = @user_event_service_stub.endpoint
180
+ config.universe_domain = @user_event_service_stub.universe_domain
181
+ end
182
182
  end
183
183
 
184
184
  ##
@@ -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 write_user_event REST call
57
66
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
- VERSION = "0.18.0"
24
+ VERSION = "0.18.1"
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-retail-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-11 00:00:00.000000000 Z
11
+ date: 2024-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common