google-cloud-ai_platform-v1 0.39.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/ai_platform/v1/bindings_override.rb +399 -0
  3. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +138 -18
  4. data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +13 -5
  5. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +2280 -0
  6. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +3971 -0
  7. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/service_stub.rb +1196 -0
  8. data/lib/google/cloud/ai_platform/v1/dataset_service/rest.rb +54 -0
  9. data/lib/google/cloud/ai_platform/v1/dataset_service.rb +6 -0
  10. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +13 -5
  11. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +13 -5
  12. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +851 -0
  13. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +3971 -0
  14. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/service_stub.rb +365 -0
  15. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest.rb +54 -0
  16. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service.rb +6 -0
  17. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +19 -8
  18. data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +13 -5
  19. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +1215 -0
  20. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +3971 -0
  21. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/service_stub.rb +546 -0
  22. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest.rb +54 -0
  23. data/lib/google/cloud/ai_platform/v1/endpoint_service.rb +6 -0
  24. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +29 -13
  25. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +13 -5
  26. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +1732 -0
  27. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +3971 -0
  28. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/service_stub.rb +841 -0
  29. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest.rb +55 -0
  30. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service.rb +6 -0
  31. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +7 -2
  32. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +534 -0
  33. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/service_stub.rb +189 -0
  34. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest.rb +53 -0
  35. data/lib/google/cloud/ai_platform/v1/feature_online_store_service.rb +6 -0
  36. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +24 -11
  37. data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +13 -5
  38. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +1450 -0
  39. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +3971 -0
  40. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/service_stub.rb +663 -0
  41. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest.rb +55 -0
  42. data/lib/google/cloud/ai_platform/v1/feature_registry_service.rb +6 -0
  43. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +9 -3
  44. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +645 -0
  45. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/service_stub.rb +244 -0
  46. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest.rb +53 -0
  47. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service.rb +6 -0
  48. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +45 -21
  49. data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +13 -5
  50. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +2765 -0
  51. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +3971 -0
  52. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/service_stub.rb +1319 -0
  53. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest.rb +54 -0
  54. data/lib/google/cloud/ai_platform/v1/featurestore_service.rb +6 -0
  55. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +11 -4
  56. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +720 -0
  57. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +307 -0
  58. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest.rb +53 -0
  59. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service.rb +6 -0
  60. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +19 -8
  61. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +13 -5
  62. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +1151 -0
  63. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +3971 -0
  64. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/service_stub.rb +546 -0
  65. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest.rb +54 -0
  66. data/lib/google/cloud/ai_platform/v1/index_endpoint_service.rb +6 -0
  67. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +17 -7
  68. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +13 -5
  69. data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +1034 -0
  70. data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +3971 -0
  71. data/lib/google/cloud/ai_platform/v1/index_service/rest/service_stub.rb +486 -0
  72. data/lib/google/cloud/ai_platform/v1/index_service/rest.rb +54 -0
  73. data/lib/google/cloud/ai_platform/v1/index_service.rb +6 -0
  74. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +73 -35
  75. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +13 -5
  76. data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +3841 -0
  77. data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +3971 -0
  78. data/lib/google/cloud/ai_platform/v1/job_service/rest/service_stub.rb +2149 -0
  79. data/lib/google/cloud/ai_platform/v1/job_service/rest.rb +54 -0
  80. data/lib/google/cloud/ai_platform/v1/job_service.rb +6 -0
  81. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +7 -2
  82. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +533 -0
  83. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/service_stub.rb +205 -0
  84. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest.rb +53 -0
  85. data/lib/google/cloud/ai_platform/v1/llm_utility_service.rb +6 -0
  86. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +7 -2
  87. data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +541 -0
  88. data/lib/google/cloud/ai_platform/v1/match_service/rest/service_stub.rb +189 -0
  89. data/lib/google/cloud/ai_platform/v1/match_service/rest.rb +54 -0
  90. data/lib/google/cloud/ai_platform/v1/match_service.rb +6 -0
  91. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +67 -32
  92. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +13 -5
  93. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +3634 -0
  94. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +3971 -0
  95. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/service_stub.rb +1972 -0
  96. data/lib/google/cloud/ai_platform/v1/metadata_service/rest.rb +54 -0
  97. data/lib/google/cloud/ai_platform/v1/metadata_service.rb +6 -0
  98. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +7 -2
  99. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +13 -5
  100. data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +574 -0
  101. data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +3971 -0
  102. data/lib/google/cloud/ai_platform/v1/migration_service/rest/service_stub.rb +189 -0
  103. data/lib/google/cloud/ai_platform/v1/migration_service/rest.rb +55 -0
  104. data/lib/google/cloud/ai_platform/v1/migration_service.rb +6 -0
  105. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +5 -1
  106. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +438 -0
  107. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +128 -0
  108. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb +53 -0
  109. data/lib/google/cloud/ai_platform/v1/model_garden_service.rb +6 -0
  110. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +39 -18
  111. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +13 -5
  112. data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +2213 -0
  113. data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +3971 -0
  114. data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +1140 -0
  115. data/lib/google/cloud/ai_platform/v1/model_service/rest.rb +54 -0
  116. data/lib/google/cloud/ai_platform/v1/model_service.rb +6 -0
  117. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +123 -10
  118. data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +13 -5
  119. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +1503 -0
  120. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +3971 -0
  121. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +723 -0
  122. data/lib/google/cloud/ai_platform/v1/notebook_service/rest.rb +54 -0
  123. data/lib/google/cloud/ai_platform/v1/notebook_service.rb +6 -0
  124. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +15 -6
  125. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +13 -5
  126. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +942 -0
  127. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +3971 -0
  128. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/service_stub.rb +426 -0
  129. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest.rb +54 -0
  130. data/lib/google/cloud/ai_platform/v1/persistent_resource_service.rb +6 -0
  131. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +27 -12
  132. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +13 -5
  133. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +1600 -0
  134. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +3971 -0
  135. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/service_stub.rb +783 -0
  136. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest.rb +56 -0
  137. data/lib/google/cloud/ai_platform/v1/pipeline_service.rb +6 -0
  138. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +37 -15
  139. data/lib/google/cloud/ai_platform/v1/prediction_service/credentials.rb +2 -1
  140. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +1303 -0
  141. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +658 -0
  142. data/lib/google/cloud/ai_platform/v1/prediction_service/rest.rb +53 -0
  143. data/lib/google/cloud/ai_platform/v1/prediction_service.rb +6 -0
  144. data/lib/google/cloud/ai_platform/v1/rest.rb +63 -0
  145. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +17 -7
  146. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +13 -5
  147. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +1076 -0
  148. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +3971 -0
  149. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/service_stub.rb +486 -0
  150. data/lib/google/cloud/ai_platform/v1/schedule_service/rest.rb +55 -0
  151. data/lib/google/cloud/ai_platform/v1/schedule_service.rb +6 -0
  152. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +13 -5
  153. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +13 -5
  154. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +847 -0
  155. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +3971 -0
  156. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/service_stub.rb +366 -0
  157. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest.rb +59 -0
  158. data/lib/google/cloud/ai_platform/v1/specialist_pool_service.rb +6 -0
  159. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +63 -30
  160. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +13 -5
  161. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +3274 -0
  162. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +3971 -0
  163. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/service_stub.rb +1847 -0
  164. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest.rb +54 -0
  165. data/lib/google/cloud/ai_platform/v1/tensorboard_service.rb +6 -0
  166. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  167. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +33 -15
  168. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +13 -5
  169. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +1788 -0
  170. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +3971 -0
  171. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +963 -0
  172. data/lib/google/cloud/ai_platform/v1/vizier_service/rest.rb +58 -0
  173. data/lib/google/cloud/ai_platform/v1/vizier_service.rb +6 -0
  174. data/lib/google/cloud/ai_platform/v1.rb +6 -1
  175. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
  176. data/lib/google/cloud/aiplatform/v1/content_pb.rb +4 -4
  177. data/lib/google/cloud/aiplatform/v1/dataset_pb.rb +1 -1
  178. data/lib/google/cloud/aiplatform/v1/dataset_service_pb.rb +3 -2
  179. data/lib/google/cloud/aiplatform/v1/dataset_service_services_pb.rb +2 -0
  180. data/lib/google/cloud/aiplatform/v1/dataset_version_pb.rb +1 -1
  181. data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_pb.rb +3 -1
  182. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +3 -1
  183. data/lib/google/cloud/aiplatform/v1/feature_online_store_pb.rb +3 -1
  184. data/lib/google/cloud/aiplatform/v1/feature_pb.rb +1 -1
  185. data/lib/google/cloud/aiplatform/v1/featurestore_online_service_pb.rb +3 -1
  186. data/lib/google/cloud/aiplatform/v1/index_pb.rb +2 -1
  187. data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +1 -1
  188. data/lib/google/cloud/aiplatform/v1/match_service_pb.rb +2 -1
  189. data/lib/google/cloud/aiplatform/v1/metadata_store_pb.rb +2 -1
  190. data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +3 -1
  191. data/lib/google/cloud/aiplatform/v1/notebook_service_pb.rb +2 -1
  192. data/lib/google/cloud/aiplatform/v1/notebook_service_services_pb.rb +2 -0
  193. data/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb +2 -1
  194. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
  195. data/lib/google/cloud/aiplatform/v1/publisher_model_pb.rb +1 -1
  196. data/lib/google/cloud/aiplatform/v1/tool_pb.rb +4 -1
  197. data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
  198. data/proto_docs/google/cloud/aiplatform/v1/content.rb +26 -48
  199. data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +4 -0
  200. data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +17 -0
  201. data/proto_docs/google/cloud/aiplatform/v1/dataset_version.rb +4 -0
  202. data/proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool.rb +23 -0
  203. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +7 -0
  204. data/proto_docs/google/cloud/aiplatform/v1/feature.rb +3 -0
  205. data/proto_docs/google/cloud/aiplatform/v1/feature_group.rb +3 -3
  206. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +4 -0
  207. data/proto_docs/google/cloud/aiplatform/v1/feature_registry_service.rb +1 -1
  208. data/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +24 -0
  209. data/proto_docs/google/cloud/aiplatform/v1/index.rb +23 -3
  210. data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +20 -2
  211. data/proto_docs/google/cloud/aiplatform/v1/match_service.rb +18 -1
  212. data/proto_docs/google/cloud/aiplatform/v1/metadata_store.rb +13 -0
  213. data/proto_docs/google/cloud/aiplatform/v1/model.rb +1 -1
  214. data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +17 -2
  215. data/proto_docs/google/cloud/aiplatform/v1/notebook_service.rb +18 -0
  216. data/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb +63 -0
  217. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +4 -0
  218. data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +4 -0
  219. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +43 -5
  220. data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +8 -7
  221. metadata +101 -2
