google-cloud-ai_platform-v1 0.61.0 → 0.63.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/ai_platform/v1/bindings_override.rb +24 -0
  4. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +11 -0
  5. data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +7 -0
  6. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +11 -0
  7. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +70 -0
  8. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +7 -0
  9. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +7 -0
  10. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +7 -0
  11. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +70 -0
  12. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +7 -0
  13. data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +7 -0
  14. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +7 -0
  15. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +70 -0
  16. data/lib/google/cloud/ai_platform/v1/evaluation_service/client.rb +57 -0
  17. data/lib/google/cloud/ai_platform/v1/evaluation_service/rest/client.rb +57 -0
  18. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +7 -0
  19. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +7 -0
  20. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +7 -0
  21. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +70 -0
  22. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +7 -0
  23. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +7 -0
  24. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +7 -0
  25. data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +7 -0
  26. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +7 -0
  27. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +70 -0
  28. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +7 -0
  29. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +7 -0
  30. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +26 -0
  31. data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +7 -0
  32. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +26 -0
  33. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +70 -0
  34. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/client.rb +879 -0
  35. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/credentials.rb +47 -0
  36. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/paths.rb +88 -0
  37. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest/client.rb +827 -0
  38. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest/service_stub.rb +388 -0
  39. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest.rb +53 -0
  40. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service.rb +55 -0
  41. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +7 -0
  42. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/operations.rb +7 -0
  43. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +7 -0
  44. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/operations.rb +70 -0
  45. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +7 -0
  46. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +7 -0
  47. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +7 -0
  48. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +70 -0
  49. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +7 -0
  50. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +7 -0
  51. data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +7 -0
  52. data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +70 -0
  53. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +7 -0
  54. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +7 -0
  55. data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +7 -0
  56. data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +70 -0
  57. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +7 -0
  58. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +7 -0
  59. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +7 -0
  60. data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +7 -0
  61. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +7 -0
  62. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +7 -0
  63. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +7 -0
  64. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +70 -0
  65. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +7 -0
  66. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +7 -0
  67. data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +7 -0
  68. data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +70 -0
  69. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +7 -0
  70. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +7 -0
  71. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +124 -0
  72. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +7 -0
  73. data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +117 -0
  74. data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +70 -0
  75. data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +61 -0
  76. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +7 -0
  77. data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +7 -0
  78. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +7 -0
  79. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +70 -0
  80. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +7 -0
  81. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +7 -0
  82. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +7 -0
  83. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +70 -0
  84. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +7 -0
  85. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +7 -0
  86. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +7 -0
  87. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +70 -0
  88. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +21 -2
  89. data/lib/google/cloud/ai_platform/v1/prediction_service/paths.rb +19 -0
  90. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +21 -2
  91. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/client.rb +600 -0
  92. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/credentials.rb +47 -0
  93. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/paths.rb +52 -0
  94. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest/client.rb +571 -0
  95. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest/service_stub.rb +199 -0
  96. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest.rb +53 -0
  97. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service.rb +55 -0
  98. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/client.rb +921 -0
  99. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/credentials.rb +47 -0
  100. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/operations.rb +821 -0
  101. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/paths.rb +69 -0
  102. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/client.rb +869 -0
  103. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/operations.rb +4328 -0
  104. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/service_stub.rb +388 -0
  105. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest.rb +54 -0
  106. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service.rb +56 -0
  107. data/lib/google/cloud/ai_platform/v1/rest.rb +3 -0
  108. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +7 -0
  109. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +7 -0
  110. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +7 -0
  111. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +70 -0
  112. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +7 -0
  113. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +7 -0
  114. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +7 -0
  115. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +70 -0
  116. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +7 -0
  117. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +7 -0
  118. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +7 -0
  119. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +70 -0
  120. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  121. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb +7 -0
  122. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/operations.rb +7 -0
  123. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb +7 -0
  124. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/operations.rb +70 -0
  125. data/lib/google/cloud/ai_platform/v1/vertex_rag_service/client.rb +7 -0
  126. data/lib/google/cloud/ai_platform/v1/vertex_rag_service/rest/client.rb +7 -0
  127. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +7 -0
  128. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +7 -0
  129. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +7 -0
  130. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +70 -0
  131. data/lib/google/cloud/ai_platform/v1.rb +3 -0
  132. data/lib/google/cloud/aiplatform/v1/cached_content_pb.rb +54 -0
  133. data/lib/google/cloud/aiplatform/v1/content_pb.rb +3 -1
  134. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +5 -2
  135. data/lib/google/cloud/aiplatform/v1/feature_view_pb.rb +2 -1
  136. data/lib/google/cloud/aiplatform/v1/gen_ai_cache_service_pb.rb +57 -0
  137. data/lib/google/cloud/aiplatform/v1/gen_ai_cache_service_services_pb.rb +54 -0
  138. data/lib/google/cloud/aiplatform/v1/model_pb.rb +1 -1
  139. data/lib/google/cloud/aiplatform/v1/model_service_pb.rb +4 -1
  140. data/lib/google/cloud/aiplatform/v1/model_service_services_pb.rb +2 -0
  141. data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +1 -1
  142. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
  143. data/lib/google/cloud/aiplatform/v1/reasoning_engine_execution_service_pb.rb +52 -0
  144. data/lib/google/cloud/aiplatform/v1/reasoning_engine_execution_service_services_pb.rb +47 -0
  145. data/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb +51 -0
  146. data/lib/google/cloud/aiplatform/v1/reasoning_engine_service_pb.rb +62 -0
  147. data/lib/google/cloud/aiplatform/v1/reasoning_engine_service_services_pb.rb +53 -0
  148. data/lib/google/cloud/aiplatform/v1/tool_pb.rb +9 -1
  149. data/proto_docs/google/cloud/aiplatform/v1/batch_prediction_job.rb +12 -0
  150. data/proto_docs/google/cloud/aiplatform/v1/cached_content.rb +105 -0
  151. data/proto_docs/google/cloud/aiplatform/v1/content.rb +61 -0
  152. data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +4 -0
  153. data/proto_docs/google/cloud/aiplatform/v1/data_labeling_job.rb +4 -0
  154. data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +4 -0
  155. data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +4 -0
  156. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +57 -5
  157. data/proto_docs/google/cloud/aiplatform/v1/evaluation_service.rb +100 -0
  158. data/proto_docs/google/cloud/aiplatform/v1/explanation.rb +16 -0
  159. data/proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb +4 -0
  160. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +4 -0
  161. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb +18 -0
  162. data/proto_docs/google/cloud/aiplatform/v1/feature_view.rb +39 -0
  163. data/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +24 -0
  164. data/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb +29 -0
  165. data/proto_docs/google/cloud/aiplatform/v1/gen_ai_cache_service.rb +108 -0
  166. data/proto_docs/google/cloud/aiplatform/v1/index.rb +6 -0
  167. data/proto_docs/google/cloud/aiplatform/v1/io.rb +8 -0
  168. data/proto_docs/google/cloud/aiplatform/v1/migratable_resource.rb +8 -0
  169. data/proto_docs/google/cloud/aiplatform/v1/migration_service.rb +18 -0
  170. data/proto_docs/google/cloud/aiplatform/v1/model.rb +7 -0
  171. data/proto_docs/google/cloud/aiplatform/v1/model_evaluation_slice.rb +10 -0
  172. data/proto_docs/google/cloud/aiplatform/v1/model_monitoring.rb +10 -0
  173. data/proto_docs/google/cloud/aiplatform/v1/model_service.rb +63 -0
  174. data/proto_docs/google/cloud/aiplatform/v1/notebook_execution_job.rb +14 -0
  175. data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +42 -2
  176. data/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb +4 -0
  177. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +24 -0
  178. data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +14 -0
  179. data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb +87 -0
  180. data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine_execution_service.rb +73 -0
  181. data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine_service.rb +136 -0
  182. data/proto_docs/google/cloud/aiplatform/v1/schedule.rb +4 -0
  183. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_tables.rb +12 -0
  184. data/proto_docs/google/cloud/aiplatform/v1/study.rb +24 -0
  185. data/proto_docs/google/cloud/aiplatform/v1/tensorboard_data.rb +6 -0
  186. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +95 -0
  187. data/proto_docs/google/cloud/aiplatform/v1/training_pipeline.rb +14 -0
  188. data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +6 -0
  189. data/proto_docs/google/cloud/aiplatform/v1/user_action_reference.rb +4 -0
  190. data/proto_docs/google/cloud/aiplatform/v1/value.rb +6 -0
  191. data/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb +32 -0
  192. data/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data_service.rb +8 -0
  193. data/proto_docs/google/longrunning/operations.rb +4 -0
  194. data/proto_docs/google/protobuf/struct.rb +12 -0
  195. data/proto_docs/google/type/latlng.rb +38 -0
  196. metadata +43 -9
