google-cloud-discovery_engine-v1beta 0.7.2 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +235 -4
  4. data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +801 -0
  5. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +221 -4
  6. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +1077 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/service_stub.rb +136 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest.rb +1 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/completion_service.rb +1 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +20 -3
  11. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +91 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +20 -3
  13. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +45 -0
  14. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +925 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/credentials.rb +47 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +801 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/paths.rb +97 -0
  18. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +864 -0
  19. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +1077 -0
  20. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/service_stub.rb +403 -0
  21. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest.rb +54 -0
  22. data/lib/google/cloud/discovery_engine/v1beta/data_store_service.rb +57 -0
  23. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +14 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +887 -0
  25. data/lib/google/cloud/discovery_engine/v1beta/engine_service/credentials.rb +47 -0
  26. data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +801 -0
  27. data/lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb +73 -0
  28. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +826 -0
  29. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +1077 -0
  30. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +366 -0
  31. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest.rb +54 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/engine_service.rb +57 -0
  33. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +22 -3
  34. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +19 -0
  35. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +22 -3
  36. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/service_stub.rb +8 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +4 -0
  38. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +14 -0
  39. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +48 -10
  40. data/lib/google/cloud/discovery_engine/v1beta/search_service/paths.rb +19 -0
  41. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +48 -10
  42. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/service_stub.rb +8 -0
  43. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +646 -0
  44. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/credentials.rb +47 -0
  45. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/paths.rb +146 -0
  46. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +599 -0
  47. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/service_stub.rb +291 -0
  48. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest.rb +52 -0
  49. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service.rb +55 -0
  50. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +1635 -0
  51. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/credentials.rb +47 -0
  52. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +801 -0
  53. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/paths.rb +127 -0
  54. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +1525 -0
  55. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +1077 -0
  56. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/service_stub.rb +860 -0
  57. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest.rb +53 -0
  58. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service.rb +56 -0
  59. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +14 -0
  60. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  61. data/lib/google/cloud/discovery_engine/v1beta.rb +4 -0
  62. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +6 -1
  63. data/lib/google/cloud/discoveryengine/v1beta/completion_pb.rb +45 -0
  64. data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +4 -1
  65. data/lib/google/cloud/discoveryengine/v1beta/completion_service_services_pb.rb +8 -0
  66. data/lib/google/cloud/discoveryengine/v1beta/conversation_pb.rb +1 -1
  67. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +1 -1
  68. data/lib/google/cloud/discoveryengine/v1beta/data_store_pb.rb +49 -0
  69. data/lib/google/cloud/discoveryengine/v1beta/data_store_service_pb.rb +62 -0
  70. data/lib/google/cloud/discoveryengine/v1beta/data_store_service_services_pb.rb +61 -0
  71. data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +1 -1
  72. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +1 -1
  73. data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +53 -0
  74. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +62 -0
  75. data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +55 -0
  76. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +7 -1
  77. data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +6 -1
  78. data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_pb.rb +1 -1
  79. data/lib/google/cloud/discoveryengine/v1beta/schema_pb.rb +1 -1
  80. data/lib/google/cloud/discoveryengine/v1beta/schema_service_pb.rb +1 -1
  81. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +8 -1
  82. data/lib/google/cloud/discoveryengine/v1beta/serving_config_pb.rb +53 -0
  83. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_pb.rb +54 -0
  84. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_services_pb.rb +53 -0
  85. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +54 -0
  86. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_pb.rb +82 -0
  87. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_services_pb.rb +74 -0
  88. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
  89. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +1 -1
  90. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +60 -0
  91. data/proto_docs/google/cloud/discoveryengine/v1beta/completion.rb +53 -0
  92. data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +10 -4
  93. data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +2 -0
  94. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +19 -1
  95. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store.rb +88 -0
  96. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store_service.rb +216 -0
  97. data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +1 -1
  98. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +219 -0
  99. data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +179 -0
  100. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +66 -0
  101. data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +41 -0
  102. data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +22 -3
  103. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +166 -15
  104. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config.rb +247 -0
  105. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config_service.rb +85 -0
  106. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +160 -0
  107. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine_service.rb +528 -0
  108. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +4 -3
  109. metadata +62 -116
