google-cloud-ai_platform-v1 0.33.0 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +1796 -0
  3. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/credentials.rb +47 -0
  4. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +787 -0
  5. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/paths.rb +111 -0
  6. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service.rb +51 -0
  7. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +431 -0
  8. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/credentials.rb +47 -0
  9. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/paths.rb +54 -0
  10. data/lib/google/cloud/ai_platform/v1/feature_online_store_service.rb +47 -0
  11. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +1498 -0
  12. data/lib/google/cloud/ai_platform/v1/feature_registry_service/credentials.rb +47 -0
  13. data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +787 -0
  14. data/lib/google/cloud/ai_platform/v1/feature_registry_service/paths.rb +139 -0
  15. data/lib/google/cloud/ai_platform/v1/feature_registry_service.rb +51 -0
  16. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +20 -7
  17. data/lib/google/cloud/ai_platform/v1/featurestore_service/paths.rb +53 -8
  18. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  19. data/lib/google/cloud/ai_platform/v1.rb +3 -0
  20. data/lib/google/cloud/aiplatform/v1/custom_job_pb.rb +1 -1
  21. data/lib/google/cloud/aiplatform/v1/feature_group_pb.rb +50 -0
  22. data/lib/google/cloud/aiplatform/v1/feature_online_store_admin_service_pb.rb +79 -0
  23. data/lib/google/cloud/aiplatform/v1/feature_online_store_admin_service_services_pb.rb +71 -0
  24. data/lib/google/cloud/aiplatform/v1/feature_online_store_pb.rb +50 -0
  25. data/lib/google/cloud/aiplatform/v1/feature_online_store_service_pb.rb +56 -0
  26. data/lib/google/cloud/aiplatform/v1/feature_online_store_service_services_pb.rb +44 -0
  27. data/lib/google/cloud/aiplatform/v1/feature_pb.rb +1 -1
  28. data/lib/google/cloud/aiplatform/v1/feature_registry_service_pb.rb +66 -0
  29. data/lib/google/cloud/aiplatform/v1/feature_registry_service_services_pb.rb +64 -0
  30. data/lib/google/cloud/aiplatform/v1/feature_view_pb.rb +51 -0
  31. data/lib/google/cloud/aiplatform/v1/feature_view_sync_pb.rb +51 -0
  32. data/lib/google/cloud/aiplatform/v1/index_pb.rb +3 -1
  33. data/lib/google/cloud/aiplatform/v1/machine_resources_pb.rb +1 -1
  34. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +3 -1
  35. data/lib/google/cloud/aiplatform/v1/study_pb.rb +5 -1
  36. data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +6 -0
  37. data/proto_docs/google/cloud/aiplatform/v1/feature.rb +21 -10
  38. data/proto_docs/google/cloud/aiplatform/v1/feature_group.rb +91 -0
  39. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +124 -0
  40. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_admin_service.rb +458 -0
  41. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb +102 -0
  42. data/proto_docs/google/cloud/aiplatform/v1/feature_registry_service.rb +208 -0
  43. data/proto_docs/google/cloud/aiplatform/v1/feature_view.rb +131 -0
  44. data/proto_docs/google/cloud/aiplatform/v1/feature_view_sync.rb +48 -0
  45. data/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb +32 -7
  46. data/proto_docs/google/cloud/aiplatform/v1/index.rb +53 -0
  47. data/proto_docs/google/cloud/aiplatform/v1/index_endpoint.rb +5 -4
  48. data/proto_docs/google/cloud/aiplatform/v1/machine_resources.rb +4 -0
  49. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +28 -0
  50. data/proto_docs/google/cloud/aiplatform/v1/study.rb +75 -0
  51. metadata +33 -2
