google-cloud-discovery_engine-v1beta 0.12.0 → 0.14.0

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