google-cloud-ai_platform-v1 0.38.0 → 0.40.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) 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 +39 -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 +2188 -0
  6. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +3901 -0
  7. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/service_stub.rb +1136 -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 +3901 -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 +21 -11
  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 +3901 -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 +3901 -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 +3901 -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 +3901 -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 +765 -0
  56. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/credentials.rb +47 -0
  57. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/paths.rb +154 -0
  58. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +720 -0
  59. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +307 -0
  60. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest.rb +53 -0
  61. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service.rb +55 -0
  62. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +19 -8
  63. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +13 -5
  64. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +1151 -0
  65. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +3901 -0
  66. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/service_stub.rb +546 -0
  67. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest.rb +54 -0
  68. data/lib/google/cloud/ai_platform/v1/index_endpoint_service.rb +6 -0
  69. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +17 -7
  70. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +13 -5
  71. data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +1034 -0
  72. data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +3901 -0
  73. data/lib/google/cloud/ai_platform/v1/index_service/rest/service_stub.rb +486 -0
  74. data/lib/google/cloud/ai_platform/v1/index_service/rest.rb +54 -0
  75. data/lib/google/cloud/ai_platform/v1/index_service.rb +6 -0
  76. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +73 -35
  77. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +13 -5
  78. data/lib/google/cloud/ai_platform/v1/job_service/paths.rb +19 -0
  79. data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +3841 -0
  80. data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +3901 -0
  81. data/lib/google/cloud/ai_platform/v1/job_service/rest/service_stub.rb +2149 -0
  82. data/lib/google/cloud/ai_platform/v1/job_service/rest.rb +54 -0
  83. data/lib/google/cloud/ai_platform/v1/job_service.rb +6 -0
  84. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +7 -2
  85. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +533 -0
  86. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/service_stub.rb +205 -0
  87. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest.rb +53 -0
  88. data/lib/google/cloud/ai_platform/v1/llm_utility_service.rb +6 -0
  89. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +7 -2
  90. data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +541 -0
  91. data/lib/google/cloud/ai_platform/v1/match_service/rest/service_stub.rb +189 -0
  92. data/lib/google/cloud/ai_platform/v1/match_service/rest.rb +54 -0
  93. data/lib/google/cloud/ai_platform/v1/match_service.rb +6 -0
  94. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +67 -32
  95. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +13 -5
  96. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +3634 -0
  97. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +3901 -0
  98. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/service_stub.rb +1972 -0
  99. data/lib/google/cloud/ai_platform/v1/metadata_service/rest.rb +54 -0
  100. data/lib/google/cloud/ai_platform/v1/metadata_service.rb +6 -0
  101. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +7 -2
  102. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +13 -5
  103. data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +574 -0
  104. data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +3901 -0
  105. data/lib/google/cloud/ai_platform/v1/migration_service/rest/service_stub.rb +189 -0
  106. data/lib/google/cloud/ai_platform/v1/migration_service/rest.rb +55 -0
  107. data/lib/google/cloud/ai_platform/v1/migration_service.rb +6 -0
  108. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +5 -1
  109. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +438 -0
  110. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +128 -0
  111. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb +53 -0
  112. data/lib/google/cloud/ai_platform/v1/model_garden_service.rb +6 -0
  113. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +39 -18
  114. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +13 -5
  115. data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +2213 -0
  116. data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +3901 -0
  117. data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +1140 -0
  118. data/lib/google/cloud/ai_platform/v1/model_service/rest.rb +54 -0
  119. data/lib/google/cloud/ai_platform/v1/model_service.rb +6 -0
  120. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +1497 -0
  121. data/lib/google/cloud/ai_platform/v1/notebook_service/credentials.rb +47 -0
  122. data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +817 -0
  123. data/lib/google/cloud/ai_platform/v1/notebook_service/paths.rb +124 -0
  124. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +1410 -0
  125. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +3901 -0
  126. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +663 -0
  127. data/lib/google/cloud/ai_platform/v1/notebook_service/rest.rb +54 -0
  128. data/lib/google/cloud/ai_platform/v1/notebook_service.rb +56 -0
  129. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +1001 -0
  130. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/credentials.rb +47 -0
  131. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +817 -0
  132. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/paths.rb +86 -0
  133. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +942 -0
  134. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +3901 -0
  135. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/service_stub.rb +426 -0
  136. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest.rb +54 -0
  137. data/lib/google/cloud/ai_platform/v1/persistent_resource_service.rb +56 -0
  138. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +27 -12
  139. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +13 -5
  140. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +1600 -0
  141. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +3901 -0
  142. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/service_stub.rb +783 -0
  143. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest.rb +56 -0
  144. data/lib/google/cloud/ai_platform/v1/pipeline_service.rb +6 -0
  145. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +39 -15
  146. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +1297 -0
  147. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +642 -0
  148. data/lib/google/cloud/ai_platform/v1/prediction_service/rest.rb +53 -0
  149. data/lib/google/cloud/ai_platform/v1/prediction_service.rb +6 -0
  150. data/lib/google/cloud/ai_platform/v1/rest.rb +63 -0
  151. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +17 -7
  152. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +13 -5
  153. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +1076 -0
  154. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +3901 -0
  155. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/service_stub.rb +486 -0
  156. data/lib/google/cloud/ai_platform/v1/schedule_service/rest.rb +55 -0
  157. data/lib/google/cloud/ai_platform/v1/schedule_service.rb +6 -0
  158. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +13 -5
  159. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +13 -5
  160. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +847 -0
  161. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +3901 -0
  162. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/service_stub.rb +366 -0
  163. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest.rb +59 -0
  164. data/lib/google/cloud/ai_platform/v1/specialist_pool_service.rb +6 -0
  165. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +63 -30
  166. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +13 -5
  167. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +3274 -0
  168. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +3901 -0
  169. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/service_stub.rb +1847 -0
  170. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest.rb +54 -0
  171. data/lib/google/cloud/ai_platform/v1/tensorboard_service.rb +6 -0
  172. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  173. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +33 -15
  174. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +13 -5
  175. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +1788 -0
  176. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +3901 -0
  177. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +963 -0
  178. data/lib/google/cloud/ai_platform/v1/vizier_service/rest.rb +58 -0
  179. data/lib/google/cloud/ai_platform/v1/vizier_service.rb +6 -0
  180. data/lib/google/cloud/ai_platform/v1.rb +9 -1
  181. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
  182. data/lib/google/cloud/aiplatform/v1/content_pb.rb +3 -1
  183. data/lib/google/cloud/aiplatform/v1/custom_job_pb.rb +1 -1
  184. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +3 -1
  185. data/lib/google/cloud/aiplatform/v1/feature_online_store_pb.rb +3 -1
  186. data/lib/google/cloud/aiplatform/v1/feature_online_store_service_pb.rb +1 -1
  187. data/lib/google/cloud/aiplatform/v1/feature_view_pb.rb +5 -1
  188. data/lib/google/cloud/aiplatform/v1/genai_tuning_service_pb.rb +54 -0
  189. data/lib/google/cloud/aiplatform/v1/genai_tuning_service_services_pb.rb +63 -0
  190. data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +1 -1
  191. data/lib/google/cloud/aiplatform/v1/machine_resources_pb.rb +2 -1
  192. data/lib/google/cloud/aiplatform/v1/network_spec_pb.rb +44 -0
  193. data/lib/google/cloud/aiplatform/v1/notebook_euc_config_pb.rb +44 -0
  194. data/lib/google/cloud/aiplatform/v1/notebook_idle_shutdown_config_pb.rb +46 -0
  195. data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +61 -0
  196. data/lib/google/cloud/aiplatform/v1/notebook_runtime_template_ref_pb.rb +45 -0
  197. data/lib/google/cloud/aiplatform/v1/notebook_service_pb.rb +72 -0
  198. data/lib/google/cloud/aiplatform/v1/notebook_service_services_pb.rb +64 -0
  199. data/lib/google/cloud/aiplatform/v1/openapi_pb.rb +1 -1
  200. data/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb +60 -0
  201. data/lib/google/cloud/aiplatform/v1/persistent_resource_service_pb.rb +64 -0
  202. data/lib/google/cloud/aiplatform/v1/persistent_resource_service_services_pb.rb +55 -0
  203. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
  204. data/lib/google/cloud/aiplatform/v1/publisher_model_pb.rb +1 -1
  205. data/lib/google/cloud/aiplatform/v1/tuning_job_pb.rb +60 -0
  206. data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
  207. data/proto_docs/google/cloud/aiplatform/v1/content.rb +52 -3
  208. data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +9 -0
  209. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +14 -0
  210. data/proto_docs/google/cloud/aiplatform/v1/endpoint_service.rb +2 -3
  211. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +29 -0
  212. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb +5 -0
  213. data/proto_docs/google/cloud/aiplatform/v1/feature_registry_service.rb +1 -1
  214. data/proto_docs/google/cloud/aiplatform/v1/feature_view.rb +86 -0
  215. data/proto_docs/google/cloud/aiplatform/v1/genai_tuning_service.rb +100 -0
  216. data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +3 -0
  217. data/proto_docs/google/cloud/aiplatform/v1/machine_resources.rb +17 -0
  218. data/proto_docs/google/cloud/aiplatform/v1/network_spec.rb +44 -0
  219. data/proto_docs/google/cloud/aiplatform/v1/notebook_euc_config.rb +46 -0
  220. data/proto_docs/google/cloud/aiplatform/v1/notebook_idle_shutdown_config.rb +41 -0
  221. data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +263 -0
  222. data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime_template_ref.rb +35 -0
  223. data/proto_docs/google/cloud/aiplatform/v1/notebook_service.rb +371 -0
  224. data/proto_docs/google/cloud/aiplatform/v1/openapi.rb +43 -4
  225. data/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb +248 -0
  226. data/proto_docs/google/cloud/aiplatform/v1/persistent_resource_service.rb +170 -0
  227. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +12 -0
  228. data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +4 -0
  229. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +7 -5
  230. data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +262 -0
  231. metadata +138 -2