@@ -0,0 +1,111 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+
20
+ module Google
21
+ module Cloud
22
+ module AIPlatform
23
+ module V1
24
+ module FeatureOnlineStoreAdminService
25
+ # Path helper methods for the FeatureOnlineStoreAdminService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified FeatureOnlineStore resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param feature_online_store [String]
37
+ #
38
+ # @return [::String]
39
+ def feature_online_store_path project:, location:, feature_online_store:
40
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
42
+
43
+ "projects/#{project}/locations/#{location}/featureOnlineStores/#{feature_online_store}"
44
+ end
45
+
46
+ ##
47
+ # Create a fully-qualified FeatureView resource string.
48
+ #
49
+ # The resource will be in the following format:
50
+ #
51
+ # `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
52
+ #
53
+ # @param project [String]
54
+ # @param location [String]
55
+ # @param feature_online_store [String]
56
+ # @param feature_view [String]
57
+ #
58
+ # @return [::String]
59
+ def feature_view_path project:, location:, feature_online_store:, feature_view:
60
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
61
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
62
+ raise ::ArgumentError, "feature_online_store cannot contain /" if feature_online_store.to_s.include? "/"
63
+
64
+ "projects/#{project}/locations/#{location}/featureOnlineStores/#{feature_online_store}/featureViews/#{feature_view}"
65
+ end
66
+
67
+ ##
68
+ # Create a fully-qualified FeatureViewSync resource string.
69
+ #
70
+ # The resource will be in the following format:
71
+ #
72
+ # `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/feature_view_sync`
73
+ #
74
+ # @param project [String]
75
+ # @param location [String]
76
+ # @param feature_online_store [String]
77
+ # @param feature_view [String]
78
+ #
79
+ # @return [::String]
80
+ def feature_view_sync_path project:, location:, feature_online_store:, feature_view:
81
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
82
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
83
+ raise ::ArgumentError, "feature_online_store cannot contain /" if feature_online_store.to_s.include? "/"
84
+
85
+ "projects/#{project}/locations/#{location}/featureOnlineStores/#{feature_online_store}/featureViews/#{feature_view}/featureViewSyncs/feature_view_sync"
86
+ end
87
+
88
+ ##
89
+ # Create a fully-qualified Location resource string.
90
+ #
91
+ # The resource will be in the following format:
92
+ #
93
+ # `projects/{project}/locations/{location}`
94
+ #
95
+ # @param project [String]
96
+ # @param location [String]
97
+ #
98
+ # @return [::String]
99
+ def location_path project:, location:
100
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
101
+
102
+ "projects/#{project}/locations/#{location}"
103
+ end
104
+
105
+ extend self
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/ai_platform/v1/version"
24
+
25
+ require "google/cloud/ai_platform/v1/feature_online_store_admin_service/credentials"
26
+ require "google/cloud/ai_platform/v1/feature_online_store_admin_service/paths"
27
+ require "google/cloud/ai_platform/v1/feature_online_store_admin_service/operations"
28
+ require "google/cloud/ai_platform/v1/feature_online_store_admin_service/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module AIPlatform
33
+ module V1
34
+ ##
35
+ # The service that handles CRUD and List for resources for
36
+ # FeatureOnlineStore.
37
+ #
38
+ # @example Load this service and instantiate a gRPC client
39
+ #
40
+ # require "google/cloud/ai_platform/v1/feature_online_store_admin_service"
41
+ # client = ::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreAdminService::Client.new
42
+ #
43
+ module FeatureOnlineStoreAdminService
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ helper_path = ::File.join __dir__, "feature_online_store_admin_service", "helpers.rb"
51
+ require "google/cloud/ai_platform/v1/feature_online_store_admin_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,431 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/aiplatform/v1/feature_online_store_service_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module AIPlatform
27
+ module V1
28
+ module FeatureOnlineStoreService
29
+ ##
30
+ # Client for the FeatureOnlineStoreService service.
31
+ #
32
+ class Client
33
+ include Paths
34
+
35
+ # @private
36
+ attr_reader :feature_online_store_service_stub
37
+
38
+ ##
39
+ # Configure the FeatureOnlineStoreService Client class.
40
+ #
41
+ # See {::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client::Configuration}
42
+ # for a description of the configuration fields.
43
+ #
44
+ # @example
45
+ #
46
+ # # Modify the configuration for all FeatureOnlineStoreService clients
47
+ # ::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
50
+ #
51
+ # @yield [config] Configure the Client client.
52
+ # @yieldparam config [Client::Configuration]
53
+ #
54
+ # @return [Client::Configuration]
55
+ #
56
+ def self.configure
57
+ @configure ||= begin
58
+ namespace = ["Google", "Cloud", "AIPlatform", "V1"]
59
+ parent_config = while namespace.any?
60
+ parent_name = namespace.join "::"
61
+ parent_const = const_get parent_name
62
+ break parent_const.configure if parent_const.respond_to? :configure
63
+ namespace.pop
64
+ end
65
+ default_config = Client::Configuration.new parent_config
66
+
67
+ default_config
68
+ end
69
+ yield @configure if block_given?
70
+ @configure
71
+ end
72
+
73
+ ##
74
+ # Configure the FeatureOnlineStoreService Client instance.
75
+ #
76
+ # The configuration is set to the derived mode, meaning that values can be changed,
77
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
78
+ # should be made on {Client.configure}.
79
+ #
80
+ # See {::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client::Configuration}
81
+ # for a description of the configuration fields.
82
+ #
83
+ # @yield [config] Configure the Client client.
84
+ # @yieldparam config [Client::Configuration]
85
+ #
86
+ # @return [Client::Configuration]
87
+ #
88
+ def configure
89
+ yield @config if block_given?
90
+ @config
91
+ end
92
+
93
+ ##
94
+ # Create a new FeatureOnlineStoreService client object.
95
+ #
96
+ # @example
97
+ #
98
+ # # Create a client using the default configuration
99
+ # client = ::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client.new
100
+ #
101
+ # # Create a client using a custom configuration
102
+ # client = ::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client.new do |config|
103
+ # config.timeout = 10.0
104
+ # end
105
+ #
106
+ # @yield [config] Configure the FeatureOnlineStoreService client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ def initialize
110
+ # These require statements are intentionally placed here to initialize
111
+ # the gRPC module only when it's required.
112
+ # See https://github.com/googleapis/toolkit/issues/446
113
+ require "gapic/grpc"
114
+ require "google/cloud/aiplatform/v1/feature_online_store_service_services_pb"
115
+
116
+ # Create the configuration object
117
+ @config = Configuration.new Client.configure
118
+
119
+ # Yield the configuration if needed
120
+ yield @config if block_given?
121
+
122
+ # Create credentials
123
+ credentials = @config.credentials
124
+ # Use self-signed JWT if the endpoint is unchanged from default,
125
+ # but only if the default endpoint does not have a region prefix.
126
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
127
+ !@config.endpoint.split(".").first.include?("-")
128
+ credentials ||= Credentials.default scope: @config.scope,
129
+ enable_self_signed_jwt: enable_self_signed_jwt
130
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
131
+ credentials = Credentials.new credentials, scope: @config.scope
132
+ end
133
+ @quota_project_id = @config.quota_project
134
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
135
+
136
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
137
+ config.credentials = credentials
138
+ config.quota_project = @quota_project_id
139
+ config.endpoint = @config.endpoint
140
+ end
141
+
142
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
143
+ config.credentials = credentials
144
+ config.quota_project = @quota_project_id
145
+ config.endpoint = @config.endpoint
146
+ end
147
+
148
+ @feature_online_store_service_stub = ::Gapic::ServiceStub.new(
149
+ ::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Stub,
150
+ credentials: credentials,
151
+ endpoint: @config.endpoint,
152
+ channel_args: @config.channel_args,
153
+ interceptors: @config.interceptors,
154
+ channel_pool_config: @config.channel_pool
155
+ )
156
+ end
157
+
158
+ ##
159
+ # Get the associated client for mix-in of the Locations.
160
+ #
161
+ # @return [Google::Cloud::Location::Locations::Client]
162
+ #
163
+ attr_reader :location_client
164
+
165
+ ##
166
+ # Get the associated client for mix-in of the IAMPolicy.
167
+ #
168
+ # @return [Google::Iam::V1::IAMPolicy::Client]
169
+ #
170
+ attr_reader :iam_policy_client
171
+
172
+ # Service calls
173
+
174
+ ##
175
+ # Fetch feature values under a FeatureView.
176
+ #
177
+ # @overload fetch_feature_values(request, options = nil)
178
+ # Pass arguments to `fetch_feature_values` via a request object, either of type
179
+ # {::Google::Cloud::AIPlatform::V1::FetchFeatureValuesRequest} or an equivalent Hash.
180
+ #
181
+ # @param request [::Google::Cloud::AIPlatform::V1::FetchFeatureValuesRequest, ::Hash]
182
+ # A request object representing the call parameters. Required. To specify no
183
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
184
+ # @param options [::Gapic::CallOptions, ::Hash]
185
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
186
+ #
187
+ # @overload fetch_feature_values(feature_view: nil, data_key: nil, data_format: nil)
188
+ # Pass arguments to `fetch_feature_values` via keyword arguments. Note that at
189
+ # least one keyword argument is required. To specify no parameters, or to keep all
190
+ # the default parameter values, pass an empty Hash as a request object (see above).
191
+ #
192
+ # @param feature_view [::String]
193
+ # Required. FeatureView resource format
194
+ # `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
195
+ # @param data_key [::Google::Cloud::AIPlatform::V1::FeatureViewDataKey, ::Hash]
196
+ # Optional. The request key to fetch feature values for.
197
+ # @param data_format [::Google::Cloud::AIPlatform::V1::FeatureViewDataFormat]
198
+ # Optional. Response data format. If not set,
199
+ # {::Google::Cloud::AIPlatform::V1::FeatureViewDataFormat::KEY_VALUE FeatureViewDataFormat.KEY_VALUE}
200
+ # will be used.
201
+ #
202
+ # @yield [response, operation] Access the result along with the RPC operation
203
+ # @yieldparam response [::Google::Cloud::AIPlatform::V1::FetchFeatureValuesResponse]
204
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
205
+ #
206
+ # @return [::Google::Cloud::AIPlatform::V1::FetchFeatureValuesResponse]
207
+ #
208
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
209
+ #
210
+ # @example Basic example
211
+ # require "google/cloud/ai_platform/v1"
212
+ #
213
+ # # Create a client object. The client can be reused for multiple calls.
214
+ # client = Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client.new
215
+ #
216
+ # # Create a request. To set request fields, pass in keyword arguments.
217
+ # request = Google::Cloud::AIPlatform::V1::FetchFeatureValuesRequest.new
218
+ #
219
+ # # Call the fetch_feature_values method.
220
+ # result = client.fetch_feature_values request
221
+ #
222
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::FetchFeatureValuesResponse.
223
+ # p result
224
+ #
225
+ def fetch_feature_values request, options = nil
226
+ raise ::ArgumentError, "request must be provided" if request.nil?
227
+
228
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::FetchFeatureValuesRequest
229
+
230
+ # Converts hash and nil to an options object
231
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
232
+
233
+ # Customize the options with defaults
234
+ metadata = @config.rpcs.fetch_feature_values.metadata.to_h
235
+
236
+ # Set x-goog-api-client and x-goog-user-project headers
237
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
238
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
239
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
240
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
241
+
242
+ header_params = {}
243
+ if request.feature_view
244
+ header_params["feature_view"] = request.feature_view
245
+ end
246
+
247
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
248
+ metadata[:"x-goog-request-params"] ||= request_params_header
249
+
250
+ options.apply_defaults timeout: @config.rpcs.fetch_feature_values.timeout,
251
+ metadata: metadata,
252
+ retry_policy: @config.rpcs.fetch_feature_values.retry_policy
253
+
254
+ options.apply_defaults timeout: @config.timeout,
255
+ metadata: @config.metadata,
256
+ retry_policy: @config.retry_policy
257
+
258
+ @feature_online_store_service_stub.call_rpc :fetch_feature_values, request, options: options do |response, operation|
259
+ yield response, operation if block_given?
260
+ return response
261
+ end
262
+ rescue ::GRPC::BadStatus => e
263
+ raise ::Google::Cloud::Error.from_error(e)
264
+ end
265
+
266
+ ##
267
+ # Configuration class for the FeatureOnlineStoreService API.
268
+ #
269
+ # This class represents the configuration for FeatureOnlineStoreService,
270
+ # providing control over timeouts, retry behavior, logging, transport
271
+ # parameters, and other low-level controls. Certain parameters can also be
272
+ # applied individually to specific RPCs. See
273
+ # {::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client::Configuration::Rpcs}
274
+ # for a list of RPCs that can be configured independently.
275
+ #
276
+ # Configuration can be applied globally to all clients, or to a single client
277
+ # on construction.
278
+ #
279
+ # @example
280
+ #
281
+ # # Modify the global config, setting the timeout for
282
+ # # fetch_feature_values to 20 seconds,
283
+ # # and all remaining timeouts to 10 seconds.
284
+ # ::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client.configure do |config|
285
+ # config.timeout = 10.0
286
+ # config.rpcs.fetch_feature_values.timeout = 20.0
287
+ # end
288
+ #
289
+ # # Apply the above configuration only to a new client.
290
+ # client = ::Google::Cloud::AIPlatform::V1::FeatureOnlineStoreService::Client.new do |config|
291
+ # config.timeout = 10.0
292
+ # config.rpcs.fetch_feature_values.timeout = 20.0
293
+ # end
294
+ #
295
+ # @!attribute [rw] endpoint
296
+ # The hostname or hostname:port of the service endpoint.
297
+ # Defaults to `"aiplatform.googleapis.com"`.
298
+ # @return [::String]
299
+ # @!attribute [rw] credentials
300
+ # Credentials to send with calls. You may provide any of the following types:
301
+ # * (`String`) The path to a service account key file in JSON format
302
+ # * (`Hash`) A service account key as a Hash
303
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
304
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
305
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
306
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
307
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
308
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
309
+ # * (`nil`) indicating no credentials
310
+ # @return [::Object]
311
+ # @!attribute [rw] scope
312
+ # The OAuth scopes
313
+ # @return [::Array<::String>]
314
+ # @!attribute [rw] lib_name
315
+ # The library name as recorded in instrumentation and logging
316
+ # @return [::String]
317
+ # @!attribute [rw] lib_version
318
+ # The library version as recorded in instrumentation and logging
319
+ # @return [::String]
320
+ # @!attribute [rw] channel_args
321
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
322
+ # `GRPC::Core::Channel` object is provided as the credential.
323
+ # @return [::Hash]
324
+ # @!attribute [rw] interceptors
325
+ # An array of interceptors that are run before calls are executed.
326
+ # @return [::Array<::GRPC::ClientInterceptor>]
327
+ # @!attribute [rw] timeout
328
+ # The call timeout in seconds.
329
+ # @return [::Numeric]
330
+ # @!attribute [rw] metadata
331
+ # Additional gRPC headers to be sent with the call.
332
+ # @return [::Hash{::Symbol=>::String}]
333
+ # @!attribute [rw] retry_policy
334
+ # The retry policy. The value is a hash with the following keys:
335
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
336
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
337
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
338
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
339
+ # trigger a retry.
340
+ # @return [::Hash]
341
+ # @!attribute [rw] quota_project
342
+ # A separate project against which to charge quota.
343
+ # @return [::String]
344
+ #
345
+ class Configuration
346
+ extend ::Gapic::Config
347
+
348
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
349
+
350
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
351
+ config_attr :credentials, nil do |value|
352
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
353
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
354
+ allowed.any? { |klass| klass === value }
355
+ end
356
+ config_attr :scope, nil, ::String, ::Array, nil
357
+ config_attr :lib_name, nil, ::String, nil
358
+ config_attr :lib_version, nil, ::String, nil
359
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
360
+ config_attr :interceptors, nil, ::Array, nil
361
+ config_attr :timeout, nil, ::Numeric, nil
362
+ config_attr :metadata, nil, ::Hash, nil
363
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
364
+ config_attr :quota_project, nil, ::String, nil
365
+
366
+ # @private
367
+ def initialize parent_config = nil
368
+ @parent_config = parent_config unless parent_config.nil?
369
+
370
+ yield self if block_given?
371
+ end
372
+
373
+ ##
374
+ # Configurations for individual RPCs
375
+ # @return [Rpcs]
376
+ #
377
+ def rpcs
378
+ @rpcs ||= begin
379
+ parent_rpcs = nil
380
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
381
+ Rpcs.new parent_rpcs
382
+ end
383
+ end
384
+
385
+ ##
386
+ # Configuration for the channel pool
387
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
388
+ #
389
+ def channel_pool
390
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
391
+ end
392
+
393
+ ##
394
+ # Configuration RPC class for the FeatureOnlineStoreService API.
395
+ #
396
+ # Includes fields providing the configuration for each RPC in this service.
397
+ # Each configuration object is of type `Gapic::Config::Method` and includes
398
+ # the following configuration fields:
399
+ #
400
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
401
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
402
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
403
+ # include the following keys:
404
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
405
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
406
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
407
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
408
+ # trigger a retry.
409
+ #
410
+ class Rpcs
411
+ ##
412
+ # RPC-specific configuration for `fetch_feature_values`
413
+ # @return [::Gapic::Config::Method]
414
+ #
415
+ attr_reader :fetch_feature_values
416
+
417
+ # @private
418
+ def initialize parent_rpcs = nil
419
+ fetch_feature_values_config = parent_rpcs.fetch_feature_values if parent_rpcs.respond_to? :fetch_feature_values
420
+ @fetch_feature_values = ::Gapic::Config::Method.new fetch_feature_values_config
421
+
422
+ yield self if block_given?
423
+ end
424
+ end
425
+ end
426
+ end
427
+ end
428
+ end
429
+ end
430
+ end
431
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module AIPlatform
24
+ module V1
25
+ module FeatureOnlineStoreService
26
+ # Credentials for the FeatureOnlineStoreService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "GOOGLE_CLOUD_CREDENTIALS",
33
+ "GOOGLE_CLOUD_KEYFILE",
34
+ "GCLOUD_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
36
+ "GOOGLE_CLOUD_KEYFILE_JSON",
37
+ "GCLOUD_KEYFILE_JSON"
38
+ ]
39
+ self.paths = [
40
+ "~/.config/google_cloud/application_default_credentials.json"
41
+ ]
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end