google-cloud-ai_platform-v1 0.39.0 → 0.41.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.
Files changed (221) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/ai_platform/v1/bindings_override.rb +399 -0
  3. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +138 -18
  4. data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +13 -5
  5. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +2280 -0
  6. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +3971 -0
  7. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/service_stub.rb +1196 -0
  8. data/lib/google/cloud/ai_platform/v1/dataset_service/rest.rb +54 -0
  9. data/lib/google/cloud/ai_platform/v1/dataset_service.rb +6 -0
  10. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +13 -5
  11. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +13 -5
  12. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +851 -0
  13. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +3971 -0
  14. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/service_stub.rb +365 -0
  15. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest.rb +54 -0
  16. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service.rb +6 -0
  17. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +19 -8
  18. data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +13 -5
  19. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +1215 -0
  20. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +3971 -0
  21. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/service_stub.rb +546 -0
  22. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest.rb +54 -0
  23. data/lib/google/cloud/ai_platform/v1/endpoint_service.rb +6 -0
  24. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +29 -13
  25. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +13 -5
  26. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +1732 -0
  27. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +3971 -0
  28. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/service_stub.rb +841 -0
  29. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest.rb +55 -0
  30. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service.rb +6 -0
  31. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +7 -2
  32. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +534 -0
  33. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/service_stub.rb +189 -0
  34. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest.rb +53 -0
  35. data/lib/google/cloud/ai_platform/v1/feature_online_store_service.rb +6 -0
  36. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +24 -11
  37. data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +13 -5
  38. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +1450 -0
  39. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +3971 -0
  40. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/service_stub.rb +663 -0
  41. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest.rb +55 -0
  42. data/lib/google/cloud/ai_platform/v1/feature_registry_service.rb +6 -0
  43. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +9 -3
  44. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +645 -0
  45. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/service_stub.rb +244 -0
  46. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest.rb +53 -0
  47. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service.rb +6 -0
  48. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +45 -21
  49. data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +13 -5
  50. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +2765 -0
  51. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +3971 -0
  52. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/service_stub.rb +1319 -0
  53. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest.rb +54 -0
  54. data/lib/google/cloud/ai_platform/v1/featurestore_service.rb +6 -0
  55. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +11 -4
  56. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +720 -0
  57. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +307 -0
  58. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest.rb +53 -0
  59. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service.rb +6 -0
  60. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +19 -8
  61. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +13 -5
  62. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +1151 -0
  63. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +3971 -0
  64. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/service_stub.rb +546 -0
  65. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest.rb +54 -0
  66. data/lib/google/cloud/ai_platform/v1/index_endpoint_service.rb +6 -0
  67. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +17 -7
  68. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +13 -5
  69. data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +1034 -0
  70. data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +3971 -0
  71. data/lib/google/cloud/ai_platform/v1/index_service/rest/service_stub.rb +486 -0
  72. data/lib/google/cloud/ai_platform/v1/index_service/rest.rb +54 -0
  73. data/lib/google/cloud/ai_platform/v1/index_service.rb +6 -0
  74. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +73 -35
  75. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +13 -5
  76. data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +3841 -0
  77. data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +3971 -0
  78. data/lib/google/cloud/ai_platform/v1/job_service/rest/service_stub.rb +2149 -0
  79. data/lib/google/cloud/ai_platform/v1/job_service/rest.rb +54 -0
  80. data/lib/google/cloud/ai_platform/v1/job_service.rb +6 -0
  81. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +7 -2
  82. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +533 -0
  83. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/service_stub.rb +205 -0
  84. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest.rb +53 -0
  85. data/lib/google/cloud/ai_platform/v1/llm_utility_service.rb +6 -0
  86. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +7 -2
  87. data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +541 -0
  88. data/lib/google/cloud/ai_platform/v1/match_service/rest/service_stub.rb +189 -0
  89. data/lib/google/cloud/ai_platform/v1/match_service/rest.rb +54 -0
  90. data/lib/google/cloud/ai_platform/v1/match_service.rb +6 -0
  91. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +67 -32
  92. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +13 -5
  93. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +3634 -0
  94. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +3971 -0
  95. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/service_stub.rb +1972 -0
  96. data/lib/google/cloud/ai_platform/v1/metadata_service/rest.rb +54 -0
  97. data/lib/google/cloud/ai_platform/v1/metadata_service.rb +6 -0
  98. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +7 -2
  99. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +13 -5
  100. data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +574 -0
  101. data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +3971 -0
  102. data/lib/google/cloud/ai_platform/v1/migration_service/rest/service_stub.rb +189 -0
  103. data/lib/google/cloud/ai_platform/v1/migration_service/rest.rb +55 -0
  104. data/lib/google/cloud/ai_platform/v1/migration_service.rb +6 -0
  105. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +5 -1
  106. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +438 -0
  107. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +128 -0
  108. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb +53 -0
  109. data/lib/google/cloud/ai_platform/v1/model_garden_service.rb +6 -0
  110. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +39 -18
  111. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +13 -5
  112. data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +2213 -0
  113. data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +3971 -0
  114. data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +1140 -0
  115. data/lib/google/cloud/ai_platform/v1/model_service/rest.rb +54 -0
  116. data/lib/google/cloud/ai_platform/v1/model_service.rb +6 -0
  117. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +123 -10
  118. data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +13 -5
  119. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +1503 -0
  120. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +3971 -0
  121. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +723 -0
  122. data/lib/google/cloud/ai_platform/v1/notebook_service/rest.rb +54 -0
  123. data/lib/google/cloud/ai_platform/v1/notebook_service.rb +6 -0
  124. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +15 -6
  125. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +13 -5
  126. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +942 -0
  127. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +3971 -0
  128. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/service_stub.rb +426 -0
  129. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest.rb +54 -0
  130. data/lib/google/cloud/ai_platform/v1/persistent_resource_service.rb +6 -0
  131. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +27 -12
  132. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +13 -5
  133. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +1600 -0
  134. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +3971 -0
  135. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/service_stub.rb +783 -0
  136. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest.rb +56 -0
  137. data/lib/google/cloud/ai_platform/v1/pipeline_service.rb +6 -0
  138. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +37 -15
  139. data/lib/google/cloud/ai_platform/v1/prediction_service/credentials.rb +2 -1
  140. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +1303 -0
  141. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +658 -0
  142. data/lib/google/cloud/ai_platform/v1/prediction_service/rest.rb +53 -0
  143. data/lib/google/cloud/ai_platform/v1/prediction_service.rb +6 -0
  144. data/lib/google/cloud/ai_platform/v1/rest.rb +63 -0
  145. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +17 -7
  146. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +13 -5
  147. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +1076 -0
  148. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +3971 -0
  149. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/service_stub.rb +486 -0
  150. data/lib/google/cloud/ai_platform/v1/schedule_service/rest.rb +55 -0
  151. data/lib/google/cloud/ai_platform/v1/schedule_service.rb +6 -0
  152. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +13 -5
  153. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +13 -5
  154. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +847 -0
  155. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +3971 -0
  156. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/service_stub.rb +366 -0
  157. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest.rb +59 -0
  158. data/lib/google/cloud/ai_platform/v1/specialist_pool_service.rb +6 -0
  159. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +63 -30
  160. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +13 -5
  161. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +3274 -0
  162. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +3971 -0
  163. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/service_stub.rb +1847 -0
  164. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest.rb +54 -0
  165. data/lib/google/cloud/ai_platform/v1/tensorboard_service.rb +6 -0
  166. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  167. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +33 -15
  168. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +13 -5
  169. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +1788 -0
  170. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +3971 -0
  171. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +963 -0
  172. data/lib/google/cloud/ai_platform/v1/vizier_service/rest.rb +58 -0
  173. data/lib/google/cloud/ai_platform/v1/vizier_service.rb +6 -0
  174. data/lib/google/cloud/ai_platform/v1.rb +6 -1
  175. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
  176. data/lib/google/cloud/aiplatform/v1/content_pb.rb +4 -4
  177. data/lib/google/cloud/aiplatform/v1/dataset_pb.rb +1 -1
  178. data/lib/google/cloud/aiplatform/v1/dataset_service_pb.rb +3 -2
  179. data/lib/google/cloud/aiplatform/v1/dataset_service_services_pb.rb +2 -0
  180. data/lib/google/cloud/aiplatform/v1/dataset_version_pb.rb +1 -1
  181. data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_pb.rb +3 -1
  182. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +3 -1
  183. data/lib/google/cloud/aiplatform/v1/feature_online_store_pb.rb +3 -1
  184. data/lib/google/cloud/aiplatform/v1/feature_pb.rb +1 -1
  185. data/lib/google/cloud/aiplatform/v1/featurestore_online_service_pb.rb +3 -1
  186. data/lib/google/cloud/aiplatform/v1/index_pb.rb +2 -1
  187. data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +1 -1
  188. data/lib/google/cloud/aiplatform/v1/match_service_pb.rb +2 -1
  189. data/lib/google/cloud/aiplatform/v1/metadata_store_pb.rb +2 -1
  190. data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +3 -1
  191. data/lib/google/cloud/aiplatform/v1/notebook_service_pb.rb +2 -1
  192. data/lib/google/cloud/aiplatform/v1/notebook_service_services_pb.rb +2 -0
  193. data/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb +2 -1
  194. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
  195. data/lib/google/cloud/aiplatform/v1/publisher_model_pb.rb +1 -1
  196. data/lib/google/cloud/aiplatform/v1/tool_pb.rb +4 -1
  197. data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
  198. data/proto_docs/google/cloud/aiplatform/v1/content.rb +26 -48
  199. data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +4 -0
  200. data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +17 -0
  201. data/proto_docs/google/cloud/aiplatform/v1/dataset_version.rb +4 -0
  202. data/proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool.rb +23 -0
  203. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +7 -0
  204. data/proto_docs/google/cloud/aiplatform/v1/feature.rb +3 -0
  205. data/proto_docs/google/cloud/aiplatform/v1/feature_group.rb +3 -3
  206. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +4 -0
  207. data/proto_docs/google/cloud/aiplatform/v1/feature_registry_service.rb +1 -1
  208. data/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +24 -0
  209. data/proto_docs/google/cloud/aiplatform/v1/index.rb +23 -3
  210. data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +20 -2
  211. data/proto_docs/google/cloud/aiplatform/v1/match_service.rb +18 -1
  212. data/proto_docs/google/cloud/aiplatform/v1/metadata_store.rb +13 -0
  213. data/proto_docs/google/cloud/aiplatform/v1/model.rb +1 -1
  214. data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +17 -2
  215. data/proto_docs/google/cloud/aiplatform/v1/notebook_service.rb +18 -0
  216. data/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb +63 -0
  217. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +4 -0
  218. data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +4 -0
  219. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +43 -5
  220. data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +8 -7
  221. metadata +101 -2
