google-cloud-ai_platform-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +139 -0
  6. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +1364 -0
  7. data/lib/google/cloud/ai_platform/v1/dataset_service/credentials.rb +47 -0
  8. data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +767 -0
  9. data/lib/google/cloud/ai_platform/v1/dataset_service/paths.rb +111 -0
  10. data/lib/google/cloud/ai_platform/v1/dataset_service.rb +51 -0
  11. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +1076 -0
  12. data/lib/google/cloud/ai_platform/v1/endpoint_service/credentials.rb +47 -0
  13. data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +767 -0
  14. data/lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb +124 -0
  15. data/lib/google/cloud/ai_platform/v1/endpoint_service.rb +50 -0
  16. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +508 -0
  17. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/credentials.rb +47 -0
  18. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/paths.rb +54 -0
  19. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service.rb +49 -0
  20. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +2707 -0
  21. data/lib/google/cloud/ai_platform/v1/featurestore_service/credentials.rb +47 -0
  22. data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +767 -0
  23. data/lib/google/cloud/ai_platform/v1/featurestore_service/paths.rb +113 -0
  24. data/lib/google/cloud/ai_platform/v1/featurestore_service.rb +50 -0
  25. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +1146 -0
  26. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/credentials.rb +47 -0
  27. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +767 -0
  28. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/paths.rb +88 -0
  29. data/lib/google/cloud/ai_platform/v1/index_endpoint_service.rb +50 -0
  30. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +823 -0
  31. data/lib/google/cloud/ai_platform/v1/index_service/credentials.rb +47 -0
  32. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +767 -0
  33. data/lib/google/cloud/ai_platform/v1/index_service/paths.rb +88 -0
  34. data/lib/google/cloud/ai_platform/v1/index_service.rb +50 -0
  35. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +3236 -0
  36. data/lib/google/cloud/ai_platform/v1/job_service/credentials.rb +47 -0
  37. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +767 -0
  38. data/lib/google/cloud/ai_platform/v1/job_service/paths.rb +259 -0
  39. data/lib/google/cloud/ai_platform/v1/job_service.rb +50 -0
  40. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +3654 -0
  41. data/lib/google/cloud/ai_platform/v1/metadata_service/credentials.rb +47 -0
  42. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +767 -0
  43. data/lib/google/cloud/ai_platform/v1/metadata_service/paths.rb +153 -0
  44. data/lib/google/cloud/ai_platform/v1/metadata_service.rb +50 -0
  45. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +538 -0
  46. data/lib/google/cloud/ai_platform/v1/migration_service/credentials.rb +47 -0
  47. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +767 -0
  48. data/lib/google/cloud/ai_platform/v1/migration_service/paths.rb +148 -0
  49. data/lib/google/cloud/ai_platform/v1/migration_service.rb +51 -0
  50. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +1355 -0
  51. data/lib/google/cloud/ai_platform/v1/model_service/credentials.rb +47 -0
  52. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +767 -0
  53. data/lib/google/cloud/ai_platform/v1/model_service/paths.rb +151 -0
  54. data/lib/google/cloud/ai_platform/v1/model_service.rb +50 -0
  55. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +1384 -0
  56. data/lib/google/cloud/ai_platform/v1/pipeline_service/credentials.rb +47 -0
  57. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +767 -0
  58. data/lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb +225 -0
  59. data/lib/google/cloud/ai_platform/v1/pipeline_service.rb +52 -0
  60. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +650 -0
  61. data/lib/google/cloud/ai_platform/v1/prediction_service/credentials.rb +47 -0
  62. data/lib/google/cloud/ai_platform/v1/prediction_service/paths.rb +52 -0
  63. data/lib/google/cloud/ai_platform/v1/prediction_service.rb +49 -0
  64. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +826 -0
  65. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/credentials.rb +47 -0
  66. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +767 -0
  67. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/paths.rb +69 -0
  68. data/lib/google/cloud/ai_platform/v1/specialist_pool_service.rb +55 -0
  69. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +3224 -0
  70. data/lib/google/cloud/ai_platform/v1/tensorboard_service/credentials.rb +48 -0
  71. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +767 -0
  72. data/lib/google/cloud/ai_platform/v1/tensorboard_service/paths.rb +138 -0
  73. data/lib/google/cloud/ai_platform/v1/tensorboard_service.rb +50 -0
  74. data/lib/google/cloud/ai_platform/v1/version.rb +28 -0
  75. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +1793 -0
  76. data/lib/google/cloud/ai_platform/v1/vizier_service/credentials.rb +47 -0
  77. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +767 -0
  78. data/lib/google/cloud/ai_platform/v1/vizier_service/paths.rb +109 -0
  79. data/lib/google/cloud/ai_platform/v1/vizier_service.rb +54 -0
  80. data/lib/google/cloud/ai_platform/v1.rb +52 -0
  81. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +29 -0
  82. data/lib/google/cloud/aiplatform/v1/annotation_pb.rb +35 -0
  83. data/lib/google/cloud/aiplatform/v1/annotation_spec_pb.rb +30 -0
  84. data/lib/google/cloud/aiplatform/v1/artifact_pb.rb +45 -0
  85. data/lib/google/cloud/aiplatform/v1/batch_prediction_job_pb.rb +83 -0
  86. data/lib/google/cloud/aiplatform/v1/completion_stats_pb.rb +27 -0
  87. data/lib/google/cloud/aiplatform/v1/context_pb.rb +38 -0
  88. data/lib/google/cloud/aiplatform/v1/custom_job_pb.rb +84 -0
  89. data/lib/google/cloud/aiplatform/v1/data_item_pb.rb +32 -0
  90. data/lib/google/cloud/aiplatform/v1/data_labeling_job_pb.rb +78 -0
  91. data/lib/google/cloud/aiplatform/v1/dataset_pb.rb +53 -0
  92. data/lib/google/cloud/aiplatform/v1/dataset_service_pb.rb +126 -0
  93. data/lib/google/cloud/aiplatform/v1/dataset_service_services_pb.rb +64 -0
  94. data/lib/google/cloud/aiplatform/v1/deployed_index_ref_pb.rb +26 -0
  95. data/lib/google/cloud/aiplatform/v1/deployed_model_ref_pb.rb +26 -0
  96. data/lib/google/cloud/aiplatform/v1/encryption_spec_pb.rb +24 -0
  97. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +67 -0
  98. data/lib/google/cloud/aiplatform/v1/endpoint_service_pb.rb +90 -0
  99. data/lib/google/cloud/aiplatform/v1/endpoint_service_services_pb.rb +58 -0
  100. data/lib/google/cloud/aiplatform/v1/entity_type_pb.rb +32 -0
  101. data/lib/google/cloud/aiplatform/v1/env_var_pb.rb +25 -0
  102. data/lib/google/cloud/aiplatform/v1/event_pb.rb +36 -0
  103. data/lib/google/cloud/aiplatform/v1/execution_pb.rb +48 -0
  104. data/lib/google/cloud/aiplatform/v1/explanation_metadata_pb.rb +107 -0
  105. data/lib/google/cloud/aiplatform/v1/explanation_pb.rb +106 -0
  106. data/lib/google/cloud/aiplatform/v1/feature_monitoring_stats_pb.rb +30 -0
  107. data/lib/google/cloud/aiplatform/v1/feature_pb.rb +46 -0
  108. data/lib/google/cloud/aiplatform/v1/feature_selector_pb.rb +28 -0
  109. data/lib/google/cloud/aiplatform/v1/featurestore_online_service_pb.rb +86 -0
  110. data/lib/google/cloud/aiplatform/v1/featurestore_online_service_services_pb.rb +51 -0
  111. data/lib/google/cloud/aiplatform/v1/featurestore_pb.rb +44 -0
  112. data/lib/google/cloud/aiplatform/v1/featurestore_service_pb.rb +280 -0
  113. data/lib/google/cloud/aiplatform/v1/featurestore_service_services_pb.rb +109 -0
  114. data/lib/google/cloud/aiplatform/v1/hyperparameter_tuning_job_pb.rb +46 -0
  115. data/lib/google/cloud/aiplatform/v1/index_endpoint_pb.rb +66 -0
  116. data/lib/google/cloud/aiplatform/v1/index_endpoint_service_pb.rb +101 -0
  117. data/lib/google/cloud/aiplatform/v1/index_endpoint_service_services_pb.rb +62 -0
  118. data/lib/google/cloud/aiplatform/v1/index_pb.rb +38 -0
  119. data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +98 -0
  120. data/lib/google/cloud/aiplatform/v1/index_service_services_pb.rb +55 -0
  121. data/lib/google/cloud/aiplatform/v1/io_pb.rb +56 -0
  122. data/lib/google/cloud/aiplatform/v1/job_service_pb.rb +217 -0
  123. data/lib/google/cloud/aiplatform/v1/job_service_services_pb.rb +134 -0
  124. data/lib/google/cloud/aiplatform/v1/job_state_pb.rb +32 -0
  125. data/lib/google/cloud/aiplatform/v1/lineage_subgraph_pb.rb +28 -0
  126. data/lib/google/cloud/aiplatform/v1/machine_resources_pb.rb +59 -0
  127. data/lib/google/cloud/aiplatform/v1/manual_batch_tuning_parameters_pb.rb +24 -0
  128. data/lib/google/cloud/aiplatform/v1/metadata_schema_pb.rb +38 -0
  129. data/lib/google/cloud/aiplatform/v1/metadata_service_pb.rb +272 -0
  130. data/lib/google/cloud/aiplatform/v1/metadata_service_services_pb.rb +119 -0
  131. data/lib/google/cloud/aiplatform/v1/metadata_store_pb.rb +36 -0
  132. data/lib/google/cloud/aiplatform/v1/migratable_resource_pb.rb +59 -0
  133. data/lib/google/cloud/aiplatform/v1/migration_service_pb.rb +106 -0
  134. data/lib/google/cloud/aiplatform/v1/migration_service_services_pb.rb +51 -0
  135. data/lib/google/cloud/aiplatform/v1/model_deployment_monitoring_job_pb.rb +111 -0
  136. data/lib/google/cloud/aiplatform/v1/model_evaluation_pb.rb +33 -0
  137. data/lib/google/cloud/aiplatform/v1/model_evaluation_slice_pb.rb +36 -0
  138. data/lib/google/cloud/aiplatform/v1/model_monitoring_pb.rb +93 -0
  139. data/lib/google/cloud/aiplatform/v1/model_pb.rb +88 -0
  140. data/lib/google/cloud/aiplatform/v1/model_service_pb.rb +129 -0
  141. data/lib/google/cloud/aiplatform/v1/model_service_services_pb.rb +69 -0
  142. data/lib/google/cloud/aiplatform/v1/operation_pb.rb +32 -0
  143. data/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb +115 -0
  144. data/lib/google/cloud/aiplatform/v1/pipeline_service_pb.rb +88 -0
  145. data/lib/google/cloud/aiplatform/v1/pipeline_service_services_pb.rb +84 -0
  146. data/lib/google/cloud/aiplatform/v1/pipeline_state_pb.rb +31 -0
  147. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +57 -0
  148. data/lib/google/cloud/aiplatform/v1/prediction_service_services_pb.rb +66 -0
  149. data/lib/google/cloud/aiplatform/v1/specialist_pool_pb.rb +30 -0
  150. data/lib/google/cloud/aiplatform/v1/specialist_pool_service_pb.rb +66 -0
  151. data/lib/google/cloud/aiplatform/v1/specialist_pool_service_services_pb.rb +58 -0
  152. data/lib/google/cloud/aiplatform/v1/study_pb.rb +191 -0
  153. data/lib/google/cloud/aiplatform/v1/tensorboard_data_pb.rb +56 -0
  154. data/lib/google/cloud/aiplatform/v1/tensorboard_experiment_pb.rb +33 -0
  155. data/lib/google/cloud/aiplatform/v1/tensorboard_pb.rb +36 -0
  156. data/lib/google/cloud/aiplatform/v1/tensorboard_run_pb.rb +32 -0
  157. data/lib/google/cloud/aiplatform/v1/tensorboard_service_pb.rb +244 -0
  158. data/lib/google/cloud/aiplatform/v1/tensorboard_service_services_pb.rb +115 -0
  159. data/lib/google/cloud/aiplatform/v1/tensorboard_time_series_pb.rb +48 -0
  160. data/lib/google/cloud/aiplatform/v1/training_pipeline_pb.rb +95 -0
  161. data/lib/google/cloud/aiplatform/v1/types_pb.rb +35 -0
  162. data/lib/google/cloud/aiplatform/v1/unmanaged_container_model_pb.rb +27 -0
  163. data/lib/google/cloud/aiplatform/v1/user_action_reference_pb.rb +27 -0
  164. data/lib/google/cloud/aiplatform/v1/value_pb.rb +27 -0
  165. data/lib/google/cloud/aiplatform/v1/vizier_service_pb.rb +136 -0
  166. data/lib/google/cloud/aiplatform/v1/vizier_service_services_pb.rb +90 -0
  167. data/lib/google-cloud-ai_platform-v1.rb +21 -0
  168. data/proto_docs/README.md +4 -0
  169. data/proto_docs/google/api/field_behavior.rb +71 -0
  170. data/proto_docs/google/api/httpbody.rb +80 -0
  171. data/proto_docs/google/api/resource.rb +222 -0
  172. data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +50 -0
  173. data/proto_docs/google/cloud/aiplatform/v1/annotation.rb +92 -0
  174. data/proto_docs/google/cloud/aiplatform/v1/annotation_spec.rb +50 -0
  175. data/proto_docs/google/cloud/aiplatform/v1/artifact.rb +112 -0
  176. data/proto_docs/google/cloud/aiplatform/v1/batch_prediction_job.rb +278 -0
  177. data/proto_docs/google/cloud/aiplatform/v1/completion_stats.rb +46 -0
  178. data/proto_docs/google/cloud/aiplatform/v1/context.rb +92 -0
  179. data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +272 -0
  180. data/proto_docs/google/cloud/aiplatform/v1/data_item.rb +73 -0
  181. data/proto_docs/google/cloud/aiplatform/v1/data_labeling_job.rb +207 -0
  182. data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +154 -0
  183. data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +301 -0
  184. data/proto_docs/google/cloud/aiplatform/v1/deployed_index_ref.rb +38 -0
  185. data/proto_docs/google/cloud/aiplatform/v1/deployed_model_ref.rb +38 -0
  186. data/proto_docs/google/cloud/aiplatform/v1/encryption_spec.rb +40 -0
  187. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +227 -0
  188. data/proto_docs/google/cloud/aiplatform/v1/endpoint_service.rb +258 -0
  189. data/proto_docs/google/cloud/aiplatform/v1/entity_type.rb +79 -0
  190. data/proto_docs/google/cloud/aiplatform/v1/env_var.rb +44 -0
  191. data/proto_docs/google/cloud/aiplatform/v1/event.rb +79 -0
  192. data/proto_docs/google/cloud/aiplatform/v1/execution.rb +118 -0
  193. data/proto_docs/google/cloud/aiplatform/v1/explanation.rb +445 -0
  194. data/proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb +419 -0
  195. data/proto_docs/google/cloud/aiplatform/v1/feature.rb +115 -0
  196. data/proto_docs/google/cloud/aiplatform/v1/feature_monitoring_stats.rb +88 -0
  197. data/proto_docs/google/cloud/aiplatform/v1/feature_selector.rb +49 -0
  198. data/proto_docs/google/cloud/aiplatform/v1/featurestore.rb +115 -0
  199. data/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +203 -0
  200. data/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb +978 -0
  201. data/proto_docs/google/cloud/aiplatform/v1/hyperparameter_tuning_job.rb +109 -0
  202. data/proto_docs/google/cloud/aiplatform/v1/index.rb +98 -0
  203. data/proto_docs/google/cloud/aiplatform/v1/index_endpoint.rb +252 -0
  204. data/proto_docs/google/cloud/aiplatform/v1/index_endpoint_service.rb +240 -0
  205. data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +220 -0
  206. data/proto_docs/google/cloud/aiplatform/v1/io.rb +134 -0
  207. data/proto_docs/google/cloud/aiplatform/v1/job_service.rb +660 -0
  208. data/proto_docs/google/cloud/aiplatform/v1/job_state.rb +60 -0
  209. data/proto_docs/google/cloud/aiplatform/v1/lineage_subgraph.rb +42 -0
  210. data/proto_docs/google/cloud/aiplatform/v1/machine_resources.rb +194 -0
  211. data/proto_docs/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.rb +41 -0
  212. data/proto_docs/google/cloud/aiplatform/v1/metadata_schema.rb +74 -0
  213. data/proto_docs/google/cloud/aiplatform/v1/metadata_service.rb +912 -0
  214. data/proto_docs/google/cloud/aiplatform/v1/metadata_store.rb +62 -0
  215. data/proto_docs/google/cloud/aiplatform/v1/migratable_resource.rb +133 -0
  216. data/proto_docs/google/cloud/aiplatform/v1/migration_service.rb +260 -0
  217. data/proto_docs/google/cloud/aiplatform/v1/model.rb +562 -0
  218. data/proto_docs/google/cloud/aiplatform/v1/model_deployment_monitoring_job.rb +293 -0
  219. data/proto_docs/google/cloud/aiplatform/v1/model_evaluation.rb +60 -0
  220. data/proto_docs/google/cloud/aiplatform/v1/model_evaluation_slice.rb +68 -0
  221. data/proto_docs/google/cloud/aiplatform/v1/model_monitoring.rb +257 -0
  222. data/proto_docs/google/cloud/aiplatform/v1/model_service.rb +329 -0
  223. data/proto_docs/google/cloud/aiplatform/v1/operation.rb +55 -0
  224. data/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb +347 -0
  225. data/proto_docs/google/cloud/aiplatform/v1/pipeline_service.rb +258 -0
  226. data/proto_docs/google/cloud/aiplatform/v1/pipeline_state.rb +59 -0
  227. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +165 -0
  228. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.rb +52 -0
  229. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.rb +52 -0
  230. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/image_segmentation.rb +47 -0
  231. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/text_classification.rb +46 -0
  232. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/text_extraction.rb +53 -0
  233. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/text_sentiment.rb +46 -0
  234. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/video_action_recognition.rb +59 -0
  235. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/video_classification.rb +59 -0
  236. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/video_object_tracking.rb +59 -0
  237. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/image_classification.rb +47 -0
  238. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/image_object_detection.rb +47 -0
  239. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/image_segmentation.rb +44 -0
  240. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/video_action_recognition.rb +47 -0
  241. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/video_classification.rb +72 -0
  242. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/video_object_tracking.rb +51 -0
  243. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/classification.rb +49 -0
  244. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/image_object_detection.rb +58 -0
  245. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/image_segmentation.rb +53 -0
  246. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_classification.rb +47 -0
  247. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_regression.rb +47 -0
  248. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/text_extraction.rb +60 -0
  249. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/text_sentiment.rb +45 -0
  250. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/video_action_recognition.rb +60 -0
  251. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/video_classification.rb +73 -0
  252. data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/video_object_tracking.rb +91 -0
  253. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_classification.rb +142 -0
  254. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_object_detection.rb +134 -0
  255. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_segmentation.rb +120 -0
  256. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_tables.rb +315 -0
  257. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_classification.rb +48 -0
  258. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_extraction.rb +46 -0
  259. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_sentiment.rb +55 -0
  260. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_action_recognition.rb +73 -0
  261. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_classification.rb +67 -0
  262. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_object_tracking.rb +78 -0
  263. data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/export_evaluated_data_items_config.rb +51 -0
  264. data/proto_docs/google/cloud/aiplatform/v1/specialist_pool.rb +58 -0
  265. data/proto_docs/google/cloud/aiplatform/v1/specialist_pool_service.rb +136 -0
  266. data/proto_docs/google/cloud/aiplatform/v1/study.rb +543 -0
  267. data/proto_docs/google/cloud/aiplatform/v1/tensorboard.rb +89 -0
  268. data/proto_docs/google/cloud/aiplatform/v1/tensorboard_data.rb +110 -0
  269. data/proto_docs/google/cloud/aiplatform/v1/tensorboard_experiment.rb +82 -0
  270. data/proto_docs/google/cloud/aiplatform/v1/tensorboard_run.rb +85 -0
  271. data/proto_docs/google/cloud/aiplatform/v1/tensorboard_service.rb +706 -0
  272. data/proto_docs/google/cloud/aiplatform/v1/tensorboard_time_series.rb +101 -0
  273. data/proto_docs/google/cloud/aiplatform/v1/training_pipeline.rb +381 -0
  274. data/proto_docs/google/cloud/aiplatform/v1/types.rb +62 -0
  275. data/proto_docs/google/cloud/aiplatform/v1/unmanaged_container_model.rb +44 -0
  276. data/proto_docs/google/cloud/aiplatform/v1/user_action_reference.rb +49 -0
  277. data/proto_docs/google/cloud/aiplatform/v1/value.rb +41 -0
  278. data/proto_docs/google/cloud/aiplatform/v1/vizier_service.rb +332 -0
  279. data/proto_docs/google/longrunning/operations.rb +164 -0
  280. data/proto_docs/google/protobuf/any.rb +141 -0
  281. data/proto_docs/google/protobuf/duration.rb +98 -0
  282. data/proto_docs/google/protobuf/empty.rb +36 -0
  283. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  284. data/proto_docs/google/protobuf/struct.rb +96 -0
  285. data/proto_docs/google/protobuf/timestamp.rb +129 -0
  286. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  287. data/proto_docs/google/rpc/status.rb +46 -0
  288. data/proto_docs/google/type/money.rb +43 -0
  289. metadata +479 -0