@@ -0,0 +1,2765 @@
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/featurestore_service_pb"
21
+ require "google/cloud/ai_platform/v1/featurestore_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 FeaturestoreService
30
+ module Rest
31
+ ##
32
+ # REST client for the FeaturestoreService service.
33
+ #
34
+ # The service that handles CRUD and List for resources for Featurestore.
35
+ #
36
+ class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
40
+ # @private
41
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
42
+
43
+ include Paths
44
+
45
+ # @private
46
+ attr_reader :featurestore_service_stub
47
+
48
+ ##
49
+ # Configure the FeaturestoreService Client class.
50
+ #
51
+ # See {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all FeaturestoreService clients
57
+ # ::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.configure do |config|
58
+ # config.timeout = 10.0
59
+ # end
60
+ #
61
+ # @yield [config] Configure the Client client.
62
+ # @yieldparam config [Client::Configuration]
63
+ #
64
+ # @return [Client::Configuration]
65
+ #
66
+ def self.configure
67
+ @configure ||= begin
68
+ namespace = ["Google", "Cloud", "AIPlatform", "V1"]
69
+ parent_config = while namespace.any?
70
+ parent_name = namespace.join "::"
71
+ parent_const = const_get parent_name
72
+ break parent_const.configure if parent_const.respond_to? :configure
73
+ namespace.pop
74
+ end
75
+ default_config = Client::Configuration.new parent_config
76
+
77
+ default_config
78
+ end
79
+ yield @configure if block_given?
80
+ @configure
81
+ end
82
+
83
+ ##
84
+ # Configure the FeaturestoreService Client instance.
85
+ #
86
+ # The configuration is set to the derived mode, meaning that values can be changed,
87
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
88
+ # should be made on {Client.configure}.
89
+ #
90
+ # See {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client::Configuration}
91
+ # for a description of the configuration fields.
92
+ #
93
+ # @yield [config] Configure the Client client.
94
+ # @yieldparam config [Client::Configuration]
95
+ #
96
+ # @return [Client::Configuration]
97
+ #
98
+ def configure
99
+ yield @config if block_given?
100
+ @config
101
+ end
102
+
103
+ ##
104
+ # The effective universe domain
105
+ #
106
+ # @return [String]
107
+ #
108
+ def universe_domain
109
+ @featurestore_service_stub.universe_domain
110
+ end
111
+
112
+ ##
113
+ # Create a new FeaturestoreService REST client object.
114
+ #
115
+ # @example
116
+ #
117
+ # # Create a client using the default configuration
118
+ # client = ::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
119
+ #
120
+ # # Create a client using a custom configuration
121
+ # client = ::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new do |config|
122
+ # config.timeout = 10.0
123
+ # end
124
+ #
125
+ # @yield [config] Configure the FeaturestoreService client.
126
+ # @yieldparam config [Client::Configuration]
127
+ #
128
+ def initialize
129
+ # Create the configuration object
130
+ @config = Configuration.new Client.configure
131
+
132
+ # Yield the configuration if needed
133
+ yield @config if block_given?
134
+
135
+ # Create credentials
136
+ credentials = @config.credentials
137
+ # Use self-signed JWT if the endpoint is unchanged from default,
138
+ # but only if the default endpoint does not have a region prefix.
139
+ enable_self_signed_jwt = @config.endpoint.nil? ||
140
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
141
+ !@config.endpoint.split(".").first.include?("-"))
142
+ credentials ||= Credentials.default scope: @config.scope,
143
+ enable_self_signed_jwt: enable_self_signed_jwt
144
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
145
+ credentials = Credentials.new credentials, scope: @config.scope
146
+ end
147
+
148
+ @quota_project_id = @config.quota_project
149
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
150
+
151
+ @operations_client = ::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Operations.new do |config|
152
+ config.credentials = credentials
153
+ config.quota_project = @quota_project_id
154
+ config.endpoint = @config.endpoint
155
+ config.universe_domain = @config.universe_domain
156
+ end
157
+
158
+ @featurestore_service_stub = ::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::ServiceStub.new(
159
+ endpoint: @config.endpoint,
160
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
161
+ universe_domain: @config.universe_domain,
162
+ credentials: credentials
163
+ )
164
+
165
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
166
+ config.credentials = credentials
167
+ config.quota_project = @quota_project_id
168
+ config.endpoint = @featurestore_service_stub.endpoint
169
+ config.universe_domain = @featurestore_service_stub.universe_domain
170
+ config.bindings_override = @config.bindings_override
171
+ end
172
+
173
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
174
+ config.credentials = credentials
175
+ config.quota_project = @quota_project_id
176
+ config.endpoint = @featurestore_service_stub.endpoint
177
+ config.universe_domain = @featurestore_service_stub.universe_domain
178
+ config.bindings_override = @config.bindings_override
179
+ end
180
+ end
181
+
182
+ ##
183
+ # Get the associated client for long-running operations.
184
+ #
185
+ # @return [::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Operations]
186
+ #
187
+ attr_reader :operations_client
188
+
189
+ ##
190
+ # Get the associated client for mix-in of the Locations.
191
+ #
192
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
193
+ #
194
+ attr_reader :location_client
195
+
196
+ ##
197
+ # Get the associated client for mix-in of the IAMPolicy.
198
+ #
199
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
200
+ #
201
+ attr_reader :iam_policy_client
202
+
203
+ # Service calls
204
+
205
+ ##
206
+ # Creates a new Featurestore in a given project and location.
207
+ #
208
+ # @overload create_featurestore(request, options = nil)
209
+ # Pass arguments to `create_featurestore` via a request object, either of type
210
+ # {::Google::Cloud::AIPlatform::V1::CreateFeaturestoreRequest} or an equivalent Hash.
211
+ #
212
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateFeaturestoreRequest, ::Hash]
213
+ # A request object representing the call parameters. Required. To specify no
214
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
215
+ # @param options [::Gapic::CallOptions, ::Hash]
216
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
217
+ #
218
+ # @overload create_featurestore(parent: nil, featurestore: nil, featurestore_id: nil)
219
+ # Pass arguments to `create_featurestore` via keyword arguments. Note that at
220
+ # least one keyword argument is required. To specify no parameters, or to keep all
221
+ # the default parameter values, pass an empty Hash as a request object (see above).
222
+ #
223
+ # @param parent [::String]
224
+ # Required. The resource name of the Location to create Featurestores.
225
+ # Format:
226
+ # `projects/{project}/locations/{location}`
227
+ # @param featurestore [::Google::Cloud::AIPlatform::V1::Featurestore, ::Hash]
228
+ # Required. The Featurestore to create.
229
+ # @param featurestore_id [::String]
230
+ # Required. The ID to use for this Featurestore, which will become the final
231
+ # component of the Featurestore's resource name.
232
+ #
233
+ # This value may be up to 60 characters, and valid characters are
234
+ # `[a-z0-9_]`. The first character cannot be a number.
235
+ #
236
+ # The value must be unique within the project and location.
237
+ # @yield [result, operation] Access the result along with the TransportOperation object
238
+ # @yieldparam result [::Gapic::Operation]
239
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
240
+ #
241
+ # @return [::Gapic::Operation]
242
+ #
243
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
244
+ #
245
+ # @example Basic example
246
+ # require "google/cloud/ai_platform/v1"
247
+ #
248
+ # # Create a client object. The client can be reused for multiple calls.
249
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
250
+ #
251
+ # # Create a request. To set request fields, pass in keyword arguments.
252
+ # request = Google::Cloud::AIPlatform::V1::CreateFeaturestoreRequest.new
253
+ #
254
+ # # Call the create_featurestore method.
255
+ # result = client.create_featurestore request
256
+ #
257
+ # # The returned object is of type Gapic::Operation. You can use it to
258
+ # # check the status of an operation, cancel it, or wait for results.
259
+ # # Here is how to wait for a response.
260
+ # result.wait_until_done! timeout: 60
261
+ # if result.response?
262
+ # p result.response
263
+ # else
264
+ # puts "No response received."
265
+ # end
266
+ #
267
+ def create_featurestore request, options = nil
268
+ raise ::ArgumentError, "request must be provided" if request.nil?
269
+
270
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateFeaturestoreRequest
271
+
272
+ # Converts hash and nil to an options object
273
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
274
+
275
+ # Customize the options with defaults
276
+ call_metadata = @config.rpcs.create_featurestore.metadata.to_h
277
+
278
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
279
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
280
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
281
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
282
+ transports_version_send: [:rest]
283
+
284
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
285
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
286
+
287
+ options.apply_defaults timeout: @config.rpcs.create_featurestore.timeout,
288
+ metadata: call_metadata,
289
+ retry_policy: @config.rpcs.create_featurestore.retry_policy
290
+
291
+ options.apply_defaults timeout: @config.timeout,
292
+ metadata: @config.metadata,
293
+ retry_policy: @config.retry_policy
294
+
295
+ @featurestore_service_stub.create_featurestore request, options do |result, operation|
296
+ result = ::Gapic::Operation.new result, @operations_client, options: options
297
+ yield result, operation if block_given?
298
+ return result
299
+ end
300
+ rescue ::Gapic::Rest::Error => e
301
+ raise ::Google::Cloud::Error.from_error(e)
302
+ end
303
+
304
+ ##
305
+ # Gets details of a single Featurestore.
306
+ #
307
+ # @overload get_featurestore(request, options = nil)
308
+ # Pass arguments to `get_featurestore` via a request object, either of type
309
+ # {::Google::Cloud::AIPlatform::V1::GetFeaturestoreRequest} or an equivalent Hash.
310
+ #
311
+ # @param request [::Google::Cloud::AIPlatform::V1::GetFeaturestoreRequest, ::Hash]
312
+ # A request object representing the call parameters. Required. To specify no
313
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
314
+ # @param options [::Gapic::CallOptions, ::Hash]
315
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
316
+ #
317
+ # @overload get_featurestore(name: nil)
318
+ # Pass arguments to `get_featurestore` via keyword arguments. Note that at
319
+ # least one keyword argument is required. To specify no parameters, or to keep all
320
+ # the default parameter values, pass an empty Hash as a request object (see above).
321
+ #
322
+ # @param name [::String]
323
+ # Required. The name of the Featurestore resource.
324
+ # @yield [result, operation] Access the result along with the TransportOperation object
325
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Featurestore]
326
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
327
+ #
328
+ # @return [::Google::Cloud::AIPlatform::V1::Featurestore]
329
+ #
330
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
331
+ #
332
+ # @example Basic example
333
+ # require "google/cloud/ai_platform/v1"
334
+ #
335
+ # # Create a client object. The client can be reused for multiple calls.
336
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
337
+ #
338
+ # # Create a request. To set request fields, pass in keyword arguments.
339
+ # request = Google::Cloud::AIPlatform::V1::GetFeaturestoreRequest.new
340
+ #
341
+ # # Call the get_featurestore method.
342
+ # result = client.get_featurestore request
343
+ #
344
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Featurestore.
345
+ # p result
346
+ #
347
+ def get_featurestore request, options = nil
348
+ raise ::ArgumentError, "request must be provided" if request.nil?
349
+
350
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetFeaturestoreRequest
351
+
352
+ # Converts hash and nil to an options object
353
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
354
+
355
+ # Customize the options with defaults
356
+ call_metadata = @config.rpcs.get_featurestore.metadata.to_h
357
+
358
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
359
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
360
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
361
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
362
+ transports_version_send: [:rest]
363
+
364
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
365
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
366
+
367
+ options.apply_defaults timeout: @config.rpcs.get_featurestore.timeout,
368
+ metadata: call_metadata,
369
+ retry_policy: @config.rpcs.get_featurestore.retry_policy
370
+
371
+ options.apply_defaults timeout: @config.timeout,
372
+ metadata: @config.metadata,
373
+ retry_policy: @config.retry_policy
374
+
375
+ @featurestore_service_stub.get_featurestore request, options do |result, operation|
376
+ yield result, operation if block_given?
377
+ return result
378
+ end
379
+ rescue ::Gapic::Rest::Error => e
380
+ raise ::Google::Cloud::Error.from_error(e)
381
+ end
382
+
383
+ ##
384
+ # Lists Featurestores in a given project and location.
385
+ #
386
+ # @overload list_featurestores(request, options = nil)
387
+ # Pass arguments to `list_featurestores` via a request object, either of type
388
+ # {::Google::Cloud::AIPlatform::V1::ListFeaturestoresRequest} or an equivalent Hash.
389
+ #
390
+ # @param request [::Google::Cloud::AIPlatform::V1::ListFeaturestoresRequest, ::Hash]
391
+ # A request object representing the call parameters. Required. To specify no
392
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
393
+ # @param options [::Gapic::CallOptions, ::Hash]
394
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
395
+ #
396
+ # @overload list_featurestores(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil)
397
+ # Pass arguments to `list_featurestores` via keyword arguments. Note that at
398
+ # least one keyword argument is required. To specify no parameters, or to keep all
399
+ # the default parameter values, pass an empty Hash as a request object (see above).
400
+ #
401
+ # @param parent [::String]
402
+ # Required. The resource name of the Location to list Featurestores.
403
+ # Format:
404
+ # `projects/{project}/locations/{location}`
405
+ # @param filter [::String]
406
+ # Lists the featurestores that match the filter expression. The following
407
+ # fields are supported:
408
+ #
409
+ # * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
410
+ # Values must be
411
+ # in RFC 3339 format.
412
+ # * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
413
+ # Values must be
414
+ # in RFC 3339 format.
415
+ # * `online_serving_config.fixed_node_count`: Supports `=`, `!=`, `<`, `>`,
416
+ # `<=`, and `>=` comparisons.
417
+ # * `labels`: Supports key-value equality and key presence.
418
+ #
419
+ # Examples:
420
+ #
421
+ # * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
422
+ # Featurestores created or updated after 2020-01-01.
423
+ # * `labels.env = "prod"`
424
+ # Featurestores with label "env" set to "prod".
425
+ # @param page_size [::Integer]
426
+ # The maximum number of Featurestores to return. The service may return fewer
427
+ # than this value. If unspecified, at most 100 Featurestores will be
428
+ # returned. The maximum value is 100; any value greater than 100 will be
429
+ # coerced to 100.
430
+ # @param page_token [::String]
431
+ # A page token, received from a previous
432
+ # {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client#list_featurestores FeaturestoreService.ListFeaturestores}
433
+ # call. Provide this to retrieve the subsequent page.
434
+ #
435
+ # When paginating, all other parameters provided to
436
+ # {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client#list_featurestores FeaturestoreService.ListFeaturestores}
437
+ # must match the call that provided the page token.
438
+ # @param order_by [::String]
439
+ # A comma-separated list of fields to order by, sorted in ascending order.
440
+ # Use "desc" after a field name for descending.
441
+ # Supported Fields:
442
+ #
443
+ # * `create_time`
444
+ # * `update_time`
445
+ # * `online_serving_config.fixed_node_count`
446
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
447
+ # Mask specifying which fields to read.
448
+ # @yield [result, operation] Access the result along with the TransportOperation object
449
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Featurestore>]
450
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
451
+ #
452
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Featurestore>]
453
+ #
454
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
455
+ #
456
+ # @example Basic example
457
+ # require "google/cloud/ai_platform/v1"
458
+ #
459
+ # # Create a client object. The client can be reused for multiple calls.
460
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
461
+ #
462
+ # # Create a request. To set request fields, pass in keyword arguments.
463
+ # request = Google::Cloud::AIPlatform::V1::ListFeaturestoresRequest.new
464
+ #
465
+ # # Call the list_featurestores method.
466
+ # result = client.list_featurestores request
467
+ #
468
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
469
+ # # over elements, and API calls will be issued to fetch pages as needed.
470
+ # result.each do |item|
471
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Featurestore.
472
+ # p item
473
+ # end
474
+ #
475
+ def list_featurestores request, options = nil
476
+ raise ::ArgumentError, "request must be provided" if request.nil?
477
+
478
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListFeaturestoresRequest
479
+
480
+ # Converts hash and nil to an options object
481
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
482
+
483
+ # Customize the options with defaults
484
+ call_metadata = @config.rpcs.list_featurestores.metadata.to_h
485
+
486
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
487
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
488
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
489
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
490
+ transports_version_send: [:rest]
491
+
492
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
493
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
494
+
495
+ options.apply_defaults timeout: @config.rpcs.list_featurestores.timeout,
496
+ metadata: call_metadata,
497
+ retry_policy: @config.rpcs.list_featurestores.retry_policy
498
+
499
+ options.apply_defaults timeout: @config.timeout,
500
+ metadata: @config.metadata,
501
+ retry_policy: @config.retry_policy
502
+
503
+ @featurestore_service_stub.list_featurestores request, options do |result, operation|
504
+ result = ::Gapic::Rest::PagedEnumerable.new @featurestore_service_stub, :list_featurestores, "featurestores", request, result, options
505
+ yield result, operation if block_given?
506
+ return result
507
+ end
508
+ rescue ::Gapic::Rest::Error => e
509
+ raise ::Google::Cloud::Error.from_error(e)
510
+ end
511
+
512
+ ##
513
+ # Updates the parameters of a single Featurestore.
514
+ #
515
+ # @overload update_featurestore(request, options = nil)
516
+ # Pass arguments to `update_featurestore` via a request object, either of type
517
+ # {::Google::Cloud::AIPlatform::V1::UpdateFeaturestoreRequest} or an equivalent Hash.
518
+ #
519
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateFeaturestoreRequest, ::Hash]
520
+ # A request object representing the call parameters. Required. To specify no
521
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
522
+ # @param options [::Gapic::CallOptions, ::Hash]
523
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
524
+ #
525
+ # @overload update_featurestore(featurestore: nil, update_mask: nil)
526
+ # Pass arguments to `update_featurestore` via keyword arguments. Note that at
527
+ # least one keyword argument is required. To specify no parameters, or to keep all
528
+ # the default parameter values, pass an empty Hash as a request object (see above).
529
+ #
530
+ # @param featurestore [::Google::Cloud::AIPlatform::V1::Featurestore, ::Hash]
531
+ # Required. The Featurestore's `name` field is used to identify the
532
+ # Featurestore to be updated. Format:
533
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}`
534
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
535
+ # Field mask is used to specify the fields to be overwritten in the
536
+ # Featurestore resource by the update.
537
+ # The fields specified in the update_mask are relative to the resource, not
538
+ # the full request. A field will be overwritten if it is in the mask. If the
539
+ # user does not provide a mask then only the non-empty fields present in the
540
+ # request will be overwritten. Set the update_mask to `*` to override all
541
+ # fields.
542
+ #
543
+ # Updatable fields:
544
+ #
545
+ # * `labels`
546
+ # * `online_serving_config.fixed_node_count`
547
+ # * `online_serving_config.scaling`
548
+ # * `online_storage_ttl_days`
549
+ # @yield [result, operation] Access the result along with the TransportOperation object
550
+ # @yieldparam result [::Gapic::Operation]
551
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
552
+ #
553
+ # @return [::Gapic::Operation]
554
+ #
555
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
556
+ #
557
+ # @example Basic example
558
+ # require "google/cloud/ai_platform/v1"
559
+ #
560
+ # # Create a client object. The client can be reused for multiple calls.
561
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
562
+ #
563
+ # # Create a request. To set request fields, pass in keyword arguments.
564
+ # request = Google::Cloud::AIPlatform::V1::UpdateFeaturestoreRequest.new
565
+ #
566
+ # # Call the update_featurestore method.
567
+ # result = client.update_featurestore request
568
+ #
569
+ # # The returned object is of type Gapic::Operation. You can use it to
570
+ # # check the status of an operation, cancel it, or wait for results.
571
+ # # Here is how to wait for a response.
572
+ # result.wait_until_done! timeout: 60
573
+ # if result.response?
574
+ # p result.response
575
+ # else
576
+ # puts "No response received."
577
+ # end
578
+ #
579
+ def update_featurestore request, options = nil
580
+ raise ::ArgumentError, "request must be provided" if request.nil?
581
+
582
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateFeaturestoreRequest
583
+
584
+ # Converts hash and nil to an options object
585
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
586
+
587
+ # Customize the options with defaults
588
+ call_metadata = @config.rpcs.update_featurestore.metadata.to_h
589
+
590
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
591
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
592
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
593
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
594
+ transports_version_send: [:rest]
595
+
596
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
597
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
598
+
599
+ options.apply_defaults timeout: @config.rpcs.update_featurestore.timeout,
600
+ metadata: call_metadata,
601
+ retry_policy: @config.rpcs.update_featurestore.retry_policy
602
+
603
+ options.apply_defaults timeout: @config.timeout,
604
+ metadata: @config.metadata,
605
+ retry_policy: @config.retry_policy
606
+
607
+ @featurestore_service_stub.update_featurestore request, options do |result, operation|
608
+ result = ::Gapic::Operation.new result, @operations_client, options: options
609
+ yield result, operation if block_given?
610
+ return result
611
+ end
612
+ rescue ::Gapic::Rest::Error => e
613
+ raise ::Google::Cloud::Error.from_error(e)
614
+ end
615
+
616
+ ##
617
+ # Deletes a single Featurestore. The Featurestore must not contain any
618
+ # EntityTypes or `force` must be set to true for the request to succeed.
619
+ #
620
+ # @overload delete_featurestore(request, options = nil)
621
+ # Pass arguments to `delete_featurestore` via a request object, either of type
622
+ # {::Google::Cloud::AIPlatform::V1::DeleteFeaturestoreRequest} or an equivalent Hash.
623
+ #
624
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteFeaturestoreRequest, ::Hash]
625
+ # A request object representing the call parameters. Required. To specify no
626
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
627
+ # @param options [::Gapic::CallOptions, ::Hash]
628
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
629
+ #
630
+ # @overload delete_featurestore(name: nil, force: nil)
631
+ # Pass arguments to `delete_featurestore` via keyword arguments. Note that at
632
+ # least one keyword argument is required. To specify no parameters, or to keep all
633
+ # the default parameter values, pass an empty Hash as a request object (see above).
634
+ #
635
+ # @param name [::String]
636
+ # Required. The name of the Featurestore to be deleted.
637
+ # Format:
638
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}`
639
+ # @param force [::Boolean]
640
+ # If set to true, any EntityTypes and Features for this Featurestore will
641
+ # also be deleted. (Otherwise, the request will only work if the Featurestore
642
+ # has no EntityTypes.)
643
+ # @yield [result, operation] Access the result along with the TransportOperation object
644
+ # @yieldparam result [::Gapic::Operation]
645
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
646
+ #
647
+ # @return [::Gapic::Operation]
648
+ #
649
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
650
+ #
651
+ # @example Basic example
652
+ # require "google/cloud/ai_platform/v1"
653
+ #
654
+ # # Create a client object. The client can be reused for multiple calls.
655
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
656
+ #
657
+ # # Create a request. To set request fields, pass in keyword arguments.
658
+ # request = Google::Cloud::AIPlatform::V1::DeleteFeaturestoreRequest.new
659
+ #
660
+ # # Call the delete_featurestore method.
661
+ # result = client.delete_featurestore request
662
+ #
663
+ # # The returned object is of type Gapic::Operation. You can use it to
664
+ # # check the status of an operation, cancel it, or wait for results.
665
+ # # Here is how to wait for a response.
666
+ # result.wait_until_done! timeout: 60
667
+ # if result.response?
668
+ # p result.response
669
+ # else
670
+ # puts "No response received."
671
+ # end
672
+ #
673
+ def delete_featurestore request, options = nil
674
+ raise ::ArgumentError, "request must be provided" if request.nil?
675
+
676
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteFeaturestoreRequest
677
+
678
+ # Converts hash and nil to an options object
679
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
680
+
681
+ # Customize the options with defaults
682
+ call_metadata = @config.rpcs.delete_featurestore.metadata.to_h
683
+
684
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
685
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
686
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
687
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
688
+ transports_version_send: [:rest]
689
+
690
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
691
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
692
+
693
+ options.apply_defaults timeout: @config.rpcs.delete_featurestore.timeout,
694
+ metadata: call_metadata,
695
+ retry_policy: @config.rpcs.delete_featurestore.retry_policy
696
+
697
+ options.apply_defaults timeout: @config.timeout,
698
+ metadata: @config.metadata,
699
+ retry_policy: @config.retry_policy
700
+
701
+ @featurestore_service_stub.delete_featurestore request, options do |result, operation|
702
+ result = ::Gapic::Operation.new result, @operations_client, options: options
703
+ yield result, operation if block_given?
704
+ return result
705
+ end
706
+ rescue ::Gapic::Rest::Error => e
707
+ raise ::Google::Cloud::Error.from_error(e)
708
+ end
709
+
710
+ ##
711
+ # Creates a new EntityType in a given Featurestore.
712
+ #
713
+ # @overload create_entity_type(request, options = nil)
714
+ # Pass arguments to `create_entity_type` via a request object, either of type
715
+ # {::Google::Cloud::AIPlatform::V1::CreateEntityTypeRequest} or an equivalent Hash.
716
+ #
717
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateEntityTypeRequest, ::Hash]
718
+ # A request object representing the call parameters. Required. To specify no
719
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
720
+ # @param options [::Gapic::CallOptions, ::Hash]
721
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
722
+ #
723
+ # @overload create_entity_type(parent: nil, entity_type: nil, entity_type_id: nil)
724
+ # Pass arguments to `create_entity_type` via keyword arguments. Note that at
725
+ # least one keyword argument is required. To specify no parameters, or to keep all
726
+ # the default parameter values, pass an empty Hash as a request object (see above).
727
+ #
728
+ # @param parent [::String]
729
+ # Required. The resource name of the Featurestore to create EntityTypes.
730
+ # Format:
731
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}`
732
+ # @param entity_type [::Google::Cloud::AIPlatform::V1::EntityType, ::Hash]
733
+ # The EntityType to create.
734
+ # @param entity_type_id [::String]
735
+ # Required. The ID to use for the EntityType, which will become the final
736
+ # component of the EntityType's resource name.
737
+ #
738
+ # This value may be up to 60 characters, and valid characters are
739
+ # `[a-z0-9_]`. The first character cannot be a number.
740
+ #
741
+ # The value must be unique within a featurestore.
742
+ # @yield [result, operation] Access the result along with the TransportOperation object
743
+ # @yieldparam result [::Gapic::Operation]
744
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
745
+ #
746
+ # @return [::Gapic::Operation]
747
+ #
748
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
749
+ #
750
+ # @example Basic example
751
+ # require "google/cloud/ai_platform/v1"
752
+ #
753
+ # # Create a client object. The client can be reused for multiple calls.
754
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
755
+ #
756
+ # # Create a request. To set request fields, pass in keyword arguments.
757
+ # request = Google::Cloud::AIPlatform::V1::CreateEntityTypeRequest.new
758
+ #
759
+ # # Call the create_entity_type method.
760
+ # result = client.create_entity_type request
761
+ #
762
+ # # The returned object is of type Gapic::Operation. You can use it to
763
+ # # check the status of an operation, cancel it, or wait for results.
764
+ # # Here is how to wait for a response.
765
+ # result.wait_until_done! timeout: 60
766
+ # if result.response?
767
+ # p result.response
768
+ # else
769
+ # puts "No response received."
770
+ # end
771
+ #
772
+ def create_entity_type request, options = nil
773
+ raise ::ArgumentError, "request must be provided" if request.nil?
774
+
775
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateEntityTypeRequest
776
+
777
+ # Converts hash and nil to an options object
778
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
779
+
780
+ # Customize the options with defaults
781
+ call_metadata = @config.rpcs.create_entity_type.metadata.to_h
782
+
783
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
784
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
785
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
786
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
787
+ transports_version_send: [:rest]
788
+
789
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
790
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
791
+
792
+ options.apply_defaults timeout: @config.rpcs.create_entity_type.timeout,
793
+ metadata: call_metadata,
794
+ retry_policy: @config.rpcs.create_entity_type.retry_policy
795
+
796
+ options.apply_defaults timeout: @config.timeout,
797
+ metadata: @config.metadata,
798
+ retry_policy: @config.retry_policy
799
+
800
+ @featurestore_service_stub.create_entity_type request, options do |result, operation|
801
+ result = ::Gapic::Operation.new result, @operations_client, options: options
802
+ yield result, operation if block_given?
803
+ return result
804
+ end
805
+ rescue ::Gapic::Rest::Error => e
806
+ raise ::Google::Cloud::Error.from_error(e)
807
+ end
808
+
809
+ ##
810
+ # Gets details of a single EntityType.
811
+ #
812
+ # @overload get_entity_type(request, options = nil)
813
+ # Pass arguments to `get_entity_type` via a request object, either of type
814
+ # {::Google::Cloud::AIPlatform::V1::GetEntityTypeRequest} or an equivalent Hash.
815
+ #
816
+ # @param request [::Google::Cloud::AIPlatform::V1::GetEntityTypeRequest, ::Hash]
817
+ # A request object representing the call parameters. Required. To specify no
818
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
819
+ # @param options [::Gapic::CallOptions, ::Hash]
820
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
821
+ #
822
+ # @overload get_entity_type(name: nil)
823
+ # Pass arguments to `get_entity_type` via keyword arguments. Note that at
824
+ # least one keyword argument is required. To specify no parameters, or to keep all
825
+ # the default parameter values, pass an empty Hash as a request object (see above).
826
+ #
827
+ # @param name [::String]
828
+ # Required. The name of the EntityType resource.
829
+ # Format:
830
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
831
+ # @yield [result, operation] Access the result along with the TransportOperation object
832
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::EntityType]
833
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
834
+ #
835
+ # @return [::Google::Cloud::AIPlatform::V1::EntityType]
836
+ #
837
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
838
+ #
839
+ # @example Basic example
840
+ # require "google/cloud/ai_platform/v1"
841
+ #
842
+ # # Create a client object. The client can be reused for multiple calls.
843
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
844
+ #
845
+ # # Create a request. To set request fields, pass in keyword arguments.
846
+ # request = Google::Cloud::AIPlatform::V1::GetEntityTypeRequest.new
847
+ #
848
+ # # Call the get_entity_type method.
849
+ # result = client.get_entity_type request
850
+ #
851
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::EntityType.
852
+ # p result
853
+ #
854
+ def get_entity_type request, options = nil
855
+ raise ::ArgumentError, "request must be provided" if request.nil?
856
+
857
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetEntityTypeRequest
858
+
859
+ # Converts hash and nil to an options object
860
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
861
+
862
+ # Customize the options with defaults
863
+ call_metadata = @config.rpcs.get_entity_type.metadata.to_h
864
+
865
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
866
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
867
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
868
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
869
+ transports_version_send: [:rest]
870
+
871
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
872
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
873
+
874
+ options.apply_defaults timeout: @config.rpcs.get_entity_type.timeout,
875
+ metadata: call_metadata,
876
+ retry_policy: @config.rpcs.get_entity_type.retry_policy
877
+
878
+ options.apply_defaults timeout: @config.timeout,
879
+ metadata: @config.metadata,
880
+ retry_policy: @config.retry_policy
881
+
882
+ @featurestore_service_stub.get_entity_type request, options do |result, operation|
883
+ yield result, operation if block_given?
884
+ return result
885
+ end
886
+ rescue ::Gapic::Rest::Error => e
887
+ raise ::Google::Cloud::Error.from_error(e)
888
+ end
889
+
890
+ ##
891
+ # Lists EntityTypes in a given Featurestore.
892
+ #
893
+ # @overload list_entity_types(request, options = nil)
894
+ # Pass arguments to `list_entity_types` via a request object, either of type
895
+ # {::Google::Cloud::AIPlatform::V1::ListEntityTypesRequest} or an equivalent Hash.
896
+ #
897
+ # @param request [::Google::Cloud::AIPlatform::V1::ListEntityTypesRequest, ::Hash]
898
+ # A request object representing the call parameters. Required. To specify no
899
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
900
+ # @param options [::Gapic::CallOptions, ::Hash]
901
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
902
+ #
903
+ # @overload list_entity_types(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil)
904
+ # Pass arguments to `list_entity_types` via keyword arguments. Note that at
905
+ # least one keyword argument is required. To specify no parameters, or to keep all
906
+ # the default parameter values, pass an empty Hash as a request object (see above).
907
+ #
908
+ # @param parent [::String]
909
+ # Required. The resource name of the Featurestore to list EntityTypes.
910
+ # Format:
911
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}`
912
+ # @param filter [::String]
913
+ # Lists the EntityTypes that match the filter expression. The following
914
+ # filters are supported:
915
+ #
916
+ # * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
917
+ # Values must be in RFC 3339 format.
918
+ # * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
919
+ # Values must be in RFC 3339 format.
920
+ # * `labels`: Supports key-value equality as well as key presence.
921
+ #
922
+ # Examples:
923
+ #
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` --> EntityTypes having both
928
+ # (active: yes) and (env: prod) labels.
929
+ # * `labels.env: *` --> Any EntityType which has a label with 'env' as the
930
+ # key.
931
+ # @param page_size [::Integer]
932
+ # The maximum number of EntityTypes to return. The service may return fewer
933
+ # than this value. If unspecified, at most 1000 EntityTypes 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_entity_types FeaturestoreService.ListEntityTypes}
939
+ # call. Provide this to retrieve the subsequent page.
940
+ #
941
+ # When paginating, all other parameters provided to
942
+ # {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client#list_entity_types FeaturestoreService.ListEntityTypes}
943
+ # must match the call that provided the page token.
944
+ # @param order_by [::String]
945
+ # A comma-separated list of fields to order by, sorted in ascending order.
946
+ # Use "desc" after a field name for descending.
947
+ #
948
+ # Supported fields:
949
+ #
950
+ # * `entity_type_id`
951
+ # * `create_time`
952
+ # * `update_time`
953
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
954
+ # Mask specifying which fields to read.
955
+ # @yield [result, operation] Access the result along with the TransportOperation object
956
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::EntityType>]
957
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
958
+ #
959
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::EntityType>]
960
+ #
961
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
962
+ #
963
+ # @example Basic example
964
+ # require "google/cloud/ai_platform/v1"
965
+ #
966
+ # # Create a client object. The client can be reused for multiple calls.
967
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
968
+ #
969
+ # # Create a request. To set request fields, pass in keyword arguments.
970
+ # request = Google::Cloud::AIPlatform::V1::ListEntityTypesRequest.new
971
+ #
972
+ # # Call the list_entity_types method.
973
+ # result = client.list_entity_types request
974
+ #
975
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
976
+ # # over elements, and API calls will be issued to fetch pages as needed.
977
+ # result.each do |item|
978
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::EntityType.
979
+ # p item
980
+ # end
981
+ #
982
+ def list_entity_types request, options = nil
983
+ raise ::ArgumentError, "request must be provided" if request.nil?
984
+
985
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListEntityTypesRequest
986
+
987
+ # Converts hash and nil to an options object
988
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
989
+
990
+ # Customize the options with defaults
991
+ call_metadata = @config.rpcs.list_entity_types.metadata.to_h
992
+
993
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
994
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
995
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
996
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
997
+ transports_version_send: [:rest]
998
+
999
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1000
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1001
+
1002
+ options.apply_defaults timeout: @config.rpcs.list_entity_types.timeout,
1003
+ metadata: call_metadata,
1004
+ retry_policy: @config.rpcs.list_entity_types.retry_policy
1005
+
1006
+ options.apply_defaults timeout: @config.timeout,
1007
+ metadata: @config.metadata,
1008
+ retry_policy: @config.retry_policy
1009
+
1010
+ @featurestore_service_stub.list_entity_types request, options do |result, operation|
1011
+ result = ::Gapic::Rest::PagedEnumerable.new @featurestore_service_stub, :list_entity_types, "entity_types", request, result, options
1012
+ yield result, operation if block_given?
1013
+ return result
1014
+ end
1015
+ rescue ::Gapic::Rest::Error => e
1016
+ raise ::Google::Cloud::Error.from_error(e)
1017
+ end
1018
+
1019
+ ##
1020
+ # Updates the parameters of a single EntityType.
1021
+ #
1022
+ # @overload update_entity_type(request, options = nil)
1023
+ # Pass arguments to `update_entity_type` via a request object, either of type
1024
+ # {::Google::Cloud::AIPlatform::V1::UpdateEntityTypeRequest} or an equivalent Hash.
1025
+ #
1026
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateEntityTypeRequest, ::Hash]
1027
+ # A request object representing the call parameters. Required. To specify no
1028
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1029
+ # @param options [::Gapic::CallOptions, ::Hash]
1030
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1031
+ #
1032
+ # @overload update_entity_type(entity_type: nil, update_mask: nil)
1033
+ # Pass arguments to `update_entity_type` via keyword arguments. Note that at
1034
+ # least one keyword argument is required. To specify no parameters, or to keep all
1035
+ # the default parameter values, pass an empty Hash as a request object (see above).
1036
+ #
1037
+ # @param entity_type [::Google::Cloud::AIPlatform::V1::EntityType, ::Hash]
1038
+ # Required. The EntityType's `name` field is used to identify the EntityType
1039
+ # to be updated. Format:
1040
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
1041
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1042
+ # Field mask is used to specify the fields to be overwritten in the
1043
+ # EntityType resource by the update.
1044
+ # The fields specified in the update_mask are relative to the resource, not
1045
+ # the full request. A field will be overwritten if it is in the mask. If the
1046
+ # user does not provide a mask then only the non-empty fields present in the
1047
+ # request will be overwritten. Set the update_mask to `*` to override all
1048
+ # fields.
1049
+ #
1050
+ # Updatable fields:
1051
+ #
1052
+ # * `description`
1053
+ # * `labels`
1054
+ # * `monitoring_config.snapshot_analysis.disabled`
1055
+ # * `monitoring_config.snapshot_analysis.monitoring_interval_days`
1056
+ # * `monitoring_config.snapshot_analysis.staleness_days`
1057
+ # * `monitoring_config.import_features_analysis.state`
1058
+ # * `monitoring_config.import_features_analysis.anomaly_detection_baseline`
1059
+ # * `monitoring_config.numerical_threshold_config.value`
1060
+ # * `monitoring_config.categorical_threshold_config.value`
1061
+ # * `offline_storage_ttl_days`
1062
+ # @yield [result, operation] Access the result along with the TransportOperation object
1063
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::EntityType]
1064
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1065
+ #
1066
+ # @return [::Google::Cloud::AIPlatform::V1::EntityType]
1067
+ #
1068
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1069
+ #
1070
+ # @example Basic example
1071
+ # require "google/cloud/ai_platform/v1"
1072
+ #
1073
+ # # Create a client object. The client can be reused for multiple calls.
1074
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
1075
+ #
1076
+ # # Create a request. To set request fields, pass in keyword arguments.
1077
+ # request = Google::Cloud::AIPlatform::V1::UpdateEntityTypeRequest.new
1078
+ #
1079
+ # # Call the update_entity_type method.
1080
+ # result = client.update_entity_type request
1081
+ #
1082
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::EntityType.
1083
+ # p result
1084
+ #
1085
+ def update_entity_type request, options = nil
1086
+ raise ::ArgumentError, "request must be provided" if request.nil?
1087
+
1088
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateEntityTypeRequest
1089
+
1090
+ # Converts hash and nil to an options object
1091
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1092
+
1093
+ # Customize the options with defaults
1094
+ call_metadata = @config.rpcs.update_entity_type.metadata.to_h
1095
+
1096
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1097
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1098
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1099
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1100
+ transports_version_send: [:rest]
1101
+
1102
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1103
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1104
+
1105
+ options.apply_defaults timeout: @config.rpcs.update_entity_type.timeout,
1106
+ metadata: call_metadata,
1107
+ retry_policy: @config.rpcs.update_entity_type.retry_policy
1108
+
1109
+ options.apply_defaults timeout: @config.timeout,
1110
+ metadata: @config.metadata,
1111
+ retry_policy: @config.retry_policy
1112
+
1113
+ @featurestore_service_stub.update_entity_type request, options do |result, operation|
1114
+ yield result, operation if block_given?
1115
+ return result
1116
+ end
1117
+ rescue ::Gapic::Rest::Error => e
1118
+ raise ::Google::Cloud::Error.from_error(e)
1119
+ end
1120
+
1121
+ ##
1122
+ # Deletes a single EntityType. The EntityType must not have any Features
1123
+ # or `force` must be set to true for the request to succeed.
1124
+ #
1125
+ # @overload delete_entity_type(request, options = nil)
1126
+ # Pass arguments to `delete_entity_type` via a request object, either of type
1127
+ # {::Google::Cloud::AIPlatform::V1::DeleteEntityTypeRequest} or an equivalent Hash.
1128
+ #
1129
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteEntityTypeRequest, ::Hash]
1130
+ # A request object representing the call parameters. Required. To specify no
1131
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1132
+ # @param options [::Gapic::CallOptions, ::Hash]
1133
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1134
+ #
1135
+ # @overload delete_entity_type(name: nil, force: nil)
1136
+ # Pass arguments to `delete_entity_type` via keyword arguments. Note that at
1137
+ # least one keyword argument is required. To specify no parameters, or to keep all
1138
+ # the default parameter values, pass an empty Hash as a request object (see above).
1139
+ #
1140
+ # @param name [::String]
1141
+ # Required. The name of the EntityType to be deleted.
1142
+ # Format:
1143
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
1144
+ # @param force [::Boolean]
1145
+ # If set to true, any Features for this EntityType will also be deleted.
1146
+ # (Otherwise, the request will only work if the EntityType has no Features.)
1147
+ # @yield [result, operation] Access the result along with the TransportOperation object
1148
+ # @yieldparam result [::Gapic::Operation]
1149
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1150
+ #
1151
+ # @return [::Gapic::Operation]
1152
+ #
1153
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1154
+ #
1155
+ # @example Basic example
1156
+ # require "google/cloud/ai_platform/v1"
1157
+ #
1158
+ # # Create a client object. The client can be reused for multiple calls.
1159
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
1160
+ #
1161
+ # # Create a request. To set request fields, pass in keyword arguments.
1162
+ # request = Google::Cloud::AIPlatform::V1::DeleteEntityTypeRequest.new
1163
+ #
1164
+ # # Call the delete_entity_type method.
1165
+ # result = client.delete_entity_type request
1166
+ #
1167
+ # # The returned object is of type Gapic::Operation. You can use it to
1168
+ # # check the status of an operation, cancel it, or wait for results.
1169
+ # # Here is how to wait for a response.
1170
+ # result.wait_until_done! timeout: 60
1171
+ # if result.response?
1172
+ # p result.response
1173
+ # else
1174
+ # puts "No response received."
1175
+ # end
1176
+ #
1177
+ def delete_entity_type request, options = nil
1178
+ raise ::ArgumentError, "request must be provided" if request.nil?
1179
+
1180
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteEntityTypeRequest
1181
+
1182
+ # Converts hash and nil to an options object
1183
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1184
+
1185
+ # Customize the options with defaults
1186
+ call_metadata = @config.rpcs.delete_entity_type.metadata.to_h
1187
+
1188
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1189
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1190
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1191
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1192
+ transports_version_send: [:rest]
1193
+
1194
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1195
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1196
+
1197
+ options.apply_defaults timeout: @config.rpcs.delete_entity_type.timeout,
1198
+ metadata: call_metadata,
1199
+ retry_policy: @config.rpcs.delete_entity_type.retry_policy
1200
+
1201
+ options.apply_defaults timeout: @config.timeout,
1202
+ metadata: @config.metadata,
1203
+ retry_policy: @config.retry_policy
1204
+
1205
+ @featurestore_service_stub.delete_entity_type request, options do |result, operation|
1206
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1207
+ yield result, operation if block_given?
1208
+ return result
1209
+ end
1210
+ rescue ::Gapic::Rest::Error => e
1211
+ raise ::Google::Cloud::Error.from_error(e)
1212
+ end
1213
+
1214
+ ##
1215
+ # Creates a new Feature in a given EntityType.
1216
+ #
1217
+ # @overload create_feature(request, options = nil)
1218
+ # Pass arguments to `create_feature` via a request object, either of type
1219
+ # {::Google::Cloud::AIPlatform::V1::CreateFeatureRequest} or an equivalent Hash.
1220
+ #
1221
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateFeatureRequest, ::Hash]
1222
+ # A request object representing the call parameters. Required. To specify no
1223
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1224
+ # @param options [::Gapic::CallOptions, ::Hash]
1225
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1226
+ #
1227
+ # @overload create_feature(parent: nil, feature: nil, feature_id: nil)
1228
+ # Pass arguments to `create_feature` via keyword arguments. Note that at
1229
+ # least one keyword argument is required. To specify no parameters, or to keep all
1230
+ # the default parameter values, pass an empty Hash as a request object (see above).
1231
+ #
1232
+ # @param parent [::String]
1233
+ # Required. The resource name of the EntityType or FeatureGroup to create a
1234
+ # Feature. Format for entity_type as parent:
1235
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
1236
+ # Format for feature_group as parent:
1237
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
1238
+ # @param feature [::Google::Cloud::AIPlatform::V1::Feature, ::Hash]
1239
+ # Required. The Feature to create.
1240
+ # @param feature_id [::String]
1241
+ # Required. The ID to use for the Feature, which will become the final
1242
+ # component of the Feature's resource name.
1243
+ #
1244
+ # This value may be up to 128 characters, and valid characters are
1245
+ # `[a-z0-9_]`. The first character cannot be a number.
1246
+ #
1247
+ # The value must be unique within an EntityType/FeatureGroup.
1248
+ # @yield [result, operation] Access the result along with the TransportOperation object
1249
+ # @yieldparam result [::Gapic::Operation]
1250
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1251
+ #
1252
+ # @return [::Gapic::Operation]
1253
+ #
1254
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1255
+ #
1256
+ # @example Basic example
1257
+ # require "google/cloud/ai_platform/v1"
1258
+ #
1259
+ # # Create a client object. The client can be reused for multiple calls.
1260
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
1261
+ #
1262
+ # # Create a request. To set request fields, pass in keyword arguments.
1263
+ # request = Google::Cloud::AIPlatform::V1::CreateFeatureRequest.new
1264
+ #
1265
+ # # Call the create_feature method.
1266
+ # result = client.create_feature request
1267
+ #
1268
+ # # The returned object is of type Gapic::Operation. You can use it to
1269
+ # # check the status of an operation, cancel it, or wait for results.
1270
+ # # Here is how to wait for a response.
1271
+ # result.wait_until_done! timeout: 60
1272
+ # if result.response?
1273
+ # p result.response
1274
+ # else
1275
+ # puts "No response received."
1276
+ # end
1277
+ #
1278
+ def create_feature request, options = nil
1279
+ raise ::ArgumentError, "request must be provided" if request.nil?
1280
+
1281
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateFeatureRequest
1282
+
1283
+ # Converts hash and nil to an options object
1284
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1285
+
1286
+ # Customize the options with defaults
1287
+ call_metadata = @config.rpcs.create_feature.metadata.to_h
1288
+
1289
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1290
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1291
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1292
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1293
+ transports_version_send: [:rest]
1294
+
1295
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1296
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1297
+
1298
+ options.apply_defaults timeout: @config.rpcs.create_feature.timeout,
1299
+ metadata: call_metadata,
1300
+ retry_policy: @config.rpcs.create_feature.retry_policy
1301
+
1302
+ options.apply_defaults timeout: @config.timeout,
1303
+ metadata: @config.metadata,
1304
+ retry_policy: @config.retry_policy
1305
+
1306
+ @featurestore_service_stub.create_feature request, options do |result, operation|
1307
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1308
+ yield result, operation if block_given?
1309
+ return result
1310
+ end
1311
+ rescue ::Gapic::Rest::Error => e
1312
+ raise ::Google::Cloud::Error.from_error(e)
1313
+ end
1314
+
1315
+ ##
1316
+ # Creates a batch of Features in a given EntityType.
1317
+ #
1318
+ # @overload batch_create_features(request, options = nil)
1319
+ # Pass arguments to `batch_create_features` via a request object, either of type
1320
+ # {::Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest} or an equivalent Hash.
1321
+ #
1322
+ # @param request [::Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest, ::Hash]
1323
+ # A request object representing the call parameters. Required. To specify no
1324
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1325
+ # @param options [::Gapic::CallOptions, ::Hash]
1326
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1327
+ #
1328
+ # @overload batch_create_features(parent: nil, requests: nil)
1329
+ # Pass arguments to `batch_create_features` via keyword arguments. Note that at
1330
+ # least one keyword argument is required. To specify no parameters, or to keep all
1331
+ # the default parameter values, pass an empty Hash as a request object (see above).
1332
+ #
1333
+ # @param parent [::String]
1334
+ # Required. The resource name of the EntityType to create the batch of
1335
+ # Features under. Format:
1336
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
1337
+ # @param requests [::Array<::Google::Cloud::AIPlatform::V1::CreateFeatureRequest, ::Hash>]
1338
+ # Required. The request message specifying the Features to create. All
1339
+ # Features must be created under the same parent EntityType. The `parent`
1340
+ # field in each child request message can be omitted. If `parent` is set in a
1341
+ # child request, then the value must match the `parent` value in this request
1342
+ # message.
1343
+ # @yield [result, operation] Access the result along with the TransportOperation object
1344
+ # @yieldparam result [::Gapic::Operation]
1345
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1346
+ #
1347
+ # @return [::Gapic::Operation]
1348
+ #
1349
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1350
+ #
1351
+ # @example Basic example
1352
+ # require "google/cloud/ai_platform/v1"
1353
+ #
1354
+ # # Create a client object. The client can be reused for multiple calls.
1355
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
1356
+ #
1357
+ # # Create a request. To set request fields, pass in keyword arguments.
1358
+ # request = Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest.new
1359
+ #
1360
+ # # Call the batch_create_features method.
1361
+ # result = client.batch_create_features request
1362
+ #
1363
+ # # The returned object is of type Gapic::Operation. You can use it to
1364
+ # # check the status of an operation, cancel it, or wait for results.
1365
+ # # Here is how to wait for a response.
1366
+ # result.wait_until_done! timeout: 60
1367
+ # if result.response?
1368
+ # p result.response
1369
+ # else
1370
+ # puts "No response received."
1371
+ # end
1372
+ #
1373
+ def batch_create_features request, options = nil
1374
+ raise ::ArgumentError, "request must be provided" if request.nil?
1375
+
1376
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest
1377
+
1378
+ # Converts hash and nil to an options object
1379
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1380
+
1381
+ # Customize the options with defaults
1382
+ call_metadata = @config.rpcs.batch_create_features.metadata.to_h
1383
+
1384
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1385
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1386
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1387
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1388
+ transports_version_send: [:rest]
1389
+
1390
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1391
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1392
+
1393
+ options.apply_defaults timeout: @config.rpcs.batch_create_features.timeout,
1394
+ metadata: call_metadata,
1395
+ retry_policy: @config.rpcs.batch_create_features.retry_policy
1396
+
1397
+ options.apply_defaults timeout: @config.timeout,
1398
+ metadata: @config.metadata,
1399
+ retry_policy: @config.retry_policy
1400
+
1401
+ @featurestore_service_stub.batch_create_features request, options do |result, operation|
1402
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1403
+ yield result, operation if block_given?
1404
+ return result
1405
+ end
1406
+ rescue ::Gapic::Rest::Error => e
1407
+ raise ::Google::Cloud::Error.from_error(e)
1408
+ end
1409
+
1410
+ ##
1411
+ # Gets details of a single Feature.
1412
+ #
1413
+ # @overload get_feature(request, options = nil)
1414
+ # Pass arguments to `get_feature` via a request object, either of type
1415
+ # {::Google::Cloud::AIPlatform::V1::GetFeatureRequest} or an equivalent Hash.
1416
+ #
1417
+ # @param request [::Google::Cloud::AIPlatform::V1::GetFeatureRequest, ::Hash]
1418
+ # A request object representing the call parameters. Required. To specify no
1419
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1420
+ # @param options [::Gapic::CallOptions, ::Hash]
1421
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1422
+ #
1423
+ # @overload get_feature(name: nil)
1424
+ # Pass arguments to `get_feature` via keyword arguments. Note that at
1425
+ # least one keyword argument is required. To specify no parameters, or to keep all
1426
+ # the default parameter values, pass an empty Hash as a request object (see above).
1427
+ #
1428
+ # @param name [::String]
1429
+ # Required. The name of the Feature resource.
1430
+ # Format for entity_type as parent:
1431
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
1432
+ # Format for feature_group as parent:
1433
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
1434
+ # @yield [result, operation] Access the result along with the TransportOperation object
1435
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Feature]
1436
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1437
+ #
1438
+ # @return [::Google::Cloud::AIPlatform::V1::Feature]
1439
+ #
1440
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1441
+ #
1442
+ # @example Basic example
1443
+ # require "google/cloud/ai_platform/v1"
1444
+ #
1445
+ # # Create a client object. The client can be reused for multiple calls.
1446
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
1447
+ #
1448
+ # # Create a request. To set request fields, pass in keyword arguments.
1449
+ # request = Google::Cloud::AIPlatform::V1::GetFeatureRequest.new
1450
+ #
1451
+ # # Call the get_feature method.
1452
+ # result = client.get_feature request
1453
+ #
1454
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Feature.
1455
+ # p result
1456
+ #
1457
+ def get_feature request, options = nil
1458
+ raise ::ArgumentError, "request must be provided" if request.nil?
1459
+
1460
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetFeatureRequest
1461
+
1462
+ # Converts hash and nil to an options object
1463
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1464
+
1465
+ # Customize the options with defaults
1466
+ call_metadata = @config.rpcs.get_feature.metadata.to_h
1467
+
1468
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1469
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1470
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1471
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1472
+ transports_version_send: [:rest]
1473
+
1474
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1475
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1476
+
1477
+ options.apply_defaults timeout: @config.rpcs.get_feature.timeout,
1478
+ metadata: call_metadata,
1479
+ retry_policy: @config.rpcs.get_feature.retry_policy
1480
+
1481
+ options.apply_defaults timeout: @config.timeout,
1482
+ metadata: @config.metadata,
1483
+ retry_policy: @config.retry_policy
1484
+
1485
+ @featurestore_service_stub.get_feature request, options do |result, operation|
1486
+ yield result, operation if block_given?
1487
+ return result
1488
+ end
1489
+ rescue ::Gapic::Rest::Error => e
1490
+ raise ::Google::Cloud::Error.from_error(e)
1491
+ end
1492
+
1493
+ ##
1494
+ # Lists Features in a given EntityType.
1495
+ #
1496
+ # @overload list_features(request, options = nil)
1497
+ # Pass arguments to `list_features` via a request object, either of type
1498
+ # {::Google::Cloud::AIPlatform::V1::ListFeaturesRequest} or an equivalent Hash.
1499
+ #
1500
+ # @param request [::Google::Cloud::AIPlatform::V1::ListFeaturesRequest, ::Hash]
1501
+ # A request object representing the call parameters. Required. To specify no
1502
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1503
+ # @param options [::Gapic::CallOptions, ::Hash]
1504
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1505
+ #
1506
+ # @overload list_features(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, read_mask: nil, latest_stats_count: nil)
1507
+ # Pass arguments to `list_features` via keyword arguments. Note that at
1508
+ # least one keyword argument is required. To specify no parameters, or to keep all
1509
+ # the default parameter values, pass an empty Hash as a request object (see above).
1510
+ #
1511
+ # @param parent [::String]
1512
+ # Required. The resource name of the Location to list Features.
1513
+ # Format for entity_type as parent:
1514
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
1515
+ # Format for feature_group as parent:
1516
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
1517
+ # @param filter [::String]
1518
+ # Lists the Features that match the filter expression. The following
1519
+ # filters are supported:
1520
+ #
1521
+ # * `value_type`: Supports = and != comparisons.
1522
+ # * `create_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must
1523
+ # be in RFC 3339 format.
1524
+ # * `update_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must
1525
+ # be in RFC 3339 format.
1526
+ # * `labels`: Supports key-value equality as well as key presence.
1527
+ #
1528
+ # Examples:
1529
+ #
1530
+ # * `value_type = DOUBLE` --> Features whose type is DOUBLE.
1531
+ # * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
1532
+ # update_time > \"2020-01-31T15:30:00.000000Z\"` --> EntityTypes created
1533
+ # or updated after 2020-01-31T15:30:00.000000Z.
1534
+ # * `labels.active = yes AND labels.env = prod` --> Features having both
1535
+ # (active: yes) and (env: prod) labels.
1536
+ # * `labels.env: *` --> Any Feature which has a label with 'env' as the
1537
+ # key.
1538
+ # @param page_size [::Integer]
1539
+ # The maximum number of Features to return. The service may return fewer
1540
+ # than this value. If unspecified, at most 1000 Features will be returned.
1541
+ # The maximum value is 1000; any value greater than 1000 will be coerced to
1542
+ # 1000.
1543
+ # @param page_token [::String]
1544
+ # A page token, received from a previous
1545
+ # {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client#list_features FeaturestoreService.ListFeatures}
1546
+ # call or
1547
+ # {::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client#list_features FeatureRegistryService.ListFeatures}
1548
+ # call. Provide this to retrieve the subsequent page.
1549
+ #
1550
+ # When paginating, all other parameters provided to
1551
+ # {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client#list_features FeaturestoreService.ListFeatures}
1552
+ # or
1553
+ # {::Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client#list_features FeatureRegistryService.ListFeatures}
1554
+ # must match the call that provided the page token.
1555
+ # @param order_by [::String]
1556
+ # A comma-separated list of fields to order by, sorted in ascending order.
1557
+ # Use "desc" after a field name for descending.
1558
+ # Supported fields:
1559
+ #
1560
+ # * `feature_id`
1561
+ # * `value_type` (Not supported for FeatureRegistry Feature)
1562
+ # * `create_time`
1563
+ # * `update_time`
1564
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1565
+ # Mask specifying which fields to read.
1566
+ # @param latest_stats_count [::Integer]
1567
+ # Only applicable for Vertex AI Feature Store (Legacy).
1568
+ # If set, return the most recent
1569
+ # {::Google::Cloud::AIPlatform::V1::ListFeaturesRequest#latest_stats_count ListFeaturesRequest.latest_stats_count}
1570
+ # of stats for each Feature in response. Valid value is [0, 10]. If number of
1571
+ # stats exists <
1572
+ # {::Google::Cloud::AIPlatform::V1::ListFeaturesRequest#latest_stats_count ListFeaturesRequest.latest_stats_count},
1573
+ # return all existing stats.
1574
+ # @yield [result, operation] Access the result along with the TransportOperation object
1575
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Feature>]
1576
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1577
+ #
1578
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Feature>]
1579
+ #
1580
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1581
+ #
1582
+ # @example Basic example
1583
+ # require "google/cloud/ai_platform/v1"
1584
+ #
1585
+ # # Create a client object. The client can be reused for multiple calls.
1586
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
1587
+ #
1588
+ # # Create a request. To set request fields, pass in keyword arguments.
1589
+ # request = Google::Cloud::AIPlatform::V1::ListFeaturesRequest.new
1590
+ #
1591
+ # # Call the list_features method.
1592
+ # result = client.list_features request
1593
+ #
1594
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1595
+ # # over elements, and API calls will be issued to fetch pages as needed.
1596
+ # result.each do |item|
1597
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Feature.
1598
+ # p item
1599
+ # end
1600
+ #
1601
+ def list_features request, options = nil
1602
+ raise ::ArgumentError, "request must be provided" if request.nil?
1603
+
1604
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListFeaturesRequest
1605
+
1606
+ # Converts hash and nil to an options object
1607
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1608
+
1609
+ # Customize the options with defaults
1610
+ call_metadata = @config.rpcs.list_features.metadata.to_h
1611
+
1612
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1613
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1614
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1615
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1616
+ transports_version_send: [:rest]
1617
+
1618
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1619
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1620
+
1621
+ options.apply_defaults timeout: @config.rpcs.list_features.timeout,
1622
+ metadata: call_metadata,
1623
+ retry_policy: @config.rpcs.list_features.retry_policy
1624
+
1625
+ options.apply_defaults timeout: @config.timeout,
1626
+ metadata: @config.metadata,
1627
+ retry_policy: @config.retry_policy
1628
+
1629
+ @featurestore_service_stub.list_features request, options do |result, operation|
1630
+ result = ::Gapic::Rest::PagedEnumerable.new @featurestore_service_stub, :list_features, "features", request, result, options
1631
+ yield result, operation if block_given?
1632
+ return result
1633
+ end
1634
+ rescue ::Gapic::Rest::Error => e
1635
+ raise ::Google::Cloud::Error.from_error(e)
1636
+ end
1637
+
1638
+ ##
1639
+ # Updates the parameters of a single Feature.
1640
+ #
1641
+ # @overload update_feature(request, options = nil)
1642
+ # Pass arguments to `update_feature` via a request object, either of type
1643
+ # {::Google::Cloud::AIPlatform::V1::UpdateFeatureRequest} or an equivalent Hash.
1644
+ #
1645
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateFeatureRequest, ::Hash]
1646
+ # A request object representing the call parameters. Required. To specify no
1647
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1648
+ # @param options [::Gapic::CallOptions, ::Hash]
1649
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1650
+ #
1651
+ # @overload update_feature(feature: nil, update_mask: nil)
1652
+ # Pass arguments to `update_feature` via keyword arguments. Note that at
1653
+ # least one keyword argument is required. To specify no parameters, or to keep all
1654
+ # the default parameter values, pass an empty Hash as a request object (see above).
1655
+ #
1656
+ # @param feature [::Google::Cloud::AIPlatform::V1::Feature, ::Hash]
1657
+ # Required. The Feature's `name` field is used to identify the Feature to be
1658
+ # updated.
1659
+ # Format:
1660
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`
1661
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`
1662
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1663
+ # Field mask is used to specify the fields to be overwritten in the
1664
+ # Features resource by the update.
1665
+ # The fields specified in the update_mask are relative to the resource, not
1666
+ # the full request. A field will be overwritten if it is in the mask. If the
1667
+ # user does not provide a mask then only the non-empty fields present in the
1668
+ # request will be overwritten. Set the update_mask to `*` to override all
1669
+ # fields.
1670
+ #
1671
+ # Updatable fields:
1672
+ #
1673
+ # * `description`
1674
+ # * `labels`
1675
+ # * `disable_monitoring` (Not supported for FeatureRegistry Feature)
1676
+ # @yield [result, operation] Access the result along with the TransportOperation object
1677
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Feature]
1678
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1679
+ #
1680
+ # @return [::Google::Cloud::AIPlatform::V1::Feature]
1681
+ #
1682
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1683
+ #
1684
+ # @example Basic example
1685
+ # require "google/cloud/ai_platform/v1"
1686
+ #
1687
+ # # Create a client object. The client can be reused for multiple calls.
1688
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
1689
+ #
1690
+ # # Create a request. To set request fields, pass in keyword arguments.
1691
+ # request = Google::Cloud::AIPlatform::V1::UpdateFeatureRequest.new
1692
+ #
1693
+ # # Call the update_feature method.
1694
+ # result = client.update_feature request
1695
+ #
1696
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Feature.
1697
+ # p result
1698
+ #
1699
+ def update_feature request, options = nil
1700
+ raise ::ArgumentError, "request must be provided" if request.nil?
1701
+
1702
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateFeatureRequest
1703
+
1704
+ # Converts hash and nil to an options object
1705
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1706
+
1707
+ # Customize the options with defaults
1708
+ call_metadata = @config.rpcs.update_feature.metadata.to_h
1709
+
1710
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1711
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1712
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1713
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1714
+ transports_version_send: [:rest]
1715
+
1716
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1717
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1718
+
1719
+ options.apply_defaults timeout: @config.rpcs.update_feature.timeout,
1720
+ metadata: call_metadata,
1721
+ retry_policy: @config.rpcs.update_feature.retry_policy
1722
+
1723
+ options.apply_defaults timeout: @config.timeout,
1724
+ metadata: @config.metadata,
1725
+ retry_policy: @config.retry_policy
1726
+
1727
+ @featurestore_service_stub.update_feature request, options do |result, operation|
1728
+ yield result, operation if block_given?
1729
+ return result
1730
+ end
1731
+ rescue ::Gapic::Rest::Error => e
1732
+ raise ::Google::Cloud::Error.from_error(e)
1733
+ end
1734
+
1735
+ ##
1736
+ # Deletes a single Feature.
1737
+ #
1738
+ # @overload delete_feature(request, options = nil)
1739
+ # Pass arguments to `delete_feature` via a request object, either of type
1740
+ # {::Google::Cloud::AIPlatform::V1::DeleteFeatureRequest} or an equivalent Hash.
1741
+ #
1742
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteFeatureRequest, ::Hash]
1743
+ # A request object representing the call parameters. Required. To specify no
1744
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1745
+ # @param options [::Gapic::CallOptions, ::Hash]
1746
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1747
+ #
1748
+ # @overload delete_feature(name: nil)
1749
+ # Pass arguments to `delete_feature` via keyword arguments. Note that at
1750
+ # least one keyword argument is required. To specify no parameters, or to keep all
1751
+ # the default parameter values, pass an empty Hash as a request object (see above).
1752
+ #
1753
+ # @param name [::String]
1754
+ # Required. The name of the Features to be deleted.
1755
+ # Format:
1756
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`
1757
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`
1758
+ # @yield [result, operation] Access the result along with the TransportOperation object
1759
+ # @yieldparam result [::Gapic::Operation]
1760
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1761
+ #
1762
+ # @return [::Gapic::Operation]
1763
+ #
1764
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1765
+ #
1766
+ # @example Basic example
1767
+ # require "google/cloud/ai_platform/v1"
1768
+ #
1769
+ # # Create a client object. The client can be reused for multiple calls.
1770
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
1771
+ #
1772
+ # # Create a request. To set request fields, pass in keyword arguments.
1773
+ # request = Google::Cloud::AIPlatform::V1::DeleteFeatureRequest.new
1774
+ #
1775
+ # # Call the delete_feature method.
1776
+ # result = client.delete_feature request
1777
+ #
1778
+ # # The returned object is of type Gapic::Operation. You can use it to
1779
+ # # check the status of an operation, cancel it, or wait for results.
1780
+ # # Here is how to wait for a response.
1781
+ # result.wait_until_done! timeout: 60
1782
+ # if result.response?
1783
+ # p result.response
1784
+ # else
1785
+ # puts "No response received."
1786
+ # end
1787
+ #
1788
+ def delete_feature request, options = nil
1789
+ raise ::ArgumentError, "request must be provided" if request.nil?
1790
+
1791
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteFeatureRequest
1792
+
1793
+ # Converts hash and nil to an options object
1794
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1795
+
1796
+ # Customize the options with defaults
1797
+ call_metadata = @config.rpcs.delete_feature.metadata.to_h
1798
+
1799
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1800
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1801
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1802
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1803
+ transports_version_send: [:rest]
1804
+
1805
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1806
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1807
+
1808
+ options.apply_defaults timeout: @config.rpcs.delete_feature.timeout,
1809
+ metadata: call_metadata,
1810
+ retry_policy: @config.rpcs.delete_feature.retry_policy
1811
+
1812
+ options.apply_defaults timeout: @config.timeout,
1813
+ metadata: @config.metadata,
1814
+ retry_policy: @config.retry_policy
1815
+
1816
+ @featurestore_service_stub.delete_feature request, options do |result, operation|
1817
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1818
+ yield result, operation if block_given?
1819
+ return result
1820
+ end
1821
+ rescue ::Gapic::Rest::Error => e
1822
+ raise ::Google::Cloud::Error.from_error(e)
1823
+ end
1824
+
1825
+ ##
1826
+ # Imports Feature values into the Featurestore from a source storage.
1827
+ #
1828
+ # The progress of the import is tracked by the returned operation. The
1829
+ # imported features are guaranteed to be visible to subsequent read
1830
+ # operations after the operation is marked as successfully done.
1831
+ #
1832
+ # If an import operation fails, the Feature values returned from
1833
+ # reads and exports may be inconsistent. If consistency is
1834
+ # required, the caller must retry the same import request again and wait till
1835
+ # the new operation returned is marked as successfully done.
1836
+ #
1837
+ # There are also scenarios where the caller can cause inconsistency.
1838
+ #
1839
+ # - Source data for import contains multiple distinct Feature values for
1840
+ # the same entity ID and timestamp.
1841
+ # - Source is modified during an import. This includes adding, updating, or
1842
+ # removing source data and/or metadata. Examples of updating metadata
1843
+ # include but are not limited to changing storage location, storage class,
1844
+ # or retention policy.
1845
+ # - Online serving cluster is under-provisioned.
1846
+ #
1847
+ # @overload import_feature_values(request, options = nil)
1848
+ # Pass arguments to `import_feature_values` via a request object, either of type
1849
+ # {::Google::Cloud::AIPlatform::V1::ImportFeatureValuesRequest} or an equivalent Hash.
1850
+ #
1851
+ # @param request [::Google::Cloud::AIPlatform::V1::ImportFeatureValuesRequest, ::Hash]
1852
+ # A request object representing the call parameters. Required. To specify no
1853
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1854
+ # @param options [::Gapic::CallOptions, ::Hash]
1855
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1856
+ #
1857
+ # @overload import_feature_values(avro_source: nil, bigquery_source: nil, csv_source: nil, feature_time_field: nil, feature_time: nil, entity_type: nil, entity_id_field: nil, feature_specs: nil, disable_online_serving: nil, worker_count: nil, disable_ingestion_analysis: nil)
1858
+ # Pass arguments to `import_feature_values` via keyword arguments. Note that at
1859
+ # least one keyword argument is required. To specify no parameters, or to keep all
1860
+ # the default parameter values, pass an empty Hash as a request object (see above).
1861
+ #
1862
+ # @param avro_source [::Google::Cloud::AIPlatform::V1::AvroSource, ::Hash]
1863
+ # @param bigquery_source [::Google::Cloud::AIPlatform::V1::BigQuerySource, ::Hash]
1864
+ # @param csv_source [::Google::Cloud::AIPlatform::V1::CsvSource, ::Hash]
1865
+ # @param feature_time_field [::String]
1866
+ # Source column that holds the Feature timestamp for all Feature
1867
+ # values in each entity.
1868
+ # @param feature_time [::Google::Protobuf::Timestamp, ::Hash]
1869
+ # Single Feature timestamp for all entities being imported. The
1870
+ # timestamp must not have higher than millisecond precision.
1871
+ # @param entity_type [::String]
1872
+ # Required. The resource name of the EntityType grouping the Features for
1873
+ # which values are being imported. Format:
1874
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`
1875
+ # @param entity_id_field [::String]
1876
+ # Source column that holds entity IDs. If not provided, entity IDs are
1877
+ # extracted from the column named entity_id.
1878
+ # @param feature_specs [::Array<::Google::Cloud::AIPlatform::V1::ImportFeatureValuesRequest::FeatureSpec, ::Hash>]
1879
+ # Required. Specifications defining which Feature values to import from the
1880
+ # entity. The request fails if no feature_specs are provided, and having
1881
+ # multiple feature_specs for one Feature is not allowed.
1882
+ # @param disable_online_serving [::Boolean]
1883
+ # If set, data will not be imported for online serving. This
1884
+ # is typically used for backfilling, where Feature generation timestamps are
1885
+ # not in the timestamp range needed for online serving.
1886
+ # @param worker_count [::Integer]
1887
+ # Specifies the number of workers that are used to write data to the
1888
+ # Featurestore. Consider the online serving capacity that you require to
1889
+ # achieve the desired import throughput without interfering with online
1890
+ # serving. The value must be positive, and less than or equal to 100.
1891
+ # If not set, defaults to using 1 worker. The low count ensures minimal
1892
+ # impact on online serving performance.
1893
+ # @param disable_ingestion_analysis [::Boolean]
1894
+ # If true, API doesn't start ingestion analysis pipeline.
1895
+ # @yield [result, operation] Access the result along with the TransportOperation object
1896
+ # @yieldparam result [::Gapic::Operation]
1897
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1898
+ #
1899
+ # @return [::Gapic::Operation]
1900
+ #
1901
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1902
+ #
1903
+ # @example Basic example
1904
+ # require "google/cloud/ai_platform/v1"
1905
+ #
1906
+ # # Create a client object. The client can be reused for multiple calls.
1907
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
1908
+ #
1909
+ # # Create a request. To set request fields, pass in keyword arguments.
1910
+ # request = Google::Cloud::AIPlatform::V1::ImportFeatureValuesRequest.new
1911
+ #
1912
+ # # Call the import_feature_values method.
1913
+ # result = client.import_feature_values request
1914
+ #
1915
+ # # The returned object is of type Gapic::Operation. You can use it to
1916
+ # # check the status of an operation, cancel it, or wait for results.
1917
+ # # Here is how to wait for a response.
1918
+ # result.wait_until_done! timeout: 60
1919
+ # if result.response?
1920
+ # p result.response
1921
+ # else
1922
+ # puts "No response received."
1923
+ # end
1924
+ #
1925
+ def import_feature_values request, options = nil
1926
+ raise ::ArgumentError, "request must be provided" if request.nil?
1927
+
1928
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ImportFeatureValuesRequest
1929
+
1930
+ # Converts hash and nil to an options object
1931
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1932
+
1933
+ # Customize the options with defaults
1934
+ call_metadata = @config.rpcs.import_feature_values.metadata.to_h
1935
+
1936
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1937
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1938
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1939
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1940
+ transports_version_send: [:rest]
1941
+
1942
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1943
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1944
+
1945
+ options.apply_defaults timeout: @config.rpcs.import_feature_values.timeout,
1946
+ metadata: call_metadata,
1947
+ retry_policy: @config.rpcs.import_feature_values.retry_policy
1948
+
1949
+ options.apply_defaults timeout: @config.timeout,
1950
+ metadata: @config.metadata,
1951
+ retry_policy: @config.retry_policy
1952
+
1953
+ @featurestore_service_stub.import_feature_values request, options do |result, operation|
1954
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1955
+ yield result, operation if block_given?
1956
+ return result
1957
+ end
1958
+ rescue ::Gapic::Rest::Error => e
1959
+ raise ::Google::Cloud::Error.from_error(e)
1960
+ end
1961
+
1962
+ ##
1963
+ # Batch reads Feature values from a Featurestore.
1964
+ #
1965
+ # This API enables batch reading Feature values, where each read
1966
+ # instance in the batch may read Feature values of entities from one or
1967
+ # more EntityTypes. Point-in-time correctness is guaranteed for Feature
1968
+ # values of each read instance as of each instance's read timestamp.
1969
+ #
1970
+ # @overload batch_read_feature_values(request, options = nil)
1971
+ # Pass arguments to `batch_read_feature_values` via a request object, either of type
1972
+ # {::Google::Cloud::AIPlatform::V1::BatchReadFeatureValuesRequest} or an equivalent Hash.
1973
+ #
1974
+ # @param request [::Google::Cloud::AIPlatform::V1::BatchReadFeatureValuesRequest, ::Hash]
1975
+ # A request object representing the call parameters. Required. To specify no
1976
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1977
+ # @param options [::Gapic::CallOptions, ::Hash]
1978
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1979
+ #
1980
+ # @overload batch_read_feature_values(csv_read_instances: nil, bigquery_read_instances: nil, featurestore: nil, destination: nil, pass_through_fields: nil, entity_type_specs: nil, start_time: nil)
1981
+ # Pass arguments to `batch_read_feature_values` via keyword arguments. Note that at
1982
+ # least one keyword argument is required. To specify no parameters, or to keep all
1983
+ # the default parameter values, pass an empty Hash as a request object (see above).
1984
+ #
1985
+ # @param csv_read_instances [::Google::Cloud::AIPlatform::V1::CsvSource, ::Hash]
1986
+ # Each read instance consists of exactly one read timestamp and one or more
1987
+ # entity IDs identifying entities of the corresponding EntityTypes whose
1988
+ # Features are requested.
1989
+ #
1990
+ # Each output instance contains Feature values of requested entities
1991
+ # concatenated together as of the read time.
1992
+ #
1993
+ # An example read instance may be `foo_entity_id, bar_entity_id,
1994
+ # 2020-01-01T10:00:00.123Z`.
1995
+ #
1996
+ # An example output instance may be `foo_entity_id, bar_entity_id,
1997
+ # 2020-01-01T10:00:00.123Z, foo_entity_feature1_value,
1998
+ # bar_entity_feature2_value`.
1999
+ #
2000
+ # Timestamp in each read instance must be millisecond-aligned.
2001
+ #
2002
+ # `csv_read_instances` are read instances stored in a plain-text CSV file.
2003
+ # The header should be:
2004
+ # [ENTITY_TYPE_ID1], [ENTITY_TYPE_ID2], ..., timestamp
2005
+ #
2006
+ # The columns can be in any order.
2007
+ #
2008
+ # Values in the timestamp column must use the RFC 3339 format, e.g.
2009
+ # `2012-07-30T10:43:17.123Z`.
2010
+ # @param bigquery_read_instances [::Google::Cloud::AIPlatform::V1::BigQuerySource, ::Hash]
2011
+ # Similar to csv_read_instances, but from BigQuery source.
2012
+ # @param featurestore [::String]
2013
+ # Required. The resource name of the Featurestore from which to query Feature
2014
+ # values. Format:
2015
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}`
2016
+ # @param destination [::Google::Cloud::AIPlatform::V1::FeatureValueDestination, ::Hash]
2017
+ # Required. Specifies output location and format.
2018
+ # @param pass_through_fields [::Array<::Google::Cloud::AIPlatform::V1::BatchReadFeatureValuesRequest::PassThroughField, ::Hash>]
2019
+ # When not empty, the specified fields in the *_read_instances source will be
2020
+ # joined as-is in the output, in addition to those fields from the
2021
+ # Featurestore Entity.
2022
+ #
2023
+ # For BigQuery source, the type of the pass-through values will be
2024
+ # automatically inferred. For CSV source, the pass-through values will be
2025
+ # passed as opaque bytes.
2026
+ # @param entity_type_specs [::Array<::Google::Cloud::AIPlatform::V1::BatchReadFeatureValuesRequest::EntityTypeSpec, ::Hash>]
2027
+ # Required. Specifies EntityType grouping Features to read values of and
2028
+ # settings.
2029
+ # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
2030
+ # Optional. Excludes Feature values with feature generation timestamp before
2031
+ # this timestamp. If not set, retrieve oldest values kept in Feature Store.
2032
+ # Timestamp, if present, must not have higher than millisecond precision.
2033
+ # @yield [result, operation] Access the result along with the TransportOperation object
2034
+ # @yieldparam result [::Gapic::Operation]
2035
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2036
+ #
2037
+ # @return [::Gapic::Operation]
2038
+ #
2039
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2040
+ #
2041
+ # @example Basic example
2042
+ # require "google/cloud/ai_platform/v1"
2043
+ #
2044
+ # # Create a client object. The client can be reused for multiple calls.
2045
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
2046
+ #
2047
+ # # Create a request. To set request fields, pass in keyword arguments.
2048
+ # request = Google::Cloud::AIPlatform::V1::BatchReadFeatureValuesRequest.new
2049
+ #
2050
+ # # Call the batch_read_feature_values method.
2051
+ # result = client.batch_read_feature_values request
2052
+ #
2053
+ # # The returned object is of type Gapic::Operation. You can use it to
2054
+ # # check the status of an operation, cancel it, or wait for results.
2055
+ # # Here is how to wait for a response.
2056
+ # result.wait_until_done! timeout: 60
2057
+ # if result.response?
2058
+ # p result.response
2059
+ # else
2060
+ # puts "No response received."
2061
+ # end
2062
+ #
2063
+ def batch_read_feature_values request, options = nil
2064
+ raise ::ArgumentError, "request must be provided" if request.nil?
2065
+
2066
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::BatchReadFeatureValuesRequest
2067
+
2068
+ # Converts hash and nil to an options object
2069
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2070
+
2071
+ # Customize the options with defaults
2072
+ call_metadata = @config.rpcs.batch_read_feature_values.metadata.to_h
2073
+
2074
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2075
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2076
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2077
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2078
+ transports_version_send: [:rest]
2079
+
2080
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2081
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2082
+
2083
+ options.apply_defaults timeout: @config.rpcs.batch_read_feature_values.timeout,
2084
+ metadata: call_metadata,
2085
+ retry_policy: @config.rpcs.batch_read_feature_values.retry_policy
2086
+
2087
+ options.apply_defaults timeout: @config.timeout,
2088
+ metadata: @config.metadata,
2089
+ retry_policy: @config.retry_policy
2090
+
2091
+ @featurestore_service_stub.batch_read_feature_values request, options do |result, operation|
2092
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2093
+ yield result, operation if block_given?
2094
+ return result
2095
+ end
2096
+ rescue ::Gapic::Rest::Error => e
2097
+ raise ::Google::Cloud::Error.from_error(e)
2098
+ end
2099
+
2100
+ ##
2101
+ # Exports Feature values from all the entities of a target EntityType.
2102
+ #
2103
+ # @overload export_feature_values(request, options = nil)
2104
+ # Pass arguments to `export_feature_values` via a request object, either of type
2105
+ # {::Google::Cloud::AIPlatform::V1::ExportFeatureValuesRequest} or an equivalent Hash.
2106
+ #
2107
+ # @param request [::Google::Cloud::AIPlatform::V1::ExportFeatureValuesRequest, ::Hash]
2108
+ # A request object representing the call parameters. Required. To specify no
2109
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2110
+ # @param options [::Gapic::CallOptions, ::Hash]
2111
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2112
+ #
2113
+ # @overload export_feature_values(snapshot_export: nil, full_export: nil, entity_type: nil, destination: nil, feature_selector: nil, settings: nil)
2114
+ # Pass arguments to `export_feature_values` via keyword arguments. Note that at
2115
+ # least one keyword argument is required. To specify no parameters, or to keep all
2116
+ # the default parameter values, pass an empty Hash as a request object (see above).
2117
+ #
2118
+ # @param snapshot_export [::Google::Cloud::AIPlatform::V1::ExportFeatureValuesRequest::SnapshotExport, ::Hash]
2119
+ # Exports the latest Feature values of all entities of the EntityType
2120
+ # within a time range.
2121
+ # @param full_export [::Google::Cloud::AIPlatform::V1::ExportFeatureValuesRequest::FullExport, ::Hash]
2122
+ # Exports all historical values of all entities of the EntityType within a
2123
+ # time range
2124
+ # @param entity_type [::String]
2125
+ # Required. The resource name of the EntityType from which to export Feature
2126
+ # values. Format:
2127
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
2128
+ # @param destination [::Google::Cloud::AIPlatform::V1::FeatureValueDestination, ::Hash]
2129
+ # Required. Specifies destination location and format.
2130
+ # @param feature_selector [::Google::Cloud::AIPlatform::V1::FeatureSelector, ::Hash]
2131
+ # Required. Selects Features to export values of.
2132
+ # @param settings [::Array<::Google::Cloud::AIPlatform::V1::DestinationFeatureSetting, ::Hash>]
2133
+ # Per-Feature export settings.
2134
+ # @yield [result, operation] Access the result along with the TransportOperation object
2135
+ # @yieldparam result [::Gapic::Operation]
2136
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2137
+ #
2138
+ # @return [::Gapic::Operation]
2139
+ #
2140
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2141
+ #
2142
+ # @example Basic example
2143
+ # require "google/cloud/ai_platform/v1"
2144
+ #
2145
+ # # Create a client object. The client can be reused for multiple calls.
2146
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
2147
+ #
2148
+ # # Create a request. To set request fields, pass in keyword arguments.
2149
+ # request = Google::Cloud::AIPlatform::V1::ExportFeatureValuesRequest.new
2150
+ #
2151
+ # # Call the export_feature_values method.
2152
+ # result = client.export_feature_values request
2153
+ #
2154
+ # # The returned object is of type Gapic::Operation. You can use it to
2155
+ # # check the status of an operation, cancel it, or wait for results.
2156
+ # # Here is how to wait for a response.
2157
+ # result.wait_until_done! timeout: 60
2158
+ # if result.response?
2159
+ # p result.response
2160
+ # else
2161
+ # puts "No response received."
2162
+ # end
2163
+ #
2164
+ def export_feature_values request, options = nil
2165
+ raise ::ArgumentError, "request must be provided" if request.nil?
2166
+
2167
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ExportFeatureValuesRequest
2168
+
2169
+ # Converts hash and nil to an options object
2170
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2171
+
2172
+ # Customize the options with defaults
2173
+ call_metadata = @config.rpcs.export_feature_values.metadata.to_h
2174
+
2175
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2176
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2177
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2178
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2179
+ transports_version_send: [:rest]
2180
+
2181
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2182
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2183
+
2184
+ options.apply_defaults timeout: @config.rpcs.export_feature_values.timeout,
2185
+ metadata: call_metadata,
2186
+ retry_policy: @config.rpcs.export_feature_values.retry_policy
2187
+
2188
+ options.apply_defaults timeout: @config.timeout,
2189
+ metadata: @config.metadata,
2190
+ retry_policy: @config.retry_policy
2191
+
2192
+ @featurestore_service_stub.export_feature_values request, options do |result, operation|
2193
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2194
+ yield result, operation if block_given?
2195
+ return result
2196
+ end
2197
+ rescue ::Gapic::Rest::Error => e
2198
+ raise ::Google::Cloud::Error.from_error(e)
2199
+ end
2200
+
2201
+ ##
2202
+ # Delete Feature values from Featurestore.
2203
+ #
2204
+ # The progress of the deletion is tracked by the returned operation. The
2205
+ # deleted feature values are guaranteed to be invisible to subsequent read
2206
+ # operations after the operation is marked as successfully done.
2207
+ #
2208
+ # If a delete feature values operation fails, the feature values
2209
+ # returned from reads and exports may be inconsistent. If consistency is
2210
+ # required, the caller must retry the same delete request again and wait till
2211
+ # the new operation returned is marked as successfully done.
2212
+ #
2213
+ # @overload delete_feature_values(request, options = nil)
2214
+ # Pass arguments to `delete_feature_values` via a request object, either of type
2215
+ # {::Google::Cloud::AIPlatform::V1::DeleteFeatureValuesRequest} or an equivalent Hash.
2216
+ #
2217
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteFeatureValuesRequest, ::Hash]
2218
+ # A request object representing the call parameters. Required. To specify no
2219
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2220
+ # @param options [::Gapic::CallOptions, ::Hash]
2221
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2222
+ #
2223
+ # @overload delete_feature_values(select_entity: nil, select_time_range_and_feature: nil, entity_type: nil)
2224
+ # Pass arguments to `delete_feature_values` via keyword arguments. Note that at
2225
+ # least one keyword argument is required. To specify no parameters, or to keep all
2226
+ # the default parameter values, pass an empty Hash as a request object (see above).
2227
+ #
2228
+ # @param select_entity [::Google::Cloud::AIPlatform::V1::DeleteFeatureValuesRequest::SelectEntity, ::Hash]
2229
+ # Select feature values to be deleted by specifying entities.
2230
+ # @param select_time_range_and_feature [::Google::Cloud::AIPlatform::V1::DeleteFeatureValuesRequest::SelectTimeRangeAndFeature, ::Hash]
2231
+ # Select feature values to be deleted by specifying time range and
2232
+ # features.
2233
+ # @param entity_type [::String]
2234
+ # Required. The resource name of the EntityType grouping the Features for
2235
+ # which values are being deleted from. Format:
2236
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`
2237
+ # @yield [result, operation] Access the result along with the TransportOperation object
2238
+ # @yieldparam result [::Gapic::Operation]
2239
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2240
+ #
2241
+ # @return [::Gapic::Operation]
2242
+ #
2243
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2244
+ #
2245
+ # @example Basic example
2246
+ # require "google/cloud/ai_platform/v1"
2247
+ #
2248
+ # # Create a client object. The client can be reused for multiple calls.
2249
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
2250
+ #
2251
+ # # Create a request. To set request fields, pass in keyword arguments.
2252
+ # request = Google::Cloud::AIPlatform::V1::DeleteFeatureValuesRequest.new
2253
+ #
2254
+ # # Call the delete_feature_values method.
2255
+ # result = client.delete_feature_values request
2256
+ #
2257
+ # # The returned object is of type Gapic::Operation. You can use it to
2258
+ # # check the status of an operation, cancel it, or wait for results.
2259
+ # # Here is how to wait for a response.
2260
+ # result.wait_until_done! timeout: 60
2261
+ # if result.response?
2262
+ # p result.response
2263
+ # else
2264
+ # puts "No response received."
2265
+ # end
2266
+ #
2267
+ def delete_feature_values request, options = nil
2268
+ raise ::ArgumentError, "request must be provided" if request.nil?
2269
+
2270
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteFeatureValuesRequest
2271
+
2272
+ # Converts hash and nil to an options object
2273
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2274
+
2275
+ # Customize the options with defaults
2276
+ call_metadata = @config.rpcs.delete_feature_values.metadata.to_h
2277
+
2278
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2279
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2280
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2281
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2282
+ transports_version_send: [:rest]
2283
+
2284
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2285
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2286
+
2287
+ options.apply_defaults timeout: @config.rpcs.delete_feature_values.timeout,
2288
+ metadata: call_metadata,
2289
+ retry_policy: @config.rpcs.delete_feature_values.retry_policy
2290
+
2291
+ options.apply_defaults timeout: @config.timeout,
2292
+ metadata: @config.metadata,
2293
+ retry_policy: @config.retry_policy
2294
+
2295
+ @featurestore_service_stub.delete_feature_values request, options do |result, operation|
2296
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2297
+ yield result, operation if block_given?
2298
+ return result
2299
+ end
2300
+ rescue ::Gapic::Rest::Error => e
2301
+ raise ::Google::Cloud::Error.from_error(e)
2302
+ end
2303
+
2304
+ ##
2305
+ # Searches Features matching a query in a given project.
2306
+ #
2307
+ # @overload search_features(request, options = nil)
2308
+ # Pass arguments to `search_features` via a request object, either of type
2309
+ # {::Google::Cloud::AIPlatform::V1::SearchFeaturesRequest} or an equivalent Hash.
2310
+ #
2311
+ # @param request [::Google::Cloud::AIPlatform::V1::SearchFeaturesRequest, ::Hash]
2312
+ # A request object representing the call parameters. Required. To specify no
2313
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2314
+ # @param options [::Gapic::CallOptions, ::Hash]
2315
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2316
+ #
2317
+ # @overload search_features(location: nil, query: nil, page_size: nil, page_token: nil)
2318
+ # Pass arguments to `search_features` via keyword arguments. Note that at
2319
+ # least one keyword argument is required. To specify no parameters, or to keep all
2320
+ # the default parameter values, pass an empty Hash as a request object (see above).
2321
+ #
2322
+ # @param location [::String]
2323
+ # Required. The resource name of the Location to search Features.
2324
+ # Format:
2325
+ # `projects/{project}/locations/{location}`
2326
+ # @param query [::String]
2327
+ # Query string that is a conjunction of field-restricted queries and/or
2328
+ # field-restricted filters. Field-restricted queries and filters can be
2329
+ # combined using `AND` to form a conjunction.
2330
+ #
2331
+ # A field query is in the form FIELD:QUERY. This implicitly checks if QUERY
2332
+ # exists as a substring within Feature's FIELD. The QUERY
2333
+ # and the FIELD are converted to a sequence of words (i.e. tokens) for
2334
+ # comparison. This is done by:
2335
+ #
2336
+ # * Removing leading/trailing whitespace and tokenizing the search value.
2337
+ # Characters that are not one of alphanumeric `[a-zA-Z0-9]`, underscore
2338
+ # `_`, or asterisk `*` are treated as delimiters for tokens. `*` is treated
2339
+ # as a wildcard that matches characters within a token.
2340
+ # * Ignoring case.
2341
+ # * Prepending an asterisk to the first and appending an asterisk to the
2342
+ # last token in QUERY.
2343
+ #
2344
+ # A QUERY must be either a singular token or a phrase. A phrase is one or
2345
+ # multiple words enclosed in double quotation marks ("). With phrases, the
2346
+ # order of the words is important. Words in the phrase must be matching in
2347
+ # order and consecutively.
2348
+ #
2349
+ # Supported FIELDs for field-restricted queries:
2350
+ #
2351
+ # * `feature_id`
2352
+ # * `description`
2353
+ # * `entity_type_id`
2354
+ #
2355
+ # Examples:
2356
+ #
2357
+ # * `feature_id: foo` --> Matches a Feature with ID containing the substring
2358
+ # `foo` (eg. `foo`, `foofeature`, `barfoo`).
2359
+ # * `feature_id: foo*feature` --> Matches a Feature with ID containing the
2360
+ # substring `foo*feature` (eg. `foobarfeature`).
2361
+ # * `feature_id: foo AND description: bar` --> Matches a Feature with ID
2362
+ # containing the substring `foo` and description containing the substring
2363
+ # `bar`.
2364
+ #
2365
+ #
2366
+ # Besides field queries, the following exact-match filters are
2367
+ # supported. The exact-match filters do not support wildcards. Unlike
2368
+ # field-restricted queries, exact-match filters are case-sensitive.
2369
+ #
2370
+ # * `feature_id`: Supports = comparisons.
2371
+ # * `description`: Supports = comparisons. Multi-token filters should be
2372
+ # enclosed in quotes.
2373
+ # * `entity_type_id`: Supports = comparisons.
2374
+ # * `value_type`: Supports = and != comparisons.
2375
+ # * `labels`: Supports key-value equality as well as key presence.
2376
+ # * `featurestore_id`: Supports = comparisons.
2377
+ #
2378
+ # Examples:
2379
+ #
2380
+ # * `description = "foo bar"` --> Any Feature with description exactly equal
2381
+ # to `foo bar`
2382
+ # * `value_type = DOUBLE` --> Features whose type is DOUBLE.
2383
+ # * `labels.active = yes AND labels.env = prod` --> Features having both
2384
+ # (active: yes) and (env: prod) labels.
2385
+ # * `labels.env: *` --> Any Feature which has a label with `env` as the
2386
+ # key.
2387
+ # @param page_size [::Integer]
2388
+ # The maximum number of Features to return. The service may return fewer
2389
+ # than this value. If unspecified, at most 100 Features will be returned.
2390
+ # The maximum value is 100; any value greater than 100 will be coerced to
2391
+ # 100.
2392
+ # @param page_token [::String]
2393
+ # A page token, received from a previous
2394
+ # {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client#search_features FeaturestoreService.SearchFeatures}
2395
+ # call. Provide this to retrieve the subsequent page.
2396
+ #
2397
+ # When paginating, all other parameters provided to
2398
+ # {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client#search_features FeaturestoreService.SearchFeatures},
2399
+ # except `page_size`, must match the call that provided the page token.
2400
+ # @yield [result, operation] Access the result along with the TransportOperation object
2401
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Feature>]
2402
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2403
+ #
2404
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Feature>]
2405
+ #
2406
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2407
+ #
2408
+ # @example Basic example
2409
+ # require "google/cloud/ai_platform/v1"
2410
+ #
2411
+ # # Create a client object. The client can be reused for multiple calls.
2412
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new
2413
+ #
2414
+ # # Create a request. To set request fields, pass in keyword arguments.
2415
+ # request = Google::Cloud::AIPlatform::V1::SearchFeaturesRequest.new
2416
+ #
2417
+ # # Call the search_features method.
2418
+ # result = client.search_features request
2419
+ #
2420
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2421
+ # # over elements, and API calls will be issued to fetch pages as needed.
2422
+ # result.each do |item|
2423
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Feature.
2424
+ # p item
2425
+ # end
2426
+ #
2427
+ def search_features request, options = nil
2428
+ raise ::ArgumentError, "request must be provided" if request.nil?
2429
+
2430
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::SearchFeaturesRequest
2431
+
2432
+ # Converts hash and nil to an options object
2433
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2434
+
2435
+ # Customize the options with defaults
2436
+ call_metadata = @config.rpcs.search_features.metadata.to_h
2437
+
2438
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2439
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2440
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2441
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2442
+ transports_version_send: [:rest]
2443
+
2444
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2445
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2446
+
2447
+ options.apply_defaults timeout: @config.rpcs.search_features.timeout,
2448
+ metadata: call_metadata,
2449
+ retry_policy: @config.rpcs.search_features.retry_policy
2450
+
2451
+ options.apply_defaults timeout: @config.timeout,
2452
+ metadata: @config.metadata,
2453
+ retry_policy: @config.retry_policy
2454
+
2455
+ @featurestore_service_stub.search_features request, options do |result, operation|
2456
+ result = ::Gapic::Rest::PagedEnumerable.new @featurestore_service_stub, :search_features, "features", request, result, options
2457
+ yield result, operation if block_given?
2458
+ return result
2459
+ end
2460
+ rescue ::Gapic::Rest::Error => e
2461
+ raise ::Google::Cloud::Error.from_error(e)
2462
+ end
2463
+
2464
+ ##
2465
+ # Configuration class for the FeaturestoreService REST API.
2466
+ #
2467
+ # This class represents the configuration for FeaturestoreService REST,
2468
+ # providing control over timeouts, retry behavior, logging, transport
2469
+ # parameters, and other low-level controls. Certain parameters can also be
2470
+ # applied individually to specific RPCs. See
2471
+ # {::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client::Configuration::Rpcs}
2472
+ # for a list of RPCs that can be configured independently.
2473
+ #
2474
+ # Configuration can be applied globally to all clients, or to a single client
2475
+ # on construction.
2476
+ #
2477
+ # @example
2478
+ #
2479
+ # # Modify the global config, setting the timeout for
2480
+ # # create_featurestore to 20 seconds,
2481
+ # # and all remaining timeouts to 10 seconds.
2482
+ # ::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.configure do |config|
2483
+ # config.timeout = 10.0
2484
+ # config.rpcs.create_featurestore.timeout = 20.0
2485
+ # end
2486
+ #
2487
+ # # Apply the above configuration only to a new client.
2488
+ # client = ::Google::Cloud::AIPlatform::V1::FeaturestoreService::Rest::Client.new do |config|
2489
+ # config.timeout = 10.0
2490
+ # config.rpcs.create_featurestore.timeout = 20.0
2491
+ # end
2492
+ #
2493
+ # @!attribute [rw] endpoint
2494
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2495
+ # nil, indicating to use the default endpoint in the current universe domain.
2496
+ # @return [::String,nil]
2497
+ # @!attribute [rw] credentials
2498
+ # Credentials to send with calls. You may provide any of the following types:
2499
+ # * (`String`) The path to a service account key file in JSON format
2500
+ # * (`Hash`) A service account key as a Hash
2501
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2502
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2503
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2504
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2505
+ # * (`nil`) indicating no credentials
2506
+ # @return [::Object]
2507
+ # @!attribute [rw] scope
2508
+ # The OAuth scopes
2509
+ # @return [::Array<::String>]
2510
+ # @!attribute [rw] lib_name
2511
+ # The library name as recorded in instrumentation and logging
2512
+ # @return [::String]
2513
+ # @!attribute [rw] lib_version
2514
+ # The library version as recorded in instrumentation and logging
2515
+ # @return [::String]
2516
+ # @!attribute [rw] timeout
2517
+ # The call timeout in seconds.
2518
+ # @return [::Numeric]
2519
+ # @!attribute [rw] metadata
2520
+ # Additional headers to be sent with the call.
2521
+ # @return [::Hash{::Symbol=>::String}]
2522
+ # @!attribute [rw] retry_policy
2523
+ # The retry policy. The value is a hash with the following keys:
2524
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2525
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2526
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2527
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2528
+ # trigger a retry.
2529
+ # @return [::Hash]
2530
+ # @!attribute [rw] quota_project
2531
+ # A separate project against which to charge quota.
2532
+ # @return [::String]
2533
+ # @!attribute [rw] universe_domain
2534
+ # The universe domain within which to make requests. This determines the
2535
+ # default endpoint URL. The default value of nil uses the environment
2536
+ # universe (usually the default "googleapis.com" universe).
2537
+ # @return [::String,nil]
2538
+ #
2539
+ class Configuration
2540
+ extend ::Gapic::Config
2541
+
2542
+ # @private
2543
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2544
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
2545
+
2546
+ config_attr :endpoint, nil, ::String, nil
2547
+ config_attr :credentials, nil do |value|
2548
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2549
+ allowed.any? { |klass| klass === value }
2550
+ end
2551
+ config_attr :scope, nil, ::String, ::Array, nil
2552
+ config_attr :lib_name, nil, ::String, nil
2553
+ config_attr :lib_version, nil, ::String, nil
2554
+ config_attr :timeout, nil, ::Numeric, nil
2555
+ config_attr :metadata, nil, ::Hash, nil
2556
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2557
+ config_attr :quota_project, nil, ::String, nil
2558
+ config_attr :universe_domain, nil, ::String, nil
2559
+
2560
+ # @private
2561
+ # Overrides for http bindings for the RPCs of this service
2562
+ # are only used when this service is used as mixin, and only
2563
+ # by the host service.
2564
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2565
+ config_attr :bindings_override, {}, ::Hash, nil
2566
+
2567
+ # @private
2568
+ def initialize parent_config = nil
2569
+ @parent_config = parent_config unless parent_config.nil?
2570
+
2571
+ yield self if block_given?
2572
+ end
2573
+
2574
+ ##
2575
+ # Configurations for individual RPCs
2576
+ # @return [Rpcs]
2577
+ #
2578
+ def rpcs
2579
+ @rpcs ||= begin
2580
+ parent_rpcs = nil
2581
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2582
+ Rpcs.new parent_rpcs
2583
+ end
2584
+ end
2585
+
2586
+ ##
2587
+ # Configuration RPC class for the FeaturestoreService API.
2588
+ #
2589
+ # Includes fields providing the configuration for each RPC in this service.
2590
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2591
+ # the following configuration fields:
2592
+ #
2593
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2594
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2595
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2596
+ # include the following keys:
2597
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2598
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2599
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2600
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2601
+ # trigger a retry.
2602
+ #
2603
+ class Rpcs
2604
+ ##
2605
+ # RPC-specific configuration for `create_featurestore`
2606
+ # @return [::Gapic::Config::Method]
2607
+ #
2608
+ attr_reader :create_featurestore
2609
+ ##
2610
+ # RPC-specific configuration for `get_featurestore`
2611
+ # @return [::Gapic::Config::Method]
2612
+ #
2613
+ attr_reader :get_featurestore
2614
+ ##
2615
+ # RPC-specific configuration for `list_featurestores`
2616
+ # @return [::Gapic::Config::Method]
2617
+ #
2618
+ attr_reader :list_featurestores
2619
+ ##
2620
+ # RPC-specific configuration for `update_featurestore`
2621
+ # @return [::Gapic::Config::Method]
2622
+ #
2623
+ attr_reader :update_featurestore
2624
+ ##
2625
+ # RPC-specific configuration for `delete_featurestore`
2626
+ # @return [::Gapic::Config::Method]
2627
+ #
2628
+ attr_reader :delete_featurestore
2629
+ ##
2630
+ # RPC-specific configuration for `create_entity_type`
2631
+ # @return [::Gapic::Config::Method]
2632
+ #
2633
+ attr_reader :create_entity_type
2634
+ ##
2635
+ # RPC-specific configuration for `get_entity_type`
2636
+ # @return [::Gapic::Config::Method]
2637
+ #
2638
+ attr_reader :get_entity_type
2639
+ ##
2640
+ # RPC-specific configuration for `list_entity_types`
2641
+ # @return [::Gapic::Config::Method]
2642
+ #
2643
+ attr_reader :list_entity_types
2644
+ ##
2645
+ # RPC-specific configuration for `update_entity_type`
2646
+ # @return [::Gapic::Config::Method]
2647
+ #
2648
+ attr_reader :update_entity_type
2649
+ ##
2650
+ # RPC-specific configuration for `delete_entity_type`
2651
+ # @return [::Gapic::Config::Method]
2652
+ #
2653
+ attr_reader :delete_entity_type
2654
+ ##
2655
+ # RPC-specific configuration for `create_feature`
2656
+ # @return [::Gapic::Config::Method]
2657
+ #
2658
+ attr_reader :create_feature
2659
+ ##
2660
+ # RPC-specific configuration for `batch_create_features`
2661
+ # @return [::Gapic::Config::Method]
2662
+ #
2663
+ attr_reader :batch_create_features
2664
+ ##
2665
+ # RPC-specific configuration for `get_feature`
2666
+ # @return [::Gapic::Config::Method]
2667
+ #
2668
+ attr_reader :get_feature
2669
+ ##
2670
+ # RPC-specific configuration for `list_features`
2671
+ # @return [::Gapic::Config::Method]
2672
+ #
2673
+ attr_reader :list_features
2674
+ ##
2675
+ # RPC-specific configuration for `update_feature`
2676
+ # @return [::Gapic::Config::Method]
2677
+ #
2678
+ attr_reader :update_feature
2679
+ ##
2680
+ # RPC-specific configuration for `delete_feature`
2681
+ # @return [::Gapic::Config::Method]
2682
+ #
2683
+ attr_reader :delete_feature
2684
+ ##
2685
+ # RPC-specific configuration for `import_feature_values`
2686
+ # @return [::Gapic::Config::Method]
2687
+ #
2688
+ attr_reader :import_feature_values
2689
+ ##
2690
+ # RPC-specific configuration for `batch_read_feature_values`
2691
+ # @return [::Gapic::Config::Method]
2692
+ #
2693
+ attr_reader :batch_read_feature_values
2694
+ ##
2695
+ # RPC-specific configuration for `export_feature_values`
2696
+ # @return [::Gapic::Config::Method]
2697
+ #
2698
+ attr_reader :export_feature_values
2699
+ ##
2700
+ # RPC-specific configuration for `delete_feature_values`
2701
+ # @return [::Gapic::Config::Method]
2702
+ #
2703
+ attr_reader :delete_feature_values
2704
+ ##
2705
+ # RPC-specific configuration for `search_features`
2706
+ # @return [::Gapic::Config::Method]
2707
+ #
2708
+ attr_reader :search_features
2709
+
2710
+ # @private
2711
+ def initialize parent_rpcs = nil
2712
+ create_featurestore_config = parent_rpcs.create_featurestore if parent_rpcs.respond_to? :create_featurestore
2713
+ @create_featurestore = ::Gapic::Config::Method.new create_featurestore_config
2714
+ get_featurestore_config = parent_rpcs.get_featurestore if parent_rpcs.respond_to? :get_featurestore
2715
+ @get_featurestore = ::Gapic::Config::Method.new get_featurestore_config
2716
+ list_featurestores_config = parent_rpcs.list_featurestores if parent_rpcs.respond_to? :list_featurestores
2717
+ @list_featurestores = ::Gapic::Config::Method.new list_featurestores_config
2718
+ update_featurestore_config = parent_rpcs.update_featurestore if parent_rpcs.respond_to? :update_featurestore
2719
+ @update_featurestore = ::Gapic::Config::Method.new update_featurestore_config
2720
+ delete_featurestore_config = parent_rpcs.delete_featurestore if parent_rpcs.respond_to? :delete_featurestore
2721
+ @delete_featurestore = ::Gapic::Config::Method.new delete_featurestore_config
2722
+ create_entity_type_config = parent_rpcs.create_entity_type if parent_rpcs.respond_to? :create_entity_type
2723
+ @create_entity_type = ::Gapic::Config::Method.new create_entity_type_config
2724
+ get_entity_type_config = parent_rpcs.get_entity_type if parent_rpcs.respond_to? :get_entity_type
2725
+ @get_entity_type = ::Gapic::Config::Method.new get_entity_type_config
2726
+ list_entity_types_config = parent_rpcs.list_entity_types if parent_rpcs.respond_to? :list_entity_types
2727
+ @list_entity_types = ::Gapic::Config::Method.new list_entity_types_config
2728
+ update_entity_type_config = parent_rpcs.update_entity_type if parent_rpcs.respond_to? :update_entity_type
2729
+ @update_entity_type = ::Gapic::Config::Method.new update_entity_type_config
2730
+ delete_entity_type_config = parent_rpcs.delete_entity_type if parent_rpcs.respond_to? :delete_entity_type
2731
+ @delete_entity_type = ::Gapic::Config::Method.new delete_entity_type_config
2732
+ create_feature_config = parent_rpcs.create_feature if parent_rpcs.respond_to? :create_feature
2733
+ @create_feature = ::Gapic::Config::Method.new create_feature_config
2734
+ batch_create_features_config = parent_rpcs.batch_create_features if parent_rpcs.respond_to? :batch_create_features
2735
+ @batch_create_features = ::Gapic::Config::Method.new batch_create_features_config
2736
+ get_feature_config = parent_rpcs.get_feature if parent_rpcs.respond_to? :get_feature
2737
+ @get_feature = ::Gapic::Config::Method.new get_feature_config
2738
+ list_features_config = parent_rpcs.list_features if parent_rpcs.respond_to? :list_features
2739
+ @list_features = ::Gapic::Config::Method.new list_features_config
2740
+ update_feature_config = parent_rpcs.update_feature if parent_rpcs.respond_to? :update_feature
2741
+ @update_feature = ::Gapic::Config::Method.new update_feature_config
2742
+ delete_feature_config = parent_rpcs.delete_feature if parent_rpcs.respond_to? :delete_feature
2743
+ @delete_feature = ::Gapic::Config::Method.new delete_feature_config
2744
+ import_feature_values_config = parent_rpcs.import_feature_values if parent_rpcs.respond_to? :import_feature_values
2745
+ @import_feature_values = ::Gapic::Config::Method.new import_feature_values_config
2746
+ batch_read_feature_values_config = parent_rpcs.batch_read_feature_values if parent_rpcs.respond_to? :batch_read_feature_values
2747
+ @batch_read_feature_values = ::Gapic::Config::Method.new batch_read_feature_values_config
2748
+ export_feature_values_config = parent_rpcs.export_feature_values if parent_rpcs.respond_to? :export_feature_values
2749
+ @export_feature_values = ::Gapic::Config::Method.new export_feature_values_config
2750
+ delete_feature_values_config = parent_rpcs.delete_feature_values if parent_rpcs.respond_to? :delete_feature_values
2751
+ @delete_feature_values = ::Gapic::Config::Method.new delete_feature_values_config
2752
+ search_features_config = parent_rpcs.search_features if parent_rpcs.respond_to? :search_features
2753
+ @search_features = ::Gapic::Config::Method.new search_features_config
2754
+
2755
+ yield self if block_given?
2756
+ end
2757
+ end
2758
+ end
2759
+ end
2760
+ end
2761
+ end
2762
+ end
2763
+ end
2764
+ end
2765
+ end