google-cloud-discovery_engine-v1 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +4 -4
- data/README.md +4 -4
- data/lib/google/cloud/discovery_engine/v1/cmek_config_service/client.rb +803 -0
- data/lib/google/cloud/discovery_engine/v1/cmek_config_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/cmek_config_service/operations.rb +813 -0
- data/lib/google/cloud/discovery_engine/v1/cmek_config_service/paths.rb +135 -0
- data/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/client.rb +749 -0
- data/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/operations.rb +1148 -0
- data/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest/service_stub.rb +341 -0
- data/lib/google/cloud/discovery_engine/v1/cmek_config_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1/cmek_config_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +11 -1
- data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +104 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +11 -1
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/client.rb +1160 -0
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/operations.rb +813 -0
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/paths.rb +154 -0
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/client.rb +1085 -0
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/operations.rb +1148 -0
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest/service_stub.rb +511 -0
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1/identity_mapping_store_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -1
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/user_license_service/client.rb +630 -0
- data/lib/google/cloud/discovery_engine/v1/user_license_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/user_license_service/operations.rb +813 -0
- data/lib/google/cloud/discovery_engine/v1/user_license_service/paths.rb +71 -0
- data/lib/google/cloud/discovery_engine/v1/user_license_service/rest/client.rb +590 -0
- data/lib/google/cloud/discovery_engine/v1/user_license_service/rest/operations.rb +1148 -0
- data/lib/google/cloud/discovery_engine/v1/user_license_service/rest/service_stub.rb +204 -0
- data/lib/google/cloud/discovery_engine/v1/user_license_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1/user_license_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +5 -2
- data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/chunk_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1/cmek_config_service_pb.rb +61 -0
- data/lib/google/cloud/discoveryengine/v1/cmek_config_service_services_pb.rb +55 -0
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/document_pb.rb +5 -1
- data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +7 -1
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/identity_mapping_store_pb.rb +48 -0
- data/lib/google/cloud/discoveryengine/v1/identity_mapping_store_service_pb.rb +68 -0
- data/lib/google/cloud/discoveryengine/v1/identity_mapping_store_service_services_pb.rb +58 -0
- data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_license_pb.rb +48 -0
- data/lib/google/cloud/discoveryengine/v1/user_license_service_pb.rb +61 -0
- data/lib/google/cloud/discoveryengine/v1/user_license_service_services_pb.rb +48 -0
- data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +17 -0
- data/proto_docs/google/cloud/discoveryengine/v1/chunk.rb +54 -0
- data/proto_docs/google/cloud/discoveryengine/v1/cmek_config_service.rb +222 -0
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +55 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control.rb +1 -3
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +43 -1
- data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +12 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document.rb +99 -4
- data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +23 -0
- data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +141 -5
- data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +8 -0
- data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +9 -0
- data/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store.rb +81 -0
- data/proto_docs/google/cloud/discoveryengine/v1/identity_mapping_store_service.rb +279 -0
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +6 -0
- data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +6 -0
- data/proto_docs/google/cloud/discoveryengine/v1/user_license.rb +85 -0
- data/proto_docs/google/cloud/discoveryengine/v1/user_license_service.rb +153 -0
- metadata +42 -2
@@ -0,0 +1,803 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 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/v1/cmek_config_service_pb"
|
21
|
+
require "google/cloud/location"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module DiscoveryEngine
|
26
|
+
module V1
|
27
|
+
module CmekConfigService
|
28
|
+
##
|
29
|
+
# Client for the CmekConfigService service.
|
30
|
+
#
|
31
|
+
# Service for managing CMEK related tasks
|
32
|
+
#
|
33
|
+
class Client
|
34
|
+
# @private
|
35
|
+
API_VERSION = ""
|
36
|
+
|
37
|
+
# @private
|
38
|
+
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
39
|
+
|
40
|
+
include Paths
|
41
|
+
|
42
|
+
# @private
|
43
|
+
attr_reader :cmek_config_service_stub
|
44
|
+
|
45
|
+
##
|
46
|
+
# Configure the CmekConfigService Client class.
|
47
|
+
#
|
48
|
+
# See {::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client::Configuration}
|
49
|
+
# for a description of the configuration fields.
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
#
|
53
|
+
# # Modify the configuration for all CmekConfigService clients
|
54
|
+
# ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::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", "V1"]
|
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 CmekConfigService 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::V1::CmekConfigService::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
|
+
@cmek_config_service_stub.universe_domain
|
107
|
+
end
|
108
|
+
|
109
|
+
##
|
110
|
+
# Create a new CmekConfigService client object.
|
111
|
+
#
|
112
|
+
# @example
|
113
|
+
#
|
114
|
+
# # Create a client using the default configuration
|
115
|
+
# client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new
|
116
|
+
#
|
117
|
+
# # Create a client using a custom configuration
|
118
|
+
# client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config|
|
119
|
+
# config.timeout = 10.0
|
120
|
+
# end
|
121
|
+
#
|
122
|
+
# @yield [config] Configure the CmekConfigService client.
|
123
|
+
# @yieldparam config [Client::Configuration]
|
124
|
+
#
|
125
|
+
def initialize
|
126
|
+
# These require statements are intentionally placed here to initialize
|
127
|
+
# the gRPC module only when it's required.
|
128
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
129
|
+
require "gapic/grpc"
|
130
|
+
require "google/cloud/discoveryengine/v1/cmek_config_service_services_pb"
|
131
|
+
|
132
|
+
# Create the configuration object
|
133
|
+
@config = Configuration.new Client.configure
|
134
|
+
|
135
|
+
# Yield the configuration if needed
|
136
|
+
yield @config if block_given?
|
137
|
+
|
138
|
+
# Create credentials
|
139
|
+
credentials = @config.credentials
|
140
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
141
|
+
# but only if the default endpoint does not have a region prefix.
|
142
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
143
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
144
|
+
!@config.endpoint.split(".").first.include?("-"))
|
145
|
+
credentials ||= Credentials.default scope: @config.scope,
|
146
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
147
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
148
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
149
|
+
end
|
150
|
+
@quota_project_id = @config.quota_project
|
151
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
152
|
+
|
153
|
+
@operations_client = Operations.new do |config|
|
154
|
+
config.credentials = credentials
|
155
|
+
config.quota_project = @quota_project_id
|
156
|
+
config.endpoint = @config.endpoint
|
157
|
+
config.universe_domain = @config.universe_domain
|
158
|
+
end
|
159
|
+
|
160
|
+
@cmek_config_service_stub = ::Gapic::ServiceStub.new(
|
161
|
+
::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Stub,
|
162
|
+
credentials: credentials,
|
163
|
+
endpoint: @config.endpoint,
|
164
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
165
|
+
universe_domain: @config.universe_domain,
|
166
|
+
channel_args: @config.channel_args,
|
167
|
+
interceptors: @config.interceptors,
|
168
|
+
channel_pool_config: @config.channel_pool,
|
169
|
+
logger: @config.logger
|
170
|
+
)
|
171
|
+
|
172
|
+
@cmek_config_service_stub.stub_logger&.info do |entry|
|
173
|
+
entry.set_system_name
|
174
|
+
entry.set_service
|
175
|
+
entry.message = "Created client for #{entry.service}"
|
176
|
+
entry.set_credentials_fields credentials
|
177
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
178
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
179
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
180
|
+
end
|
181
|
+
|
182
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
183
|
+
config.credentials = credentials
|
184
|
+
config.quota_project = @quota_project_id
|
185
|
+
config.endpoint = @cmek_config_service_stub.endpoint
|
186
|
+
config.universe_domain = @cmek_config_service_stub.universe_domain
|
187
|
+
config.logger = @cmek_config_service_stub.logger if config.respond_to? :logger=
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
##
|
192
|
+
# Get the associated client for long-running operations.
|
193
|
+
#
|
194
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Operations]
|
195
|
+
#
|
196
|
+
attr_reader :operations_client
|
197
|
+
|
198
|
+
##
|
199
|
+
# Get the associated client for mix-in of the Locations.
|
200
|
+
#
|
201
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
202
|
+
#
|
203
|
+
attr_reader :location_client
|
204
|
+
|
205
|
+
##
|
206
|
+
# The logger used for request/response debug logging.
|
207
|
+
#
|
208
|
+
# @return [Logger]
|
209
|
+
#
|
210
|
+
def logger
|
211
|
+
@cmek_config_service_stub.logger
|
212
|
+
end
|
213
|
+
|
214
|
+
# Service calls
|
215
|
+
|
216
|
+
##
|
217
|
+
# Provisions a CMEK key for use in a location of a customer's project.
|
218
|
+
# This method will also conduct location validation on the provided
|
219
|
+
# cmekConfig to make sure the key is valid and can be used in the
|
220
|
+
# selected location.
|
221
|
+
#
|
222
|
+
# @overload update_cmek_config(request, options = nil)
|
223
|
+
# Pass arguments to `update_cmek_config` via a request object, either of type
|
224
|
+
# {::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest} or an equivalent Hash.
|
225
|
+
#
|
226
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest, ::Hash]
|
227
|
+
# A request object representing the call parameters. Required. To specify no
|
228
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
229
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
230
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
231
|
+
#
|
232
|
+
# @overload update_cmek_config(config: nil, set_default: nil)
|
233
|
+
# Pass arguments to `update_cmek_config` via keyword arguments. Note that at
|
234
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
235
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
236
|
+
#
|
237
|
+
# @param config [::Google::Cloud::DiscoveryEngine::V1::CmekConfig, ::Hash]
|
238
|
+
# Required. The CmekConfig resource.
|
239
|
+
# @param set_default [::Boolean]
|
240
|
+
# Set the following CmekConfig as the default to be used for child
|
241
|
+
# resources if one is not specified.
|
242
|
+
#
|
243
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
244
|
+
# @yieldparam response [::Gapic::Operation]
|
245
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
246
|
+
#
|
247
|
+
# @return [::Gapic::Operation]
|
248
|
+
#
|
249
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
250
|
+
#
|
251
|
+
# @example Basic example
|
252
|
+
# require "google/cloud/discovery_engine/v1"
|
253
|
+
#
|
254
|
+
# # Create a client object. The client can be reused for multiple calls.
|
255
|
+
# client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new
|
256
|
+
#
|
257
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
258
|
+
# request = Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest.new
|
259
|
+
#
|
260
|
+
# # Call the update_cmek_config method.
|
261
|
+
# result = client.update_cmek_config request
|
262
|
+
#
|
263
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
264
|
+
# # check the status of an operation, cancel it, or wait for results.
|
265
|
+
# # Here is how to wait for a response.
|
266
|
+
# result.wait_until_done! timeout: 60
|
267
|
+
# if result.response?
|
268
|
+
# p result.response
|
269
|
+
# else
|
270
|
+
# puts "No response received."
|
271
|
+
# end
|
272
|
+
#
|
273
|
+
def update_cmek_config request, options = nil
|
274
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
275
|
+
|
276
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest
|
277
|
+
|
278
|
+
# Converts hash and nil to an options object
|
279
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
280
|
+
|
281
|
+
# Customize the options with defaults
|
282
|
+
metadata = @config.rpcs.update_cmek_config.metadata.to_h
|
283
|
+
|
284
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
285
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
286
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
287
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
288
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
289
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
290
|
+
|
291
|
+
header_params = {}
|
292
|
+
if request.config&.name
|
293
|
+
header_params["config.name"] = request.config.name
|
294
|
+
end
|
295
|
+
|
296
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
297
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
298
|
+
|
299
|
+
options.apply_defaults timeout: @config.rpcs.update_cmek_config.timeout,
|
300
|
+
metadata: metadata,
|
301
|
+
retry_policy: @config.rpcs.update_cmek_config.retry_policy
|
302
|
+
|
303
|
+
options.apply_defaults timeout: @config.timeout,
|
304
|
+
metadata: @config.metadata,
|
305
|
+
retry_policy: @config.retry_policy
|
306
|
+
|
307
|
+
@cmek_config_service_stub.call_rpc :update_cmek_config, request, options: options do |response, operation|
|
308
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
309
|
+
yield response, operation if block_given?
|
310
|
+
throw :response, response
|
311
|
+
end
|
312
|
+
rescue ::GRPC::BadStatus => e
|
313
|
+
raise ::Google::Cloud::Error.from_error(e)
|
314
|
+
end
|
315
|
+
|
316
|
+
##
|
317
|
+
# Gets the {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}.
|
318
|
+
#
|
319
|
+
# @overload get_cmek_config(request, options = nil)
|
320
|
+
# Pass arguments to `get_cmek_config` via a request object, either of type
|
321
|
+
# {::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest} or an equivalent Hash.
|
322
|
+
#
|
323
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest, ::Hash]
|
324
|
+
# A request object representing the call parameters. Required. To specify no
|
325
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
326
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
327
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
328
|
+
#
|
329
|
+
# @overload get_cmek_config(name: nil)
|
330
|
+
# Pass arguments to `get_cmek_config` via keyword arguments. Note that at
|
331
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
332
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
333
|
+
#
|
334
|
+
# @param name [::String]
|
335
|
+
# Required. Resource name of
|
336
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}, such as
|
337
|
+
# `projects/*/locations/*/cmekConfig` or
|
338
|
+
# `projects/*/locations/*/cmekConfigs/*`.
|
339
|
+
#
|
340
|
+
# If the caller does not have permission to access the
|
341
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}, regardless of
|
342
|
+
# whether or not it exists, a PERMISSION_DENIED error is returned.
|
343
|
+
#
|
344
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
345
|
+
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::CmekConfig]
|
346
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
347
|
+
#
|
348
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::CmekConfig]
|
349
|
+
#
|
350
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
351
|
+
#
|
352
|
+
# @example Basic example
|
353
|
+
# require "google/cloud/discovery_engine/v1"
|
354
|
+
#
|
355
|
+
# # Create a client object. The client can be reused for multiple calls.
|
356
|
+
# client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new
|
357
|
+
#
|
358
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
359
|
+
# request = Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest.new
|
360
|
+
#
|
361
|
+
# # Call the get_cmek_config method.
|
362
|
+
# result = client.get_cmek_config request
|
363
|
+
#
|
364
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1::CmekConfig.
|
365
|
+
# p result
|
366
|
+
#
|
367
|
+
def get_cmek_config request, options = nil
|
368
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
369
|
+
|
370
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest
|
371
|
+
|
372
|
+
# Converts hash and nil to an options object
|
373
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
374
|
+
|
375
|
+
# Customize the options with defaults
|
376
|
+
metadata = @config.rpcs.get_cmek_config.metadata.to_h
|
377
|
+
|
378
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
379
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
380
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
381
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
382
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
383
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
384
|
+
|
385
|
+
header_params = {}
|
386
|
+
if request.name
|
387
|
+
header_params["name"] = request.name
|
388
|
+
end
|
389
|
+
|
390
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
391
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
392
|
+
|
393
|
+
options.apply_defaults timeout: @config.rpcs.get_cmek_config.timeout,
|
394
|
+
metadata: metadata,
|
395
|
+
retry_policy: @config.rpcs.get_cmek_config.retry_policy
|
396
|
+
|
397
|
+
options.apply_defaults timeout: @config.timeout,
|
398
|
+
metadata: @config.metadata,
|
399
|
+
retry_policy: @config.retry_policy
|
400
|
+
|
401
|
+
@cmek_config_service_stub.call_rpc :get_cmek_config, request, options: options do |response, operation|
|
402
|
+
yield response, operation if block_given?
|
403
|
+
end
|
404
|
+
rescue ::GRPC::BadStatus => e
|
405
|
+
raise ::Google::Cloud::Error.from_error(e)
|
406
|
+
end
|
407
|
+
|
408
|
+
##
|
409
|
+
# Lists all the {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}s
|
410
|
+
# with the project.
|
411
|
+
#
|
412
|
+
# @overload list_cmek_configs(request, options = nil)
|
413
|
+
# Pass arguments to `list_cmek_configs` via a request object, either of type
|
414
|
+
# {::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest} or an equivalent Hash.
|
415
|
+
#
|
416
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest, ::Hash]
|
417
|
+
# A request object representing the call parameters. Required. To specify no
|
418
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
419
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
420
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
421
|
+
#
|
422
|
+
# @overload list_cmek_configs(parent: nil)
|
423
|
+
# Pass arguments to `list_cmek_configs` via keyword arguments. Note that at
|
424
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
425
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
426
|
+
#
|
427
|
+
# @param parent [::String]
|
428
|
+
# Required. The parent location resource name, such as
|
429
|
+
# `projects/{project}/locations/{location}`.
|
430
|
+
#
|
431
|
+
# If the caller does not have permission to list
|
432
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}s under this
|
433
|
+
# location, regardless of whether or not a CmekConfig exists, a
|
434
|
+
# PERMISSION_DENIED error is returned.
|
435
|
+
#
|
436
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
437
|
+
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse]
|
438
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
439
|
+
#
|
440
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse]
|
441
|
+
#
|
442
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
443
|
+
#
|
444
|
+
# @example Basic example
|
445
|
+
# require "google/cloud/discovery_engine/v1"
|
446
|
+
#
|
447
|
+
# # Create a client object. The client can be reused for multiple calls.
|
448
|
+
# client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new
|
449
|
+
#
|
450
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
451
|
+
# request = Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest.new
|
452
|
+
#
|
453
|
+
# # Call the list_cmek_configs method.
|
454
|
+
# result = client.list_cmek_configs request
|
455
|
+
#
|
456
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse.
|
457
|
+
# p result
|
458
|
+
#
|
459
|
+
def list_cmek_configs request, options = nil
|
460
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
461
|
+
|
462
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest
|
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
|
+
metadata = @config.rpcs.list_cmek_configs.metadata.to_h
|
469
|
+
|
470
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
471
|
+
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::V1::VERSION
|
474
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
475
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
476
|
+
|
477
|
+
header_params = {}
|
478
|
+
if request.parent
|
479
|
+
header_params["parent"] = request.parent
|
480
|
+
end
|
481
|
+
|
482
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
483
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
484
|
+
|
485
|
+
options.apply_defaults timeout: @config.rpcs.list_cmek_configs.timeout,
|
486
|
+
metadata: metadata,
|
487
|
+
retry_policy: @config.rpcs.list_cmek_configs.retry_policy
|
488
|
+
|
489
|
+
options.apply_defaults timeout: @config.timeout,
|
490
|
+
metadata: @config.metadata,
|
491
|
+
retry_policy: @config.retry_policy
|
492
|
+
|
493
|
+
@cmek_config_service_stub.call_rpc :list_cmek_configs, request, options: options do |response, operation|
|
494
|
+
yield response, operation if block_given?
|
495
|
+
end
|
496
|
+
rescue ::GRPC::BadStatus => e
|
497
|
+
raise ::Google::Cloud::Error.from_error(e)
|
498
|
+
end
|
499
|
+
|
500
|
+
##
|
501
|
+
# De-provisions a CmekConfig.
|
502
|
+
#
|
503
|
+
# @overload delete_cmek_config(request, options = nil)
|
504
|
+
# Pass arguments to `delete_cmek_config` via a request object, either of type
|
505
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest} or an equivalent Hash.
|
506
|
+
#
|
507
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest, ::Hash]
|
508
|
+
# A request object representing the call parameters. Required. To specify no
|
509
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
510
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
511
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
512
|
+
#
|
513
|
+
# @overload delete_cmek_config(name: nil)
|
514
|
+
# Pass arguments to `delete_cmek_config` via keyword arguments. Note that at
|
515
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
516
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
517
|
+
#
|
518
|
+
# @param name [::String]
|
519
|
+
# Required. The resource name of the
|
520
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig} to delete, such as
|
521
|
+
# `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
|
522
|
+
#
|
523
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
524
|
+
# @yieldparam response [::Gapic::Operation]
|
525
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
526
|
+
#
|
527
|
+
# @return [::Gapic::Operation]
|
528
|
+
#
|
529
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
530
|
+
#
|
531
|
+
# @example Basic example
|
532
|
+
# require "google/cloud/discovery_engine/v1"
|
533
|
+
#
|
534
|
+
# # Create a client object. The client can be reused for multiple calls.
|
535
|
+
# client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new
|
536
|
+
#
|
537
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
538
|
+
# request = Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest.new
|
539
|
+
#
|
540
|
+
# # Call the delete_cmek_config method.
|
541
|
+
# result = client.delete_cmek_config request
|
542
|
+
#
|
543
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
544
|
+
# # check the status of an operation, cancel it, or wait for results.
|
545
|
+
# # Here is how to wait for a response.
|
546
|
+
# result.wait_until_done! timeout: 60
|
547
|
+
# if result.response?
|
548
|
+
# p result.response
|
549
|
+
# else
|
550
|
+
# puts "No response received."
|
551
|
+
# end
|
552
|
+
#
|
553
|
+
def delete_cmek_config request, options = nil
|
554
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
555
|
+
|
556
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest
|
557
|
+
|
558
|
+
# Converts hash and nil to an options object
|
559
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
560
|
+
|
561
|
+
# Customize the options with defaults
|
562
|
+
metadata = @config.rpcs.delete_cmek_config.metadata.to_h
|
563
|
+
|
564
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
565
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
566
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
567
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
|
568
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
569
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
570
|
+
|
571
|
+
header_params = {}
|
572
|
+
if request.name
|
573
|
+
header_params["name"] = request.name
|
574
|
+
end
|
575
|
+
|
576
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
577
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
578
|
+
|
579
|
+
options.apply_defaults timeout: @config.rpcs.delete_cmek_config.timeout,
|
580
|
+
metadata: metadata,
|
581
|
+
retry_policy: @config.rpcs.delete_cmek_config.retry_policy
|
582
|
+
|
583
|
+
options.apply_defaults timeout: @config.timeout,
|
584
|
+
metadata: @config.metadata,
|
585
|
+
retry_policy: @config.retry_policy
|
586
|
+
|
587
|
+
@cmek_config_service_stub.call_rpc :delete_cmek_config, request, options: options do |response, operation|
|
588
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
589
|
+
yield response, operation if block_given?
|
590
|
+
throw :response, response
|
591
|
+
end
|
592
|
+
rescue ::GRPC::BadStatus => e
|
593
|
+
raise ::Google::Cloud::Error.from_error(e)
|
594
|
+
end
|
595
|
+
|
596
|
+
##
|
597
|
+
# Configuration class for the CmekConfigService API.
|
598
|
+
#
|
599
|
+
# This class represents the configuration for CmekConfigService,
|
600
|
+
# providing control over timeouts, retry behavior, logging, transport
|
601
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
602
|
+
# applied individually to specific RPCs. See
|
603
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client::Configuration::Rpcs}
|
604
|
+
# for a list of RPCs that can be configured independently.
|
605
|
+
#
|
606
|
+
# Configuration can be applied globally to all clients, or to a single client
|
607
|
+
# on construction.
|
608
|
+
#
|
609
|
+
# @example
|
610
|
+
#
|
611
|
+
# # Modify the global config, setting the timeout for
|
612
|
+
# # update_cmek_config to 20 seconds,
|
613
|
+
# # and all remaining timeouts to 10 seconds.
|
614
|
+
# ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.configure do |config|
|
615
|
+
# config.timeout = 10.0
|
616
|
+
# config.rpcs.update_cmek_config.timeout = 20.0
|
617
|
+
# end
|
618
|
+
#
|
619
|
+
# # Apply the above configuration only to a new client.
|
620
|
+
# client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config|
|
621
|
+
# config.timeout = 10.0
|
622
|
+
# config.rpcs.update_cmek_config.timeout = 20.0
|
623
|
+
# end
|
624
|
+
#
|
625
|
+
# @!attribute [rw] endpoint
|
626
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
627
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
628
|
+
# @return [::String,nil]
|
629
|
+
# @!attribute [rw] credentials
|
630
|
+
# Credentials to send with calls. You may provide any of the following types:
|
631
|
+
# * (`String`) The path to a service account key file in JSON format
|
632
|
+
# * (`Hash`) A service account key as a Hash
|
633
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
634
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
635
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
636
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
637
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
638
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
639
|
+
# * (`nil`) indicating no credentials
|
640
|
+
#
|
641
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
642
|
+
# external source for authentication to Google Cloud, you must validate it before
|
643
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
644
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
645
|
+
# For more information, refer to [Validate credential configurations from external
|
646
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
647
|
+
# @return [::Object]
|
648
|
+
# @!attribute [rw] scope
|
649
|
+
# The OAuth scopes
|
650
|
+
# @return [::Array<::String>]
|
651
|
+
# @!attribute [rw] lib_name
|
652
|
+
# The library name as recorded in instrumentation and logging
|
653
|
+
# @return [::String]
|
654
|
+
# @!attribute [rw] lib_version
|
655
|
+
# The library version as recorded in instrumentation and logging
|
656
|
+
# @return [::String]
|
657
|
+
# @!attribute [rw] channel_args
|
658
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
659
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
660
|
+
# @return [::Hash]
|
661
|
+
# @!attribute [rw] interceptors
|
662
|
+
# An array of interceptors that are run before calls are executed.
|
663
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
664
|
+
# @!attribute [rw] timeout
|
665
|
+
# The call timeout in seconds.
|
666
|
+
# @return [::Numeric]
|
667
|
+
# @!attribute [rw] metadata
|
668
|
+
# Additional gRPC headers to be sent with the call.
|
669
|
+
# @return [::Hash{::Symbol=>::String}]
|
670
|
+
# @!attribute [rw] retry_policy
|
671
|
+
# The retry policy. The value is a hash with the following keys:
|
672
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
673
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
674
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
675
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
676
|
+
# trigger a retry.
|
677
|
+
# @return [::Hash]
|
678
|
+
# @!attribute [rw] quota_project
|
679
|
+
# A separate project against which to charge quota.
|
680
|
+
# @return [::String]
|
681
|
+
# @!attribute [rw] universe_domain
|
682
|
+
# The universe domain within which to make requests. This determines the
|
683
|
+
# default endpoint URL. The default value of nil uses the environment
|
684
|
+
# universe (usually the default "googleapis.com" universe).
|
685
|
+
# @return [::String,nil]
|
686
|
+
# @!attribute [rw] logger
|
687
|
+
# A custom logger to use for request/response debug logging, or the value
|
688
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
689
|
+
# explicitly disable logging.
|
690
|
+
# @return [::Logger,:default,nil]
|
691
|
+
#
|
692
|
+
class Configuration
|
693
|
+
extend ::Gapic::Config
|
694
|
+
|
695
|
+
# @private
|
696
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
697
|
+
DEFAULT_ENDPOINT = "discoveryengine.googleapis.com"
|
698
|
+
|
699
|
+
config_attr :endpoint, nil, ::String, nil
|
700
|
+
config_attr :credentials, nil do |value|
|
701
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
702
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
|
703
|
+
allowed.any? { |klass| klass === value }
|
704
|
+
end
|
705
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
706
|
+
config_attr :lib_name, nil, ::String, nil
|
707
|
+
config_attr :lib_version, nil, ::String, nil
|
708
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
709
|
+
config_attr :interceptors, nil, ::Array, nil
|
710
|
+
config_attr :timeout, nil, ::Numeric, nil
|
711
|
+
config_attr :metadata, nil, ::Hash, nil
|
712
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
|
+
config_attr :quota_project, nil, ::String, nil
|
714
|
+
config_attr :universe_domain, nil, ::String, nil
|
715
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
716
|
+
|
717
|
+
# @private
|
718
|
+
def initialize parent_config = nil
|
719
|
+
@parent_config = parent_config unless parent_config.nil?
|
720
|
+
|
721
|
+
yield self if block_given?
|
722
|
+
end
|
723
|
+
|
724
|
+
##
|
725
|
+
# Configurations for individual RPCs
|
726
|
+
# @return [Rpcs]
|
727
|
+
#
|
728
|
+
def rpcs
|
729
|
+
@rpcs ||= begin
|
730
|
+
parent_rpcs = nil
|
731
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
732
|
+
Rpcs.new parent_rpcs
|
733
|
+
end
|
734
|
+
end
|
735
|
+
|
736
|
+
##
|
737
|
+
# Configuration for the channel pool
|
738
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
739
|
+
#
|
740
|
+
def channel_pool
|
741
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
742
|
+
end
|
743
|
+
|
744
|
+
##
|
745
|
+
# Configuration RPC class for the CmekConfigService API.
|
746
|
+
#
|
747
|
+
# Includes fields providing the configuration for each RPC in this service.
|
748
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
749
|
+
# the following configuration fields:
|
750
|
+
#
|
751
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
752
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
753
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
754
|
+
# include the following keys:
|
755
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
756
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
757
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
758
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
759
|
+
# trigger a retry.
|
760
|
+
#
|
761
|
+
class Rpcs
|
762
|
+
##
|
763
|
+
# RPC-specific configuration for `update_cmek_config`
|
764
|
+
# @return [::Gapic::Config::Method]
|
765
|
+
#
|
766
|
+
attr_reader :update_cmek_config
|
767
|
+
##
|
768
|
+
# RPC-specific configuration for `get_cmek_config`
|
769
|
+
# @return [::Gapic::Config::Method]
|
770
|
+
#
|
771
|
+
attr_reader :get_cmek_config
|
772
|
+
##
|
773
|
+
# RPC-specific configuration for `list_cmek_configs`
|
774
|
+
# @return [::Gapic::Config::Method]
|
775
|
+
#
|
776
|
+
attr_reader :list_cmek_configs
|
777
|
+
##
|
778
|
+
# RPC-specific configuration for `delete_cmek_config`
|
779
|
+
# @return [::Gapic::Config::Method]
|
780
|
+
#
|
781
|
+
attr_reader :delete_cmek_config
|
782
|
+
|
783
|
+
# @private
|
784
|
+
def initialize parent_rpcs = nil
|
785
|
+
update_cmek_config_config = parent_rpcs.update_cmek_config if parent_rpcs.respond_to? :update_cmek_config
|
786
|
+
@update_cmek_config = ::Gapic::Config::Method.new update_cmek_config_config
|
787
|
+
get_cmek_config_config = parent_rpcs.get_cmek_config if parent_rpcs.respond_to? :get_cmek_config
|
788
|
+
@get_cmek_config = ::Gapic::Config::Method.new get_cmek_config_config
|
789
|
+
list_cmek_configs_config = parent_rpcs.list_cmek_configs if parent_rpcs.respond_to? :list_cmek_configs
|
790
|
+
@list_cmek_configs = ::Gapic::Config::Method.new list_cmek_configs_config
|
791
|
+
delete_cmek_config_config = parent_rpcs.delete_cmek_config if parent_rpcs.respond_to? :delete_cmek_config
|
792
|
+
@delete_cmek_config = ::Gapic::Config::Method.new delete_cmek_config_config
|
793
|
+
|
794
|
+
yield self if block_given?
|
795
|
+
end
|
796
|
+
end
|
797
|
+
end
|
798
|
+
end
|
799
|
+
end
|
800
|
+
end
|
801
|
+
end
|
802
|
+
end
|
803
|
+
end
|