@@ -0,0 +1,1151 @@
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/index_endpoint_service_pb"
21
+ require "google/cloud/ai_platform/v1/index_endpoint_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 IndexEndpointService
30
+ module Rest
31
+ ##
32
+ # REST client for the IndexEndpointService service.
33
+ #
34
+ # A service for managing Vertex AI's IndexEndpoints.
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 :index_endpoint_service_stub
47
+
48
+ ##
49
+ # Configure the IndexEndpointService Client class.
50
+ #
51
+ # See {::Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all IndexEndpointService clients
57
+ # ::Google::Cloud::AIPlatform::V1::IndexEndpointService::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 IndexEndpointService 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::IndexEndpointService::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
+ @index_endpoint_service_stub.universe_domain
110
+ end
111
+
112
+ ##
113
+ # Create a new IndexEndpointService REST client object.
114
+ #
115
+ # @example
116
+ #
117
+ # # Create a client using the default configuration
118
+ # client = ::Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.new
119
+ #
120
+ # # Create a client using a custom configuration
121
+ # client = ::Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.new do |config|
122
+ # config.timeout = 10.0
123
+ # end
124
+ #
125
+ # @yield [config] Configure the IndexEndpointService 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::IndexEndpointService::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
+ @index_endpoint_service_stub = ::Google::Cloud::AIPlatform::V1::IndexEndpointService::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 = @index_endpoint_service_stub.endpoint
169
+ config.universe_domain = @index_endpoint_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 = @index_endpoint_service_stub.endpoint
177
+ config.universe_domain = @index_endpoint_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::IndexEndpointService::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 an IndexEndpoint.
207
+ #
208
+ # @overload create_index_endpoint(request, options = nil)
209
+ # Pass arguments to `create_index_endpoint` via a request object, either of type
210
+ # {::Google::Cloud::AIPlatform::V1::CreateIndexEndpointRequest} or an equivalent Hash.
211
+ #
212
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateIndexEndpointRequest, ::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_index_endpoint(parent: nil, index_endpoint: nil)
219
+ # Pass arguments to `create_index_endpoint` 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 the IndexEndpoint in.
225
+ # Format: `projects/{project}/locations/{location}`
226
+ # @param index_endpoint [::Google::Cloud::AIPlatform::V1::IndexEndpoint, ::Hash]
227
+ # Required. The IndexEndpoint to create.
228
+ # @yield [result, operation] Access the result along with the TransportOperation object
229
+ # @yieldparam result [::Gapic::Operation]
230
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
231
+ #
232
+ # @return [::Gapic::Operation]
233
+ #
234
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
235
+ #
236
+ # @example Basic example
237
+ # require "google/cloud/ai_platform/v1"
238
+ #
239
+ # # Create a client object. The client can be reused for multiple calls.
240
+ # client = Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.new
241
+ #
242
+ # # Create a request. To set request fields, pass in keyword arguments.
243
+ # request = Google::Cloud::AIPlatform::V1::CreateIndexEndpointRequest.new
244
+ #
245
+ # # Call the create_index_endpoint method.
246
+ # result = client.create_index_endpoint request
247
+ #
248
+ # # The returned object is of type Gapic::Operation. You can use it to
249
+ # # check the status of an operation, cancel it, or wait for results.
250
+ # # Here is how to wait for a response.
251
+ # result.wait_until_done! timeout: 60
252
+ # if result.response?
253
+ # p result.response
254
+ # else
255
+ # puts "No response received."
256
+ # end
257
+ #
258
+ def create_index_endpoint request, options = nil
259
+ raise ::ArgumentError, "request must be provided" if request.nil?
260
+
261
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateIndexEndpointRequest
262
+
263
+ # Converts hash and nil to an options object
264
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
265
+
266
+ # Customize the options with defaults
267
+ call_metadata = @config.rpcs.create_index_endpoint.metadata.to_h
268
+
269
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
270
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
272
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
273
+ transports_version_send: [:rest]
274
+
275
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
276
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
277
+
278
+ options.apply_defaults timeout: @config.rpcs.create_index_endpoint.timeout,
279
+ metadata: call_metadata,
280
+ retry_policy: @config.rpcs.create_index_endpoint.retry_policy
281
+
282
+ options.apply_defaults timeout: @config.timeout,
283
+ metadata: @config.metadata,
284
+ retry_policy: @config.retry_policy
285
+
286
+ @index_endpoint_service_stub.create_index_endpoint request, options do |result, operation|
287
+ result = ::Gapic::Operation.new result, @operations_client, options: options
288
+ yield result, operation if block_given?
289
+ return result
290
+ end
291
+ rescue ::Gapic::Rest::Error => e
292
+ raise ::Google::Cloud::Error.from_error(e)
293
+ end
294
+
295
+ ##
296
+ # Gets an IndexEndpoint.
297
+ #
298
+ # @overload get_index_endpoint(request, options = nil)
299
+ # Pass arguments to `get_index_endpoint` via a request object, either of type
300
+ # {::Google::Cloud::AIPlatform::V1::GetIndexEndpointRequest} or an equivalent Hash.
301
+ #
302
+ # @param request [::Google::Cloud::AIPlatform::V1::GetIndexEndpointRequest, ::Hash]
303
+ # A request object representing the call parameters. Required. To specify no
304
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
305
+ # @param options [::Gapic::CallOptions, ::Hash]
306
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
307
+ #
308
+ # @overload get_index_endpoint(name: nil)
309
+ # Pass arguments to `get_index_endpoint` via keyword arguments. Note that at
310
+ # least one keyword argument is required. To specify no parameters, or to keep all
311
+ # the default parameter values, pass an empty Hash as a request object (see above).
312
+ #
313
+ # @param name [::String]
314
+ # Required. The name of the IndexEndpoint resource.
315
+ # Format:
316
+ # `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
317
+ # @yield [result, operation] Access the result along with the TransportOperation object
318
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::IndexEndpoint]
319
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
320
+ #
321
+ # @return [::Google::Cloud::AIPlatform::V1::IndexEndpoint]
322
+ #
323
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
324
+ #
325
+ # @example Basic example
326
+ # require "google/cloud/ai_platform/v1"
327
+ #
328
+ # # Create a client object. The client can be reused for multiple calls.
329
+ # client = Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.new
330
+ #
331
+ # # Create a request. To set request fields, pass in keyword arguments.
332
+ # request = Google::Cloud::AIPlatform::V1::GetIndexEndpointRequest.new
333
+ #
334
+ # # Call the get_index_endpoint method.
335
+ # result = client.get_index_endpoint request
336
+ #
337
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::IndexEndpoint.
338
+ # p result
339
+ #
340
+ def get_index_endpoint request, options = nil
341
+ raise ::ArgumentError, "request must be provided" if request.nil?
342
+
343
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetIndexEndpointRequest
344
+
345
+ # Converts hash and nil to an options object
346
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
347
+
348
+ # Customize the options with defaults
349
+ call_metadata = @config.rpcs.get_index_endpoint.metadata.to_h
350
+
351
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
352
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
353
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
354
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
355
+ transports_version_send: [:rest]
356
+
357
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
358
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
359
+
360
+ options.apply_defaults timeout: @config.rpcs.get_index_endpoint.timeout,
361
+ metadata: call_metadata,
362
+ retry_policy: @config.rpcs.get_index_endpoint.retry_policy
363
+
364
+ options.apply_defaults timeout: @config.timeout,
365
+ metadata: @config.metadata,
366
+ retry_policy: @config.retry_policy
367
+
368
+ @index_endpoint_service_stub.get_index_endpoint request, options do |result, operation|
369
+ yield result, operation if block_given?
370
+ return result
371
+ end
372
+ rescue ::Gapic::Rest::Error => e
373
+ raise ::Google::Cloud::Error.from_error(e)
374
+ end
375
+
376
+ ##
377
+ # Lists IndexEndpoints in a Location.
378
+ #
379
+ # @overload list_index_endpoints(request, options = nil)
380
+ # Pass arguments to `list_index_endpoints` via a request object, either of type
381
+ # {::Google::Cloud::AIPlatform::V1::ListIndexEndpointsRequest} or an equivalent Hash.
382
+ #
383
+ # @param request [::Google::Cloud::AIPlatform::V1::ListIndexEndpointsRequest, ::Hash]
384
+ # A request object representing the call parameters. Required. To specify no
385
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
386
+ # @param options [::Gapic::CallOptions, ::Hash]
387
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
388
+ #
389
+ # @overload list_index_endpoints(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil)
390
+ # Pass arguments to `list_index_endpoints` via keyword arguments. Note that at
391
+ # least one keyword argument is required. To specify no parameters, or to keep all
392
+ # the default parameter values, pass an empty Hash as a request object (see above).
393
+ #
394
+ # @param parent [::String]
395
+ # Required. The resource name of the Location from which to list the
396
+ # IndexEndpoints. Format: `projects/{project}/locations/{location}`
397
+ # @param filter [::String]
398
+ # Optional. An expression for filtering the results of the request. For field
399
+ # names both snake_case and camelCase are supported.
400
+ #
401
+ # * `index_endpoint` supports = and !=. `index_endpoint` represents the
402
+ # IndexEndpoint ID, ie. the last segment of the IndexEndpoint's
403
+ # {::Google::Cloud::AIPlatform::V1::IndexEndpoint#name resourcename}.
404
+ # * `display_name` supports =, != and regex()
405
+ # (uses [re2](https://github.com/google/re2/wiki/Syntax) syntax)
406
+ # * `labels` supports general map functions that is:
407
+ # `labels.key=value` - key:value equality
408
+ # `labels.key:* or labels:key - key existence
409
+ # A key including a space must be quoted. `labels."a key"`.
410
+ #
411
+ # Some examples:
412
+ # * `index_endpoint="1"`
413
+ # * `display_name="myDisplayName"`
414
+ # * `regex(display_name, "^A") -> The display name starts with an A.
415
+ # * `labels.myKey="myValue"`
416
+ # @param page_size [::Integer]
417
+ # Optional. The standard list page size.
418
+ # @param page_token [::String]
419
+ # Optional. The standard list page token.
420
+ # Typically obtained via
421
+ # {::Google::Cloud::AIPlatform::V1::ListIndexEndpointsResponse#next_page_token ListIndexEndpointsResponse.next_page_token}
422
+ # of the previous
423
+ # {::Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client#list_index_endpoints IndexEndpointService.ListIndexEndpoints}
424
+ # call.
425
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
426
+ # Optional. Mask specifying which fields to read.
427
+ # @yield [result, operation] Access the result along with the TransportOperation object
428
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::IndexEndpoint>]
429
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
430
+ #
431
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::IndexEndpoint>]
432
+ #
433
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
434
+ #
435
+ # @example Basic example
436
+ # require "google/cloud/ai_platform/v1"
437
+ #
438
+ # # Create a client object. The client can be reused for multiple calls.
439
+ # client = Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.new
440
+ #
441
+ # # Create a request. To set request fields, pass in keyword arguments.
442
+ # request = Google::Cloud::AIPlatform::V1::ListIndexEndpointsRequest.new
443
+ #
444
+ # # Call the list_index_endpoints method.
445
+ # result = client.list_index_endpoints request
446
+ #
447
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
448
+ # # over elements, and API calls will be issued to fetch pages as needed.
449
+ # result.each do |item|
450
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::IndexEndpoint.
451
+ # p item
452
+ # end
453
+ #
454
+ def list_index_endpoints request, options = nil
455
+ raise ::ArgumentError, "request must be provided" if request.nil?
456
+
457
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListIndexEndpointsRequest
458
+
459
+ # Converts hash and nil to an options object
460
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
461
+
462
+ # Customize the options with defaults
463
+ call_metadata = @config.rpcs.list_index_endpoints.metadata.to_h
464
+
465
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
466
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
467
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
468
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
469
+ transports_version_send: [:rest]
470
+
471
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
472
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
473
+
474
+ options.apply_defaults timeout: @config.rpcs.list_index_endpoints.timeout,
475
+ metadata: call_metadata,
476
+ retry_policy: @config.rpcs.list_index_endpoints.retry_policy
477
+
478
+ options.apply_defaults timeout: @config.timeout,
479
+ metadata: @config.metadata,
480
+ retry_policy: @config.retry_policy
481
+
482
+ @index_endpoint_service_stub.list_index_endpoints request, options do |result, operation|
483
+ result = ::Gapic::Rest::PagedEnumerable.new @index_endpoint_service_stub, :list_index_endpoints, "index_endpoints", request, result, options
484
+ yield result, operation if block_given?
485
+ return result
486
+ end
487
+ rescue ::Gapic::Rest::Error => e
488
+ raise ::Google::Cloud::Error.from_error(e)
489
+ end
490
+
491
+ ##
492
+ # Updates an IndexEndpoint.
493
+ #
494
+ # @overload update_index_endpoint(request, options = nil)
495
+ # Pass arguments to `update_index_endpoint` via a request object, either of type
496
+ # {::Google::Cloud::AIPlatform::V1::UpdateIndexEndpointRequest} or an equivalent Hash.
497
+ #
498
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateIndexEndpointRequest, ::Hash]
499
+ # A request object representing the call parameters. Required. To specify no
500
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
501
+ # @param options [::Gapic::CallOptions, ::Hash]
502
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
503
+ #
504
+ # @overload update_index_endpoint(index_endpoint: nil, update_mask: nil)
505
+ # Pass arguments to `update_index_endpoint` via keyword arguments. Note that at
506
+ # least one keyword argument is required. To specify no parameters, or to keep all
507
+ # the default parameter values, pass an empty Hash as a request object (see above).
508
+ #
509
+ # @param index_endpoint [::Google::Cloud::AIPlatform::V1::IndexEndpoint, ::Hash]
510
+ # Required. The IndexEndpoint which replaces the resource on the server.
511
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
512
+ # Required. The update mask applies to the resource. See
513
+ # {::Google::Protobuf::FieldMask google.protobuf.FieldMask}.
514
+ # @yield [result, operation] Access the result along with the TransportOperation object
515
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::IndexEndpoint]
516
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
517
+ #
518
+ # @return [::Google::Cloud::AIPlatform::V1::IndexEndpoint]
519
+ #
520
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
521
+ #
522
+ # @example Basic example
523
+ # require "google/cloud/ai_platform/v1"
524
+ #
525
+ # # Create a client object. The client can be reused for multiple calls.
526
+ # client = Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.new
527
+ #
528
+ # # Create a request. To set request fields, pass in keyword arguments.
529
+ # request = Google::Cloud::AIPlatform::V1::UpdateIndexEndpointRequest.new
530
+ #
531
+ # # Call the update_index_endpoint method.
532
+ # result = client.update_index_endpoint request
533
+ #
534
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::IndexEndpoint.
535
+ # p result
536
+ #
537
+ def update_index_endpoint request, options = nil
538
+ raise ::ArgumentError, "request must be provided" if request.nil?
539
+
540
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateIndexEndpointRequest
541
+
542
+ # Converts hash and nil to an options object
543
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
544
+
545
+ # Customize the options with defaults
546
+ call_metadata = @config.rpcs.update_index_endpoint.metadata.to_h
547
+
548
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
549
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
550
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
551
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
552
+ transports_version_send: [:rest]
553
+
554
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
555
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
556
+
557
+ options.apply_defaults timeout: @config.rpcs.update_index_endpoint.timeout,
558
+ metadata: call_metadata,
559
+ retry_policy: @config.rpcs.update_index_endpoint.retry_policy
560
+
561
+ options.apply_defaults timeout: @config.timeout,
562
+ metadata: @config.metadata,
563
+ retry_policy: @config.retry_policy
564
+
565
+ @index_endpoint_service_stub.update_index_endpoint request, options do |result, operation|
566
+ yield result, operation if block_given?
567
+ return result
568
+ end
569
+ rescue ::Gapic::Rest::Error => e
570
+ raise ::Google::Cloud::Error.from_error(e)
571
+ end
572
+
573
+ ##
574
+ # Deletes an IndexEndpoint.
575
+ #
576
+ # @overload delete_index_endpoint(request, options = nil)
577
+ # Pass arguments to `delete_index_endpoint` via a request object, either of type
578
+ # {::Google::Cloud::AIPlatform::V1::DeleteIndexEndpointRequest} or an equivalent Hash.
579
+ #
580
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteIndexEndpointRequest, ::Hash]
581
+ # A request object representing the call parameters. Required. To specify no
582
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
583
+ # @param options [::Gapic::CallOptions, ::Hash]
584
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
585
+ #
586
+ # @overload delete_index_endpoint(name: nil)
587
+ # Pass arguments to `delete_index_endpoint` via keyword arguments. Note that at
588
+ # least one keyword argument is required. To specify no parameters, or to keep all
589
+ # the default parameter values, pass an empty Hash as a request object (see above).
590
+ #
591
+ # @param name [::String]
592
+ # Required. The name of the IndexEndpoint resource to be deleted.
593
+ # Format:
594
+ # `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
595
+ # @yield [result, operation] Access the result along with the TransportOperation object
596
+ # @yieldparam result [::Gapic::Operation]
597
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
598
+ #
599
+ # @return [::Gapic::Operation]
600
+ #
601
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
602
+ #
603
+ # @example Basic example
604
+ # require "google/cloud/ai_platform/v1"
605
+ #
606
+ # # Create a client object. The client can be reused for multiple calls.
607
+ # client = Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.new
608
+ #
609
+ # # Create a request. To set request fields, pass in keyword arguments.
610
+ # request = Google::Cloud::AIPlatform::V1::DeleteIndexEndpointRequest.new
611
+ #
612
+ # # Call the delete_index_endpoint method.
613
+ # result = client.delete_index_endpoint request
614
+ #
615
+ # # The returned object is of type Gapic::Operation. You can use it to
616
+ # # check the status of an operation, cancel it, or wait for results.
617
+ # # Here is how to wait for a response.
618
+ # result.wait_until_done! timeout: 60
619
+ # if result.response?
620
+ # p result.response
621
+ # else
622
+ # puts "No response received."
623
+ # end
624
+ #
625
+ def delete_index_endpoint request, options = nil
626
+ raise ::ArgumentError, "request must be provided" if request.nil?
627
+
628
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteIndexEndpointRequest
629
+
630
+ # Converts hash and nil to an options object
631
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
632
+
633
+ # Customize the options with defaults
634
+ call_metadata = @config.rpcs.delete_index_endpoint.metadata.to_h
635
+
636
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
637
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
638
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
639
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
640
+ transports_version_send: [:rest]
641
+
642
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
643
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
644
+
645
+ options.apply_defaults timeout: @config.rpcs.delete_index_endpoint.timeout,
646
+ metadata: call_metadata,
647
+ retry_policy: @config.rpcs.delete_index_endpoint.retry_policy
648
+
649
+ options.apply_defaults timeout: @config.timeout,
650
+ metadata: @config.metadata,
651
+ retry_policy: @config.retry_policy
652
+
653
+ @index_endpoint_service_stub.delete_index_endpoint request, options do |result, operation|
654
+ result = ::Gapic::Operation.new result, @operations_client, options: options
655
+ yield result, operation if block_given?
656
+ return result
657
+ end
658
+ rescue ::Gapic::Rest::Error => e
659
+ raise ::Google::Cloud::Error.from_error(e)
660
+ end
661
+
662
+ ##
663
+ # Deploys an Index into this IndexEndpoint, creating a DeployedIndex within
664
+ # it.
665
+ # Only non-empty Indexes can be deployed.
666
+ #
667
+ # @overload deploy_index(request, options = nil)
668
+ # Pass arguments to `deploy_index` via a request object, either of type
669
+ # {::Google::Cloud::AIPlatform::V1::DeployIndexRequest} or an equivalent Hash.
670
+ #
671
+ # @param request [::Google::Cloud::AIPlatform::V1::DeployIndexRequest, ::Hash]
672
+ # A request object representing the call parameters. Required. To specify no
673
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
674
+ # @param options [::Gapic::CallOptions, ::Hash]
675
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
676
+ #
677
+ # @overload deploy_index(index_endpoint: nil, deployed_index: nil)
678
+ # Pass arguments to `deploy_index` via keyword arguments. Note that at
679
+ # least one keyword argument is required. To specify no parameters, or to keep all
680
+ # the default parameter values, pass an empty Hash as a request object (see above).
681
+ #
682
+ # @param index_endpoint [::String]
683
+ # Required. The name of the IndexEndpoint resource into which to deploy an
684
+ # Index. Format:
685
+ # `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
686
+ # @param deployed_index [::Google::Cloud::AIPlatform::V1::DeployedIndex, ::Hash]
687
+ # Required. The DeployedIndex to be created within the IndexEndpoint.
688
+ # @yield [result, operation] Access the result along with the TransportOperation object
689
+ # @yieldparam result [::Gapic::Operation]
690
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
691
+ #
692
+ # @return [::Gapic::Operation]
693
+ #
694
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
695
+ #
696
+ # @example Basic example
697
+ # require "google/cloud/ai_platform/v1"
698
+ #
699
+ # # Create a client object. The client can be reused for multiple calls.
700
+ # client = Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.new
701
+ #
702
+ # # Create a request. To set request fields, pass in keyword arguments.
703
+ # request = Google::Cloud::AIPlatform::V1::DeployIndexRequest.new
704
+ #
705
+ # # Call the deploy_index method.
706
+ # result = client.deploy_index request
707
+ #
708
+ # # The returned object is of type Gapic::Operation. You can use it to
709
+ # # check the status of an operation, cancel it, or wait for results.
710
+ # # Here is how to wait for a response.
711
+ # result.wait_until_done! timeout: 60
712
+ # if result.response?
713
+ # p result.response
714
+ # else
715
+ # puts "No response received."
716
+ # end
717
+ #
718
+ def deploy_index request, options = nil
719
+ raise ::ArgumentError, "request must be provided" if request.nil?
720
+
721
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeployIndexRequest
722
+
723
+ # Converts hash and nil to an options object
724
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
725
+
726
+ # Customize the options with defaults
727
+ call_metadata = @config.rpcs.deploy_index.metadata.to_h
728
+
729
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
730
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
731
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
732
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
733
+ transports_version_send: [:rest]
734
+
735
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
736
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
737
+
738
+ options.apply_defaults timeout: @config.rpcs.deploy_index.timeout,
739
+ metadata: call_metadata,
740
+ retry_policy: @config.rpcs.deploy_index.retry_policy
741
+
742
+ options.apply_defaults timeout: @config.timeout,
743
+ metadata: @config.metadata,
744
+ retry_policy: @config.retry_policy
745
+
746
+ @index_endpoint_service_stub.deploy_index request, options do |result, operation|
747
+ result = ::Gapic::Operation.new result, @operations_client, options: options
748
+ yield result, operation if block_given?
749
+ return result
750
+ end
751
+ rescue ::Gapic::Rest::Error => e
752
+ raise ::Google::Cloud::Error.from_error(e)
753
+ end
754
+
755
+ ##
756
+ # Undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it,
757
+ # and freeing all resources it's using.
758
+ #
759
+ # @overload undeploy_index(request, options = nil)
760
+ # Pass arguments to `undeploy_index` via a request object, either of type
761
+ # {::Google::Cloud::AIPlatform::V1::UndeployIndexRequest} or an equivalent Hash.
762
+ #
763
+ # @param request [::Google::Cloud::AIPlatform::V1::UndeployIndexRequest, ::Hash]
764
+ # A request object representing the call parameters. Required. To specify no
765
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
766
+ # @param options [::Gapic::CallOptions, ::Hash]
767
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
768
+ #
769
+ # @overload undeploy_index(index_endpoint: nil, deployed_index_id: nil)
770
+ # Pass arguments to `undeploy_index` via keyword arguments. Note that at
771
+ # least one keyword argument is required. To specify no parameters, or to keep all
772
+ # the default parameter values, pass an empty Hash as a request object (see above).
773
+ #
774
+ # @param index_endpoint [::String]
775
+ # Required. The name of the IndexEndpoint resource from which to undeploy an
776
+ # Index. Format:
777
+ # `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
778
+ # @param deployed_index_id [::String]
779
+ # Required. The ID of the DeployedIndex to be undeployed from the
780
+ # IndexEndpoint.
781
+ # @yield [result, operation] Access the result along with the TransportOperation object
782
+ # @yieldparam result [::Gapic::Operation]
783
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
784
+ #
785
+ # @return [::Gapic::Operation]
786
+ #
787
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
788
+ #
789
+ # @example Basic example
790
+ # require "google/cloud/ai_platform/v1"
791
+ #
792
+ # # Create a client object. The client can be reused for multiple calls.
793
+ # client = Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.new
794
+ #
795
+ # # Create a request. To set request fields, pass in keyword arguments.
796
+ # request = Google::Cloud::AIPlatform::V1::UndeployIndexRequest.new
797
+ #
798
+ # # Call the undeploy_index method.
799
+ # result = client.undeploy_index request
800
+ #
801
+ # # The returned object is of type Gapic::Operation. You can use it to
802
+ # # check the status of an operation, cancel it, or wait for results.
803
+ # # Here is how to wait for a response.
804
+ # result.wait_until_done! timeout: 60
805
+ # if result.response?
806
+ # p result.response
807
+ # else
808
+ # puts "No response received."
809
+ # end
810
+ #
811
+ def undeploy_index request, options = nil
812
+ raise ::ArgumentError, "request must be provided" if request.nil?
813
+
814
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UndeployIndexRequest
815
+
816
+ # Converts hash and nil to an options object
817
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
818
+
819
+ # Customize the options with defaults
820
+ call_metadata = @config.rpcs.undeploy_index.metadata.to_h
821
+
822
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
823
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
824
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
825
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
826
+ transports_version_send: [:rest]
827
+
828
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
829
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
830
+
831
+ options.apply_defaults timeout: @config.rpcs.undeploy_index.timeout,
832
+ metadata: call_metadata,
833
+ retry_policy: @config.rpcs.undeploy_index.retry_policy
834
+
835
+ options.apply_defaults timeout: @config.timeout,
836
+ metadata: @config.metadata,
837
+ retry_policy: @config.retry_policy
838
+
839
+ @index_endpoint_service_stub.undeploy_index request, options do |result, operation|
840
+ result = ::Gapic::Operation.new result, @operations_client, options: options
841
+ yield result, operation if block_given?
842
+ return result
843
+ end
844
+ rescue ::Gapic::Rest::Error => e
845
+ raise ::Google::Cloud::Error.from_error(e)
846
+ end
847
+
848
+ ##
849
+ # Update an existing DeployedIndex under an IndexEndpoint.
850
+ #
851
+ # @overload mutate_deployed_index(request, options = nil)
852
+ # Pass arguments to `mutate_deployed_index` via a request object, either of type
853
+ # {::Google::Cloud::AIPlatform::V1::MutateDeployedIndexRequest} or an equivalent Hash.
854
+ #
855
+ # @param request [::Google::Cloud::AIPlatform::V1::MutateDeployedIndexRequest, ::Hash]
856
+ # A request object representing the call parameters. Required. To specify no
857
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
858
+ # @param options [::Gapic::CallOptions, ::Hash]
859
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
860
+ #
861
+ # @overload mutate_deployed_index(index_endpoint: nil, deployed_index: nil)
862
+ # Pass arguments to `mutate_deployed_index` via keyword arguments. Note that at
863
+ # least one keyword argument is required. To specify no parameters, or to keep all
864
+ # the default parameter values, pass an empty Hash as a request object (see above).
865
+ #
866
+ # @param index_endpoint [::String]
867
+ # Required. The name of the IndexEndpoint resource into which to deploy an
868
+ # Index. Format:
869
+ # `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
870
+ # @param deployed_index [::Google::Cloud::AIPlatform::V1::DeployedIndex, ::Hash]
871
+ # Required. The DeployedIndex to be updated within the IndexEndpoint.
872
+ # Currently, the updatable fields are [DeployedIndex][automatic_resources]
873
+ # and [DeployedIndex][dedicated_resources]
874
+ # @yield [result, operation] Access the result along with the TransportOperation object
875
+ # @yieldparam result [::Gapic::Operation]
876
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
877
+ #
878
+ # @return [::Gapic::Operation]
879
+ #
880
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
881
+ #
882
+ # @example Basic example
883
+ # require "google/cloud/ai_platform/v1"
884
+ #
885
+ # # Create a client object. The client can be reused for multiple calls.
886
+ # client = Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.new
887
+ #
888
+ # # Create a request. To set request fields, pass in keyword arguments.
889
+ # request = Google::Cloud::AIPlatform::V1::MutateDeployedIndexRequest.new
890
+ #
891
+ # # Call the mutate_deployed_index method.
892
+ # result = client.mutate_deployed_index request
893
+ #
894
+ # # The returned object is of type Gapic::Operation. You can use it to
895
+ # # check the status of an operation, cancel it, or wait for results.
896
+ # # Here is how to wait for a response.
897
+ # result.wait_until_done! timeout: 60
898
+ # if result.response?
899
+ # p result.response
900
+ # else
901
+ # puts "No response received."
902
+ # end
903
+ #
904
+ def mutate_deployed_index request, options = nil
905
+ raise ::ArgumentError, "request must be provided" if request.nil?
906
+
907
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::MutateDeployedIndexRequest
908
+
909
+ # Converts hash and nil to an options object
910
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
911
+
912
+ # Customize the options with defaults
913
+ call_metadata = @config.rpcs.mutate_deployed_index.metadata.to_h
914
+
915
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
916
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
917
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
918
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
919
+ transports_version_send: [:rest]
920
+
921
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
922
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
923
+
924
+ options.apply_defaults timeout: @config.rpcs.mutate_deployed_index.timeout,
925
+ metadata: call_metadata,
926
+ retry_policy: @config.rpcs.mutate_deployed_index.retry_policy
927
+
928
+ options.apply_defaults timeout: @config.timeout,
929
+ metadata: @config.metadata,
930
+ retry_policy: @config.retry_policy
931
+
932
+ @index_endpoint_service_stub.mutate_deployed_index request, options do |result, operation|
933
+ result = ::Gapic::Operation.new result, @operations_client, options: options
934
+ yield result, operation if block_given?
935
+ return result
936
+ end
937
+ rescue ::Gapic::Rest::Error => e
938
+ raise ::Google::Cloud::Error.from_error(e)
939
+ end
940
+
941
+ ##
942
+ # Configuration class for the IndexEndpointService REST API.
943
+ #
944
+ # This class represents the configuration for IndexEndpointService REST,
945
+ # providing control over timeouts, retry behavior, logging, transport
946
+ # parameters, and other low-level controls. Certain parameters can also be
947
+ # applied individually to specific RPCs. See
948
+ # {::Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client::Configuration::Rpcs}
949
+ # for a list of RPCs that can be configured independently.
950
+ #
951
+ # Configuration can be applied globally to all clients, or to a single client
952
+ # on construction.
953
+ #
954
+ # @example
955
+ #
956
+ # # Modify the global config, setting the timeout for
957
+ # # create_index_endpoint to 20 seconds,
958
+ # # and all remaining timeouts to 10 seconds.
959
+ # ::Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.configure do |config|
960
+ # config.timeout = 10.0
961
+ # config.rpcs.create_index_endpoint.timeout = 20.0
962
+ # end
963
+ #
964
+ # # Apply the above configuration only to a new client.
965
+ # client = ::Google::Cloud::AIPlatform::V1::IndexEndpointService::Rest::Client.new do |config|
966
+ # config.timeout = 10.0
967
+ # config.rpcs.create_index_endpoint.timeout = 20.0
968
+ # end
969
+ #
970
+ # @!attribute [rw] endpoint
971
+ # A custom service endpoint, as a hostname or hostname:port. The default is
972
+ # nil, indicating to use the default endpoint in the current universe domain.
973
+ # @return [::String,nil]
974
+ # @!attribute [rw] credentials
975
+ # Credentials to send with calls. You may provide any of the following types:
976
+ # * (`String`) The path to a service account key file in JSON format
977
+ # * (`Hash`) A service account key as a Hash
978
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
979
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
980
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
981
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
982
+ # * (`nil`) indicating no credentials
983
+ # @return [::Object]
984
+ # @!attribute [rw] scope
985
+ # The OAuth scopes
986
+ # @return [::Array<::String>]
987
+ # @!attribute [rw] lib_name
988
+ # The library name as recorded in instrumentation and logging
989
+ # @return [::String]
990
+ # @!attribute [rw] lib_version
991
+ # The library version as recorded in instrumentation and logging
992
+ # @return [::String]
993
+ # @!attribute [rw] timeout
994
+ # The call timeout in seconds.
995
+ # @return [::Numeric]
996
+ # @!attribute [rw] metadata
997
+ # Additional headers to be sent with the call.
998
+ # @return [::Hash{::Symbol=>::String}]
999
+ # @!attribute [rw] retry_policy
1000
+ # The retry policy. The value is a hash with the following keys:
1001
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1002
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1003
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1004
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1005
+ # trigger a retry.
1006
+ # @return [::Hash]
1007
+ # @!attribute [rw] quota_project
1008
+ # A separate project against which to charge quota.
1009
+ # @return [::String]
1010
+ # @!attribute [rw] universe_domain
1011
+ # The universe domain within which to make requests. This determines the
1012
+ # default endpoint URL. The default value of nil uses the environment
1013
+ # universe (usually the default "googleapis.com" universe).
1014
+ # @return [::String,nil]
1015
+ #
1016
+ class Configuration
1017
+ extend ::Gapic::Config
1018
+
1019
+ # @private
1020
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1021
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
1022
+
1023
+ config_attr :endpoint, nil, ::String, nil
1024
+ config_attr :credentials, nil do |value|
1025
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1026
+ allowed.any? { |klass| klass === value }
1027
+ end
1028
+ config_attr :scope, nil, ::String, ::Array, nil
1029
+ config_attr :lib_name, nil, ::String, nil
1030
+ config_attr :lib_version, nil, ::String, nil
1031
+ config_attr :timeout, nil, ::Numeric, nil
1032
+ config_attr :metadata, nil, ::Hash, nil
1033
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1034
+ config_attr :quota_project, nil, ::String, nil
1035
+ config_attr :universe_domain, nil, ::String, nil
1036
+
1037
+ # @private
1038
+ # Overrides for http bindings for the RPCs of this service
1039
+ # are only used when this service is used as mixin, and only
1040
+ # by the host service.
1041
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1042
+ config_attr :bindings_override, {}, ::Hash, nil
1043
+
1044
+ # @private
1045
+ def initialize parent_config = nil
1046
+ @parent_config = parent_config unless parent_config.nil?
1047
+
1048
+ yield self if block_given?
1049
+ end
1050
+
1051
+ ##
1052
+ # Configurations for individual RPCs
1053
+ # @return [Rpcs]
1054
+ #
1055
+ def rpcs
1056
+ @rpcs ||= begin
1057
+ parent_rpcs = nil
1058
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1059
+ Rpcs.new parent_rpcs
1060
+ end
1061
+ end
1062
+
1063
+ ##
1064
+ # Configuration RPC class for the IndexEndpointService API.
1065
+ #
1066
+ # Includes fields providing the configuration for each RPC in this service.
1067
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1068
+ # the following configuration fields:
1069
+ #
1070
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1071
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1072
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1073
+ # include the following keys:
1074
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1075
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1076
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1077
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1078
+ # trigger a retry.
1079
+ #
1080
+ class Rpcs
1081
+ ##
1082
+ # RPC-specific configuration for `create_index_endpoint`
1083
+ # @return [::Gapic::Config::Method]
1084
+ #
1085
+ attr_reader :create_index_endpoint
1086
+ ##
1087
+ # RPC-specific configuration for `get_index_endpoint`
1088
+ # @return [::Gapic::Config::Method]
1089
+ #
1090
+ attr_reader :get_index_endpoint
1091
+ ##
1092
+ # RPC-specific configuration for `list_index_endpoints`
1093
+ # @return [::Gapic::Config::Method]
1094
+ #
1095
+ attr_reader :list_index_endpoints
1096
+ ##
1097
+ # RPC-specific configuration for `update_index_endpoint`
1098
+ # @return [::Gapic::Config::Method]
1099
+ #
1100
+ attr_reader :update_index_endpoint
1101
+ ##
1102
+ # RPC-specific configuration for `delete_index_endpoint`
1103
+ # @return [::Gapic::Config::Method]
1104
+ #
1105
+ attr_reader :delete_index_endpoint
1106
+ ##
1107
+ # RPC-specific configuration for `deploy_index`
1108
+ # @return [::Gapic::Config::Method]
1109
+ #
1110
+ attr_reader :deploy_index
1111
+ ##
1112
+ # RPC-specific configuration for `undeploy_index`
1113
+ # @return [::Gapic::Config::Method]
1114
+ #
1115
+ attr_reader :undeploy_index
1116
+ ##
1117
+ # RPC-specific configuration for `mutate_deployed_index`
1118
+ # @return [::Gapic::Config::Method]
1119
+ #
1120
+ attr_reader :mutate_deployed_index
1121
+
1122
+ # @private
1123
+ def initialize parent_rpcs = nil
1124
+ create_index_endpoint_config = parent_rpcs.create_index_endpoint if parent_rpcs.respond_to? :create_index_endpoint
1125
+ @create_index_endpoint = ::Gapic::Config::Method.new create_index_endpoint_config
1126
+ get_index_endpoint_config = parent_rpcs.get_index_endpoint if parent_rpcs.respond_to? :get_index_endpoint
1127
+ @get_index_endpoint = ::Gapic::Config::Method.new get_index_endpoint_config
1128
+ list_index_endpoints_config = parent_rpcs.list_index_endpoints if parent_rpcs.respond_to? :list_index_endpoints
1129
+ @list_index_endpoints = ::Gapic::Config::Method.new list_index_endpoints_config
1130
+ update_index_endpoint_config = parent_rpcs.update_index_endpoint if parent_rpcs.respond_to? :update_index_endpoint
1131
+ @update_index_endpoint = ::Gapic::Config::Method.new update_index_endpoint_config
1132
+ delete_index_endpoint_config = parent_rpcs.delete_index_endpoint if parent_rpcs.respond_to? :delete_index_endpoint
1133
+ @delete_index_endpoint = ::Gapic::Config::Method.new delete_index_endpoint_config
1134
+ deploy_index_config = parent_rpcs.deploy_index if parent_rpcs.respond_to? :deploy_index
1135
+ @deploy_index = ::Gapic::Config::Method.new deploy_index_config
1136
+ undeploy_index_config = parent_rpcs.undeploy_index if parent_rpcs.respond_to? :undeploy_index
1137
+ @undeploy_index = ::Gapic::Config::Method.new undeploy_index_config
1138
+ mutate_deployed_index_config = parent_rpcs.mutate_deployed_index if parent_rpcs.respond_to? :mutate_deployed_index
1139
+ @mutate_deployed_index = ::Gapic::Config::Method.new mutate_deployed_index_config
1140
+
1141
+ yield self if block_given?
1142
+ end
1143
+ end
1144
+ end
1145
+ end
1146
+ end
1147
+ end
1148
+ end
1149
+ end
1150
+ end
1151
+ end