@@ -0,0 +1,921 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/aiplatform/v1/reasoning_engine_service_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module AIPlatform
27
+ module V1
28
+ module ReasoningEngineService
29
+ ##
30
+ # Client for the ReasoningEngineService service.
31
+ #
32
+ # A service for managing Vertex AI's Reasoning Engines.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :reasoning_engine_service_stub
45
+
46
+ ##
47
+ # Configure the ReasoningEngineService Client class.
48
+ #
49
+ # See {::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all ReasoningEngineService clients
55
+ # ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "AIPlatform", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config
76
+ end
77
+ yield @configure if block_given?
78
+ @configure
79
+ end
80
+
81
+ ##
82
+ # Configure the ReasoningEngineService Client instance.
83
+ #
84
+ # The configuration is set to the derived mode, meaning that values can be changed,
85
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
86
+ # should be made on {Client.configure}.
87
+ #
88
+ # See {::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client::Configuration}
89
+ # for a description of the configuration fields.
90
+ #
91
+ # @yield [config] Configure the Client client.
92
+ # @yieldparam config [Client::Configuration]
93
+ #
94
+ # @return [Client::Configuration]
95
+ #
96
+ def configure
97
+ yield @config if block_given?
98
+ @config
99
+ end
100
+
101
+ ##
102
+ # The effective universe domain
103
+ #
104
+ # @return [String]
105
+ #
106
+ def universe_domain
107
+ @reasoning_engine_service_stub.universe_domain
108
+ end
109
+
110
+ ##
111
+ # Create a new ReasoningEngineService client object.
112
+ #
113
+ # @example
114
+ #
115
+ # # Create a client using the default configuration
116
+ # client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
117
+ #
118
+ # # Create a client using a custom configuration
119
+ # client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new do |config|
120
+ # config.timeout = 10.0
121
+ # end
122
+ #
123
+ # @yield [config] Configure the ReasoningEngineService client.
124
+ # @yieldparam config [Client::Configuration]
125
+ #
126
+ def initialize
127
+ # These require statements are intentionally placed here to initialize
128
+ # the gRPC module only when it's required.
129
+ # See https://github.com/googleapis/toolkit/issues/446
130
+ require "gapic/grpc"
131
+ require "google/cloud/aiplatform/v1/reasoning_engine_service_services_pb"
132
+
133
+ # Create the configuration object
134
+ @config = Configuration.new Client.configure
135
+
136
+ # Yield the configuration if needed
137
+ yield @config if block_given?
138
+
139
+ # Create credentials
140
+ credentials = @config.credentials
141
+ # Use self-signed JWT if the endpoint is unchanged from default,
142
+ # but only if the default endpoint does not have a region prefix.
143
+ enable_self_signed_jwt = @config.endpoint.nil? ||
144
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
145
+ !@config.endpoint.split(".").first.include?("-"))
146
+ credentials ||= Credentials.default scope: @config.scope,
147
+ enable_self_signed_jwt: enable_self_signed_jwt
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
149
+ credentials = Credentials.new credentials, scope: @config.scope
150
+ end
151
+ @quota_project_id = @config.quota_project
152
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
153
+
154
+ @operations_client = Operations.new do |config|
155
+ config.credentials = credentials
156
+ config.quota_project = @quota_project_id
157
+ config.endpoint = @config.endpoint
158
+ config.universe_domain = @config.universe_domain
159
+ end
160
+
161
+ @reasoning_engine_service_stub = ::Gapic::ServiceStub.new(
162
+ ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Stub,
163
+ credentials: credentials,
164
+ endpoint: @config.endpoint,
165
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
166
+ universe_domain: @config.universe_domain,
167
+ channel_args: @config.channel_args,
168
+ interceptors: @config.interceptors,
169
+ channel_pool_config: @config.channel_pool,
170
+ logger: @config.logger
171
+ )
172
+
173
+ @reasoning_engine_service_stub.stub_logger&.info do |entry|
174
+ entry.set_system_name
175
+ entry.set_service
176
+ entry.message = "Created client for #{entry.service}"
177
+ entry.set_credentials_fields credentials
178
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
179
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
180
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
181
+ end
182
+
183
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
184
+ config.credentials = credentials
185
+ config.quota_project = @quota_project_id
186
+ config.endpoint = @reasoning_engine_service_stub.endpoint
187
+ config.universe_domain = @reasoning_engine_service_stub.universe_domain
188
+ config.logger = @reasoning_engine_service_stub.logger if config.respond_to? :logger=
189
+ end
190
+
191
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
192
+ config.credentials = credentials
193
+ config.quota_project = @quota_project_id
194
+ config.endpoint = @reasoning_engine_service_stub.endpoint
195
+ config.universe_domain = @reasoning_engine_service_stub.universe_domain
196
+ config.logger = @reasoning_engine_service_stub.logger if config.respond_to? :logger=
197
+ end
198
+ end
199
+
200
+ ##
201
+ # Get the associated client for long-running operations.
202
+ #
203
+ # @return [::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Operations]
204
+ #
205
+ attr_reader :operations_client
206
+
207
+ ##
208
+ # Get the associated client for mix-in of the Locations.
209
+ #
210
+ # @return [Google::Cloud::Location::Locations::Client]
211
+ #
212
+ attr_reader :location_client
213
+
214
+ ##
215
+ # Get the associated client for mix-in of the IAMPolicy.
216
+ #
217
+ # @return [Google::Iam::V1::IAMPolicy::Client]
218
+ #
219
+ attr_reader :iam_policy_client
220
+
221
+ ##
222
+ # The logger used for request/response debug logging.
223
+ #
224
+ # @return [Logger]
225
+ #
226
+ def logger
227
+ @reasoning_engine_service_stub.logger
228
+ end
229
+
230
+ # Service calls
231
+
232
+ ##
233
+ # Creates a reasoning engine.
234
+ #
235
+ # @overload create_reasoning_engine(request, options = nil)
236
+ # Pass arguments to `create_reasoning_engine` via a request object, either of type
237
+ # {::Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest} or an equivalent Hash.
238
+ #
239
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest, ::Hash]
240
+ # A request object representing the call parameters. Required. To specify no
241
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
242
+ # @param options [::Gapic::CallOptions, ::Hash]
243
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
244
+ #
245
+ # @overload create_reasoning_engine(parent: nil, reasoning_engine: nil)
246
+ # Pass arguments to `create_reasoning_engine` via keyword arguments. Note that at
247
+ # least one keyword argument is required. To specify no parameters, or to keep all
248
+ # the default parameter values, pass an empty Hash as a request object (see above).
249
+ #
250
+ # @param parent [::String]
251
+ # Required. The resource name of the Location to create the ReasoningEngine
252
+ # in. Format: `projects/{project}/locations/{location}`
253
+ # @param reasoning_engine [::Google::Cloud::AIPlatform::V1::ReasoningEngine, ::Hash]
254
+ # Required. The ReasoningEngine to create.
255
+ #
256
+ # @yield [response, operation] Access the result along with the RPC operation
257
+ # @yieldparam response [::Gapic::Operation]
258
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
259
+ #
260
+ # @return [::Gapic::Operation]
261
+ #
262
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
263
+ #
264
+ # @example Basic example
265
+ # require "google/cloud/ai_platform/v1"
266
+ #
267
+ # # Create a client object. The client can be reused for multiple calls.
268
+ # client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
269
+ #
270
+ # # Create a request. To set request fields, pass in keyword arguments.
271
+ # request = Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest.new
272
+ #
273
+ # # Call the create_reasoning_engine method.
274
+ # result = client.create_reasoning_engine request
275
+ #
276
+ # # The returned object is of type Gapic::Operation. You can use it to
277
+ # # check the status of an operation, cancel it, or wait for results.
278
+ # # Here is how to wait for a response.
279
+ # result.wait_until_done! timeout: 60
280
+ # if result.response?
281
+ # p result.response
282
+ # else
283
+ # puts "No response received."
284
+ # end
285
+ #
286
+ def create_reasoning_engine request, options = nil
287
+ raise ::ArgumentError, "request must be provided" if request.nil?
288
+
289
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest
290
+
291
+ # Converts hash and nil to an options object
292
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
293
+
294
+ # Customize the options with defaults
295
+ metadata = @config.rpcs.create_reasoning_engine.metadata.to_h
296
+
297
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
298
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
299
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
300
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
301
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
302
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
303
+
304
+ header_params = {}
305
+ if request.parent
306
+ header_params["parent"] = request.parent
307
+ end
308
+
309
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
310
+ metadata[:"x-goog-request-params"] ||= request_params_header
311
+
312
+ options.apply_defaults timeout: @config.rpcs.create_reasoning_engine.timeout,
313
+ metadata: metadata,
314
+ retry_policy: @config.rpcs.create_reasoning_engine.retry_policy
315
+
316
+ options.apply_defaults timeout: @config.timeout,
317
+ metadata: @config.metadata,
318
+ retry_policy: @config.retry_policy
319
+
320
+ @reasoning_engine_service_stub.call_rpc :create_reasoning_engine, request, options: options do |response, operation|
321
+ response = ::Gapic::Operation.new response, @operations_client, options: options
322
+ yield response, operation if block_given?
323
+ throw :response, response
324
+ end
325
+ rescue ::GRPC::BadStatus => e
326
+ raise ::Google::Cloud::Error.from_error(e)
327
+ end
328
+
329
+ ##
330
+ # Gets a reasoning engine.
331
+ #
332
+ # @overload get_reasoning_engine(request, options = nil)
333
+ # Pass arguments to `get_reasoning_engine` via a request object, either of type
334
+ # {::Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest} or an equivalent Hash.
335
+ #
336
+ # @param request [::Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest, ::Hash]
337
+ # A request object representing the call parameters. Required. To specify no
338
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
339
+ # @param options [::Gapic::CallOptions, ::Hash]
340
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
341
+ #
342
+ # @overload get_reasoning_engine(name: nil)
343
+ # Pass arguments to `get_reasoning_engine` via keyword arguments. Note that at
344
+ # least one keyword argument is required. To specify no parameters, or to keep all
345
+ # the default parameter values, pass an empty Hash as a request object (see above).
346
+ #
347
+ # @param name [::String]
348
+ # Required. The name of the ReasoningEngine resource.
349
+ # Format:
350
+ # `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
351
+ #
352
+ # @yield [response, operation] Access the result along with the RPC operation
353
+ # @yieldparam response [::Google::Cloud::AIPlatform::V1::ReasoningEngine]
354
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
355
+ #
356
+ # @return [::Google::Cloud::AIPlatform::V1::ReasoningEngine]
357
+ #
358
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
359
+ #
360
+ # @example Basic example
361
+ # require "google/cloud/ai_platform/v1"
362
+ #
363
+ # # Create a client object. The client can be reused for multiple calls.
364
+ # client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
365
+ #
366
+ # # Create a request. To set request fields, pass in keyword arguments.
367
+ # request = Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest.new
368
+ #
369
+ # # Call the get_reasoning_engine method.
370
+ # result = client.get_reasoning_engine request
371
+ #
372
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::ReasoningEngine.
373
+ # p result
374
+ #
375
+ def get_reasoning_engine request, options = nil
376
+ raise ::ArgumentError, "request must be provided" if request.nil?
377
+
378
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest
379
+
380
+ # Converts hash and nil to an options object
381
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
382
+
383
+ # Customize the options with defaults
384
+ metadata = @config.rpcs.get_reasoning_engine.metadata.to_h
385
+
386
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
387
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
388
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
389
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
390
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
391
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
392
+
393
+ header_params = {}
394
+ if request.name
395
+ header_params["name"] = request.name
396
+ end
397
+
398
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
399
+ metadata[:"x-goog-request-params"] ||= request_params_header
400
+
401
+ options.apply_defaults timeout: @config.rpcs.get_reasoning_engine.timeout,
402
+ metadata: metadata,
403
+ retry_policy: @config.rpcs.get_reasoning_engine.retry_policy
404
+
405
+ options.apply_defaults timeout: @config.timeout,
406
+ metadata: @config.metadata,
407
+ retry_policy: @config.retry_policy
408
+
409
+ @reasoning_engine_service_stub.call_rpc :get_reasoning_engine, request, options: options do |response, operation|
410
+ yield response, operation if block_given?
411
+ end
412
+ rescue ::GRPC::BadStatus => e
413
+ raise ::Google::Cloud::Error.from_error(e)
414
+ end
415
+
416
+ ##
417
+ # Lists reasoning engines in a location.
418
+ #
419
+ # @overload list_reasoning_engines(request, options = nil)
420
+ # Pass arguments to `list_reasoning_engines` via a request object, either of type
421
+ # {::Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest} or an equivalent Hash.
422
+ #
423
+ # @param request [::Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest, ::Hash]
424
+ # A request object representing the call parameters. Required. To specify no
425
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
426
+ # @param options [::Gapic::CallOptions, ::Hash]
427
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
428
+ #
429
+ # @overload list_reasoning_engines(parent: nil, filter: nil, page_size: nil, page_token: nil)
430
+ # Pass arguments to `list_reasoning_engines` via keyword arguments. Note that at
431
+ # least one keyword argument is required. To specify no parameters, or to keep all
432
+ # the default parameter values, pass an empty Hash as a request object (see above).
433
+ #
434
+ # @param parent [::String]
435
+ # Required. The resource name of the Location to list the ReasoningEngines
436
+ # from. Format: `projects/{project}/locations/{location}`
437
+ # @param filter [::String]
438
+ # Optional. The standard list filter.
439
+ # More detail in [AIP-160](https://google.aip.dev/160).
440
+ # @param page_size [::Integer]
441
+ # Optional. The standard list page size.
442
+ # @param page_token [::String]
443
+ # Optional. The standard list page token.
444
+ #
445
+ # @yield [response, operation] Access the result along with the RPC operation
446
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ReasoningEngine>]
447
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
448
+ #
449
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ReasoningEngine>]
450
+ #
451
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
452
+ #
453
+ # @example Basic example
454
+ # require "google/cloud/ai_platform/v1"
455
+ #
456
+ # # Create a client object. The client can be reused for multiple calls.
457
+ # client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
458
+ #
459
+ # # Create a request. To set request fields, pass in keyword arguments.
460
+ # request = Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest.new
461
+ #
462
+ # # Call the list_reasoning_engines method.
463
+ # result = client.list_reasoning_engines request
464
+ #
465
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
466
+ # # over elements, and API calls will be issued to fetch pages as needed.
467
+ # result.each do |item|
468
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::ReasoningEngine.
469
+ # p item
470
+ # end
471
+ #
472
+ def list_reasoning_engines request, options = nil
473
+ raise ::ArgumentError, "request must be provided" if request.nil?
474
+
475
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest
476
+
477
+ # Converts hash and nil to an options object
478
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
479
+
480
+ # Customize the options with defaults
481
+ metadata = @config.rpcs.list_reasoning_engines.metadata.to_h
482
+
483
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
484
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
485
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
486
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
487
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
488
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
489
+
490
+ header_params = {}
491
+ if request.parent
492
+ header_params["parent"] = request.parent
493
+ end
494
+
495
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
496
+ metadata[:"x-goog-request-params"] ||= request_params_header
497
+
498
+ options.apply_defaults timeout: @config.rpcs.list_reasoning_engines.timeout,
499
+ metadata: metadata,
500
+ retry_policy: @config.rpcs.list_reasoning_engines.retry_policy
501
+
502
+ options.apply_defaults timeout: @config.timeout,
503
+ metadata: @config.metadata,
504
+ retry_policy: @config.retry_policy
505
+
506
+ @reasoning_engine_service_stub.call_rpc :list_reasoning_engines, request, options: options do |response, operation|
507
+ response = ::Gapic::PagedEnumerable.new @reasoning_engine_service_stub, :list_reasoning_engines, request, response, operation, options
508
+ yield response, operation if block_given?
509
+ throw :response, response
510
+ end
511
+ rescue ::GRPC::BadStatus => e
512
+ raise ::Google::Cloud::Error.from_error(e)
513
+ end
514
+
515
+ ##
516
+ # Updates a reasoning engine.
517
+ #
518
+ # @overload update_reasoning_engine(request, options = nil)
519
+ # Pass arguments to `update_reasoning_engine` via a request object, either of type
520
+ # {::Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest} or an equivalent Hash.
521
+ #
522
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest, ::Hash]
523
+ # A request object representing the call parameters. Required. To specify no
524
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
525
+ # @param options [::Gapic::CallOptions, ::Hash]
526
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
527
+ #
528
+ # @overload update_reasoning_engine(reasoning_engine: nil, update_mask: nil)
529
+ # Pass arguments to `update_reasoning_engine` via keyword arguments. Note that at
530
+ # least one keyword argument is required. To specify no parameters, or to keep all
531
+ # the default parameter values, pass an empty Hash as a request object (see above).
532
+ #
533
+ # @param reasoning_engine [::Google::Cloud::AIPlatform::V1::ReasoningEngine, ::Hash]
534
+ # Required. The ReasoningEngine which replaces the resource on the server.
535
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
536
+ # Optional. Mask specifying which fields to update.
537
+ #
538
+ # @yield [response, operation] Access the result along with the RPC operation
539
+ # @yieldparam response [::Gapic::Operation]
540
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
541
+ #
542
+ # @return [::Gapic::Operation]
543
+ #
544
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
545
+ #
546
+ # @example Basic example
547
+ # require "google/cloud/ai_platform/v1"
548
+ #
549
+ # # Create a client object. The client can be reused for multiple calls.
550
+ # client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
551
+ #
552
+ # # Create a request. To set request fields, pass in keyword arguments.
553
+ # request = Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest.new
554
+ #
555
+ # # Call the update_reasoning_engine method.
556
+ # result = client.update_reasoning_engine request
557
+ #
558
+ # # The returned object is of type Gapic::Operation. You can use it to
559
+ # # check the status of an operation, cancel it, or wait for results.
560
+ # # Here is how to wait for a response.
561
+ # result.wait_until_done! timeout: 60
562
+ # if result.response?
563
+ # p result.response
564
+ # else
565
+ # puts "No response received."
566
+ # end
567
+ #
568
+ def update_reasoning_engine request, options = nil
569
+ raise ::ArgumentError, "request must be provided" if request.nil?
570
+
571
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest
572
+
573
+ # Converts hash and nil to an options object
574
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
575
+
576
+ # Customize the options with defaults
577
+ metadata = @config.rpcs.update_reasoning_engine.metadata.to_h
578
+
579
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
580
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
581
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
582
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
583
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
584
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
585
+
586
+ header_params = {}
587
+ if request.reasoning_engine&.name
588
+ header_params["reasoning_engine.name"] = request.reasoning_engine.name
589
+ end
590
+
591
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
592
+ metadata[:"x-goog-request-params"] ||= request_params_header
593
+
594
+ options.apply_defaults timeout: @config.rpcs.update_reasoning_engine.timeout,
595
+ metadata: metadata,
596
+ retry_policy: @config.rpcs.update_reasoning_engine.retry_policy
597
+
598
+ options.apply_defaults timeout: @config.timeout,
599
+ metadata: @config.metadata,
600
+ retry_policy: @config.retry_policy
601
+
602
+ @reasoning_engine_service_stub.call_rpc :update_reasoning_engine, request, options: options do |response, operation|
603
+ response = ::Gapic::Operation.new response, @operations_client, options: options
604
+ yield response, operation if block_given?
605
+ throw :response, response
606
+ end
607
+ rescue ::GRPC::BadStatus => e
608
+ raise ::Google::Cloud::Error.from_error(e)
609
+ end
610
+
611
+ ##
612
+ # Deletes a reasoning engine.
613
+ #
614
+ # @overload delete_reasoning_engine(request, options = nil)
615
+ # Pass arguments to `delete_reasoning_engine` via a request object, either of type
616
+ # {::Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest} or an equivalent Hash.
617
+ #
618
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest, ::Hash]
619
+ # A request object representing the call parameters. Required. To specify no
620
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
621
+ # @param options [::Gapic::CallOptions, ::Hash]
622
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
623
+ #
624
+ # @overload delete_reasoning_engine(name: nil)
625
+ # Pass arguments to `delete_reasoning_engine` via keyword arguments. Note that at
626
+ # least one keyword argument is required. To specify no parameters, or to keep all
627
+ # the default parameter values, pass an empty Hash as a request object (see above).
628
+ #
629
+ # @param name [::String]
630
+ # Required. The name of the ReasoningEngine resource to be deleted.
631
+ # Format:
632
+ # `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
633
+ #
634
+ # @yield [response, operation] Access the result along with the RPC operation
635
+ # @yieldparam response [::Gapic::Operation]
636
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
637
+ #
638
+ # @return [::Gapic::Operation]
639
+ #
640
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
641
+ #
642
+ # @example Basic example
643
+ # require "google/cloud/ai_platform/v1"
644
+ #
645
+ # # Create a client object. The client can be reused for multiple calls.
646
+ # client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
647
+ #
648
+ # # Create a request. To set request fields, pass in keyword arguments.
649
+ # request = Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest.new
650
+ #
651
+ # # Call the delete_reasoning_engine method.
652
+ # result = client.delete_reasoning_engine request
653
+ #
654
+ # # The returned object is of type Gapic::Operation. You can use it to
655
+ # # check the status of an operation, cancel it, or wait for results.
656
+ # # Here is how to wait for a response.
657
+ # result.wait_until_done! timeout: 60
658
+ # if result.response?
659
+ # p result.response
660
+ # else
661
+ # puts "No response received."
662
+ # end
663
+ #
664
+ def delete_reasoning_engine request, options = nil
665
+ raise ::ArgumentError, "request must be provided" if request.nil?
666
+
667
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest
668
+
669
+ # Converts hash and nil to an options object
670
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
671
+
672
+ # Customize the options with defaults
673
+ metadata = @config.rpcs.delete_reasoning_engine.metadata.to_h
674
+
675
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
676
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
677
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
678
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
679
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
680
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
681
+
682
+ header_params = {}
683
+ if request.name
684
+ header_params["name"] = request.name
685
+ end
686
+
687
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
688
+ metadata[:"x-goog-request-params"] ||= request_params_header
689
+
690
+ options.apply_defaults timeout: @config.rpcs.delete_reasoning_engine.timeout,
691
+ metadata: metadata,
692
+ retry_policy: @config.rpcs.delete_reasoning_engine.retry_policy
693
+
694
+ options.apply_defaults timeout: @config.timeout,
695
+ metadata: @config.metadata,
696
+ retry_policy: @config.retry_policy
697
+
698
+ @reasoning_engine_service_stub.call_rpc :delete_reasoning_engine, request, options: options do |response, operation|
699
+ response = ::Gapic::Operation.new response, @operations_client, options: options
700
+ yield response, operation if block_given?
701
+ throw :response, response
702
+ end
703
+ rescue ::GRPC::BadStatus => e
704
+ raise ::Google::Cloud::Error.from_error(e)
705
+ end
706
+
707
+ ##
708
+ # Configuration class for the ReasoningEngineService API.
709
+ #
710
+ # This class represents the configuration for ReasoningEngineService,
711
+ # providing control over timeouts, retry behavior, logging, transport
712
+ # parameters, and other low-level controls. Certain parameters can also be
713
+ # applied individually to specific RPCs. See
714
+ # {::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client::Configuration::Rpcs}
715
+ # for a list of RPCs that can be configured independently.
716
+ #
717
+ # Configuration can be applied globally to all clients, or to a single client
718
+ # on construction.
719
+ #
720
+ # @example
721
+ #
722
+ # # Modify the global config, setting the timeout for
723
+ # # create_reasoning_engine to 20 seconds,
724
+ # # and all remaining timeouts to 10 seconds.
725
+ # ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.configure do |config|
726
+ # config.timeout = 10.0
727
+ # config.rpcs.create_reasoning_engine.timeout = 20.0
728
+ # end
729
+ #
730
+ # # Apply the above configuration only to a new client.
731
+ # client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new do |config|
732
+ # config.timeout = 10.0
733
+ # config.rpcs.create_reasoning_engine.timeout = 20.0
734
+ # end
735
+ #
736
+ # @!attribute [rw] endpoint
737
+ # A custom service endpoint, as a hostname or hostname:port. The default is
738
+ # nil, indicating to use the default endpoint in the current universe domain.
739
+ # @return [::String,nil]
740
+ # @!attribute [rw] credentials
741
+ # Credentials to send with calls. You may provide any of the following types:
742
+ # * (`String`) The path to a service account key file in JSON format
743
+ # * (`Hash`) A service account key as a Hash
744
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
745
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
746
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
747
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
748
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
749
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
750
+ # * (`nil`) indicating no credentials
751
+ #
752
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
753
+ # external source for authentication to Google Cloud, you must validate it before
754
+ # providing it to a Google API client library. Providing an unvalidated credential
755
+ # configuration to Google APIs can compromise the security of your systems and data.
756
+ # For more information, refer to [Validate credential configurations from external
757
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
758
+ # @return [::Object]
759
+ # @!attribute [rw] scope
760
+ # The OAuth scopes
761
+ # @return [::Array<::String>]
762
+ # @!attribute [rw] lib_name
763
+ # The library name as recorded in instrumentation and logging
764
+ # @return [::String]
765
+ # @!attribute [rw] lib_version
766
+ # The library version as recorded in instrumentation and logging
767
+ # @return [::String]
768
+ # @!attribute [rw] channel_args
769
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
770
+ # `GRPC::Core::Channel` object is provided as the credential.
771
+ # @return [::Hash]
772
+ # @!attribute [rw] interceptors
773
+ # An array of interceptors that are run before calls are executed.
774
+ # @return [::Array<::GRPC::ClientInterceptor>]
775
+ # @!attribute [rw] timeout
776
+ # The call timeout in seconds.
777
+ # @return [::Numeric]
778
+ # @!attribute [rw] metadata
779
+ # Additional gRPC headers to be sent with the call.
780
+ # @return [::Hash{::Symbol=>::String}]
781
+ # @!attribute [rw] retry_policy
782
+ # The retry policy. The value is a hash with the following keys:
783
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
784
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
785
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
786
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
787
+ # trigger a retry.
788
+ # @return [::Hash]
789
+ # @!attribute [rw] quota_project
790
+ # A separate project against which to charge quota.
791
+ # @return [::String]
792
+ # @!attribute [rw] universe_domain
793
+ # The universe domain within which to make requests. This determines the
794
+ # default endpoint URL. The default value of nil uses the environment
795
+ # universe (usually the default "googleapis.com" universe).
796
+ # @return [::String,nil]
797
+ # @!attribute [rw] logger
798
+ # A custom logger to use for request/response debug logging, or the value
799
+ # `:default` (the default) to construct a default logger, or `nil` to
800
+ # explicitly disable logging.
801
+ # @return [::Logger,:default,nil]
802
+ #
803
+ class Configuration
804
+ extend ::Gapic::Config
805
+
806
+ # @private
807
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
808
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
809
+
810
+ config_attr :endpoint, nil, ::String, nil
811
+ config_attr :credentials, nil do |value|
812
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
813
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
814
+ allowed.any? { |klass| klass === value }
815
+ end
816
+ config_attr :scope, nil, ::String, ::Array, nil
817
+ config_attr :lib_name, nil, ::String, nil
818
+ config_attr :lib_version, nil, ::String, nil
819
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
820
+ config_attr :interceptors, nil, ::Array, nil
821
+ config_attr :timeout, nil, ::Numeric, nil
822
+ config_attr :metadata, nil, ::Hash, nil
823
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
824
+ config_attr :quota_project, nil, ::String, nil
825
+ config_attr :universe_domain, nil, ::String, nil
826
+ config_attr :logger, :default, ::Logger, nil, :default
827
+
828
+ # @private
829
+ def initialize parent_config = nil
830
+ @parent_config = parent_config unless parent_config.nil?
831
+
832
+ yield self if block_given?
833
+ end
834
+
835
+ ##
836
+ # Configurations for individual RPCs
837
+ # @return [Rpcs]
838
+ #
839
+ def rpcs
840
+ @rpcs ||= begin
841
+ parent_rpcs = nil
842
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
843
+ Rpcs.new parent_rpcs
844
+ end
845
+ end
846
+
847
+ ##
848
+ # Configuration for the channel pool
849
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
850
+ #
851
+ def channel_pool
852
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
853
+ end
854
+
855
+ ##
856
+ # Configuration RPC class for the ReasoningEngineService API.
857
+ #
858
+ # Includes fields providing the configuration for each RPC in this service.
859
+ # Each configuration object is of type `Gapic::Config::Method` and includes
860
+ # the following configuration fields:
861
+ #
862
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
863
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
864
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
865
+ # include the following keys:
866
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
867
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
868
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
869
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
870
+ # trigger a retry.
871
+ #
872
+ class Rpcs
873
+ ##
874
+ # RPC-specific configuration for `create_reasoning_engine`
875
+ # @return [::Gapic::Config::Method]
876
+ #
877
+ attr_reader :create_reasoning_engine
878
+ ##
879
+ # RPC-specific configuration for `get_reasoning_engine`
880
+ # @return [::Gapic::Config::Method]
881
+ #
882
+ attr_reader :get_reasoning_engine
883
+ ##
884
+ # RPC-specific configuration for `list_reasoning_engines`
885
+ # @return [::Gapic::Config::Method]
886
+ #
887
+ attr_reader :list_reasoning_engines
888
+ ##
889
+ # RPC-specific configuration for `update_reasoning_engine`
890
+ # @return [::Gapic::Config::Method]
891
+ #
892
+ attr_reader :update_reasoning_engine
893
+ ##
894
+ # RPC-specific configuration for `delete_reasoning_engine`
895
+ # @return [::Gapic::Config::Method]
896
+ #
897
+ attr_reader :delete_reasoning_engine
898
+
899
+ # @private
900
+ def initialize parent_rpcs = nil
901
+ create_reasoning_engine_config = parent_rpcs.create_reasoning_engine if parent_rpcs.respond_to? :create_reasoning_engine
902
+ @create_reasoning_engine = ::Gapic::Config::Method.new create_reasoning_engine_config
903
+ get_reasoning_engine_config = parent_rpcs.get_reasoning_engine if parent_rpcs.respond_to? :get_reasoning_engine
904
+ @get_reasoning_engine = ::Gapic::Config::Method.new get_reasoning_engine_config
905
+ list_reasoning_engines_config = parent_rpcs.list_reasoning_engines if parent_rpcs.respond_to? :list_reasoning_engines
906
+ @list_reasoning_engines = ::Gapic::Config::Method.new list_reasoning_engines_config
907
+ update_reasoning_engine_config = parent_rpcs.update_reasoning_engine if parent_rpcs.respond_to? :update_reasoning_engine
908
+ @update_reasoning_engine = ::Gapic::Config::Method.new update_reasoning_engine_config
909
+ delete_reasoning_engine_config = parent_rpcs.delete_reasoning_engine if parent_rpcs.respond_to? :delete_reasoning_engine
910
+ @delete_reasoning_engine = ::Gapic::Config::Method.new delete_reasoning_engine_config
911
+
912
+ yield self if block_given?
913
+ end
914
+ end
915
+ end
916
+ end
917
+ end
918
+ end
919
+ end
920
+ end
921
+ end