@@ -0,0 +1,650 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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/prediction_service_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module AIPlatform
25
+ module V1
26
+ module PredictionService
27
+ ##
28
+ # Client for the PredictionService service.
29
+ #
30
+ # A service for online predictions and explanations.
31
+ #
32
+ class Client
33
+ include Paths
34
+
35
+ # @private
36
+ attr_reader :prediction_service_stub
37
+
38
+ ##
39
+ # Configure the PredictionService Client class.
40
+ #
41
+ # See {::Google::Cloud::AIPlatform::V1::PredictionService::Client::Configuration}
42
+ # for a description of the configuration fields.
43
+ #
44
+ # @example
45
+ #
46
+ # # Modify the configuration for all PredictionService clients
47
+ # ::Google::Cloud::AIPlatform::V1::PredictionService::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
50
+ #
51
+ # @yield [config] Configure the Client client.
52
+ # @yieldparam config [Client::Configuration]
53
+ #
54
+ # @return [Client::Configuration]
55
+ #
56
+ def self.configure
57
+ @configure ||= begin
58
+ namespace = ["Google", "Cloud", "AIPlatform", "V1"]
59
+ parent_config = while namespace.any?
60
+ parent_name = namespace.join "::"
61
+ parent_const = const_get parent_name
62
+ break parent_const.configure if parent_const.respond_to? :configure
63
+ namespace.pop
64
+ end
65
+ default_config = Client::Configuration.new parent_config
66
+
67
+ default_config
68
+ end
69
+ yield @configure if block_given?
70
+ @configure
71
+ end
72
+
73
+ ##
74
+ # Configure the PredictionService Client instance.
75
+ #
76
+ # The configuration is set to the derived mode, meaning that values can be changed,
77
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
78
+ # should be made on {Client.configure}.
79
+ #
80
+ # See {::Google::Cloud::AIPlatform::V1::PredictionService::Client::Configuration}
81
+ # for a description of the configuration fields.
82
+ #
83
+ # @yield [config] Configure the Client client.
84
+ # @yieldparam config [Client::Configuration]
85
+ #
86
+ # @return [Client::Configuration]
87
+ #
88
+ def configure
89
+ yield @config if block_given?
90
+ @config
91
+ end
92
+
93
+ ##
94
+ # Create a new PredictionService client object.
95
+ #
96
+ # @example
97
+ #
98
+ # # Create a client using the default configuration
99
+ # client = ::Google::Cloud::AIPlatform::V1::PredictionService::Client.new
100
+ #
101
+ # # Create a client using a custom configuration
102
+ # client = ::Google::Cloud::AIPlatform::V1::PredictionService::Client.new do |config|
103
+ # config.timeout = 10.0
104
+ # end
105
+ #
106
+ # @yield [config] Configure the PredictionService client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ def initialize
110
+ # These require statements are intentionally placed here to initialize
111
+ # the gRPC module only when it's required.
112
+ # See https://github.com/googleapis/toolkit/issues/446
113
+ require "gapic/grpc"
114
+ require "google/cloud/aiplatform/v1/prediction_service_services_pb"
115
+
116
+ # Create the configuration object
117
+ @config = Configuration.new Client.configure
118
+
119
+ # Yield the configuration if needed
120
+ yield @config if block_given?
121
+
122
+ # Create credentials
123
+ credentials = @config.credentials
124
+ # Use self-signed JWT if the endpoint is unchanged from default,
125
+ # but only if the default endpoint does not have a region prefix.
126
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
127
+ !@config.endpoint.split(".").first.include?("-")
128
+ credentials ||= Credentials.default scope: @config.scope,
129
+ enable_self_signed_jwt: enable_self_signed_jwt
130
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
131
+ credentials = Credentials.new credentials, scope: @config.scope
132
+ end
133
+ @quota_project_id = @config.quota_project
134
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
135
+
136
+ @prediction_service_stub = ::Gapic::ServiceStub.new(
137
+ ::Google::Cloud::AIPlatform::V1::PredictionService::Stub,
138
+ credentials: credentials,
139
+ endpoint: @config.endpoint,
140
+ channel_args: @config.channel_args,
141
+ interceptors: @config.interceptors
142
+ )
143
+ end
144
+
145
+ # Service calls
146
+
147
+ ##
148
+ # Perform an online prediction.
149
+ #
150
+ # @overload predict(request, options = nil)
151
+ # Pass arguments to `predict` via a request object, either of type
152
+ # {::Google::Cloud::AIPlatform::V1::PredictRequest} or an equivalent Hash.
153
+ #
154
+ # @param request [::Google::Cloud::AIPlatform::V1::PredictRequest, ::Hash]
155
+ # A request object representing the call parameters. Required. To specify no
156
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
157
+ # @param options [::Gapic::CallOptions, ::Hash]
158
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
159
+ #
160
+ # @overload predict(endpoint: nil, instances: nil, parameters: nil)
161
+ # Pass arguments to `predict` via keyword arguments. Note that at
162
+ # least one keyword argument is required. To specify no parameters, or to keep all
163
+ # the default parameter values, pass an empty Hash as a request object (see above).
164
+ #
165
+ # @param endpoint [::String]
166
+ # Required. The name of the Endpoint requested to serve the prediction.
167
+ # Format:
168
+ # `projects/{project}/locations/{location}/endpoints/{endpoint}`
169
+ # @param instances [::Array<::Google::Protobuf::Value, ::Hash>]
170
+ # Required. The instances that are the input to the prediction call.
171
+ # A DeployedModel may have an upper limit on the number of instances it
172
+ # supports per request, and when it is exceeded the prediction call errors
173
+ # in case of AutoML Models, or, in case of customer created Models, the
174
+ # behaviour is as documented by that Model.
175
+ # The schema of any single instance may be specified via Endpoint's
176
+ # DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
177
+ # [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
178
+ # {::Google::Cloud::AIPlatform::V1::PredictSchemata#instance_schema_uri instance_schema_uri}.
179
+ # @param parameters [::Google::Protobuf::Value, ::Hash]
180
+ # The parameters that govern the prediction. The schema of the parameters may
181
+ # be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
182
+ # [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
183
+ # {::Google::Cloud::AIPlatform::V1::PredictSchemata#parameters_schema_uri parameters_schema_uri}.
184
+ #
185
+ # @yield [response, operation] Access the result along with the RPC operation
186
+ # @yieldparam response [::Google::Cloud::AIPlatform::V1::PredictResponse]
187
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
188
+ #
189
+ # @return [::Google::Cloud::AIPlatform::V1::PredictResponse]
190
+ #
191
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
192
+ #
193
+ # @example Basic example
194
+ # require "google/cloud/ai_platform/v1"
195
+ #
196
+ # # Create a client object. The client can be reused for multiple calls.
197
+ # client = Google::Cloud::AIPlatform::V1::PredictionService::Client.new
198
+ #
199
+ # # Create a request. To set request fields, pass in keyword arguments.
200
+ # request = Google::Cloud::AIPlatform::V1::PredictRequest.new
201
+ #
202
+ # # Call the predict method.
203
+ # result = client.predict request
204
+ #
205
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::PredictResponse.
206
+ # p result
207
+ #
208
+ def predict request, options = nil
209
+ raise ::ArgumentError, "request must be provided" if request.nil?
210
+
211
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::PredictRequest
212
+
213
+ # Converts hash and nil to an options object
214
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
215
+
216
+ # Customize the options with defaults
217
+ metadata = @config.rpcs.predict.metadata.to_h
218
+
219
+ # Set x-goog-api-client and x-goog-user-project headers
220
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
221
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
222
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
223
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
224
+
225
+ header_params = {}
226
+ if request.endpoint
227
+ header_params["endpoint"] = request.endpoint
228
+ end
229
+
230
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
231
+ metadata[:"x-goog-request-params"] ||= request_params_header
232
+
233
+ options.apply_defaults timeout: @config.rpcs.predict.timeout,
234
+ metadata: metadata,
235
+ retry_policy: @config.rpcs.predict.retry_policy
236
+
237
+ options.apply_defaults timeout: @config.timeout,
238
+ metadata: @config.metadata,
239
+ retry_policy: @config.retry_policy
240
+
241
+ @prediction_service_stub.call_rpc :predict, request, options: options do |response, operation|
242
+ yield response, operation if block_given?
243
+ return response
244
+ end
245
+ rescue ::GRPC::BadStatus => e
246
+ raise ::Google::Cloud::Error.from_error(e)
247
+ end
248
+
249
+ ##
250
+ # Perform an online prediction with an arbitrary HTTP payload.
251
+ #
252
+ # The response includes the following HTTP headers:
253
+ #
254
+ # * `X-Vertex-AI-Endpoint-Id`: ID of the {::Google::Cloud::AIPlatform::V1::Endpoint Endpoint} that served this
255
+ # prediction.
256
+ #
257
+ # * `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's {::Google::Cloud::AIPlatform::V1::DeployedModel DeployedModel}
258
+ # that served this prediction.
259
+ #
260
+ # @overload raw_predict(request, options = nil)
261
+ # Pass arguments to `raw_predict` via a request object, either of type
262
+ # {::Google::Cloud::AIPlatform::V1::RawPredictRequest} or an equivalent Hash.
263
+ #
264
+ # @param request [::Google::Cloud::AIPlatform::V1::RawPredictRequest, ::Hash]
265
+ # A request object representing the call parameters. Required. To specify no
266
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
267
+ # @param options [::Gapic::CallOptions, ::Hash]
268
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
269
+ #
270
+ # @overload raw_predict(endpoint: nil, http_body: nil)
271
+ # Pass arguments to `raw_predict` via keyword arguments. Note that at
272
+ # least one keyword argument is required. To specify no parameters, or to keep all
273
+ # the default parameter values, pass an empty Hash as a request object (see above).
274
+ #
275
+ # @param endpoint [::String]
276
+ # Required. The name of the Endpoint requested to serve the prediction.
277
+ # Format:
278
+ # `projects/{project}/locations/{location}/endpoints/{endpoint}`
279
+ # @param http_body [::Google::Api::HttpBody, ::Hash]
280
+ # The prediction input. Supports HTTP headers and arbitrary data payload.
281
+ #
282
+ # A {::Google::Cloud::AIPlatform::V1::DeployedModel DeployedModel} may have an upper limit on the number of instances it
283
+ # supports per request. When this limit it is exceeded for an AutoML model,
284
+ # the {::Google::Cloud::AIPlatform::V1::PredictionService::Client#raw_predict RawPredict} method returns an error.
285
+ # When this limit is exceeded for a custom-trained model, the behavior varies
286
+ # depending on the model.
287
+ #
288
+ # You can specify the schema for each instance in the
289
+ # {::Google::Cloud::AIPlatform::V1::PredictSchemata#instance_schema_uri predict_schemata.instance_schema_uri}
290
+ # field when you create a {::Google::Cloud::AIPlatform::V1::Model Model}. This schema applies when you deploy the
291
+ # `Model` as a `DeployedModel` to an {::Google::Cloud::AIPlatform::V1::Endpoint Endpoint} and use the `RawPredict`
292
+ # method.
293
+ #
294
+ # @yield [response, operation] Access the result along with the RPC operation
295
+ # @yieldparam response [::Google::Api::HttpBody]
296
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
297
+ #
298
+ # @return [::Google::Api::HttpBody]
299
+ #
300
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
301
+ #
302
+ # @example Basic example
303
+ # require "google/cloud/ai_platform/v1"
304
+ #
305
+ # # Create a client object. The client can be reused for multiple calls.
306
+ # client = Google::Cloud::AIPlatform::V1::PredictionService::Client.new
307
+ #
308
+ # # Create a request. To set request fields, pass in keyword arguments.
309
+ # request = Google::Cloud::AIPlatform::V1::RawPredictRequest.new
310
+ #
311
+ # # Call the raw_predict method.
312
+ # result = client.raw_predict request
313
+ #
314
+ # # The returned object is of type Google::Api::HttpBody.
315
+ # p result
316
+ #
317
+ def raw_predict request, options = nil
318
+ raise ::ArgumentError, "request must be provided" if request.nil?
319
+
320
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::RawPredictRequest
321
+
322
+ # Converts hash and nil to an options object
323
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
324
+
325
+ # Customize the options with defaults
326
+ metadata = @config.rpcs.raw_predict.metadata.to_h
327
+
328
+ # Set x-goog-api-client and x-goog-user-project headers
329
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
330
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
331
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
332
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
333
+
334
+ header_params = {}
335
+ if request.endpoint
336
+ header_params["endpoint"] = request.endpoint
337
+ end
338
+
339
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
340
+ metadata[:"x-goog-request-params"] ||= request_params_header
341
+
342
+ options.apply_defaults timeout: @config.rpcs.raw_predict.timeout,
343
+ metadata: metadata,
344
+ retry_policy: @config.rpcs.raw_predict.retry_policy
345
+
346
+ options.apply_defaults timeout: @config.timeout,
347
+ metadata: @config.metadata,
348
+ retry_policy: @config.retry_policy
349
+
350
+ @prediction_service_stub.call_rpc :raw_predict, request, options: options do |response, operation|
351
+ yield response, operation if block_given?
352
+ return response
353
+ end
354
+ rescue ::GRPC::BadStatus => e
355
+ raise ::Google::Cloud::Error.from_error(e)
356
+ end
357
+
358
+ ##
359
+ # Perform an online explanation.
360
+ #
361
+ # If {::Google::Cloud::AIPlatform::V1::ExplainRequest#deployed_model_id deployed_model_id} is specified,
362
+ # the corresponding DeployModel must have
363
+ # {::Google::Cloud::AIPlatform::V1::DeployedModel#explanation_spec explanation_spec}
364
+ # populated. If {::Google::Cloud::AIPlatform::V1::ExplainRequest#deployed_model_id deployed_model_id}
365
+ # is not specified, all DeployedModels must have
366
+ # {::Google::Cloud::AIPlatform::V1::DeployedModel#explanation_spec explanation_spec}
367
+ # populated. Only deployed AutoML tabular Models have
368
+ # explanation_spec.
369
+ #
370
+ # @overload explain(request, options = nil)
371
+ # Pass arguments to `explain` via a request object, either of type
372
+ # {::Google::Cloud::AIPlatform::V1::ExplainRequest} or an equivalent Hash.
373
+ #
374
+ # @param request [::Google::Cloud::AIPlatform::V1::ExplainRequest, ::Hash]
375
+ # A request object representing the call parameters. Required. To specify no
376
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
377
+ # @param options [::Gapic::CallOptions, ::Hash]
378
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
379
+ #
380
+ # @overload explain(endpoint: nil, instances: nil, parameters: nil, explanation_spec_override: nil, deployed_model_id: nil)
381
+ # Pass arguments to `explain` via keyword arguments. Note that at
382
+ # least one keyword argument is required. To specify no parameters, or to keep all
383
+ # the default parameter values, pass an empty Hash as a request object (see above).
384
+ #
385
+ # @param endpoint [::String]
386
+ # Required. The name of the Endpoint requested to serve the explanation.
387
+ # Format:
388
+ # `projects/{project}/locations/{location}/endpoints/{endpoint}`
389
+ # @param instances [::Array<::Google::Protobuf::Value, ::Hash>]
390
+ # Required. The instances that are the input to the explanation call.
391
+ # A DeployedModel may have an upper limit on the number of instances it
392
+ # supports per request, and when it is exceeded the explanation call errors
393
+ # in case of AutoML Models, or, in case of customer created Models, the
394
+ # behaviour is as documented by that Model.
395
+ # The schema of any single instance may be specified via Endpoint's
396
+ # DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
397
+ # [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
398
+ # {::Google::Cloud::AIPlatform::V1::PredictSchemata#instance_schema_uri instance_schema_uri}.
399
+ # @param parameters [::Google::Protobuf::Value, ::Hash]
400
+ # The parameters that govern the prediction. The schema of the parameters may
401
+ # be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
402
+ # [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
403
+ # {::Google::Cloud::AIPlatform::V1::PredictSchemata#parameters_schema_uri parameters_schema_uri}.
404
+ # @param explanation_spec_override [::Google::Cloud::AIPlatform::V1::ExplanationSpecOverride, ::Hash]
405
+ # If specified, overrides the
406
+ # {::Google::Cloud::AIPlatform::V1::DeployedModel#explanation_spec explanation_spec} of the DeployedModel.
407
+ # Can be used for explaining prediction results with different
408
+ # configurations, such as:
409
+ # - Explaining top-5 predictions results as opposed to top-1;
410
+ # - Increasing path count or step count of the attribution methods to reduce
411
+ # approximate errors;
412
+ # - Using different baselines for explaining the prediction results.
413
+ # @param deployed_model_id [::String]
414
+ # If specified, this ExplainRequest will be served by the chosen
415
+ # DeployedModel, overriding {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split Endpoint.traffic_split}.
416
+ #
417
+ # @yield [response, operation] Access the result along with the RPC operation
418
+ # @yieldparam response [::Google::Cloud::AIPlatform::V1::ExplainResponse]
419
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
420
+ #
421
+ # @return [::Google::Cloud::AIPlatform::V1::ExplainResponse]
422
+ #
423
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
424
+ #
425
+ # @example Basic example
426
+ # require "google/cloud/ai_platform/v1"
427
+ #
428
+ # # Create a client object. The client can be reused for multiple calls.
429
+ # client = Google::Cloud::AIPlatform::V1::PredictionService::Client.new
430
+ #
431
+ # # Create a request. To set request fields, pass in keyword arguments.
432
+ # request = Google::Cloud::AIPlatform::V1::ExplainRequest.new
433
+ #
434
+ # # Call the explain method.
435
+ # result = client.explain request
436
+ #
437
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::ExplainResponse.
438
+ # p result
439
+ #
440
+ def explain request, options = nil
441
+ raise ::ArgumentError, "request must be provided" if request.nil?
442
+
443
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ExplainRequest
444
+
445
+ # Converts hash and nil to an options object
446
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
447
+
448
+ # Customize the options with defaults
449
+ metadata = @config.rpcs.explain.metadata.to_h
450
+
451
+ # Set x-goog-api-client and x-goog-user-project headers
452
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
453
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
454
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
455
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
456
+
457
+ header_params = {}
458
+ if request.endpoint
459
+ header_params["endpoint"] = request.endpoint
460
+ end
461
+
462
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
463
+ metadata[:"x-goog-request-params"] ||= request_params_header
464
+
465
+ options.apply_defaults timeout: @config.rpcs.explain.timeout,
466
+ metadata: metadata,
467
+ retry_policy: @config.rpcs.explain.retry_policy
468
+
469
+ options.apply_defaults timeout: @config.timeout,
470
+ metadata: @config.metadata,
471
+ retry_policy: @config.retry_policy
472
+
473
+ @prediction_service_stub.call_rpc :explain, request, options: options do |response, operation|
474
+ yield response, operation if block_given?
475
+ return response
476
+ end
477
+ rescue ::GRPC::BadStatus => e
478
+ raise ::Google::Cloud::Error.from_error(e)
479
+ end
480
+
481
+ ##
482
+ # Configuration class for the PredictionService API.
483
+ #
484
+ # This class represents the configuration for PredictionService,
485
+ # providing control over timeouts, retry behavior, logging, transport
486
+ # parameters, and other low-level controls. Certain parameters can also be
487
+ # applied individually to specific RPCs. See
488
+ # {::Google::Cloud::AIPlatform::V1::PredictionService::Client::Configuration::Rpcs}
489
+ # for a list of RPCs that can be configured independently.
490
+ #
491
+ # Configuration can be applied globally to all clients, or to a single client
492
+ # on construction.
493
+ #
494
+ # @example
495
+ #
496
+ # # Modify the global config, setting the timeout for
497
+ # # predict to 20 seconds,
498
+ # # and all remaining timeouts to 10 seconds.
499
+ # ::Google::Cloud::AIPlatform::V1::PredictionService::Client.configure do |config|
500
+ # config.timeout = 10.0
501
+ # config.rpcs.predict.timeout = 20.0
502
+ # end
503
+ #
504
+ # # Apply the above configuration only to a new client.
505
+ # client = ::Google::Cloud::AIPlatform::V1::PredictionService::Client.new do |config|
506
+ # config.timeout = 10.0
507
+ # config.rpcs.predict.timeout = 20.0
508
+ # end
509
+ #
510
+ # @!attribute [rw] endpoint
511
+ # The hostname or hostname:port of the service endpoint.
512
+ # Defaults to `"aiplatform.googleapis.com"`.
513
+ # @return [::String]
514
+ # @!attribute [rw] credentials
515
+ # Credentials to send with calls. You may provide any of the following types:
516
+ # * (`String`) The path to a service account key file in JSON format
517
+ # * (`Hash`) A service account key as a Hash
518
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
519
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
520
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
521
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
522
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
523
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
524
+ # * (`nil`) indicating no credentials
525
+ # @return [::Object]
526
+ # @!attribute [rw] scope
527
+ # The OAuth scopes
528
+ # @return [::Array<::String>]
529
+ # @!attribute [rw] lib_name
530
+ # The library name as recorded in instrumentation and logging
531
+ # @return [::String]
532
+ # @!attribute [rw] lib_version
533
+ # The library version as recorded in instrumentation and logging
534
+ # @return [::String]
535
+ # @!attribute [rw] channel_args
536
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
537
+ # `GRPC::Core::Channel` object is provided as the credential.
538
+ # @return [::Hash]
539
+ # @!attribute [rw] interceptors
540
+ # An array of interceptors that are run before calls are executed.
541
+ # @return [::Array<::GRPC::ClientInterceptor>]
542
+ # @!attribute [rw] timeout
543
+ # The call timeout in seconds.
544
+ # @return [::Numeric]
545
+ # @!attribute [rw] metadata
546
+ # Additional gRPC headers to be sent with the call.
547
+ # @return [::Hash{::Symbol=>::String}]
548
+ # @!attribute [rw] retry_policy
549
+ # The retry policy. The value is a hash with the following keys:
550
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
551
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
552
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
553
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
554
+ # trigger a retry.
555
+ # @return [::Hash]
556
+ # @!attribute [rw] quota_project
557
+ # A separate project against which to charge quota.
558
+ # @return [::String]
559
+ #
560
+ class Configuration
561
+ extend ::Gapic::Config
562
+
563
+ config_attr :endpoint, "aiplatform.googleapis.com", ::String
564
+ config_attr :credentials, nil do |value|
565
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
566
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
567
+ allowed.any? { |klass| klass === value }
568
+ end
569
+ config_attr :scope, nil, ::String, ::Array, nil
570
+ config_attr :lib_name, nil, ::String, nil
571
+ config_attr :lib_version, nil, ::String, nil
572
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
573
+ config_attr :interceptors, nil, ::Array, nil
574
+ config_attr :timeout, nil, ::Numeric, nil
575
+ config_attr :metadata, nil, ::Hash, nil
576
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
577
+ config_attr :quota_project, nil, ::String, nil
578
+
579
+ # @private
580
+ def initialize parent_config = nil
581
+ @parent_config = parent_config unless parent_config.nil?
582
+
583
+ yield self if block_given?
584
+ end
585
+
586
+ ##
587
+ # Configurations for individual RPCs
588
+ # @return [Rpcs]
589
+ #
590
+ def rpcs
591
+ @rpcs ||= begin
592
+ parent_rpcs = nil
593
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
594
+ Rpcs.new parent_rpcs
595
+ end
596
+ end
597
+
598
+ ##
599
+ # Configuration RPC class for the PredictionService API.
600
+ #
601
+ # Includes fields providing the configuration for each RPC in this service.
602
+ # Each configuration object is of type `Gapic::Config::Method` and includes
603
+ # the following configuration fields:
604
+ #
605
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
606
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
607
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
608
+ # include the following keys:
609
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
610
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
611
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
612
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
613
+ # trigger a retry.
614
+ #
615
+ class Rpcs
616
+ ##
617
+ # RPC-specific configuration for `predict`
618
+ # @return [::Gapic::Config::Method]
619
+ #
620
+ attr_reader :predict
621
+ ##
622
+ # RPC-specific configuration for `raw_predict`
623
+ # @return [::Gapic::Config::Method]
624
+ #
625
+ attr_reader :raw_predict
626
+ ##
627
+ # RPC-specific configuration for `explain`
628
+ # @return [::Gapic::Config::Method]
629
+ #
630
+ attr_reader :explain
631
+
632
+ # @private
633
+ def initialize parent_rpcs = nil
634
+ predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict
635
+ @predict = ::Gapic::Config::Method.new predict_config
636
+ raw_predict_config = parent_rpcs.raw_predict if parent_rpcs.respond_to? :raw_predict
637
+ @raw_predict = ::Gapic::Config::Method.new raw_predict_config
638
+ explain_config = parent_rpcs.explain if parent_rpcs.respond_to? :explain
639
+ @explain = ::Gapic::Config::Method.new explain_config
640
+
641
+ yield self if block_given?
642
+ end
643
+ end
644
+ end
645
+ end
646
+ end
647
+ end
648
+ end
649
+ end
650
+ end