@@ -0,0 +1,1450 @@
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/aiplatform/v1/feature_registry_service_pb"
21
+ require "google/cloud/ai_platform/v1/feature_registry_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+ require "google/iam/v1/rest"
24
+
25
+ module Google
26
+ module Cloud
27
+ module AIPlatform
28
+ module V1
29
+ module FeatureRegistryService
30
+ module Rest
31
+ ##
32
+ # REST client for the FeatureRegistryService service.
33
+ #
34
+ # The service that handles CRUD and List for resources for
35
+ # FeatureRegistry.
36
+ #
37
+ class Client
38
+ # @private
39
+ API_VERSION = ""
40
+
41
+ # @private
42
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
43
+
44
+ include Paths
45
+
46
+ # @private
47
+ attr_reader :feature_registry_service_stub
48
+
49
+ ##
50
+ # Configure the FeatureRegistryService Client class.
51
+ #
52
+ # See {::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client::Configuration}
53
+ # for a description of the configuration fields.
54
+ #
55
+ # @example
56
+ #
57
+ # # Modify the configuration for all FeatureRegistryService clients
58
+ # ::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.configure do |config|
59
+ # config.timeout = 10.0
60
+ # end
61
+ #
62
+ # @yield [config] Configure the Client client.
63
+ # @yieldparam config [Client::Configuration]
64
+ #
65
+ # @return [Client::Configuration]
66
+ #
67
+ def self.configure
68
+ @configure ||= begin
69
+ namespace = ["Google", "Cloud", "AIPlatform", "V1"]
70
+ parent_config = while namespace.any?
71
+ parent_name = namespace.join "::"
72
+ parent_const = const_get parent_name
73
+ break parent_const.configure if parent_const.respond_to? :configure
74
+ namespace.pop
75
+ end
76
+ default_config = Client::Configuration.new parent_config
77
+
78
+ default_config
79
+ end
80
+ yield @configure if block_given?
81
+ @configure
82
+ end
83
+
84
+ ##
85
+ # Configure the FeatureRegistryService Client instance.
86
+ #
87
+ # The configuration is set to the derived mode, meaning that values can be changed,
88
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
89
+ # should be made on {Client.configure}.
90
+ #
91
+ # See {::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client::Configuration}
92
+ # for a description of the configuration fields.
93
+ #
94
+ # @yield [config] Configure the Client client.
95
+ # @yieldparam config [Client::Configuration]
96
+ #
97
+ # @return [Client::Configuration]
98
+ #
99
+ def configure
100
+ yield @config if block_given?
101
+ @config
102
+ end
103
+
104
+ ##
105
+ # The effective universe domain
106
+ #
107
+ # @return [String]
108
+ #
109
+ def universe_domain
110
+ @feature_registry_service_stub.universe_domain
111
+ end
112
+
113
+ ##
114
+ # Create a new FeatureRegistryService REST client object.
115
+ #
116
+ # @example
117
+ #
118
+ # # Create a client using the default configuration
119
+ # client = ::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
120
+ #
121
+ # # Create a client using a custom configuration
122
+ # client = ::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new do |config|
123
+ # config.timeout = 10.0
124
+ # end
125
+ #
126
+ # @yield [config] Configure the FeatureRegistryService client.
127
+ # @yieldparam config [Client::Configuration]
128
+ #
129
+ def initialize
130
+ # Create the configuration object
131
+ @config = Configuration.new Client.configure
132
+
133
+ # Yield the configuration if needed
134
+ yield @config if block_given?
135
+
136
+ # Create credentials
137
+ credentials = @config.credentials
138
+ # Use self-signed JWT if the endpoint is unchanged from default,
139
+ # but only if the default endpoint does not have a region prefix.
140
+ enable_self_signed_jwt = @config.endpoint.nil? ||
141
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
142
+ !@config.endpoint.split(".").first.include?("-"))
143
+ credentials ||= Credentials.default scope: @config.scope,
144
+ enable_self_signed_jwt: enable_self_signed_jwt
145
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
146
+ credentials = Credentials.new credentials, scope: @config.scope
147
+ end
148
+
149
+ @quota_project_id = @config.quota_project
150
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
151
+
152
+ @operations_client = ::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Operations.new do |config|
153
+ config.credentials = credentials
154
+ config.quota_project = @quota_project_id
155
+ config.endpoint = @config.endpoint
156
+ config.universe_domain = @config.universe_domain
157
+ end
158
+
159
+ @feature_registry_service_stub = ::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::ServiceStub.new(
160
+ endpoint: @config.endpoint,
161
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
162
+ universe_domain: @config.universe_domain,
163
+ credentials: credentials
164
+ )
165
+
166
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
167
+ config.credentials = credentials
168
+ config.quota_project = @quota_project_id
169
+ config.endpoint = @feature_registry_service_stub.endpoint
170
+ config.universe_domain = @feature_registry_service_stub.universe_domain
171
+ config.bindings_override = @config.bindings_override
172
+ end
173
+
174
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
175
+ config.credentials = credentials
176
+ config.quota_project = @quota_project_id
177
+ config.endpoint = @feature_registry_service_stub.endpoint
178
+ config.universe_domain = @feature_registry_service_stub.universe_domain
179
+ config.bindings_override = @config.bindings_override
180
+ end
181
+ end
182
+
183
+ ##
184
+ # Get the associated client for long-running operations.
185
+ #
186
+ # @return [::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Operations]
187
+ #
188
+ attr_reader :operations_client
189
+
190
+ ##
191
+ # Get the associated client for mix-in of the Locations.
192
+ #
193
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
194
+ #
195
+ attr_reader :location_client
196
+
197
+ ##
198
+ # Get the associated client for mix-in of the IAMPolicy.
199
+ #
200
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
201
+ #
202
+ attr_reader :iam_policy_client
203
+
204
+ # Service calls
205
+
206
+ ##
207
+ # Creates a new FeatureGroup in a given project and location.
208
+ #
209
+ # @overload create_feature_group(request, options = nil)
210
+ # Pass arguments to `create_feature_group` via a request object, either of type
211
+ # {::Google::Cloud::AIPlatform::V1::CreateFeatureGroupRequest} or an equivalent Hash.
212
+ #
213
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateFeatureGroupRequest, ::Hash]
214
+ # A request object representing the call parameters. Required. To specify no
215
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
216
+ # @param options [::Gapic::CallOptions, ::Hash]
217
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
218
+ #
219
+ # @overload create_feature_group(parent: nil, feature_group: nil, feature_group_id: nil)
220
+ # Pass arguments to `create_feature_group` via keyword arguments. Note that at
221
+ # least one keyword argument is required. To specify no parameters, or to keep all
222
+ # the default parameter values, pass an empty Hash as a request object (see above).
223
+ #
224
+ # @param parent [::String]
225
+ # Required. The resource name of the Location to create FeatureGroups.
226
+ # Format:
227
+ # `projects/{project}/locations/{location}`
228
+ # @param feature_group [::Google::Cloud::AIPlatform::V1::FeatureGroup, ::Hash]
229
+ # Required. The FeatureGroup to create.
230
+ # @param feature_group_id [::String]
231
+ # Required. The ID to use for this FeatureGroup, which will become the final
232
+ # component of the FeatureGroup's resource name.
233
+ #
234
+ # This value may be up to 60 characters, and valid characters are
235
+ # `[a-z0-9_]`. The first character cannot be a number.
236
+ #
237
+ # The value must be unique within the project and location.
238
+ # @yield [result, operation] Access the result along with the TransportOperation object
239
+ # @yieldparam result [::Gapic::Operation]
240
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
241
+ #
242
+ # @return [::Gapic::Operation]
243
+ #
244
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
245
+ #
246
+ # @example Basic example
247
+ # require "google/cloud/ai_platform/v1"
248
+ #
249
+ # # Create a client object. The client can be reused for multiple calls.
250
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
251
+ #
252
+ # # Create a request. To set request fields, pass in keyword arguments.
253
+ # request = Google::Cloud::AIPlatform::V1::CreateFeatureGroupRequest.new
254
+ #
255
+ # # Call the create_feature_group method.
256
+ # result = client.create_feature_group request
257
+ #
258
+ # # The returned object is of type Gapic::Operation. You can use it to
259
+ # # check the status of an operation, cancel it, or wait for results.
260
+ # # Here is how to wait for a response.
261
+ # result.wait_until_done! timeout: 60
262
+ # if result.response?
263
+ # p result.response
264
+ # else
265
+ # puts "No response received."
266
+ # end
267
+ #
268
+ def create_feature_group request, options = nil
269
+ raise ::ArgumentError, "request must be provided" if request.nil?
270
+
271
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateFeatureGroupRequest
272
+
273
+ # Converts hash and nil to an options object
274
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
275
+
276
+ # Customize the options with defaults
277
+ call_metadata = @config.rpcs.create_feature_group.metadata.to_h
278
+
279
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
280
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
281
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
282
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
283
+ transports_version_send: [:rest]
284
+
285
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
286
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
287
+
288
+ options.apply_defaults timeout: @config.rpcs.create_feature_group.timeout,
289
+ metadata: call_metadata,
290
+ retry_policy: @config.rpcs.create_feature_group.retry_policy
291
+
292
+ options.apply_defaults timeout: @config.timeout,
293
+ metadata: @config.metadata,
294
+ retry_policy: @config.retry_policy
295
+
296
+ @feature_registry_service_stub.create_feature_group request, options do |result, operation|
297
+ result = ::Gapic::Operation.new result, @operations_client, options: options
298
+ yield result, operation if block_given?
299
+ return result
300
+ end
301
+ rescue ::Gapic::Rest::Error => e
302
+ raise ::Google::Cloud::Error.from_error(e)
303
+ end
304
+
305
+ ##
306
+ # Gets details of a single FeatureGroup.
307
+ #
308
+ # @overload get_feature_group(request, options = nil)
309
+ # Pass arguments to `get_feature_group` via a request object, either of type
310
+ # {::Google::Cloud::AIPlatform::V1::GetFeatureGroupRequest} or an equivalent Hash.
311
+ #
312
+ # @param request [::Google::Cloud::AIPlatform::V1::GetFeatureGroupRequest, ::Hash]
313
+ # A request object representing the call parameters. Required. To specify no
314
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
315
+ # @param options [::Gapic::CallOptions, ::Hash]
316
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
317
+ #
318
+ # @overload get_feature_group(name: nil)
319
+ # Pass arguments to `get_feature_group` via keyword arguments. Note that at
320
+ # least one keyword argument is required. To specify no parameters, or to keep all
321
+ # the default parameter values, pass an empty Hash as a request object (see above).
322
+ #
323
+ # @param name [::String]
324
+ # Required. The name of the FeatureGroup resource.
325
+ # @yield [result, operation] Access the result along with the TransportOperation object
326
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::FeatureGroup]
327
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
328
+ #
329
+ # @return [::Google::Cloud::AIPlatform::V1::FeatureGroup]
330
+ #
331
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
332
+ #
333
+ # @example Basic example
334
+ # require "google/cloud/ai_platform/v1"
335
+ #
336
+ # # Create a client object. The client can be reused for multiple calls.
337
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
338
+ #
339
+ # # Create a request. To set request fields, pass in keyword arguments.
340
+ # request = Google::Cloud::AIPlatform::V1::GetFeatureGroupRequest.new
341
+ #
342
+ # # Call the get_feature_group method.
343
+ # result = client.get_feature_group request
344
+ #
345
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::FeatureGroup.
346
+ # p result
347
+ #
348
+ def get_feature_group request, options = nil
349
+ raise ::ArgumentError, "request must be provided" if request.nil?
350
+
351
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetFeatureGroupRequest
352
+
353
+ # Converts hash and nil to an options object
354
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
355
+
356
+ # Customize the options with defaults
357
+ call_metadata = @config.rpcs.get_feature_group.metadata.to_h
358
+
359
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
360
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
361
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
362
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
363
+ transports_version_send: [:rest]
364
+
365
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
366
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
367
+
368
+ options.apply_defaults timeout: @config.rpcs.get_feature_group.timeout,
369
+ metadata: call_metadata,
370
+ retry_policy: @config.rpcs.get_feature_group.retry_policy
371
+
372
+ options.apply_defaults timeout: @config.timeout,
373
+ metadata: @config.metadata,
374
+ retry_policy: @config.retry_policy
375
+
376
+ @feature_registry_service_stub.get_feature_group request, options do |result, operation|
377
+ yield result, operation if block_given?
378
+ return result
379
+ end
380
+ rescue ::Gapic::Rest::Error => e
381
+ raise ::Google::Cloud::Error.from_error(e)
382
+ end
383
+
384
+ ##
385
+ # Lists FeatureGroups in a given project and location.
386
+ #
387
+ # @overload list_feature_groups(request, options = nil)
388
+ # Pass arguments to `list_feature_groups` via a request object, either of type
389
+ # {::Google::Cloud::AIPlatform::V1::ListFeatureGroupsRequest} or an equivalent Hash.
390
+ #
391
+ # @param request [::Google::Cloud::AIPlatform::V1::ListFeatureGroupsRequest, ::Hash]
392
+ # A request object representing the call parameters. Required. To specify no
393
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
394
+ # @param options [::Gapic::CallOptions, ::Hash]
395
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
396
+ #
397
+ # @overload list_feature_groups(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil)
398
+ # Pass arguments to `list_feature_groups` via keyword arguments. Note that at
399
+ # least one keyword argument is required. To specify no parameters, or to keep all
400
+ # the default parameter values, pass an empty Hash as a request object (see above).
401
+ #
402
+ # @param parent [::String]
403
+ # Required. The resource name of the Location to list FeatureGroups.
404
+ # Format:
405
+ # `projects/{project}/locations/{location}`
406
+ # @param filter [::String]
407
+ # Lists the FeatureGroups that match the filter expression. The
408
+ # following fields are supported:
409
+ #
410
+ # * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
411
+ # Values must be
412
+ # in RFC 3339 format.
413
+ # * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
414
+ # Values must be
415
+ # in RFC 3339 format.
416
+ # * `labels`: Supports key-value equality and key presence.
417
+ #
418
+ # Examples:
419
+ #
420
+ # * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
421
+ # FeatureGroups created or updated after 2020-01-01.
422
+ # * `labels.env = "prod"`
423
+ # FeatureGroups with label "env" set to "prod".
424
+ # @param page_size [::Integer]
425
+ # The maximum number of FeatureGroups to return. The service may return
426
+ # fewer than this value. If unspecified, at most 100 FeatureGroups will
427
+ # be returned. The maximum value is 100; any value greater than 100 will be
428
+ # coerced to 100.
429
+ # @param page_token [::String]
430
+ # A page token, received from a previous
431
+ # [FeatureGroupAdminService.ListFeatureGroups][] call.
432
+ # Provide this to retrieve the subsequent page.
433
+ #
434
+ # When paginating, all other parameters provided to
435
+ # [FeatureGroupAdminService.ListFeatureGroups][] must
436
+ # match the call that provided the page token.
437
+ # @param order_by [::String]
438
+ # A comma-separated list of fields to order by, sorted in ascending order.
439
+ # Use "desc" after a field name for descending.
440
+ # Supported Fields:
441
+ #
442
+ # * `create_time`
443
+ # * `update_time`
444
+ # @yield [result, operation] Access the result along with the TransportOperation object
445
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::FeatureGroup>]
446
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
447
+ #
448
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::FeatureGroup>]
449
+ #
450
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
451
+ #
452
+ # @example Basic example
453
+ # require "google/cloud/ai_platform/v1"
454
+ #
455
+ # # Create a client object. The client can be reused for multiple calls.
456
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
457
+ #
458
+ # # Create a request. To set request fields, pass in keyword arguments.
459
+ # request = Google::Cloud::AIPlatform::V1::ListFeatureGroupsRequest.new
460
+ #
461
+ # # Call the list_feature_groups method.
462
+ # result = client.list_feature_groups request
463
+ #
464
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
465
+ # # over elements, and API calls will be issued to fetch pages as needed.
466
+ # result.each do |item|
467
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::FeatureGroup.
468
+ # p item
469
+ # end
470
+ #
471
+ def list_feature_groups request, options = nil
472
+ raise ::ArgumentError, "request must be provided" if request.nil?
473
+
474
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListFeatureGroupsRequest
475
+
476
+ # Converts hash and nil to an options object
477
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
478
+
479
+ # Customize the options with defaults
480
+ call_metadata = @config.rpcs.list_feature_groups.metadata.to_h
481
+
482
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
483
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
484
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
485
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
486
+ transports_version_send: [:rest]
487
+
488
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
489
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
490
+
491
+ options.apply_defaults timeout: @config.rpcs.list_feature_groups.timeout,
492
+ metadata: call_metadata,
493
+ retry_policy: @config.rpcs.list_feature_groups.retry_policy
494
+
495
+ options.apply_defaults timeout: @config.timeout,
496
+ metadata: @config.metadata,
497
+ retry_policy: @config.retry_policy
498
+
499
+ @feature_registry_service_stub.list_feature_groups request, options do |result, operation|
500
+ result = ::Gapic::Rest::PagedEnumerable.new @feature_registry_service_stub, :list_feature_groups, "feature_groups", request, result, options
501
+ yield result, operation if block_given?
502
+ return result
503
+ end
504
+ rescue ::Gapic::Rest::Error => e
505
+ raise ::Google::Cloud::Error.from_error(e)
506
+ end
507
+
508
+ ##
509
+ # Updates the parameters of a single FeatureGroup.
510
+ #
511
+ # @overload update_feature_group(request, options = nil)
512
+ # Pass arguments to `update_feature_group` via a request object, either of type
513
+ # {::Google::Cloud::AIPlatform::V1::UpdateFeatureGroupRequest} or an equivalent Hash.
514
+ #
515
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateFeatureGroupRequest, ::Hash]
516
+ # A request object representing the call parameters. Required. To specify no
517
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
518
+ # @param options [::Gapic::CallOptions, ::Hash]
519
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
520
+ #
521
+ # @overload update_feature_group(feature_group: nil, update_mask: nil)
522
+ # Pass arguments to `update_feature_group` via keyword arguments. Note that at
523
+ # least one keyword argument is required. To specify no parameters, or to keep all
524
+ # the default parameter values, pass an empty Hash as a request object (see above).
525
+ #
526
+ # @param feature_group [::Google::Cloud::AIPlatform::V1::FeatureGroup, ::Hash]
527
+ # Required. The FeatureGroup's `name` field is used to identify the
528
+ # FeatureGroup to be updated. Format:
529
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
530
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
531
+ # Field mask is used to specify the fields to be overwritten in the
532
+ # FeatureGroup resource by the update.
533
+ # The fields specified in the update_mask are relative to the resource, not
534
+ # the full request. A field will be overwritten if it is in the mask. If the
535
+ # user does not provide a mask then only the non-empty fields present in the
536
+ # request will be overwritten. Set the update_mask to `*` to override all
537
+ # fields.
538
+ #
539
+ # Updatable fields:
540
+ #
541
+ # * `labels`
542
+ # @yield [result, operation] Access the result along with the TransportOperation object
543
+ # @yieldparam result [::Gapic::Operation]
544
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
545
+ #
546
+ # @return [::Gapic::Operation]
547
+ #
548
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
549
+ #
550
+ # @example Basic example
551
+ # require "google/cloud/ai_platform/v1"
552
+ #
553
+ # # Create a client object. The client can be reused for multiple calls.
554
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
555
+ #
556
+ # # Create a request. To set request fields, pass in keyword arguments.
557
+ # request = Google::Cloud::AIPlatform::V1::UpdateFeatureGroupRequest.new
558
+ #
559
+ # # Call the update_feature_group method.
560
+ # result = client.update_feature_group request
561
+ #
562
+ # # The returned object is of type Gapic::Operation. You can use it to
563
+ # # check the status of an operation, cancel it, or wait for results.
564
+ # # Here is how to wait for a response.
565
+ # result.wait_until_done! timeout: 60
566
+ # if result.response?
567
+ # p result.response
568
+ # else
569
+ # puts "No response received."
570
+ # end
571
+ #
572
+ def update_feature_group request, options = nil
573
+ raise ::ArgumentError, "request must be provided" if request.nil?
574
+
575
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateFeatureGroupRequest
576
+
577
+ # Converts hash and nil to an options object
578
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
579
+
580
+ # Customize the options with defaults
581
+ call_metadata = @config.rpcs.update_feature_group.metadata.to_h
582
+
583
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
584
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
585
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
586
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
587
+ transports_version_send: [:rest]
588
+
589
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
590
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
591
+
592
+ options.apply_defaults timeout: @config.rpcs.update_feature_group.timeout,
593
+ metadata: call_metadata,
594
+ retry_policy: @config.rpcs.update_feature_group.retry_policy
595
+
596
+ options.apply_defaults timeout: @config.timeout,
597
+ metadata: @config.metadata,
598
+ retry_policy: @config.retry_policy
599
+
600
+ @feature_registry_service_stub.update_feature_group request, options do |result, operation|
601
+ result = ::Gapic::Operation.new result, @operations_client, options: options
602
+ yield result, operation if block_given?
603
+ return result
604
+ end
605
+ rescue ::Gapic::Rest::Error => e
606
+ raise ::Google::Cloud::Error.from_error(e)
607
+ end
608
+
609
+ ##
610
+ # Deletes a single FeatureGroup.
611
+ #
612
+ # @overload delete_feature_group(request, options = nil)
613
+ # Pass arguments to `delete_feature_group` via a request object, either of type
614
+ # {::Google::Cloud::AIPlatform::V1::DeleteFeatureGroupRequest} or an equivalent Hash.
615
+ #
616
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteFeatureGroupRequest, ::Hash]
617
+ # A request object representing the call parameters. Required. To specify no
618
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
619
+ # @param options [::Gapic::CallOptions, ::Hash]
620
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
621
+ #
622
+ # @overload delete_feature_group(name: nil, force: nil)
623
+ # Pass arguments to `delete_feature_group` via keyword arguments. Note that at
624
+ # least one keyword argument is required. To specify no parameters, or to keep all
625
+ # the default parameter values, pass an empty Hash as a request object (see above).
626
+ #
627
+ # @param name [::String]
628
+ # Required. The name of the FeatureGroup to be deleted.
629
+ # Format:
630
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
631
+ # @param force [::Boolean]
632
+ # If set to true, any Features under this FeatureGroup
633
+ # will also be deleted. (Otherwise, the request will only work if the
634
+ # FeatureGroup has no Features.)
635
+ # @yield [result, operation] Access the result along with the TransportOperation object
636
+ # @yieldparam result [::Gapic::Operation]
637
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
638
+ #
639
+ # @return [::Gapic::Operation]
640
+ #
641
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
642
+ #
643
+ # @example Basic example
644
+ # require "google/cloud/ai_platform/v1"
645
+ #
646
+ # # Create a client object. The client can be reused for multiple calls.
647
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
648
+ #
649
+ # # Create a request. To set request fields, pass in keyword arguments.
650
+ # request = Google::Cloud::AIPlatform::V1::DeleteFeatureGroupRequest.new
651
+ #
652
+ # # Call the delete_feature_group method.
653
+ # result = client.delete_feature_group request
654
+ #
655
+ # # The returned object is of type Gapic::Operation. You can use it to
656
+ # # check the status of an operation, cancel it, or wait for results.
657
+ # # Here is how to wait for a response.
658
+ # result.wait_until_done! timeout: 60
659
+ # if result.response?
660
+ # p result.response
661
+ # else
662
+ # puts "No response received."
663
+ # end
664
+ #
665
+ def delete_feature_group request, options = nil
666
+ raise ::ArgumentError, "request must be provided" if request.nil?
667
+
668
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteFeatureGroupRequest
669
+
670
+ # Converts hash and nil to an options object
671
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
672
+
673
+ # Customize the options with defaults
674
+ call_metadata = @config.rpcs.delete_feature_group.metadata.to_h
675
+
676
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
677
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
678
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
679
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
680
+ transports_version_send: [:rest]
681
+
682
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
683
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
684
+
685
+ options.apply_defaults timeout: @config.rpcs.delete_feature_group.timeout,
686
+ metadata: call_metadata,
687
+ retry_policy: @config.rpcs.delete_feature_group.retry_policy
688
+
689
+ options.apply_defaults timeout: @config.timeout,
690
+ metadata: @config.metadata,
691
+ retry_policy: @config.retry_policy
692
+
693
+ @feature_registry_service_stub.delete_feature_group request, options do |result, operation|
694
+ result = ::Gapic::Operation.new result, @operations_client, options: options
695
+ yield result, operation if block_given?
696
+ return result
697
+ end
698
+ rescue ::Gapic::Rest::Error => e
699
+ raise ::Google::Cloud::Error.from_error(e)
700
+ end
701
+
702
+ ##
703
+ # Creates a new Feature in a given FeatureGroup.
704
+ #
705
+ # @overload create_feature(request, options = nil)
706
+ # Pass arguments to `create_feature` via a request object, either of type
707
+ # {::Google::Cloud::AIPlatform::V1::CreateFeatureRequest} or an equivalent Hash.
708
+ #
709
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateFeatureRequest, ::Hash]
710
+ # A request object representing the call parameters. Required. To specify no
711
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
712
+ # @param options [::Gapic::CallOptions, ::Hash]
713
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
714
+ #
715
+ # @overload create_feature(parent: nil, feature: nil, feature_id: nil)
716
+ # Pass arguments to `create_feature` via keyword arguments. Note that at
717
+ # least one keyword argument is required. To specify no parameters, or to keep all
718
+ # the default parameter values, pass an empty Hash as a request object (see above).
719
+ #
720
+ # @param parent [::String]
721
+ # Required. The resource name of the EntityType or FeatureGroup to create a
722
+ # Feature. Format for entity_type as parent:
723
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
724
+ # Format for feature_group as parent:
725
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
726
+ # @param feature [::Google::Cloud::AIPlatform::V1::Feature, ::Hash]
727
+ # Required. The Feature to create.
728
+ # @param feature_id [::String]
729
+ # Required. The ID to use for the Feature, which will become the final
730
+ # component of the Feature's resource name.
731
+ #
732
+ # This value may be up to 128 characters, and valid characters are
733
+ # `[a-z0-9_]`. The first character cannot be a number.
734
+ #
735
+ # The value must be unique within an EntityType/FeatureGroup.
736
+ # @yield [result, operation] Access the result along with the TransportOperation object
737
+ # @yieldparam result [::Gapic::Operation]
738
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
739
+ #
740
+ # @return [::Gapic::Operation]
741
+ #
742
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
743
+ #
744
+ # @example Basic example
745
+ # require "google/cloud/ai_platform/v1"
746
+ #
747
+ # # Create a client object. The client can be reused for multiple calls.
748
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
749
+ #
750
+ # # Create a request. To set request fields, pass in keyword arguments.
751
+ # request = Google::Cloud::AIPlatform::V1::CreateFeatureRequest.new
752
+ #
753
+ # # Call the create_feature method.
754
+ # result = client.create_feature request
755
+ #
756
+ # # The returned object is of type Gapic::Operation. You can use it to
757
+ # # check the status of an operation, cancel it, or wait for results.
758
+ # # Here is how to wait for a response.
759
+ # result.wait_until_done! timeout: 60
760
+ # if result.response?
761
+ # p result.response
762
+ # else
763
+ # puts "No response received."
764
+ # end
765
+ #
766
+ def create_feature request, options = nil
767
+ raise ::ArgumentError, "request must be provided" if request.nil?
768
+
769
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateFeatureRequest
770
+
771
+ # Converts hash and nil to an options object
772
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
773
+
774
+ # Customize the options with defaults
775
+ call_metadata = @config.rpcs.create_feature.metadata.to_h
776
+
777
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
778
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
779
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
780
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
781
+ transports_version_send: [:rest]
782
+
783
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
784
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
785
+
786
+ options.apply_defaults timeout: @config.rpcs.create_feature.timeout,
787
+ metadata: call_metadata,
788
+ retry_policy: @config.rpcs.create_feature.retry_policy
789
+
790
+ options.apply_defaults timeout: @config.timeout,
791
+ metadata: @config.metadata,
792
+ retry_policy: @config.retry_policy
793
+
794
+ @feature_registry_service_stub.create_feature request, options do |result, operation|
795
+ result = ::Gapic::Operation.new result, @operations_client, options: options
796
+ yield result, operation if block_given?
797
+ return result
798
+ end
799
+ rescue ::Gapic::Rest::Error => e
800
+ raise ::Google::Cloud::Error.from_error(e)
801
+ end
802
+
803
+ ##
804
+ # Gets details of a single Feature.
805
+ #
806
+ # @overload get_feature(request, options = nil)
807
+ # Pass arguments to `get_feature` via a request object, either of type
808
+ # {::Google::Cloud::AIPlatform::V1::GetFeatureRequest} or an equivalent Hash.
809
+ #
810
+ # @param request [::Google::Cloud::AIPlatform::V1::GetFeatureRequest, ::Hash]
811
+ # A request object representing the call parameters. Required. To specify no
812
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
813
+ # @param options [::Gapic::CallOptions, ::Hash]
814
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
815
+ #
816
+ # @overload get_feature(name: nil)
817
+ # Pass arguments to `get_feature` via keyword arguments. Note that at
818
+ # least one keyword argument is required. To specify no parameters, or to keep all
819
+ # the default parameter values, pass an empty Hash as a request object (see above).
820
+ #
821
+ # @param name [::String]
822
+ # Required. The name of the Feature resource.
823
+ # Format for entity_type as parent:
824
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
825
+ # Format for feature_group as parent:
826
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
827
+ # @yield [result, operation] Access the result along with the TransportOperation object
828
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Feature]
829
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
830
+ #
831
+ # @return [::Google::Cloud::AIPlatform::V1::Feature]
832
+ #
833
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
834
+ #
835
+ # @example Basic example
836
+ # require "google/cloud/ai_platform/v1"
837
+ #
838
+ # # Create a client object. The client can be reused for multiple calls.
839
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
840
+ #
841
+ # # Create a request. To set request fields, pass in keyword arguments.
842
+ # request = Google::Cloud::AIPlatform::V1::GetFeatureRequest.new
843
+ #
844
+ # # Call the get_feature method.
845
+ # result = client.get_feature request
846
+ #
847
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Feature.
848
+ # p result
849
+ #
850
+ def get_feature request, options = nil
851
+ raise ::ArgumentError, "request must be provided" if request.nil?
852
+
853
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetFeatureRequest
854
+
855
+ # Converts hash and nil to an options object
856
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
857
+
858
+ # Customize the options with defaults
859
+ call_metadata = @config.rpcs.get_feature.metadata.to_h
860
+
861
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
862
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
863
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
864
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
865
+ transports_version_send: [:rest]
866
+
867
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
868
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
869
+
870
+ options.apply_defaults timeout: @config.rpcs.get_feature.timeout,
871
+ metadata: call_metadata,
872
+ retry_policy: @config.rpcs.get_feature.retry_policy
873
+
874
+ options.apply_defaults timeout: @config.timeout,
875
+ metadata: @config.metadata,
876
+ retry_policy: @config.retry_policy
877
+
878
+ @feature_registry_service_stub.get_feature request, options do |result, operation|
879
+ yield result, operation if block_given?
880
+ return result
881
+ end
882
+ rescue ::Gapic::Rest::Error => e
883
+ raise ::Google::Cloud::Error.from_error(e)
884
+ end
885
+
886
+ ##
887
+ # Lists Features in a given FeatureGroup.
888
+ #
889
+ # @overload list_features(request, options = nil)
890
+ # Pass arguments to `list_features` via a request object, either of type
891
+ # {::Google::Cloud::AIPlatform::V1::ListFeaturesRequest} or an equivalent Hash.
892
+ #
893
+ # @param request [::Google::Cloud::AIPlatform::V1::ListFeaturesRequest, ::Hash]
894
+ # A request object representing the call parameters. Required. To specify no
895
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
896
+ # @param options [::Gapic::CallOptions, ::Hash]
897
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
898
+ #
899
+ # @overload list_features(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil, latest_stats_count: nil)
900
+ # Pass arguments to `list_features` via keyword arguments. Note that at
901
+ # least one keyword argument is required. To specify no parameters, or to keep all
902
+ # the default parameter values, pass an empty Hash as a request object (see above).
903
+ #
904
+ # @param parent [::String]
905
+ # Required. The resource name of the Location to list Features.
906
+ # Format for entity_type as parent:
907
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
908
+ # Format for feature_group as parent:
909
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
910
+ # @param filter [::String]
911
+ # Lists the Features that match the filter expression. The following
912
+ # filters are supported:
913
+ #
914
+ # * `value_type`: Supports = and != comparisons.
915
+ # * `create_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must
916
+ # be in RFC 3339 format.
917
+ # * `update_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must
918
+ # be in RFC 3339 format.
919
+ # * `labels`: Supports key-value equality as well as key presence.
920
+ #
921
+ # Examples:
922
+ #
923
+ # * `value_type = DOUBLE` --> Features whose type is DOUBLE.
924
+ # * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
925
+ # update_time > \"2020-01-31T15:30:00.000000Z\"` --> EntityTypes created
926
+ # or updated after 2020-01-31T15:30:00.000000Z.
927
+ # * `labels.active = yes AND labels.env = prod` --> Features having both
928
+ # (active: yes) and (env: prod) labels.
929
+ # * `labels.env: *` --> Any Feature which has a label with 'env' as the
930
+ # key.
931
+ # @param page_size [::Integer]
932
+ # The maximum number of Features to return. The service may return fewer
933
+ # than this value. If unspecified, at most 1000 Features will be returned.
934
+ # The maximum value is 1000; any value greater than 1000 will be coerced to
935
+ # 1000.
936
+ # @param page_token [::String]
937
+ # A page token, received from a previous
938
+ # {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client#list_features FeaturestoreService.ListFeatures}
939
+ # call or
940
+ # {::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client#list_features FeatureRegistryService.ListFeatures}
941
+ # call. Provide this to retrieve the subsequent page.
942
+ #
943
+ # When paginating, all other parameters provided to
944
+ # {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client#list_features FeaturestoreService.ListFeatures}
945
+ # or
946
+ # {::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client#list_features FeatureRegistryService.ListFeatures}
947
+ # must match the call that provided the page token.
948
+ # @param order_by [::String]
949
+ # A comma-separated list of fields to order by, sorted in ascending order.
950
+ # Use "desc" after a field name for descending.
951
+ # Supported fields:
952
+ #
953
+ # * `feature_id`
954
+ # * `value_type` (Not supported for FeatureRegistry Feature)
955
+ # * `create_time`
956
+ # * `update_time`
957
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
958
+ # Mask specifying which fields to read.
959
+ # @param latest_stats_count [::Integer]
960
+ # Only applicable for Vertex AI Feature Store (Legacy).
961
+ # If set, return the most recent
962
+ # {::Google::Cloud::AIPlatform::V1::ListFeaturesRequest#latest_stats_count ListFeaturesRequest.latest_stats_count}
963
+ # of stats for each Feature in response. Valid value is [0, 10]. If number of
964
+ # stats exists <
965
+ # {::Google::Cloud::AIPlatform::V1::ListFeaturesRequest#latest_stats_count ListFeaturesRequest.latest_stats_count},
966
+ # return all existing stats.
967
+ # @yield [result, operation] Access the result along with the TransportOperation object
968
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Feature>]
969
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
970
+ #
971
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Feature>]
972
+ #
973
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
974
+ #
975
+ # @example Basic example
976
+ # require "google/cloud/ai_platform/v1"
977
+ #
978
+ # # Create a client object. The client can be reused for multiple calls.
979
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
980
+ #
981
+ # # Create a request. To set request fields, pass in keyword arguments.
982
+ # request = Google::Cloud::AIPlatform::V1::ListFeaturesRequest.new
983
+ #
984
+ # # Call the list_features method.
985
+ # result = client.list_features request
986
+ #
987
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
988
+ # # over elements, and API calls will be issued to fetch pages as needed.
989
+ # result.each do |item|
990
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Feature.
991
+ # p item
992
+ # end
993
+ #
994
+ def list_features request, options = nil
995
+ raise ::ArgumentError, "request must be provided" if request.nil?
996
+
997
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListFeaturesRequest
998
+
999
+ # Converts hash and nil to an options object
1000
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1001
+
1002
+ # Customize the options with defaults
1003
+ call_metadata = @config.rpcs.list_features.metadata.to_h
1004
+
1005
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1006
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1007
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1008
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1009
+ transports_version_send: [:rest]
1010
+
1011
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1012
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1013
+
1014
+ options.apply_defaults timeout: @config.rpcs.list_features.timeout,
1015
+ metadata: call_metadata,
1016
+ retry_policy: @config.rpcs.list_features.retry_policy
1017
+
1018
+ options.apply_defaults timeout: @config.timeout,
1019
+ metadata: @config.metadata,
1020
+ retry_policy: @config.retry_policy
1021
+
1022
+ @feature_registry_service_stub.list_features request, options do |result, operation|
1023
+ result = ::Gapic::Rest::PagedEnumerable.new @feature_registry_service_stub, :list_features, "features", request, result, options
1024
+ yield result, operation if block_given?
1025
+ return result
1026
+ end
1027
+ rescue ::Gapic::Rest::Error => e
1028
+ raise ::Google::Cloud::Error.from_error(e)
1029
+ end
1030
+
1031
+ ##
1032
+ # Updates the parameters of a single Feature.
1033
+ #
1034
+ # @overload update_feature(request, options = nil)
1035
+ # Pass arguments to `update_feature` via a request object, either of type
1036
+ # {::Google::Cloud::AIPlatform::V1::UpdateFeatureRequest} or an equivalent Hash.
1037
+ #
1038
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateFeatureRequest, ::Hash]
1039
+ # A request object representing the call parameters. Required. To specify no
1040
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1041
+ # @param options [::Gapic::CallOptions, ::Hash]
1042
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1043
+ #
1044
+ # @overload update_feature(feature: nil, update_mask: nil)
1045
+ # Pass arguments to `update_feature` via keyword arguments. Note that at
1046
+ # least one keyword argument is required. To specify no parameters, or to keep all
1047
+ # the default parameter values, pass an empty Hash as a request object (see above).
1048
+ #
1049
+ # @param feature [::Google::Cloud::AIPlatform::V1::Feature, ::Hash]
1050
+ # Required. The Feature's `name` field is used to identify the Feature to be
1051
+ # updated.
1052
+ # Format:
1053
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`
1054
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`
1055
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1056
+ # Field mask is used to specify the fields to be overwritten in the
1057
+ # Features resource by the update.
1058
+ # The fields specified in the update_mask are relative to the resource, not
1059
+ # the full request. A field will be overwritten if it is in the mask. If the
1060
+ # user does not provide a mask then only the non-empty fields present in the
1061
+ # request will be overwritten. Set the update_mask to `*` to override all
1062
+ # fields.
1063
+ #
1064
+ # Updatable fields:
1065
+ #
1066
+ # * `description`
1067
+ # * `labels`
1068
+ # * `disable_monitoring` (Not supported for FeatureRegistry Feature)
1069
+ # @yield [result, operation] Access the result along with the TransportOperation object
1070
+ # @yieldparam result [::Gapic::Operation]
1071
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1072
+ #
1073
+ # @return [::Gapic::Operation]
1074
+ #
1075
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1076
+ #
1077
+ # @example Basic example
1078
+ # require "google/cloud/ai_platform/v1"
1079
+ #
1080
+ # # Create a client object. The client can be reused for multiple calls.
1081
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
1082
+ #
1083
+ # # Create a request. To set request fields, pass in keyword arguments.
1084
+ # request = Google::Cloud::AIPlatform::V1::UpdateFeatureRequest.new
1085
+ #
1086
+ # # Call the update_feature method.
1087
+ # result = client.update_feature request
1088
+ #
1089
+ # # The returned object is of type Gapic::Operation. You can use it to
1090
+ # # check the status of an operation, cancel it, or wait for results.
1091
+ # # Here is how to wait for a response.
1092
+ # result.wait_until_done! timeout: 60
1093
+ # if result.response?
1094
+ # p result.response
1095
+ # else
1096
+ # puts "No response received."
1097
+ # end
1098
+ #
1099
+ def update_feature request, options = nil
1100
+ raise ::ArgumentError, "request must be provided" if request.nil?
1101
+
1102
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateFeatureRequest
1103
+
1104
+ # Converts hash and nil to an options object
1105
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1106
+
1107
+ # Customize the options with defaults
1108
+ call_metadata = @config.rpcs.update_feature.metadata.to_h
1109
+
1110
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1111
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1112
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1113
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1114
+ transports_version_send: [:rest]
1115
+
1116
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1117
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1118
+
1119
+ options.apply_defaults timeout: @config.rpcs.update_feature.timeout,
1120
+ metadata: call_metadata,
1121
+ retry_policy: @config.rpcs.update_feature.retry_policy
1122
+
1123
+ options.apply_defaults timeout: @config.timeout,
1124
+ metadata: @config.metadata,
1125
+ retry_policy: @config.retry_policy
1126
+
1127
+ @feature_registry_service_stub.update_feature request, options do |result, operation|
1128
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1129
+ yield result, operation if block_given?
1130
+ return result
1131
+ end
1132
+ rescue ::Gapic::Rest::Error => e
1133
+ raise ::Google::Cloud::Error.from_error(e)
1134
+ end
1135
+
1136
+ ##
1137
+ # Deletes a single Feature.
1138
+ #
1139
+ # @overload delete_feature(request, options = nil)
1140
+ # Pass arguments to `delete_feature` via a request object, either of type
1141
+ # {::Google::Cloud::AIPlatform::V1::DeleteFeatureRequest} or an equivalent Hash.
1142
+ #
1143
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteFeatureRequest, ::Hash]
1144
+ # A request object representing the call parameters. Required. To specify no
1145
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1146
+ # @param options [::Gapic::CallOptions, ::Hash]
1147
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1148
+ #
1149
+ # @overload delete_feature(name: nil)
1150
+ # Pass arguments to `delete_feature` via keyword arguments. Note that at
1151
+ # least one keyword argument is required. To specify no parameters, or to keep all
1152
+ # the default parameter values, pass an empty Hash as a request object (see above).
1153
+ #
1154
+ # @param name [::String]
1155
+ # Required. The name of the Features to be deleted.
1156
+ # Format:
1157
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`
1158
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`
1159
+ # @yield [result, operation] Access the result along with the TransportOperation object
1160
+ # @yieldparam result [::Gapic::Operation]
1161
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1162
+ #
1163
+ # @return [::Gapic::Operation]
1164
+ #
1165
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1166
+ #
1167
+ # @example Basic example
1168
+ # require "google/cloud/ai_platform/v1"
1169
+ #
1170
+ # # Create a client object. The client can be reused for multiple calls.
1171
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
1172
+ #
1173
+ # # Create a request. To set request fields, pass in keyword arguments.
1174
+ # request = Google::Cloud::AIPlatform::V1::DeleteFeatureRequest.new
1175
+ #
1176
+ # # Call the delete_feature method.
1177
+ # result = client.delete_feature request
1178
+ #
1179
+ # # The returned object is of type Gapic::Operation. You can use it to
1180
+ # # check the status of an operation, cancel it, or wait for results.
1181
+ # # Here is how to wait for a response.
1182
+ # result.wait_until_done! timeout: 60
1183
+ # if result.response?
1184
+ # p result.response
1185
+ # else
1186
+ # puts "No response received."
1187
+ # end
1188
+ #
1189
+ def delete_feature request, options = nil
1190
+ raise ::ArgumentError, "request must be provided" if request.nil?
1191
+
1192
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteFeatureRequest
1193
+
1194
+ # Converts hash and nil to an options object
1195
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1196
+
1197
+ # Customize the options with defaults
1198
+ call_metadata = @config.rpcs.delete_feature.metadata.to_h
1199
+
1200
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1201
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1202
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1203
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1204
+ transports_version_send: [:rest]
1205
+
1206
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1207
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1208
+
1209
+ options.apply_defaults timeout: @config.rpcs.delete_feature.timeout,
1210
+ metadata: call_metadata,
1211
+ retry_policy: @config.rpcs.delete_feature.retry_policy
1212
+
1213
+ options.apply_defaults timeout: @config.timeout,
1214
+ metadata: @config.metadata,
1215
+ retry_policy: @config.retry_policy
1216
+
1217
+ @feature_registry_service_stub.delete_feature request, options do |result, operation|
1218
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1219
+ yield result, operation if block_given?
1220
+ return result
1221
+ end
1222
+ rescue ::Gapic::Rest::Error => e
1223
+ raise ::Google::Cloud::Error.from_error(e)
1224
+ end
1225
+
1226
+ ##
1227
+ # Configuration class for the FeatureRegistryService REST API.
1228
+ #
1229
+ # This class represents the configuration for FeatureRegistryService REST,
1230
+ # providing control over timeouts, retry behavior, logging, transport
1231
+ # parameters, and other low-level controls. Certain parameters can also be
1232
+ # applied individually to specific RPCs. See
1233
+ # {::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client::Configuration::Rpcs}
1234
+ # for a list of RPCs that can be configured independently.
1235
+ #
1236
+ # Configuration can be applied globally to all clients, or to a single client
1237
+ # on construction.
1238
+ #
1239
+ # @example
1240
+ #
1241
+ # # Modify the global config, setting the timeout for
1242
+ # # create_feature_group to 20 seconds,
1243
+ # # and all remaining timeouts to 10 seconds.
1244
+ # ::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.configure do |config|
1245
+ # config.timeout = 10.0
1246
+ # config.rpcs.create_feature_group.timeout = 20.0
1247
+ # end
1248
+ #
1249
+ # # Apply the above configuration only to a new client.
1250
+ # client = ::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new do |config|
1251
+ # config.timeout = 10.0
1252
+ # config.rpcs.create_feature_group.timeout = 20.0
1253
+ # end
1254
+ #
1255
+ # @!attribute [rw] endpoint
1256
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1257
+ # nil, indicating to use the default endpoint in the current universe domain.
1258
+ # @return [::String,nil]
1259
+ # @!attribute [rw] credentials
1260
+ # Credentials to send with calls. You may provide any of the following types:
1261
+ # * (`String`) The path to a service account key file in JSON format
1262
+ # * (`Hash`) A service account key as a Hash
1263
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1264
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1265
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1266
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1267
+ # * (`nil`) indicating no credentials
1268
+ # @return [::Object]
1269
+ # @!attribute [rw] scope
1270
+ # The OAuth scopes
1271
+ # @return [::Array<::String>]
1272
+ # @!attribute [rw] lib_name
1273
+ # The library name as recorded in instrumentation and logging
1274
+ # @return [::String]
1275
+ # @!attribute [rw] lib_version
1276
+ # The library version as recorded in instrumentation and logging
1277
+ # @return [::String]
1278
+ # @!attribute [rw] timeout
1279
+ # The call timeout in seconds.
1280
+ # @return [::Numeric]
1281
+ # @!attribute [rw] metadata
1282
+ # Additional headers to be sent with the call.
1283
+ # @return [::Hash{::Symbol=>::String}]
1284
+ # @!attribute [rw] retry_policy
1285
+ # The retry policy. The value is a hash with the following keys:
1286
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1287
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1288
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1289
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1290
+ # trigger a retry.
1291
+ # @return [::Hash]
1292
+ # @!attribute [rw] quota_project
1293
+ # A separate project against which to charge quota.
1294
+ # @return [::String]
1295
+ # @!attribute [rw] universe_domain
1296
+ # The universe domain within which to make requests. This determines the
1297
+ # default endpoint URL. The default value of nil uses the environment
1298
+ # universe (usually the default "googleapis.com" universe).
1299
+ # @return [::String,nil]
1300
+ #
1301
+ class Configuration
1302
+ extend ::Gapic::Config
1303
+
1304
+ # @private
1305
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1306
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
1307
+
1308
+ config_attr :endpoint, nil, ::String, nil
1309
+ config_attr :credentials, nil do |value|
1310
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1311
+ allowed.any? { |klass| klass === value }
1312
+ end
1313
+ config_attr :scope, nil, ::String, ::Array, nil
1314
+ config_attr :lib_name, nil, ::String, nil
1315
+ config_attr :lib_version, nil, ::String, nil
1316
+ config_attr :timeout, nil, ::Numeric, nil
1317
+ config_attr :metadata, nil, ::Hash, nil
1318
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1319
+ config_attr :quota_project, nil, ::String, nil
1320
+ config_attr :universe_domain, nil, ::String, nil
1321
+
1322
+ # @private
1323
+ # Overrides for http bindings for the RPCs of this service
1324
+ # are only used when this service is used as mixin, and only
1325
+ # by the host service.
1326
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1327
+ config_attr :bindings_override, {}, ::Hash, nil
1328
+
1329
+ # @private
1330
+ def initialize parent_config = nil
1331
+ @parent_config = parent_config unless parent_config.nil?
1332
+
1333
+ yield self if block_given?
1334
+ end
1335
+
1336
+ ##
1337
+ # Configurations for individual RPCs
1338
+ # @return [Rpcs]
1339
+ #
1340
+ def rpcs
1341
+ @rpcs ||= begin
1342
+ parent_rpcs = nil
1343
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1344
+ Rpcs.new parent_rpcs
1345
+ end
1346
+ end
1347
+
1348
+ ##
1349
+ # Configuration RPC class for the FeatureRegistryService API.
1350
+ #
1351
+ # Includes fields providing the configuration for each RPC in this service.
1352
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1353
+ # the following configuration fields:
1354
+ #
1355
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1356
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1357
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1358
+ # include the following keys:
1359
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1360
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1361
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1362
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1363
+ # trigger a retry.
1364
+ #
1365
+ class Rpcs
1366
+ ##
1367
+ # RPC-specific configuration for `create_feature_group`
1368
+ # @return [::Gapic::Config::Method]
1369
+ #
1370
+ attr_reader :create_feature_group
1371
+ ##
1372
+ # RPC-specific configuration for `get_feature_group`
1373
+ # @return [::Gapic::Config::Method]
1374
+ #
1375
+ attr_reader :get_feature_group
1376
+ ##
1377
+ # RPC-specific configuration for `list_feature_groups`
1378
+ # @return [::Gapic::Config::Method]
1379
+ #
1380
+ attr_reader :list_feature_groups
1381
+ ##
1382
+ # RPC-specific configuration for `update_feature_group`
1383
+ # @return [::Gapic::Config::Method]
1384
+ #
1385
+ attr_reader :update_feature_group
1386
+ ##
1387
+ # RPC-specific configuration for `delete_feature_group`
1388
+ # @return [::Gapic::Config::Method]
1389
+ #
1390
+ attr_reader :delete_feature_group
1391
+ ##
1392
+ # RPC-specific configuration for `create_feature`
1393
+ # @return [::Gapic::Config::Method]
1394
+ #
1395
+ attr_reader :create_feature
1396
+ ##
1397
+ # RPC-specific configuration for `get_feature`
1398
+ # @return [::Gapic::Config::Method]
1399
+ #
1400
+ attr_reader :get_feature
1401
+ ##
1402
+ # RPC-specific configuration for `list_features`
1403
+ # @return [::Gapic::Config::Method]
1404
+ #
1405
+ attr_reader :list_features
1406
+ ##
1407
+ # RPC-specific configuration for `update_feature`
1408
+ # @return [::Gapic::Config::Method]
1409
+ #
1410
+ attr_reader :update_feature
1411
+ ##
1412
+ # RPC-specific configuration for `delete_feature`
1413
+ # @return [::Gapic::Config::Method]
1414
+ #
1415
+ attr_reader :delete_feature
1416
+
1417
+ # @private
1418
+ def initialize parent_rpcs = nil
1419
+ create_feature_group_config = parent_rpcs.create_feature_group if parent_rpcs.respond_to? :create_feature_group
1420
+ @create_feature_group = ::Gapic::Config::Method.new create_feature_group_config
1421
+ get_feature_group_config = parent_rpcs.get_feature_group if parent_rpcs.respond_to? :get_feature_group
1422
+ @get_feature_group = ::Gapic::Config::Method.new get_feature_group_config
1423
+ list_feature_groups_config = parent_rpcs.list_feature_groups if parent_rpcs.respond_to? :list_feature_groups
1424
+ @list_feature_groups = ::Gapic::Config::Method.new list_feature_groups_config
1425
+ update_feature_group_config = parent_rpcs.update_feature_group if parent_rpcs.respond_to? :update_feature_group
1426
+ @update_feature_group = ::Gapic::Config::Method.new update_feature_group_config
1427
+ delete_feature_group_config = parent_rpcs.delete_feature_group if parent_rpcs.respond_to? :delete_feature_group
1428
+ @delete_feature_group = ::Gapic::Config::Method.new delete_feature_group_config
1429
+ create_feature_config = parent_rpcs.create_feature if parent_rpcs.respond_to? :create_feature
1430
+ @create_feature = ::Gapic::Config::Method.new create_feature_config
1431
+ get_feature_config = parent_rpcs.get_feature if parent_rpcs.respond_to? :get_feature
1432
+ @get_feature = ::Gapic::Config::Method.new get_feature_config
1433
+ list_features_config = parent_rpcs.list_features if parent_rpcs.respond_to? :list_features
1434
+ @list_features = ::Gapic::Config::Method.new list_features_config
1435
+ update_feature_config = parent_rpcs.update_feature if parent_rpcs.respond_to? :update_feature
1436
+ @update_feature = ::Gapic::Config::Method.new update_feature_config
1437
+ delete_feature_config = parent_rpcs.delete_feature if parent_rpcs.respond_to? :delete_feature
1438
+ @delete_feature = ::Gapic::Config::Method.new delete_feature_config
1439
+
1440
+ yield self if block_given?
1441
+ end
1442
+ end
1443
+ end
1444
+ end
1445
+ end
1446
+ end
1447
+ end
1448
+ end
1449
+ end
1450
+ end