@@ -0,0 +1,864 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/discoveryengine/v1beta/data_store_service_pb"
21
+ require "google/cloud/discovery_engine/v1beta/data_store_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module DiscoveryEngine
27
+ module V1beta
28
+ module DataStoreService
29
+ module Rest
30
+ ##
31
+ # REST client for the DataStoreService service.
32
+ #
33
+ # Service for managing
34
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore} configuration.
35
+ #
36
+ class Client
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
39
+
40
+ include Paths
41
+
42
+ # @private
43
+ attr_reader :data_store_service_stub
44
+
45
+ ##
46
+ # Configure the DataStoreService Client class.
47
+ #
48
+ # See {::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all DataStoreService clients
54
+ # ::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Cloud", "DiscoveryEngine", "V1beta"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config
75
+ end
76
+ yield @configure if block_given?
77
+ @configure
78
+ end
79
+
80
+ ##
81
+ # Configure the DataStoreService Client instance.
82
+ #
83
+ # The configuration is set to the derived mode, meaning that values can be changed,
84
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
85
+ # should be made on {Client.configure}.
86
+ #
87
+ # See {::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client::Configuration}
88
+ # for a description of the configuration fields.
89
+ #
90
+ # @yield [config] Configure the Client client.
91
+ # @yieldparam config [Client::Configuration]
92
+ #
93
+ # @return [Client::Configuration]
94
+ #
95
+ def configure
96
+ yield @config if block_given?
97
+ @config
98
+ end
99
+
100
+ ##
101
+ # The effective universe domain
102
+ #
103
+ # @return [String]
104
+ #
105
+ def universe_domain
106
+ @data_store_service_stub.universe_domain
107
+ end
108
+
109
+ ##
110
+ # Create a new DataStoreService REST client object.
111
+ #
112
+ # @example
113
+ #
114
+ # # Create a client using the default configuration
115
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client.new
116
+ #
117
+ # # Create a client using a custom configuration
118
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client.new do |config|
119
+ # config.timeout = 10.0
120
+ # end
121
+ #
122
+ # @yield [config] Configure the DataStoreService client.
123
+ # @yieldparam config [Client::Configuration]
124
+ #
125
+ def initialize
126
+ # Create the configuration object
127
+ @config = Configuration.new Client.configure
128
+
129
+ # Yield the configuration if needed
130
+ yield @config if block_given?
131
+
132
+ # Create credentials
133
+ credentials = @config.credentials
134
+ # Use self-signed JWT if the endpoint is unchanged from default,
135
+ # but only if the default endpoint does not have a region prefix.
136
+ enable_self_signed_jwt = @config.endpoint.nil? ||
137
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
138
+ !@config.endpoint.split(".").first.include?("-"))
139
+ credentials ||= Credentials.default scope: @config.scope,
140
+ enable_self_signed_jwt: enable_self_signed_jwt
141
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
142
+ credentials = Credentials.new credentials, scope: @config.scope
143
+ end
144
+
145
+ @quota_project_id = @config.quota_project
146
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
147
+
148
+ @operations_client = ::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Operations.new do |config|
149
+ config.credentials = credentials
150
+ config.quota_project = @quota_project_id
151
+ config.endpoint = @config.endpoint
152
+ config.universe_domain = @config.universe_domain
153
+ end
154
+
155
+ @data_store_service_stub = ::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::ServiceStub.new(
156
+ endpoint: @config.endpoint,
157
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
158
+ universe_domain: @config.universe_domain,
159
+ credentials: credentials
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 = @data_store_service_stub.endpoint
166
+ config.universe_domain = @data_store_service_stub.universe_domain
167
+ end
168
+ end
169
+
170
+ ##
171
+ # Get the associated client for long-running operations.
172
+ #
173
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Operations]
174
+ #
175
+ attr_reader :operations_client
176
+
177
+ ##
178
+ # Get the associated client for mix-in of the Locations.
179
+ #
180
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
181
+ #
182
+ attr_reader :location_client
183
+
184
+ # Service calls
185
+
186
+ ##
187
+ # Creates a {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}.
188
+ #
189
+ # DataStore is for storing
190
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Documents}. To serve these
191
+ # documents for Search, or Recommendation use case, an
192
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Engine Engine} needs to be created
193
+ # separately.
194
+ #
195
+ # @overload create_data_store(request, options = nil)
196
+ # Pass arguments to `create_data_store` via a request object, either of type
197
+ # {::Google::Cloud::DiscoveryEngine::V1beta::CreateDataStoreRequest} or an equivalent Hash.
198
+ #
199
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::CreateDataStoreRequest, ::Hash]
200
+ # A request object representing the call parameters. Required. To specify no
201
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
202
+ # @param options [::Gapic::CallOptions, ::Hash]
203
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
204
+ #
205
+ # @overload create_data_store(parent: nil, data_store: nil, data_store_id: nil, create_advanced_site_search: nil)
206
+ # Pass arguments to `create_data_store` via keyword arguments. Note that at
207
+ # least one keyword argument is required. To specify no parameters, or to keep all
208
+ # the default parameter values, pass an empty Hash as a request object (see above).
209
+ #
210
+ # @param parent [::String]
211
+ # Required. The parent resource name, such as
212
+ # `projects/{project}/locations/{location}/collections/{collection}`.
213
+ # @param data_store [::Google::Cloud::DiscoveryEngine::V1beta::DataStore, ::Hash]
214
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore} to
215
+ # create.
216
+ # @param data_store_id [::String]
217
+ # Required. The ID to use for the
218
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}, which will
219
+ # become the final component of the
220
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}'s resource name.
221
+ #
222
+ # This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
223
+ # standard with a length limit of 63 characters. Otherwise, an
224
+ # INVALID_ARGUMENT error is returned.
225
+ # @param create_advanced_site_search [::Boolean]
226
+ # A boolean flag indicating whether user want to directly create an advanced
227
+ # data store for site search.
228
+ # If the data store is not configured as site
229
+ # search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will
230
+ # be ignored.
231
+ # @yield [result, operation] Access the result along with the TransportOperation object
232
+ # @yieldparam result [::Gapic::Operation]
233
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
234
+ #
235
+ # @return [::Gapic::Operation]
236
+ #
237
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
238
+ #
239
+ # @example Basic example
240
+ # require "google/cloud/discovery_engine/v1beta"
241
+ #
242
+ # # Create a client object. The client can be reused for multiple calls.
243
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client.new
244
+ #
245
+ # # Create a request. To set request fields, pass in keyword arguments.
246
+ # request = Google::Cloud::DiscoveryEngine::V1beta::CreateDataStoreRequest.new
247
+ #
248
+ # # Call the create_data_store method.
249
+ # result = client.create_data_store request
250
+ #
251
+ # # The returned object is of type Gapic::Operation. You can use it to
252
+ # # check the status of an operation, cancel it, or wait for results.
253
+ # # Here is how to wait for a response.
254
+ # result.wait_until_done! timeout: 60
255
+ # if result.response?
256
+ # p result.response
257
+ # else
258
+ # puts "No response received."
259
+ # end
260
+ #
261
+ def create_data_store request, options = nil
262
+ raise ::ArgumentError, "request must be provided" if request.nil?
263
+
264
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::CreateDataStoreRequest
265
+
266
+ # Converts hash and nil to an options object
267
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
268
+
269
+ # Customize the options with defaults
270
+ call_metadata = @config.rpcs.create_data_store.metadata.to_h
271
+
272
+ # Set x-goog-api-client and x-goog-user-project headers
273
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
274
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
275
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
276
+ transports_version_send: [:rest]
277
+
278
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
279
+
280
+ options.apply_defaults timeout: @config.rpcs.create_data_store.timeout,
281
+ metadata: call_metadata,
282
+ retry_policy: @config.rpcs.create_data_store.retry_policy
283
+
284
+ options.apply_defaults timeout: @config.timeout,
285
+ metadata: @config.metadata,
286
+ retry_policy: @config.retry_policy
287
+
288
+ @data_store_service_stub.create_data_store request, options do |result, operation|
289
+ result = ::Gapic::Operation.new result, @operations_client, options: options
290
+ yield result, operation if block_given?
291
+ return result
292
+ end
293
+ rescue ::Gapic::Rest::Error => e
294
+ raise ::Google::Cloud::Error.from_error(e)
295
+ end
296
+
297
+ ##
298
+ # Gets a {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}.
299
+ #
300
+ # @overload get_data_store(request, options = nil)
301
+ # Pass arguments to `get_data_store` via a request object, either of type
302
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GetDataStoreRequest} or an equivalent Hash.
303
+ #
304
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::GetDataStoreRequest, ::Hash]
305
+ # A request object representing the call parameters. Required. To specify no
306
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
307
+ # @param options [::Gapic::CallOptions, ::Hash]
308
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
309
+ #
310
+ # @overload get_data_store(name: nil)
311
+ # Pass arguments to `get_data_store` via keyword arguments. Note that at
312
+ # least one keyword argument is required. To specify no parameters, or to keep all
313
+ # the default parameter values, pass an empty Hash as a request object (see above).
314
+ #
315
+ # @param name [::String]
316
+ # Required. Full resource name of
317
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}, such as
318
+ # `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
319
+ #
320
+ # If the caller does not have permission to access the
321
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}, regardless of
322
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
323
+ #
324
+ # If the requested {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}
325
+ # does not exist, a NOT_FOUND error is returned.
326
+ # @yield [result, operation] Access the result along with the TransportOperation object
327
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::DataStore]
328
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
329
+ #
330
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::DataStore]
331
+ #
332
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
333
+ #
334
+ # @example Basic example
335
+ # require "google/cloud/discovery_engine/v1beta"
336
+ #
337
+ # # Create a client object. The client can be reused for multiple calls.
338
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client.new
339
+ #
340
+ # # Create a request. To set request fields, pass in keyword arguments.
341
+ # request = Google::Cloud::DiscoveryEngine::V1beta::GetDataStoreRequest.new
342
+ #
343
+ # # Call the get_data_store method.
344
+ # result = client.get_data_store request
345
+ #
346
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::DataStore.
347
+ # p result
348
+ #
349
+ def get_data_store request, options = nil
350
+ raise ::ArgumentError, "request must be provided" if request.nil?
351
+
352
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::GetDataStoreRequest
353
+
354
+ # Converts hash and nil to an options object
355
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
356
+
357
+ # Customize the options with defaults
358
+ call_metadata = @config.rpcs.get_data_store.metadata.to_h
359
+
360
+ # Set x-goog-api-client and x-goog-user-project headers
361
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
362
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
363
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
364
+ transports_version_send: [:rest]
365
+
366
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
367
+
368
+ options.apply_defaults timeout: @config.rpcs.get_data_store.timeout,
369
+ metadata: call_metadata,
370
+ retry_policy: @config.rpcs.get_data_store.retry_policy
371
+
372
+ options.apply_defaults timeout: @config.timeout,
373
+ metadata: @config.metadata,
374
+ retry_policy: @config.retry_policy
375
+
376
+ @data_store_service_stub.get_data_store request, options do |result, operation|
377
+ yield result, operation if block_given?
378
+ return result
379
+ end
380
+ rescue ::Gapic::Rest::Error => e
381
+ raise ::Google::Cloud::Error.from_error(e)
382
+ end
383
+
384
+ ##
385
+ # Lists all the {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}s
386
+ # associated with the project.
387
+ #
388
+ # @overload list_data_stores(request, options = nil)
389
+ # Pass arguments to `list_data_stores` via a request object, either of type
390
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListDataStoresRequest} or an equivalent Hash.
391
+ #
392
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::ListDataStoresRequest, ::Hash]
393
+ # A request object representing the call parameters. Required. To specify no
394
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
395
+ # @param options [::Gapic::CallOptions, ::Hash]
396
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
397
+ #
398
+ # @overload list_data_stores(parent: nil, page_size: nil, page_token: nil, filter: nil)
399
+ # Pass arguments to `list_data_stores` via keyword arguments. Note that at
400
+ # least one keyword argument is required. To specify no parameters, or to keep all
401
+ # the default parameter values, pass an empty Hash as a request object (see above).
402
+ #
403
+ # @param parent [::String]
404
+ # Required. The parent branch resource name, such as
405
+ # `projects/{project}/locations/{location}/collections/{collection_id}`.
406
+ #
407
+ # If the caller does not have permission to list
408
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}s under this
409
+ # location, regardless of whether or not this data store exists, a
410
+ # PERMISSION_DENIED error is returned.
411
+ # @param page_size [::Integer]
412
+ # Maximum number of
413
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}s to return. If
414
+ # unspecified, defaults to 10. The maximum allowed value is 50. Values above
415
+ # 50 will be coerced to 50.
416
+ #
417
+ # If this field is negative, an INVALID_ARGUMENT is returned.
418
+ # @param page_token [::String]
419
+ # A page token
420
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListDataStoresResponse#next_page_token ListDataStoresResponse.next_page_token},
421
+ # received from a previous
422
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client#list_data_stores DataStoreService.ListDataStores}
423
+ # call. Provide this to retrieve the subsequent page.
424
+ #
425
+ # When paginating, all other parameters provided to
426
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client#list_data_stores DataStoreService.ListDataStores}
427
+ # must match the call that provided the page token. Otherwise, an
428
+ # INVALID_ARGUMENT error is returned.
429
+ # @param filter [::String]
430
+ # Filter by solution type. For example: filter =
431
+ # 'solution_type:SOLUTION_TYPE_SEARCH'
432
+ # @yield [result, operation] Access the result along with the TransportOperation object
433
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::DataStore>]
434
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
435
+ #
436
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::DataStore>]
437
+ #
438
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
439
+ #
440
+ # @example Basic example
441
+ # require "google/cloud/discovery_engine/v1beta"
442
+ #
443
+ # # Create a client object. The client can be reused for multiple calls.
444
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client.new
445
+ #
446
+ # # Create a request. To set request fields, pass in keyword arguments.
447
+ # request = Google::Cloud::DiscoveryEngine::V1beta::ListDataStoresRequest.new
448
+ #
449
+ # # Call the list_data_stores method.
450
+ # result = client.list_data_stores request
451
+ #
452
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
453
+ # # over elements, and API calls will be issued to fetch pages as needed.
454
+ # result.each do |item|
455
+ # # Each element is of type ::Google::Cloud::DiscoveryEngine::V1beta::DataStore.
456
+ # p item
457
+ # end
458
+ #
459
+ def list_data_stores request, options = nil
460
+ raise ::ArgumentError, "request must be provided" if request.nil?
461
+
462
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::ListDataStoresRequest
463
+
464
+ # Converts hash and nil to an options object
465
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
466
+
467
+ # Customize the options with defaults
468
+ call_metadata = @config.rpcs.list_data_stores.metadata.to_h
469
+
470
+ # Set x-goog-api-client and x-goog-user-project headers
471
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
472
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
473
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
474
+ transports_version_send: [:rest]
475
+
476
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
477
+
478
+ options.apply_defaults timeout: @config.rpcs.list_data_stores.timeout,
479
+ metadata: call_metadata,
480
+ retry_policy: @config.rpcs.list_data_stores.retry_policy
481
+
482
+ options.apply_defaults timeout: @config.timeout,
483
+ metadata: @config.metadata,
484
+ retry_policy: @config.retry_policy
485
+
486
+ @data_store_service_stub.list_data_stores request, options do |result, operation|
487
+ result = ::Gapic::Rest::PagedEnumerable.new @data_store_service_stub, :list_data_stores, "data_stores", request, result, options
488
+ yield result, operation if block_given?
489
+ return result
490
+ end
491
+ rescue ::Gapic::Rest::Error => e
492
+ raise ::Google::Cloud::Error.from_error(e)
493
+ end
494
+
495
+ ##
496
+ # Deletes a {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}.
497
+ #
498
+ # @overload delete_data_store(request, options = nil)
499
+ # Pass arguments to `delete_data_store` via a request object, either of type
500
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DeleteDataStoreRequest} or an equivalent Hash.
501
+ #
502
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::DeleteDataStoreRequest, ::Hash]
503
+ # A request object representing the call parameters. Required. To specify no
504
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
505
+ # @param options [::Gapic::CallOptions, ::Hash]
506
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
507
+ #
508
+ # @overload delete_data_store(name: nil)
509
+ # Pass arguments to `delete_data_store` via keyword arguments. Note that at
510
+ # least one keyword argument is required. To specify no parameters, or to keep all
511
+ # the default parameter values, pass an empty Hash as a request object (see above).
512
+ #
513
+ # @param name [::String]
514
+ # Required. Full resource name of
515
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}, such as
516
+ # `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
517
+ #
518
+ # If the caller does not have permission to delete the
519
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}, regardless of
520
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
521
+ #
522
+ # If the {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore} to delete
523
+ # does not exist, a NOT_FOUND error is returned.
524
+ # @yield [result, operation] Access the result along with the TransportOperation object
525
+ # @yieldparam result [::Gapic::Operation]
526
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
527
+ #
528
+ # @return [::Gapic::Operation]
529
+ #
530
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
531
+ #
532
+ # @example Basic example
533
+ # require "google/cloud/discovery_engine/v1beta"
534
+ #
535
+ # # Create a client object. The client can be reused for multiple calls.
536
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client.new
537
+ #
538
+ # # Create a request. To set request fields, pass in keyword arguments.
539
+ # request = Google::Cloud::DiscoveryEngine::V1beta::DeleteDataStoreRequest.new
540
+ #
541
+ # # Call the delete_data_store method.
542
+ # result = client.delete_data_store request
543
+ #
544
+ # # The returned object is of type Gapic::Operation. You can use it to
545
+ # # check the status of an operation, cancel it, or wait for results.
546
+ # # Here is how to wait for a response.
547
+ # result.wait_until_done! timeout: 60
548
+ # if result.response?
549
+ # p result.response
550
+ # else
551
+ # puts "No response received."
552
+ # end
553
+ #
554
+ def delete_data_store request, options = nil
555
+ raise ::ArgumentError, "request must be provided" if request.nil?
556
+
557
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::DeleteDataStoreRequest
558
+
559
+ # Converts hash and nil to an options object
560
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
561
+
562
+ # Customize the options with defaults
563
+ call_metadata = @config.rpcs.delete_data_store.metadata.to_h
564
+
565
+ # Set x-goog-api-client and x-goog-user-project headers
566
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
567
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
568
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
569
+ transports_version_send: [:rest]
570
+
571
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
572
+
573
+ options.apply_defaults timeout: @config.rpcs.delete_data_store.timeout,
574
+ metadata: call_metadata,
575
+ retry_policy: @config.rpcs.delete_data_store.retry_policy
576
+
577
+ options.apply_defaults timeout: @config.timeout,
578
+ metadata: @config.metadata,
579
+ retry_policy: @config.retry_policy
580
+
581
+ @data_store_service_stub.delete_data_store request, options do |result, operation|
582
+ result = ::Gapic::Operation.new result, @operations_client, options: options
583
+ yield result, operation if block_given?
584
+ return result
585
+ end
586
+ rescue ::Gapic::Rest::Error => e
587
+ raise ::Google::Cloud::Error.from_error(e)
588
+ end
589
+
590
+ ##
591
+ # Updates a {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}
592
+ #
593
+ # @overload update_data_store(request, options = nil)
594
+ # Pass arguments to `update_data_store` via a request object, either of type
595
+ # {::Google::Cloud::DiscoveryEngine::V1beta::UpdateDataStoreRequest} or an equivalent Hash.
596
+ #
597
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::UpdateDataStoreRequest, ::Hash]
598
+ # A request object representing the call parameters. Required. To specify no
599
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
600
+ # @param options [::Gapic::CallOptions, ::Hash]
601
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
602
+ #
603
+ # @overload update_data_store(data_store: nil, update_mask: nil)
604
+ # Pass arguments to `update_data_store` via keyword arguments. Note that at
605
+ # least one keyword argument is required. To specify no parameters, or to keep all
606
+ # the default parameter values, pass an empty Hash as a request object (see above).
607
+ #
608
+ # @param data_store [::Google::Cloud::DiscoveryEngine::V1beta::DataStore, ::Hash]
609
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore} to
610
+ # update.
611
+ #
612
+ # If the caller does not have permission to update the
613
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}, regardless of
614
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
615
+ #
616
+ # If the {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore} to update
617
+ # does not exist, a NOT_FOUND error is returned.
618
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
619
+ # Indicates which fields in the provided
620
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore} to update.
621
+ #
622
+ # If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
623
+ # is returned.
624
+ # @yield [result, operation] Access the result along with the TransportOperation object
625
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::DataStore]
626
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
627
+ #
628
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::DataStore]
629
+ #
630
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
631
+ #
632
+ # @example Basic example
633
+ # require "google/cloud/discovery_engine/v1beta"
634
+ #
635
+ # # Create a client object. The client can be reused for multiple calls.
636
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client.new
637
+ #
638
+ # # Create a request. To set request fields, pass in keyword arguments.
639
+ # request = Google::Cloud::DiscoveryEngine::V1beta::UpdateDataStoreRequest.new
640
+ #
641
+ # # Call the update_data_store method.
642
+ # result = client.update_data_store request
643
+ #
644
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::DataStore.
645
+ # p result
646
+ #
647
+ def update_data_store request, options = nil
648
+ raise ::ArgumentError, "request must be provided" if request.nil?
649
+
650
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::UpdateDataStoreRequest
651
+
652
+ # Converts hash and nil to an options object
653
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
654
+
655
+ # Customize the options with defaults
656
+ call_metadata = @config.rpcs.update_data_store.metadata.to_h
657
+
658
+ # Set x-goog-api-client and x-goog-user-project headers
659
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
660
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
661
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
662
+ transports_version_send: [:rest]
663
+
664
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
665
+
666
+ options.apply_defaults timeout: @config.rpcs.update_data_store.timeout,
667
+ metadata: call_metadata,
668
+ retry_policy: @config.rpcs.update_data_store.retry_policy
669
+
670
+ options.apply_defaults timeout: @config.timeout,
671
+ metadata: @config.metadata,
672
+ retry_policy: @config.retry_policy
673
+
674
+ @data_store_service_stub.update_data_store request, options do |result, operation|
675
+ yield result, operation if block_given?
676
+ return result
677
+ end
678
+ rescue ::Gapic::Rest::Error => e
679
+ raise ::Google::Cloud::Error.from_error(e)
680
+ end
681
+
682
+ ##
683
+ # Configuration class for the DataStoreService REST API.
684
+ #
685
+ # This class represents the configuration for DataStoreService REST,
686
+ # providing control over timeouts, retry behavior, logging, transport
687
+ # parameters, and other low-level controls. Certain parameters can also be
688
+ # applied individually to specific RPCs. See
689
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client::Configuration::Rpcs}
690
+ # for a list of RPCs that can be configured independently.
691
+ #
692
+ # Configuration can be applied globally to all clients, or to a single client
693
+ # on construction.
694
+ #
695
+ # @example
696
+ #
697
+ # # Modify the global config, setting the timeout for
698
+ # # create_data_store to 20 seconds,
699
+ # # and all remaining timeouts to 10 seconds.
700
+ # ::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client.configure do |config|
701
+ # config.timeout = 10.0
702
+ # config.rpcs.create_data_store.timeout = 20.0
703
+ # end
704
+ #
705
+ # # Apply the above configuration only to a new client.
706
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::DataStoreService::Rest::Client.new do |config|
707
+ # config.timeout = 10.0
708
+ # config.rpcs.create_data_store.timeout = 20.0
709
+ # end
710
+ #
711
+ # @!attribute [rw] endpoint
712
+ # A custom service endpoint, as a hostname or hostname:port. The default is
713
+ # nil, indicating to use the default endpoint in the current universe domain.
714
+ # @return [::String,nil]
715
+ # @!attribute [rw] credentials
716
+ # Credentials to send with calls. You may provide any of the following types:
717
+ # * (`String`) The path to a service account key file in JSON format
718
+ # * (`Hash`) A service account key as a Hash
719
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
720
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
721
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
722
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
723
+ # * (`nil`) indicating no credentials
724
+ # @return [::Object]
725
+ # @!attribute [rw] scope
726
+ # The OAuth scopes
727
+ # @return [::Array<::String>]
728
+ # @!attribute [rw] lib_name
729
+ # The library name as recorded in instrumentation and logging
730
+ # @return [::String]
731
+ # @!attribute [rw] lib_version
732
+ # The library version as recorded in instrumentation and logging
733
+ # @return [::String]
734
+ # @!attribute [rw] timeout
735
+ # The call timeout in seconds.
736
+ # @return [::Numeric]
737
+ # @!attribute [rw] metadata
738
+ # Additional headers to be sent with the call.
739
+ # @return [::Hash{::Symbol=>::String}]
740
+ # @!attribute [rw] retry_policy
741
+ # The retry policy. The value is a hash with the following keys:
742
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
743
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
744
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
745
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
746
+ # trigger a retry.
747
+ # @return [::Hash]
748
+ # @!attribute [rw] quota_project
749
+ # A separate project against which to charge quota.
750
+ # @return [::String]
751
+ # @!attribute [rw] universe_domain
752
+ # The universe domain within which to make requests. This determines the
753
+ # default endpoint URL. The default value of nil uses the environment
754
+ # universe (usually the default "googleapis.com" universe).
755
+ # @return [::String,nil]
756
+ #
757
+ class Configuration
758
+ extend ::Gapic::Config
759
+
760
+ # @private
761
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
762
+ DEFAULT_ENDPOINT = "discoveryengine.googleapis.com"
763
+
764
+ config_attr :endpoint, nil, ::String, nil
765
+ config_attr :credentials, nil do |value|
766
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
767
+ allowed.any? { |klass| klass === value }
768
+ end
769
+ config_attr :scope, nil, ::String, ::Array, nil
770
+ config_attr :lib_name, nil, ::String, nil
771
+ config_attr :lib_version, nil, ::String, nil
772
+ config_attr :timeout, nil, ::Numeric, nil
773
+ config_attr :metadata, nil, ::Hash, nil
774
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
775
+ config_attr :quota_project, nil, ::String, nil
776
+ config_attr :universe_domain, nil, ::String, nil
777
+
778
+ # @private
779
+ def initialize parent_config = nil
780
+ @parent_config = parent_config unless parent_config.nil?
781
+
782
+ yield self if block_given?
783
+ end
784
+
785
+ ##
786
+ # Configurations for individual RPCs
787
+ # @return [Rpcs]
788
+ #
789
+ def rpcs
790
+ @rpcs ||= begin
791
+ parent_rpcs = nil
792
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
793
+ Rpcs.new parent_rpcs
794
+ end
795
+ end
796
+
797
+ ##
798
+ # Configuration RPC class for the DataStoreService API.
799
+ #
800
+ # Includes fields providing the configuration for each RPC in this service.
801
+ # Each configuration object is of type `Gapic::Config::Method` and includes
802
+ # the following configuration fields:
803
+ #
804
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
805
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
806
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
807
+ # include the following keys:
808
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
809
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
810
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
811
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
812
+ # trigger a retry.
813
+ #
814
+ class Rpcs
815
+ ##
816
+ # RPC-specific configuration for `create_data_store`
817
+ # @return [::Gapic::Config::Method]
818
+ #
819
+ attr_reader :create_data_store
820
+ ##
821
+ # RPC-specific configuration for `get_data_store`
822
+ # @return [::Gapic::Config::Method]
823
+ #
824
+ attr_reader :get_data_store
825
+ ##
826
+ # RPC-specific configuration for `list_data_stores`
827
+ # @return [::Gapic::Config::Method]
828
+ #
829
+ attr_reader :list_data_stores
830
+ ##
831
+ # RPC-specific configuration for `delete_data_store`
832
+ # @return [::Gapic::Config::Method]
833
+ #
834
+ attr_reader :delete_data_store
835
+ ##
836
+ # RPC-specific configuration for `update_data_store`
837
+ # @return [::Gapic::Config::Method]
838
+ #
839
+ attr_reader :update_data_store
840
+
841
+ # @private
842
+ def initialize parent_rpcs = nil
843
+ create_data_store_config = parent_rpcs.create_data_store if parent_rpcs.respond_to? :create_data_store
844
+ @create_data_store = ::Gapic::Config::Method.new create_data_store_config
845
+ get_data_store_config = parent_rpcs.get_data_store if parent_rpcs.respond_to? :get_data_store
846
+ @get_data_store = ::Gapic::Config::Method.new get_data_store_config
847
+ list_data_stores_config = parent_rpcs.list_data_stores if parent_rpcs.respond_to? :list_data_stores
848
+ @list_data_stores = ::Gapic::Config::Method.new list_data_stores_config
849
+ delete_data_store_config = parent_rpcs.delete_data_store if parent_rpcs.respond_to? :delete_data_store
850
+ @delete_data_store = ::Gapic::Config::Method.new delete_data_store_config
851
+ update_data_store_config = parent_rpcs.update_data_store if parent_rpcs.respond_to? :update_data_store
852
+ @update_data_store = ::Gapic::Config::Method.new update_data_store_config
853
+
854
+ yield self if block_given?
855
+ end
856
+ end
857
+ end
858
+ end
859
+ end
860
+ end
861
+ end
862
+ end
863
+ end
864
+ end