google-cloud-ai_platform-v1 0.39.0 → 0.40.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/ai_platform/v1/bindings_override.rb +399 -0
  3. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +39 -18
  4. data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +13 -5
  5. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +2188 -0
  6. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +3901 -0
  7. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/service_stub.rb +1136 -0
  8. data/lib/google/cloud/ai_platform/v1/dataset_service/rest.rb +54 -0
  9. data/lib/google/cloud/ai_platform/v1/dataset_service.rb +6 -0
  10. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +13 -5
  11. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +13 -5
  12. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +851 -0
  13. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +3901 -0
  14. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/service_stub.rb +365 -0
  15. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest.rb +54 -0
  16. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service.rb +6 -0
  17. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +19 -8
  18. data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +13 -5
  19. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +1215 -0
  20. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +3901 -0
  21. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/service_stub.rb +546 -0
  22. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest.rb +54 -0
  23. data/lib/google/cloud/ai_platform/v1/endpoint_service.rb +6 -0
  24. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +29 -13
  25. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +13 -5
  26. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +1732 -0
  27. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +3901 -0
  28. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/service_stub.rb +841 -0
  29. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest.rb +55 -0
  30. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service.rb +6 -0
  31. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +7 -2
  32. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +534 -0
  33. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/service_stub.rb +189 -0
  34. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest.rb +53 -0
  35. data/lib/google/cloud/ai_platform/v1/feature_online_store_service.rb +6 -0
  36. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +24 -11
  37. data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +13 -5
  38. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +1450 -0
  39. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +3901 -0
  40. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/service_stub.rb +663 -0
  41. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest.rb +55 -0
  42. data/lib/google/cloud/ai_platform/v1/feature_registry_service.rb +6 -0
  43. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +9 -3
  44. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +645 -0
  45. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/service_stub.rb +244 -0
  46. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest.rb +53 -0
  47. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service.rb +6 -0
  48. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +45 -21
  49. data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +13 -5
  50. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +2765 -0
  51. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +3901 -0
  52. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/service_stub.rb +1319 -0
  53. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest.rb +54 -0
  54. data/lib/google/cloud/ai_platform/v1/featurestore_service.rb +6 -0
  55. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +11 -4
  56. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +720 -0
  57. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +307 -0
  58. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest.rb +53 -0
  59. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service.rb +6 -0
  60. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +19 -8
  61. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +13 -5
  62. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +1151 -0
  63. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +3901 -0
  64. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/service_stub.rb +546 -0
  65. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest.rb +54 -0
  66. data/lib/google/cloud/ai_platform/v1/index_endpoint_service.rb +6 -0
  67. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +17 -7
  68. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +13 -5
  69. data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +1034 -0
  70. data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +3901 -0
  71. data/lib/google/cloud/ai_platform/v1/index_service/rest/service_stub.rb +486 -0
  72. data/lib/google/cloud/ai_platform/v1/index_service/rest.rb +54 -0
  73. data/lib/google/cloud/ai_platform/v1/index_service.rb +6 -0
  74. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +73 -35
  75. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +13 -5
  76. data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +3841 -0
  77. data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +3901 -0
  78. data/lib/google/cloud/ai_platform/v1/job_service/rest/service_stub.rb +2149 -0
  79. data/lib/google/cloud/ai_platform/v1/job_service/rest.rb +54 -0
  80. data/lib/google/cloud/ai_platform/v1/job_service.rb +6 -0
  81. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +7 -2
  82. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +533 -0
  83. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/service_stub.rb +205 -0
  84. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest.rb +53 -0
  85. data/lib/google/cloud/ai_platform/v1/llm_utility_service.rb +6 -0
  86. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +7 -2
  87. data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +541 -0
  88. data/lib/google/cloud/ai_platform/v1/match_service/rest/service_stub.rb +189 -0
  89. data/lib/google/cloud/ai_platform/v1/match_service/rest.rb +54 -0
  90. data/lib/google/cloud/ai_platform/v1/match_service.rb +6 -0
  91. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +67 -32
  92. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +13 -5
  93. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +3634 -0
  94. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +3901 -0
  95. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/service_stub.rb +1972 -0
  96. data/lib/google/cloud/ai_platform/v1/metadata_service/rest.rb +54 -0
  97. data/lib/google/cloud/ai_platform/v1/metadata_service.rb +6 -0
  98. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +7 -2
  99. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +13 -5
  100. data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +574 -0
  101. data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +3901 -0
  102. data/lib/google/cloud/ai_platform/v1/migration_service/rest/service_stub.rb +189 -0
  103. data/lib/google/cloud/ai_platform/v1/migration_service/rest.rb +55 -0
  104. data/lib/google/cloud/ai_platform/v1/migration_service.rb +6 -0
  105. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +5 -1
  106. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +438 -0
  107. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +128 -0
  108. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb +53 -0
  109. data/lib/google/cloud/ai_platform/v1/model_garden_service.rb +6 -0
  110. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +39 -18
  111. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +13 -5
  112. data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +2213 -0
  113. data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +3901 -0
  114. data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +1140 -0
  115. data/lib/google/cloud/ai_platform/v1/model_service/rest.rb +54 -0
  116. data/lib/google/cloud/ai_platform/v1/model_service.rb +6 -0
  117. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +23 -10
  118. data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +13 -5
  119. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +1410 -0
  120. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +3901 -0
  121. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +663 -0
  122. data/lib/google/cloud/ai_platform/v1/notebook_service/rest.rb +54 -0
  123. data/lib/google/cloud/ai_platform/v1/notebook_service.rb +6 -0
  124. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +15 -6
  125. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +13 -5
  126. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +942 -0
  127. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +3901 -0
  128. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/service_stub.rb +426 -0
  129. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest.rb +54 -0
  130. data/lib/google/cloud/ai_platform/v1/persistent_resource_service.rb +6 -0
  131. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +27 -12
  132. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +13 -5
  133. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +1600 -0
  134. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +3901 -0
  135. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/service_stub.rb +783 -0
  136. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest.rb +56 -0
  137. data/lib/google/cloud/ai_platform/v1/pipeline_service.rb +6 -0
  138. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +29 -13
  139. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +1297 -0
  140. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +642 -0
  141. data/lib/google/cloud/ai_platform/v1/prediction_service/rest.rb +53 -0
  142. data/lib/google/cloud/ai_platform/v1/prediction_service.rb +6 -0
  143. data/lib/google/cloud/ai_platform/v1/rest.rb +63 -0
  144. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +17 -7
  145. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +13 -5
  146. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +1076 -0
  147. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +3901 -0
  148. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/service_stub.rb +486 -0
  149. data/lib/google/cloud/ai_platform/v1/schedule_service/rest.rb +55 -0
  150. data/lib/google/cloud/ai_platform/v1/schedule_service.rb +6 -0
  151. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +13 -5
  152. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +13 -5
  153. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +847 -0
  154. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +3901 -0
  155. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/service_stub.rb +366 -0
  156. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest.rb +59 -0
  157. data/lib/google/cloud/ai_platform/v1/specialist_pool_service.rb +6 -0
  158. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +63 -30
  159. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +13 -5
  160. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +3274 -0
  161. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +3901 -0
  162. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/service_stub.rb +1847 -0
  163. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest.rb +54 -0
  164. data/lib/google/cloud/ai_platform/v1/tensorboard_service.rb +6 -0
  165. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  166. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +33 -15
  167. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +13 -5
  168. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +1788 -0
  169. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +3901 -0
  170. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +963 -0
  171. data/lib/google/cloud/ai_platform/v1/vizier_service/rest.rb +58 -0
  172. data/lib/google/cloud/ai_platform/v1/vizier_service.rb +6 -0
  173. data/lib/google/cloud/ai_platform/v1.rb +6 -1
  174. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
  175. data/lib/google/cloud/aiplatform/v1/content_pb.rb +2 -1
  176. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +3 -1
  177. data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +1 -1
  178. data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +1 -1
  179. data/lib/google/cloud/aiplatform/v1/publisher_model_pb.rb +1 -1
  180. data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
  181. data/proto_docs/google/cloud/aiplatform/v1/content.rb +17 -0
  182. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +7 -0
  183. data/proto_docs/google/cloud/aiplatform/v1/feature_registry_service.rb +1 -1
  184. data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +3 -0
  185. data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +2 -2
  186. data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +4 -0
  187. data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +8 -7
  188. metadata +101 -2
@@ -0,0 +1,2188 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/aiplatform/v1/dataset_service_pb"
21
+ require "google/cloud/ai_platform/v1/dataset_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+ require "google/iam/v1/rest"
24
+
25
+ module Google
26
+ module Cloud
27
+ module AIPlatform
28
+ module V1
29
+ module DatasetService
30
+ module Rest
31
+ ##
32
+ # REST client for the DatasetService service.
33
+ #
34
+ # The service that manages Vertex AI Dataset and its child resources.
35
+ #
36
+ class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
40
+ # @private
41
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
42
+
43
+ include Paths
44
+
45
+ # @private
46
+ attr_reader :dataset_service_stub
47
+
48
+ ##
49
+ # Configure the DatasetService Client class.
50
+ #
51
+ # See {::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all DatasetService clients
57
+ # ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.configure do |config|
58
+ # config.timeout = 10.0
59
+ # end
60
+ #
61
+ # @yield [config] Configure the Client client.
62
+ # @yieldparam config [Client::Configuration]
63
+ #
64
+ # @return [Client::Configuration]
65
+ #
66
+ def self.configure
67
+ @configure ||= begin
68
+ namespace = ["Google", "Cloud", "AIPlatform", "V1"]
69
+ parent_config = while namespace.any?
70
+ parent_name = namespace.join "::"
71
+ parent_const = const_get parent_name
72
+ break parent_const.configure if parent_const.respond_to? :configure
73
+ namespace.pop
74
+ end
75
+ default_config = Client::Configuration.new parent_config
76
+
77
+ default_config
78
+ end
79
+ yield @configure if block_given?
80
+ @configure
81
+ end
82
+
83
+ ##
84
+ # Configure the DatasetService Client instance.
85
+ #
86
+ # The configuration is set to the derived mode, meaning that values can be changed,
87
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
88
+ # should be made on {Client.configure}.
89
+ #
90
+ # See {::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client::Configuration}
91
+ # for a description of the configuration fields.
92
+ #
93
+ # @yield [config] Configure the Client client.
94
+ # @yieldparam config [Client::Configuration]
95
+ #
96
+ # @return [Client::Configuration]
97
+ #
98
+ def configure
99
+ yield @config if block_given?
100
+ @config
101
+ end
102
+
103
+ ##
104
+ # The effective universe domain
105
+ #
106
+ # @return [String]
107
+ #
108
+ def universe_domain
109
+ @dataset_service_stub.universe_domain
110
+ end
111
+
112
+ ##
113
+ # Create a new DatasetService REST client object.
114
+ #
115
+ # @example
116
+ #
117
+ # # Create a client using the default configuration
118
+ # client = ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
119
+ #
120
+ # # Create a client using a custom configuration
121
+ # client = ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new do |config|
122
+ # config.timeout = 10.0
123
+ # end
124
+ #
125
+ # @yield [config] Configure the DatasetService client.
126
+ # @yieldparam config [Client::Configuration]
127
+ #
128
+ def initialize
129
+ # Create the configuration object
130
+ @config = Configuration.new Client.configure
131
+
132
+ # Yield the configuration if needed
133
+ yield @config if block_given?
134
+
135
+ # Create credentials
136
+ credentials = @config.credentials
137
+ # Use self-signed JWT if the endpoint is unchanged from default,
138
+ # but only if the default endpoint does not have a region prefix.
139
+ enable_self_signed_jwt = @config.endpoint.nil? ||
140
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
141
+ !@config.endpoint.split(".").first.include?("-"))
142
+ credentials ||= Credentials.default scope: @config.scope,
143
+ enable_self_signed_jwt: enable_self_signed_jwt
144
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
145
+ credentials = Credentials.new credentials, scope: @config.scope
146
+ end
147
+
148
+ @quota_project_id = @config.quota_project
149
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
150
+
151
+ @operations_client = ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Operations.new do |config|
152
+ config.credentials = credentials
153
+ config.quota_project = @quota_project_id
154
+ config.endpoint = @config.endpoint
155
+ config.universe_domain = @config.universe_domain
156
+ end
157
+
158
+ @dataset_service_stub = ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::ServiceStub.new(
159
+ endpoint: @config.endpoint,
160
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
161
+ universe_domain: @config.universe_domain,
162
+ credentials: credentials
163
+ )
164
+
165
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
166
+ config.credentials = credentials
167
+ config.quota_project = @quota_project_id
168
+ config.endpoint = @dataset_service_stub.endpoint
169
+ config.universe_domain = @dataset_service_stub.universe_domain
170
+ config.bindings_override = @config.bindings_override
171
+ end
172
+
173
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
174
+ config.credentials = credentials
175
+ config.quota_project = @quota_project_id
176
+ config.endpoint = @dataset_service_stub.endpoint
177
+ config.universe_domain = @dataset_service_stub.universe_domain
178
+ config.bindings_override = @config.bindings_override
179
+ end
180
+ end
181
+
182
+ ##
183
+ # Get the associated client for long-running operations.
184
+ #
185
+ # @return [::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Operations]
186
+ #
187
+ attr_reader :operations_client
188
+
189
+ ##
190
+ # Get the associated client for mix-in of the Locations.
191
+ #
192
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
193
+ #
194
+ attr_reader :location_client
195
+
196
+ ##
197
+ # Get the associated client for mix-in of the IAMPolicy.
198
+ #
199
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
200
+ #
201
+ attr_reader :iam_policy_client
202
+
203
+ # Service calls
204
+
205
+ ##
206
+ # Creates a Dataset.
207
+ #
208
+ # @overload create_dataset(request, options = nil)
209
+ # Pass arguments to `create_dataset` via a request object, either of type
210
+ # {::Google::Cloud::AIPlatform::V1::CreateDatasetRequest} or an equivalent Hash.
211
+ #
212
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateDatasetRequest, ::Hash]
213
+ # A request object representing the call parameters. Required. To specify no
214
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
215
+ # @param options [::Gapic::CallOptions, ::Hash]
216
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
217
+ #
218
+ # @overload create_dataset(parent: nil, dataset: nil)
219
+ # Pass arguments to `create_dataset` via keyword arguments. Note that at
220
+ # least one keyword argument is required. To specify no parameters, or to keep all
221
+ # the default parameter values, pass an empty Hash as a request object (see above).
222
+ #
223
+ # @param parent [::String]
224
+ # Required. The resource name of the Location to create the Dataset in.
225
+ # Format: `projects/{project}/locations/{location}`
226
+ # @param dataset [::Google::Cloud::AIPlatform::V1::Dataset, ::Hash]
227
+ # Required. The Dataset to create.
228
+ # @yield [result, operation] Access the result along with the TransportOperation object
229
+ # @yieldparam result [::Gapic::Operation]
230
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
231
+ #
232
+ # @return [::Gapic::Operation]
233
+ #
234
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
235
+ #
236
+ # @example Basic example
237
+ # require "google/cloud/ai_platform/v1"
238
+ #
239
+ # # Create a client object. The client can be reused for multiple calls.
240
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
241
+ #
242
+ # # Create a request. To set request fields, pass in keyword arguments.
243
+ # request = Google::Cloud::AIPlatform::V1::CreateDatasetRequest.new
244
+ #
245
+ # # Call the create_dataset method.
246
+ # result = client.create_dataset request
247
+ #
248
+ # # The returned object is of type Gapic::Operation. You can use it to
249
+ # # check the status of an operation, cancel it, or wait for results.
250
+ # # Here is how to wait for a response.
251
+ # result.wait_until_done! timeout: 60
252
+ # if result.response?
253
+ # p result.response
254
+ # else
255
+ # puts "No response received."
256
+ # end
257
+ #
258
+ def create_dataset request, options = nil
259
+ raise ::ArgumentError, "request must be provided" if request.nil?
260
+
261
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateDatasetRequest
262
+
263
+ # Converts hash and nil to an options object
264
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
265
+
266
+ # Customize the options with defaults
267
+ call_metadata = @config.rpcs.create_dataset.metadata.to_h
268
+
269
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
270
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
272
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
273
+ transports_version_send: [:rest]
274
+
275
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
276
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
277
+
278
+ options.apply_defaults timeout: @config.rpcs.create_dataset.timeout,
279
+ metadata: call_metadata,
280
+ retry_policy: @config.rpcs.create_dataset.retry_policy
281
+
282
+ options.apply_defaults timeout: @config.timeout,
283
+ metadata: @config.metadata,
284
+ retry_policy: @config.retry_policy
285
+
286
+ @dataset_service_stub.create_dataset request, options do |result, operation|
287
+ result = ::Gapic::Operation.new result, @operations_client, options: options
288
+ yield result, operation if block_given?
289
+ return result
290
+ end
291
+ rescue ::Gapic::Rest::Error => e
292
+ raise ::Google::Cloud::Error.from_error(e)
293
+ end
294
+
295
+ ##
296
+ # Gets a Dataset.
297
+ #
298
+ # @overload get_dataset(request, options = nil)
299
+ # Pass arguments to `get_dataset` via a request object, either of type
300
+ # {::Google::Cloud::AIPlatform::V1::GetDatasetRequest} or an equivalent Hash.
301
+ #
302
+ # @param request [::Google::Cloud::AIPlatform::V1::GetDatasetRequest, ::Hash]
303
+ # A request object representing the call parameters. Required. To specify no
304
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
305
+ # @param options [::Gapic::CallOptions, ::Hash]
306
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
307
+ #
308
+ # @overload get_dataset(name: nil, read_mask: nil)
309
+ # Pass arguments to `get_dataset` via keyword arguments. Note that at
310
+ # least one keyword argument is required. To specify no parameters, or to keep all
311
+ # the default parameter values, pass an empty Hash as a request object (see above).
312
+ #
313
+ # @param name [::String]
314
+ # Required. The name of the Dataset resource.
315
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
316
+ # Mask specifying which fields to read.
317
+ # @yield [result, operation] Access the result along with the TransportOperation object
318
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Dataset]
319
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
320
+ #
321
+ # @return [::Google::Cloud::AIPlatform::V1::Dataset]
322
+ #
323
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
324
+ #
325
+ # @example Basic example
326
+ # require "google/cloud/ai_platform/v1"
327
+ #
328
+ # # Create a client object. The client can be reused for multiple calls.
329
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
330
+ #
331
+ # # Create a request. To set request fields, pass in keyword arguments.
332
+ # request = Google::Cloud::AIPlatform::V1::GetDatasetRequest.new
333
+ #
334
+ # # Call the get_dataset method.
335
+ # result = client.get_dataset request
336
+ #
337
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Dataset.
338
+ # p result
339
+ #
340
+ def get_dataset request, options = nil
341
+ raise ::ArgumentError, "request must be provided" if request.nil?
342
+
343
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetDatasetRequest
344
+
345
+ # Converts hash and nil to an options object
346
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
347
+
348
+ # Customize the options with defaults
349
+ call_metadata = @config.rpcs.get_dataset.metadata.to_h
350
+
351
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
352
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
353
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
354
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
355
+ transports_version_send: [:rest]
356
+
357
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
358
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
359
+
360
+ options.apply_defaults timeout: @config.rpcs.get_dataset.timeout,
361
+ metadata: call_metadata,
362
+ retry_policy: @config.rpcs.get_dataset.retry_policy
363
+
364
+ options.apply_defaults timeout: @config.timeout,
365
+ metadata: @config.metadata,
366
+ retry_policy: @config.retry_policy
367
+
368
+ @dataset_service_stub.get_dataset request, options do |result, operation|
369
+ yield result, operation if block_given?
370
+ return result
371
+ end
372
+ rescue ::Gapic::Rest::Error => e
373
+ raise ::Google::Cloud::Error.from_error(e)
374
+ end
375
+
376
+ ##
377
+ # Updates a Dataset.
378
+ #
379
+ # @overload update_dataset(request, options = nil)
380
+ # Pass arguments to `update_dataset` via a request object, either of type
381
+ # {::Google::Cloud::AIPlatform::V1::UpdateDatasetRequest} or an equivalent Hash.
382
+ #
383
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateDatasetRequest, ::Hash]
384
+ # A request object representing the call parameters. Required. To specify no
385
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
386
+ # @param options [::Gapic::CallOptions, ::Hash]
387
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
388
+ #
389
+ # @overload update_dataset(dataset: nil, update_mask: nil)
390
+ # Pass arguments to `update_dataset` via keyword arguments. Note that at
391
+ # least one keyword argument is required. To specify no parameters, or to keep all
392
+ # the default parameter values, pass an empty Hash as a request object (see above).
393
+ #
394
+ # @param dataset [::Google::Cloud::AIPlatform::V1::Dataset, ::Hash]
395
+ # Required. The Dataset which replaces the resource on the server.
396
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
397
+ # Required. The update mask applies to the resource.
398
+ # For the `FieldMask` definition, see
399
+ # {::Google::Protobuf::FieldMask google.protobuf.FieldMask}. Updatable fields:
400
+ #
401
+ # * `display_name`
402
+ # * `description`
403
+ # * `labels`
404
+ # @yield [result, operation] Access the result along with the TransportOperation object
405
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Dataset]
406
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
407
+ #
408
+ # @return [::Google::Cloud::AIPlatform::V1::Dataset]
409
+ #
410
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
411
+ #
412
+ # @example Basic example
413
+ # require "google/cloud/ai_platform/v1"
414
+ #
415
+ # # Create a client object. The client can be reused for multiple calls.
416
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
417
+ #
418
+ # # Create a request. To set request fields, pass in keyword arguments.
419
+ # request = Google::Cloud::AIPlatform::V1::UpdateDatasetRequest.new
420
+ #
421
+ # # Call the update_dataset method.
422
+ # result = client.update_dataset request
423
+ #
424
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Dataset.
425
+ # p result
426
+ #
427
+ def update_dataset request, options = nil
428
+ raise ::ArgumentError, "request must be provided" if request.nil?
429
+
430
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateDatasetRequest
431
+
432
+ # Converts hash and nil to an options object
433
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
434
+
435
+ # Customize the options with defaults
436
+ call_metadata = @config.rpcs.update_dataset.metadata.to_h
437
+
438
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
439
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
440
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
441
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
442
+ transports_version_send: [:rest]
443
+
444
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
445
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
446
+
447
+ options.apply_defaults timeout: @config.rpcs.update_dataset.timeout,
448
+ metadata: call_metadata,
449
+ retry_policy: @config.rpcs.update_dataset.retry_policy
450
+
451
+ options.apply_defaults timeout: @config.timeout,
452
+ metadata: @config.metadata,
453
+ retry_policy: @config.retry_policy
454
+
455
+ @dataset_service_stub.update_dataset request, options do |result, operation|
456
+ yield result, operation if block_given?
457
+ return result
458
+ end
459
+ rescue ::Gapic::Rest::Error => e
460
+ raise ::Google::Cloud::Error.from_error(e)
461
+ end
462
+
463
+ ##
464
+ # Lists Datasets in a Location.
465
+ #
466
+ # @overload list_datasets(request, options = nil)
467
+ # Pass arguments to `list_datasets` via a request object, either of type
468
+ # {::Google::Cloud::AIPlatform::V1::ListDatasetsRequest} or an equivalent Hash.
469
+ #
470
+ # @param request [::Google::Cloud::AIPlatform::V1::ListDatasetsRequest, ::Hash]
471
+ # A request object representing the call parameters. Required. To specify no
472
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
473
+ # @param options [::Gapic::CallOptions, ::Hash]
474
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
475
+ #
476
+ # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
477
+ # Pass arguments to `list_datasets` via keyword arguments. Note that at
478
+ # least one keyword argument is required. To specify no parameters, or to keep all
479
+ # the default parameter values, pass an empty Hash as a request object (see above).
480
+ #
481
+ # @param parent [::String]
482
+ # Required. The name of the Dataset's parent resource.
483
+ # Format: `projects/{project}/locations/{location}`
484
+ # @param filter [::String]
485
+ # An expression for filtering the results of the request. For field names
486
+ # both snake_case and camelCase are supported.
487
+ #
488
+ # * `display_name`: supports = and !=
489
+ # * `metadata_schema_uri`: supports = and !=
490
+ # * `labels` supports general map functions that is:
491
+ # * `labels.key=value` - key:value equality
492
+ # * `labels.key:* or labels:key - key existence
493
+ # * A key including a space must be quoted. `labels."a key"`.
494
+ #
495
+ # Some examples:
496
+ #
497
+ # * `displayName="myDisplayName"`
498
+ # * `labels.myKey="myValue"`
499
+ # @param page_size [::Integer]
500
+ # The standard list page size.
501
+ # @param page_token [::String]
502
+ # The standard list page token.
503
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
504
+ # Mask specifying which fields to read.
505
+ # @param order_by [::String]
506
+ # A comma-separated list of fields to order by, sorted in ascending order.
507
+ # Use "desc" after a field name for descending.
508
+ # Supported fields:
509
+ #
510
+ # * `display_name`
511
+ # * `create_time`
512
+ # * `update_time`
513
+ # @yield [result, operation] Access the result along with the TransportOperation object
514
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Dataset>]
515
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
516
+ #
517
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Dataset>]
518
+ #
519
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
520
+ #
521
+ # @example Basic example
522
+ # require "google/cloud/ai_platform/v1"
523
+ #
524
+ # # Create a client object. The client can be reused for multiple calls.
525
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
526
+ #
527
+ # # Create a request. To set request fields, pass in keyword arguments.
528
+ # request = Google::Cloud::AIPlatform::V1::ListDatasetsRequest.new
529
+ #
530
+ # # Call the list_datasets method.
531
+ # result = client.list_datasets request
532
+ #
533
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
534
+ # # over elements, and API calls will be issued to fetch pages as needed.
535
+ # result.each do |item|
536
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Dataset.
537
+ # p item
538
+ # end
539
+ #
540
+ def list_datasets request, options = nil
541
+ raise ::ArgumentError, "request must be provided" if request.nil?
542
+
543
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDatasetsRequest
544
+
545
+ # Converts hash and nil to an options object
546
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
547
+
548
+ # Customize the options with defaults
549
+ call_metadata = @config.rpcs.list_datasets.metadata.to_h
550
+
551
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
552
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
553
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
554
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
555
+ transports_version_send: [:rest]
556
+
557
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
558
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
559
+
560
+ options.apply_defaults timeout: @config.rpcs.list_datasets.timeout,
561
+ metadata: call_metadata,
562
+ retry_policy: @config.rpcs.list_datasets.retry_policy
563
+
564
+ options.apply_defaults timeout: @config.timeout,
565
+ metadata: @config.metadata,
566
+ retry_policy: @config.retry_policy
567
+
568
+ @dataset_service_stub.list_datasets request, options do |result, operation|
569
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_datasets, "datasets", request, result, options
570
+ yield result, operation if block_given?
571
+ return result
572
+ end
573
+ rescue ::Gapic::Rest::Error => e
574
+ raise ::Google::Cloud::Error.from_error(e)
575
+ end
576
+
577
+ ##
578
+ # Deletes a Dataset.
579
+ #
580
+ # @overload delete_dataset(request, options = nil)
581
+ # Pass arguments to `delete_dataset` via a request object, either of type
582
+ # {::Google::Cloud::AIPlatform::V1::DeleteDatasetRequest} or an equivalent Hash.
583
+ #
584
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteDatasetRequest, ::Hash]
585
+ # A request object representing the call parameters. Required. To specify no
586
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
587
+ # @param options [::Gapic::CallOptions, ::Hash]
588
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
589
+ #
590
+ # @overload delete_dataset(name: nil)
591
+ # Pass arguments to `delete_dataset` via keyword arguments. Note that at
592
+ # least one keyword argument is required. To specify no parameters, or to keep all
593
+ # the default parameter values, pass an empty Hash as a request object (see above).
594
+ #
595
+ # @param name [::String]
596
+ # Required. The resource name of the Dataset to delete.
597
+ # Format:
598
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
599
+ # @yield [result, operation] Access the result along with the TransportOperation object
600
+ # @yieldparam result [::Gapic::Operation]
601
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
602
+ #
603
+ # @return [::Gapic::Operation]
604
+ #
605
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
606
+ #
607
+ # @example Basic example
608
+ # require "google/cloud/ai_platform/v1"
609
+ #
610
+ # # Create a client object. The client can be reused for multiple calls.
611
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
612
+ #
613
+ # # Create a request. To set request fields, pass in keyword arguments.
614
+ # request = Google::Cloud::AIPlatform::V1::DeleteDatasetRequest.new
615
+ #
616
+ # # Call the delete_dataset method.
617
+ # result = client.delete_dataset request
618
+ #
619
+ # # The returned object is of type Gapic::Operation. You can use it to
620
+ # # check the status of an operation, cancel it, or wait for results.
621
+ # # Here is how to wait for a response.
622
+ # result.wait_until_done! timeout: 60
623
+ # if result.response?
624
+ # p result.response
625
+ # else
626
+ # puts "No response received."
627
+ # end
628
+ #
629
+ def delete_dataset request, options = nil
630
+ raise ::ArgumentError, "request must be provided" if request.nil?
631
+
632
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteDatasetRequest
633
+
634
+ # Converts hash and nil to an options object
635
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
636
+
637
+ # Customize the options with defaults
638
+ call_metadata = @config.rpcs.delete_dataset.metadata.to_h
639
+
640
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
641
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
642
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
643
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
644
+ transports_version_send: [:rest]
645
+
646
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
647
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
648
+
649
+ options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout,
650
+ metadata: call_metadata,
651
+ retry_policy: @config.rpcs.delete_dataset.retry_policy
652
+
653
+ options.apply_defaults timeout: @config.timeout,
654
+ metadata: @config.metadata,
655
+ retry_policy: @config.retry_policy
656
+
657
+ @dataset_service_stub.delete_dataset request, options do |result, operation|
658
+ result = ::Gapic::Operation.new result, @operations_client, options: options
659
+ yield result, operation if block_given?
660
+ return result
661
+ end
662
+ rescue ::Gapic::Rest::Error => e
663
+ raise ::Google::Cloud::Error.from_error(e)
664
+ end
665
+
666
+ ##
667
+ # Imports data into a Dataset.
668
+ #
669
+ # @overload import_data(request, options = nil)
670
+ # Pass arguments to `import_data` via a request object, either of type
671
+ # {::Google::Cloud::AIPlatform::V1::ImportDataRequest} or an equivalent Hash.
672
+ #
673
+ # @param request [::Google::Cloud::AIPlatform::V1::ImportDataRequest, ::Hash]
674
+ # A request object representing the call parameters. Required. To specify no
675
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
676
+ # @param options [::Gapic::CallOptions, ::Hash]
677
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
678
+ #
679
+ # @overload import_data(name: nil, import_configs: nil)
680
+ # Pass arguments to `import_data` via keyword arguments. Note that at
681
+ # least one keyword argument is required. To specify no parameters, or to keep all
682
+ # the default parameter values, pass an empty Hash as a request object (see above).
683
+ #
684
+ # @param name [::String]
685
+ # Required. The name of the Dataset resource.
686
+ # Format:
687
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
688
+ # @param import_configs [::Array<::Google::Cloud::AIPlatform::V1::ImportDataConfig, ::Hash>]
689
+ # Required. The desired input locations. The contents of all input locations
690
+ # will be imported in one batch.
691
+ # @yield [result, operation] Access the result along with the TransportOperation object
692
+ # @yieldparam result [::Gapic::Operation]
693
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
694
+ #
695
+ # @return [::Gapic::Operation]
696
+ #
697
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
698
+ #
699
+ # @example Basic example
700
+ # require "google/cloud/ai_platform/v1"
701
+ #
702
+ # # Create a client object. The client can be reused for multiple calls.
703
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
704
+ #
705
+ # # Create a request. To set request fields, pass in keyword arguments.
706
+ # request = Google::Cloud::AIPlatform::V1::ImportDataRequest.new
707
+ #
708
+ # # Call the import_data method.
709
+ # result = client.import_data request
710
+ #
711
+ # # The returned object is of type Gapic::Operation. You can use it to
712
+ # # check the status of an operation, cancel it, or wait for results.
713
+ # # Here is how to wait for a response.
714
+ # result.wait_until_done! timeout: 60
715
+ # if result.response?
716
+ # p result.response
717
+ # else
718
+ # puts "No response received."
719
+ # end
720
+ #
721
+ def import_data request, options = nil
722
+ raise ::ArgumentError, "request must be provided" if request.nil?
723
+
724
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ImportDataRequest
725
+
726
+ # Converts hash and nil to an options object
727
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
728
+
729
+ # Customize the options with defaults
730
+ call_metadata = @config.rpcs.import_data.metadata.to_h
731
+
732
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
733
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
734
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
735
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
736
+ transports_version_send: [:rest]
737
+
738
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
739
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
740
+
741
+ options.apply_defaults timeout: @config.rpcs.import_data.timeout,
742
+ metadata: call_metadata,
743
+ retry_policy: @config.rpcs.import_data.retry_policy
744
+
745
+ options.apply_defaults timeout: @config.timeout,
746
+ metadata: @config.metadata,
747
+ retry_policy: @config.retry_policy
748
+
749
+ @dataset_service_stub.import_data request, options do |result, operation|
750
+ result = ::Gapic::Operation.new result, @operations_client, options: options
751
+ yield result, operation if block_given?
752
+ return result
753
+ end
754
+ rescue ::Gapic::Rest::Error => e
755
+ raise ::Google::Cloud::Error.from_error(e)
756
+ end
757
+
758
+ ##
759
+ # Exports data from a Dataset.
760
+ #
761
+ # @overload export_data(request, options = nil)
762
+ # Pass arguments to `export_data` via a request object, either of type
763
+ # {::Google::Cloud::AIPlatform::V1::ExportDataRequest} or an equivalent Hash.
764
+ #
765
+ # @param request [::Google::Cloud::AIPlatform::V1::ExportDataRequest, ::Hash]
766
+ # A request object representing the call parameters. Required. To specify no
767
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
768
+ # @param options [::Gapic::CallOptions, ::Hash]
769
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
770
+ #
771
+ # @overload export_data(name: nil, export_config: nil)
772
+ # Pass arguments to `export_data` via keyword arguments. Note that at
773
+ # least one keyword argument is required. To specify no parameters, or to keep all
774
+ # the default parameter values, pass an empty Hash as a request object (see above).
775
+ #
776
+ # @param name [::String]
777
+ # Required. The name of the Dataset resource.
778
+ # Format:
779
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
780
+ # @param export_config [::Google::Cloud::AIPlatform::V1::ExportDataConfig, ::Hash]
781
+ # Required. The desired output location.
782
+ # @yield [result, operation] Access the result along with the TransportOperation object
783
+ # @yieldparam result [::Gapic::Operation]
784
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
785
+ #
786
+ # @return [::Gapic::Operation]
787
+ #
788
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
789
+ #
790
+ # @example Basic example
791
+ # require "google/cloud/ai_platform/v1"
792
+ #
793
+ # # Create a client object. The client can be reused for multiple calls.
794
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
795
+ #
796
+ # # Create a request. To set request fields, pass in keyword arguments.
797
+ # request = Google::Cloud::AIPlatform::V1::ExportDataRequest.new
798
+ #
799
+ # # Call the export_data method.
800
+ # result = client.export_data request
801
+ #
802
+ # # The returned object is of type Gapic::Operation. You can use it to
803
+ # # check the status of an operation, cancel it, or wait for results.
804
+ # # Here is how to wait for a response.
805
+ # result.wait_until_done! timeout: 60
806
+ # if result.response?
807
+ # p result.response
808
+ # else
809
+ # puts "No response received."
810
+ # end
811
+ #
812
+ def export_data request, options = nil
813
+ raise ::ArgumentError, "request must be provided" if request.nil?
814
+
815
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ExportDataRequest
816
+
817
+ # Converts hash and nil to an options object
818
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
819
+
820
+ # Customize the options with defaults
821
+ call_metadata = @config.rpcs.export_data.metadata.to_h
822
+
823
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
824
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
825
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
826
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
827
+ transports_version_send: [:rest]
828
+
829
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
830
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
831
+
832
+ options.apply_defaults timeout: @config.rpcs.export_data.timeout,
833
+ metadata: call_metadata,
834
+ retry_policy: @config.rpcs.export_data.retry_policy
835
+
836
+ options.apply_defaults timeout: @config.timeout,
837
+ metadata: @config.metadata,
838
+ retry_policy: @config.retry_policy
839
+
840
+ @dataset_service_stub.export_data request, options do |result, operation|
841
+ result = ::Gapic::Operation.new result, @operations_client, options: options
842
+ yield result, operation if block_given?
843
+ return result
844
+ end
845
+ rescue ::Gapic::Rest::Error => e
846
+ raise ::Google::Cloud::Error.from_error(e)
847
+ end
848
+
849
+ ##
850
+ # Create a version from a Dataset.
851
+ #
852
+ # @overload create_dataset_version(request, options = nil)
853
+ # Pass arguments to `create_dataset_version` via a request object, either of type
854
+ # {::Google::Cloud::AIPlatform::V1::CreateDatasetVersionRequest} or an equivalent Hash.
855
+ #
856
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateDatasetVersionRequest, ::Hash]
857
+ # A request object representing the call parameters. Required. To specify no
858
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
859
+ # @param options [::Gapic::CallOptions, ::Hash]
860
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
861
+ #
862
+ # @overload create_dataset_version(parent: nil, dataset_version: nil)
863
+ # Pass arguments to `create_dataset_version` via keyword arguments. Note that at
864
+ # least one keyword argument is required. To specify no parameters, or to keep all
865
+ # the default parameter values, pass an empty Hash as a request object (see above).
866
+ #
867
+ # @param parent [::String]
868
+ # Required. The name of the Dataset resource.
869
+ # Format:
870
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
871
+ # @param dataset_version [::Google::Cloud::AIPlatform::V1::DatasetVersion, ::Hash]
872
+ # Required. The version to be created. The same CMEK policies with the
873
+ # original Dataset will be applied the dataset version. So here we don't need
874
+ # to specify the EncryptionSpecType here.
875
+ # @yield [result, operation] Access the result along with the TransportOperation object
876
+ # @yieldparam result [::Gapic::Operation]
877
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
878
+ #
879
+ # @return [::Gapic::Operation]
880
+ #
881
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
882
+ #
883
+ # @example Basic example
884
+ # require "google/cloud/ai_platform/v1"
885
+ #
886
+ # # Create a client object. The client can be reused for multiple calls.
887
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
888
+ #
889
+ # # Create a request. To set request fields, pass in keyword arguments.
890
+ # request = Google::Cloud::AIPlatform::V1::CreateDatasetVersionRequest.new
891
+ #
892
+ # # Call the create_dataset_version method.
893
+ # result = client.create_dataset_version request
894
+ #
895
+ # # The returned object is of type Gapic::Operation. You can use it to
896
+ # # check the status of an operation, cancel it, or wait for results.
897
+ # # Here is how to wait for a response.
898
+ # result.wait_until_done! timeout: 60
899
+ # if result.response?
900
+ # p result.response
901
+ # else
902
+ # puts "No response received."
903
+ # end
904
+ #
905
+ def create_dataset_version request, options = nil
906
+ raise ::ArgumentError, "request must be provided" if request.nil?
907
+
908
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateDatasetVersionRequest
909
+
910
+ # Converts hash and nil to an options object
911
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
912
+
913
+ # Customize the options with defaults
914
+ call_metadata = @config.rpcs.create_dataset_version.metadata.to_h
915
+
916
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
917
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
918
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
919
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
920
+ transports_version_send: [:rest]
921
+
922
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
923
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
924
+
925
+ options.apply_defaults timeout: @config.rpcs.create_dataset_version.timeout,
926
+ metadata: call_metadata,
927
+ retry_policy: @config.rpcs.create_dataset_version.retry_policy
928
+
929
+ options.apply_defaults timeout: @config.timeout,
930
+ metadata: @config.metadata,
931
+ retry_policy: @config.retry_policy
932
+
933
+ @dataset_service_stub.create_dataset_version request, options do |result, operation|
934
+ result = ::Gapic::Operation.new result, @operations_client, options: options
935
+ yield result, operation if block_given?
936
+ return result
937
+ end
938
+ rescue ::Gapic::Rest::Error => e
939
+ raise ::Google::Cloud::Error.from_error(e)
940
+ end
941
+
942
+ ##
943
+ # Deletes a Dataset version.
944
+ #
945
+ # @overload delete_dataset_version(request, options = nil)
946
+ # Pass arguments to `delete_dataset_version` via a request object, either of type
947
+ # {::Google::Cloud::AIPlatform::V1::DeleteDatasetVersionRequest} or an equivalent Hash.
948
+ #
949
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteDatasetVersionRequest, ::Hash]
950
+ # A request object representing the call parameters. Required. To specify no
951
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
952
+ # @param options [::Gapic::CallOptions, ::Hash]
953
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
954
+ #
955
+ # @overload delete_dataset_version(name: nil)
956
+ # Pass arguments to `delete_dataset_version` via keyword arguments. Note that at
957
+ # least one keyword argument is required. To specify no parameters, or to keep all
958
+ # the default parameter values, pass an empty Hash as a request object (see above).
959
+ #
960
+ # @param name [::String]
961
+ # Required. The resource name of the Dataset version to delete.
962
+ # Format:
963
+ # `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
964
+ # @yield [result, operation] Access the result along with the TransportOperation object
965
+ # @yieldparam result [::Gapic::Operation]
966
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
967
+ #
968
+ # @return [::Gapic::Operation]
969
+ #
970
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
971
+ #
972
+ # @example Basic example
973
+ # require "google/cloud/ai_platform/v1"
974
+ #
975
+ # # Create a client object. The client can be reused for multiple calls.
976
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
977
+ #
978
+ # # Create a request. To set request fields, pass in keyword arguments.
979
+ # request = Google::Cloud::AIPlatform::V1::DeleteDatasetVersionRequest.new
980
+ #
981
+ # # Call the delete_dataset_version method.
982
+ # result = client.delete_dataset_version request
983
+ #
984
+ # # The returned object is of type Gapic::Operation. You can use it to
985
+ # # check the status of an operation, cancel it, or wait for results.
986
+ # # Here is how to wait for a response.
987
+ # result.wait_until_done! timeout: 60
988
+ # if result.response?
989
+ # p result.response
990
+ # else
991
+ # puts "No response received."
992
+ # end
993
+ #
994
+ def delete_dataset_version request, options = nil
995
+ raise ::ArgumentError, "request must be provided" if request.nil?
996
+
997
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteDatasetVersionRequest
998
+
999
+ # Converts hash and nil to an options object
1000
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1001
+
1002
+ # Customize the options with defaults
1003
+ call_metadata = @config.rpcs.delete_dataset_version.metadata.to_h
1004
+
1005
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1006
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1007
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1008
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1009
+ transports_version_send: [:rest]
1010
+
1011
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1012
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1013
+
1014
+ options.apply_defaults timeout: @config.rpcs.delete_dataset_version.timeout,
1015
+ metadata: call_metadata,
1016
+ retry_policy: @config.rpcs.delete_dataset_version.retry_policy
1017
+
1018
+ options.apply_defaults timeout: @config.timeout,
1019
+ metadata: @config.metadata,
1020
+ retry_policy: @config.retry_policy
1021
+
1022
+ @dataset_service_stub.delete_dataset_version request, options do |result, operation|
1023
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1024
+ yield result, operation if block_given?
1025
+ return result
1026
+ end
1027
+ rescue ::Gapic::Rest::Error => e
1028
+ raise ::Google::Cloud::Error.from_error(e)
1029
+ end
1030
+
1031
+ ##
1032
+ # Gets a Dataset version.
1033
+ #
1034
+ # @overload get_dataset_version(request, options = nil)
1035
+ # Pass arguments to `get_dataset_version` via a request object, either of type
1036
+ # {::Google::Cloud::AIPlatform::V1::GetDatasetVersionRequest} or an equivalent Hash.
1037
+ #
1038
+ # @param request [::Google::Cloud::AIPlatform::V1::GetDatasetVersionRequest, ::Hash]
1039
+ # A request object representing the call parameters. Required. To specify no
1040
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1041
+ # @param options [::Gapic::CallOptions, ::Hash]
1042
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1043
+ #
1044
+ # @overload get_dataset_version(name: nil, read_mask: nil)
1045
+ # Pass arguments to `get_dataset_version` via keyword arguments. Note that at
1046
+ # least one keyword argument is required. To specify no parameters, or to keep all
1047
+ # the default parameter values, pass an empty Hash as a request object (see above).
1048
+ #
1049
+ # @param name [::String]
1050
+ # Required. The resource name of the Dataset version to delete.
1051
+ # Format:
1052
+ # `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
1053
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1054
+ # Mask specifying which fields to read.
1055
+ # @yield [result, operation] Access the result along with the TransportOperation object
1056
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::DatasetVersion]
1057
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1058
+ #
1059
+ # @return [::Google::Cloud::AIPlatform::V1::DatasetVersion]
1060
+ #
1061
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1062
+ #
1063
+ # @example Basic example
1064
+ # require "google/cloud/ai_platform/v1"
1065
+ #
1066
+ # # Create a client object. The client can be reused for multiple calls.
1067
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1068
+ #
1069
+ # # Create a request. To set request fields, pass in keyword arguments.
1070
+ # request = Google::Cloud::AIPlatform::V1::GetDatasetVersionRequest.new
1071
+ #
1072
+ # # Call the get_dataset_version method.
1073
+ # result = client.get_dataset_version request
1074
+ #
1075
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::DatasetVersion.
1076
+ # p result
1077
+ #
1078
+ def get_dataset_version request, options = nil
1079
+ raise ::ArgumentError, "request must be provided" if request.nil?
1080
+
1081
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetDatasetVersionRequest
1082
+
1083
+ # Converts hash and nil to an options object
1084
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1085
+
1086
+ # Customize the options with defaults
1087
+ call_metadata = @config.rpcs.get_dataset_version.metadata.to_h
1088
+
1089
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1090
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1091
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1092
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1093
+ transports_version_send: [:rest]
1094
+
1095
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1096
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1097
+
1098
+ options.apply_defaults timeout: @config.rpcs.get_dataset_version.timeout,
1099
+ metadata: call_metadata,
1100
+ retry_policy: @config.rpcs.get_dataset_version.retry_policy
1101
+
1102
+ options.apply_defaults timeout: @config.timeout,
1103
+ metadata: @config.metadata,
1104
+ retry_policy: @config.retry_policy
1105
+
1106
+ @dataset_service_stub.get_dataset_version request, options do |result, operation|
1107
+ yield result, operation if block_given?
1108
+ return result
1109
+ end
1110
+ rescue ::Gapic::Rest::Error => e
1111
+ raise ::Google::Cloud::Error.from_error(e)
1112
+ end
1113
+
1114
+ ##
1115
+ # Lists DatasetVersions in a Dataset.
1116
+ #
1117
+ # @overload list_dataset_versions(request, options = nil)
1118
+ # Pass arguments to `list_dataset_versions` via a request object, either of type
1119
+ # {::Google::Cloud::AIPlatform::V1::ListDatasetVersionsRequest} or an equivalent Hash.
1120
+ #
1121
+ # @param request [::Google::Cloud::AIPlatform::V1::ListDatasetVersionsRequest, ::Hash]
1122
+ # A request object representing the call parameters. Required. To specify no
1123
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1124
+ # @param options [::Gapic::CallOptions, ::Hash]
1125
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1126
+ #
1127
+ # @overload list_dataset_versions(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
1128
+ # Pass arguments to `list_dataset_versions` via keyword arguments. Note that at
1129
+ # least one keyword argument is required. To specify no parameters, or to keep all
1130
+ # the default parameter values, pass an empty Hash as a request object (see above).
1131
+ #
1132
+ # @param parent [::String]
1133
+ # Required. The resource name of the Dataset to list DatasetVersions from.
1134
+ # Format:
1135
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
1136
+ # @param filter [::String]
1137
+ # Optional. The standard list filter.
1138
+ # @param page_size [::Integer]
1139
+ # Optional. The standard list page size.
1140
+ # @param page_token [::String]
1141
+ # Optional. The standard list page token.
1142
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1143
+ # Optional. Mask specifying which fields to read.
1144
+ # @param order_by [::String]
1145
+ # Optional. A comma-separated list of fields to order by, sorted in ascending
1146
+ # order. Use "desc" after a field name for descending.
1147
+ # @yield [result, operation] Access the result along with the TransportOperation object
1148
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DatasetVersion>]
1149
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1150
+ #
1151
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DatasetVersion>]
1152
+ #
1153
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1154
+ #
1155
+ # @example Basic example
1156
+ # require "google/cloud/ai_platform/v1"
1157
+ #
1158
+ # # Create a client object. The client can be reused for multiple calls.
1159
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1160
+ #
1161
+ # # Create a request. To set request fields, pass in keyword arguments.
1162
+ # request = Google::Cloud::AIPlatform::V1::ListDatasetVersionsRequest.new
1163
+ #
1164
+ # # Call the list_dataset_versions method.
1165
+ # result = client.list_dataset_versions request
1166
+ #
1167
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1168
+ # # over elements, and API calls will be issued to fetch pages as needed.
1169
+ # result.each do |item|
1170
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::DatasetVersion.
1171
+ # p item
1172
+ # end
1173
+ #
1174
+ def list_dataset_versions request, options = nil
1175
+ raise ::ArgumentError, "request must be provided" if request.nil?
1176
+
1177
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDatasetVersionsRequest
1178
+
1179
+ # Converts hash and nil to an options object
1180
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1181
+
1182
+ # Customize the options with defaults
1183
+ call_metadata = @config.rpcs.list_dataset_versions.metadata.to_h
1184
+
1185
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1186
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1187
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1188
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1189
+ transports_version_send: [:rest]
1190
+
1191
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1192
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1193
+
1194
+ options.apply_defaults timeout: @config.rpcs.list_dataset_versions.timeout,
1195
+ metadata: call_metadata,
1196
+ retry_policy: @config.rpcs.list_dataset_versions.retry_policy
1197
+
1198
+ options.apply_defaults timeout: @config.timeout,
1199
+ metadata: @config.metadata,
1200
+ retry_policy: @config.retry_policy
1201
+
1202
+ @dataset_service_stub.list_dataset_versions request, options do |result, operation|
1203
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_dataset_versions, "dataset_versions", request, result, options
1204
+ yield result, operation if block_given?
1205
+ return result
1206
+ end
1207
+ rescue ::Gapic::Rest::Error => e
1208
+ raise ::Google::Cloud::Error.from_error(e)
1209
+ end
1210
+
1211
+ ##
1212
+ # Restores a dataset version.
1213
+ #
1214
+ # @overload restore_dataset_version(request, options = nil)
1215
+ # Pass arguments to `restore_dataset_version` via a request object, either of type
1216
+ # {::Google::Cloud::AIPlatform::V1::RestoreDatasetVersionRequest} or an equivalent Hash.
1217
+ #
1218
+ # @param request [::Google::Cloud::AIPlatform::V1::RestoreDatasetVersionRequest, ::Hash]
1219
+ # A request object representing the call parameters. Required. To specify no
1220
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1221
+ # @param options [::Gapic::CallOptions, ::Hash]
1222
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1223
+ #
1224
+ # @overload restore_dataset_version(name: nil)
1225
+ # Pass arguments to `restore_dataset_version` via keyword arguments. Note that at
1226
+ # least one keyword argument is required. To specify no parameters, or to keep all
1227
+ # the default parameter values, pass an empty Hash as a request object (see above).
1228
+ #
1229
+ # @param name [::String]
1230
+ # Required. The name of the DatasetVersion resource.
1231
+ # Format:
1232
+ # `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
1233
+ # @yield [result, operation] Access the result along with the TransportOperation object
1234
+ # @yieldparam result [::Gapic::Operation]
1235
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1236
+ #
1237
+ # @return [::Gapic::Operation]
1238
+ #
1239
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1240
+ #
1241
+ # @example Basic example
1242
+ # require "google/cloud/ai_platform/v1"
1243
+ #
1244
+ # # Create a client object. The client can be reused for multiple calls.
1245
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1246
+ #
1247
+ # # Create a request. To set request fields, pass in keyword arguments.
1248
+ # request = Google::Cloud::AIPlatform::V1::RestoreDatasetVersionRequest.new
1249
+ #
1250
+ # # Call the restore_dataset_version method.
1251
+ # result = client.restore_dataset_version request
1252
+ #
1253
+ # # The returned object is of type Gapic::Operation. You can use it to
1254
+ # # check the status of an operation, cancel it, or wait for results.
1255
+ # # Here is how to wait for a response.
1256
+ # result.wait_until_done! timeout: 60
1257
+ # if result.response?
1258
+ # p result.response
1259
+ # else
1260
+ # puts "No response received."
1261
+ # end
1262
+ #
1263
+ def restore_dataset_version request, options = nil
1264
+ raise ::ArgumentError, "request must be provided" if request.nil?
1265
+
1266
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::RestoreDatasetVersionRequest
1267
+
1268
+ # Converts hash and nil to an options object
1269
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1270
+
1271
+ # Customize the options with defaults
1272
+ call_metadata = @config.rpcs.restore_dataset_version.metadata.to_h
1273
+
1274
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1275
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1276
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1277
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1278
+ transports_version_send: [:rest]
1279
+
1280
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1281
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1282
+
1283
+ options.apply_defaults timeout: @config.rpcs.restore_dataset_version.timeout,
1284
+ metadata: call_metadata,
1285
+ retry_policy: @config.rpcs.restore_dataset_version.retry_policy
1286
+
1287
+ options.apply_defaults timeout: @config.timeout,
1288
+ metadata: @config.metadata,
1289
+ retry_policy: @config.retry_policy
1290
+
1291
+ @dataset_service_stub.restore_dataset_version request, options do |result, operation|
1292
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1293
+ yield result, operation if block_given?
1294
+ return result
1295
+ end
1296
+ rescue ::Gapic::Rest::Error => e
1297
+ raise ::Google::Cloud::Error.from_error(e)
1298
+ end
1299
+
1300
+ ##
1301
+ # Lists DataItems in a Dataset.
1302
+ #
1303
+ # @overload list_data_items(request, options = nil)
1304
+ # Pass arguments to `list_data_items` via a request object, either of type
1305
+ # {::Google::Cloud::AIPlatform::V1::ListDataItemsRequest} or an equivalent Hash.
1306
+ #
1307
+ # @param request [::Google::Cloud::AIPlatform::V1::ListDataItemsRequest, ::Hash]
1308
+ # A request object representing the call parameters. Required. To specify no
1309
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1310
+ # @param options [::Gapic::CallOptions, ::Hash]
1311
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1312
+ #
1313
+ # @overload list_data_items(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
1314
+ # Pass arguments to `list_data_items` via keyword arguments. Note that at
1315
+ # least one keyword argument is required. To specify no parameters, or to keep all
1316
+ # the default parameter values, pass an empty Hash as a request object (see above).
1317
+ #
1318
+ # @param parent [::String]
1319
+ # Required. The resource name of the Dataset to list DataItems from.
1320
+ # Format:
1321
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
1322
+ # @param filter [::String]
1323
+ # The standard list filter.
1324
+ # @param page_size [::Integer]
1325
+ # The standard list page size.
1326
+ # @param page_token [::String]
1327
+ # The standard list page token.
1328
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1329
+ # Mask specifying which fields to read.
1330
+ # @param order_by [::String]
1331
+ # A comma-separated list of fields to order by, sorted in ascending order.
1332
+ # Use "desc" after a field name for descending.
1333
+ # @yield [result, operation] Access the result along with the TransportOperation object
1334
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItem>]
1335
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1336
+ #
1337
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItem>]
1338
+ #
1339
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1340
+ #
1341
+ # @example Basic example
1342
+ # require "google/cloud/ai_platform/v1"
1343
+ #
1344
+ # # Create a client object. The client can be reused for multiple calls.
1345
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1346
+ #
1347
+ # # Create a request. To set request fields, pass in keyword arguments.
1348
+ # request = Google::Cloud::AIPlatform::V1::ListDataItemsRequest.new
1349
+ #
1350
+ # # Call the list_data_items method.
1351
+ # result = client.list_data_items request
1352
+ #
1353
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1354
+ # # over elements, and API calls will be issued to fetch pages as needed.
1355
+ # result.each do |item|
1356
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::DataItem.
1357
+ # p item
1358
+ # end
1359
+ #
1360
+ def list_data_items request, options = nil
1361
+ raise ::ArgumentError, "request must be provided" if request.nil?
1362
+
1363
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDataItemsRequest
1364
+
1365
+ # Converts hash and nil to an options object
1366
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1367
+
1368
+ # Customize the options with defaults
1369
+ call_metadata = @config.rpcs.list_data_items.metadata.to_h
1370
+
1371
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1372
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1373
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1374
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1375
+ transports_version_send: [:rest]
1376
+
1377
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1378
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1379
+
1380
+ options.apply_defaults timeout: @config.rpcs.list_data_items.timeout,
1381
+ metadata: call_metadata,
1382
+ retry_policy: @config.rpcs.list_data_items.retry_policy
1383
+
1384
+ options.apply_defaults timeout: @config.timeout,
1385
+ metadata: @config.metadata,
1386
+ retry_policy: @config.retry_policy
1387
+
1388
+ @dataset_service_stub.list_data_items request, options do |result, operation|
1389
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_data_items, "data_items", request, result, options
1390
+ yield result, operation if block_given?
1391
+ return result
1392
+ end
1393
+ rescue ::Gapic::Rest::Error => e
1394
+ raise ::Google::Cloud::Error.from_error(e)
1395
+ end
1396
+
1397
+ ##
1398
+ # Searches DataItems in a Dataset.
1399
+ #
1400
+ # @overload search_data_items(request, options = nil)
1401
+ # Pass arguments to `search_data_items` via a request object, either of type
1402
+ # {::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest} or an equivalent Hash.
1403
+ #
1404
+ # @param request [::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest, ::Hash]
1405
+ # A request object representing the call parameters. Required. To specify no
1406
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1407
+ # @param options [::Gapic::CallOptions, ::Hash]
1408
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1409
+ #
1410
+ # @overload search_data_items(order_by_data_item: nil, order_by_annotation: nil, dataset: nil, saved_query: nil, data_labeling_job: nil, data_item_filter: nil, annotations_filter: nil, annotation_filters: nil, field_mask: nil, annotations_limit: nil, page_size: nil, order_by: nil, page_token: nil)
1411
+ # Pass arguments to `search_data_items` via keyword arguments. Note that at
1412
+ # least one keyword argument is required. To specify no parameters, or to keep all
1413
+ # the default parameter values, pass an empty Hash as a request object (see above).
1414
+ #
1415
+ # @param order_by_data_item [::String]
1416
+ # A comma-separated list of data item fields to order by, sorted in
1417
+ # ascending order. Use "desc" after a field name for descending.
1418
+ # @param order_by_annotation [::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest::OrderByAnnotation, ::Hash]
1419
+ # Expression that allows ranking results based on annotation's property.
1420
+ # @param dataset [::String]
1421
+ # Required. The resource name of the Dataset from which to search DataItems.
1422
+ # Format:
1423
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
1424
+ # @param saved_query [::String]
1425
+ # The resource name of a SavedQuery(annotation set in UI).
1426
+ # Format:
1427
+ # `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
1428
+ # All of the search will be done in the context of this SavedQuery.
1429
+ # @param data_labeling_job [::String]
1430
+ # The resource name of a DataLabelingJob.
1431
+ # Format:
1432
+ # `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
1433
+ # If this field is set, all of the search will be done in the context of
1434
+ # this DataLabelingJob.
1435
+ # @param data_item_filter [::String]
1436
+ # An expression for filtering the DataItem that will be returned.
1437
+ #
1438
+ # * `data_item_id` - for = or !=.
1439
+ # * `labeled` - for = or !=.
1440
+ # * `has_annotation(ANNOTATION_SPEC_ID)` - true only for DataItem that
1441
+ # have at least one annotation with annotation_spec_id =
1442
+ # `ANNOTATION_SPEC_ID` in the context of SavedQuery or DataLabelingJob.
1443
+ #
1444
+ # For example:
1445
+ #
1446
+ # * `data_item=1`
1447
+ # * `has_annotation(5)`
1448
+ # @param annotations_filter [::String]
1449
+ # An expression for filtering the Annotations that will be returned per
1450
+ # DataItem.
1451
+ # * `annotation_spec_id` - for = or !=.
1452
+ # @param annotation_filters [::Array<::String>]
1453
+ # An expression that specifies what Annotations will be returned per
1454
+ # DataItem. Annotations satisfied either of the conditions will be returned.
1455
+ # * `annotation_spec_id` - for = or !=.
1456
+ # Must specify `saved_query_id=` - saved query id that annotations should
1457
+ # belong to.
1458
+ # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
1459
+ # Mask specifying which fields of
1460
+ # {::Google::Cloud::AIPlatform::V1::DataItemView DataItemView} to read.
1461
+ # @param annotations_limit [::Integer]
1462
+ # If set, only up to this many of Annotations will be returned per
1463
+ # DataItemView. The maximum value is 1000. If not set, the maximum value will
1464
+ # be used.
1465
+ # @param page_size [::Integer]
1466
+ # Requested page size. Server may return fewer results than requested.
1467
+ # Default and maximum page size is 100.
1468
+ # @param order_by [::String]
1469
+ # A comma-separated list of fields to order by, sorted in ascending order.
1470
+ # Use "desc" after a field name for descending.
1471
+ # @param page_token [::String]
1472
+ # A token identifying a page of results for the server to return
1473
+ # Typically obtained via
1474
+ # {::Google::Cloud::AIPlatform::V1::SearchDataItemsResponse#next_page_token SearchDataItemsResponse.next_page_token}
1475
+ # of the previous
1476
+ # {::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client#search_data_items DatasetService.SearchDataItems}
1477
+ # call.
1478
+ # @yield [result, operation] Access the result along with the TransportOperation object
1479
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>]
1480
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1481
+ #
1482
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>]
1483
+ #
1484
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1485
+ #
1486
+ # @example Basic example
1487
+ # require "google/cloud/ai_platform/v1"
1488
+ #
1489
+ # # Create a client object. The client can be reused for multiple calls.
1490
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1491
+ #
1492
+ # # Create a request. To set request fields, pass in keyword arguments.
1493
+ # request = Google::Cloud::AIPlatform::V1::SearchDataItemsRequest.new
1494
+ #
1495
+ # # Call the search_data_items method.
1496
+ # result = client.search_data_items request
1497
+ #
1498
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1499
+ # # over elements, and API calls will be issued to fetch pages as needed.
1500
+ # result.each do |item|
1501
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::DataItemView.
1502
+ # p item
1503
+ # end
1504
+ #
1505
+ def search_data_items request, options = nil
1506
+ raise ::ArgumentError, "request must be provided" if request.nil?
1507
+
1508
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest
1509
+
1510
+ # Converts hash and nil to an options object
1511
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1512
+
1513
+ # Customize the options with defaults
1514
+ call_metadata = @config.rpcs.search_data_items.metadata.to_h
1515
+
1516
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1517
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1518
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1519
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1520
+ transports_version_send: [:rest]
1521
+
1522
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1523
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1524
+
1525
+ options.apply_defaults timeout: @config.rpcs.search_data_items.timeout,
1526
+ metadata: call_metadata,
1527
+ retry_policy: @config.rpcs.search_data_items.retry_policy
1528
+
1529
+ options.apply_defaults timeout: @config.timeout,
1530
+ metadata: @config.metadata,
1531
+ retry_policy: @config.retry_policy
1532
+
1533
+ @dataset_service_stub.search_data_items request, options do |result, operation|
1534
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :search_data_items, "data_item_views", request, result, options
1535
+ yield result, operation if block_given?
1536
+ return result
1537
+ end
1538
+ rescue ::Gapic::Rest::Error => e
1539
+ raise ::Google::Cloud::Error.from_error(e)
1540
+ end
1541
+
1542
+ ##
1543
+ # Lists SavedQueries in a Dataset.
1544
+ #
1545
+ # @overload list_saved_queries(request, options = nil)
1546
+ # Pass arguments to `list_saved_queries` via a request object, either of type
1547
+ # {::Google::Cloud::AIPlatform::V1::ListSavedQueriesRequest} or an equivalent Hash.
1548
+ #
1549
+ # @param request [::Google::Cloud::AIPlatform::V1::ListSavedQueriesRequest, ::Hash]
1550
+ # A request object representing the call parameters. Required. To specify no
1551
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1552
+ # @param options [::Gapic::CallOptions, ::Hash]
1553
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1554
+ #
1555
+ # @overload list_saved_queries(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
1556
+ # Pass arguments to `list_saved_queries` via keyword arguments. Note that at
1557
+ # least one keyword argument is required. To specify no parameters, or to keep all
1558
+ # the default parameter values, pass an empty Hash as a request object (see above).
1559
+ #
1560
+ # @param parent [::String]
1561
+ # Required. The resource name of the Dataset to list SavedQueries from.
1562
+ # Format:
1563
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
1564
+ # @param filter [::String]
1565
+ # The standard list filter.
1566
+ # @param page_size [::Integer]
1567
+ # The standard list page size.
1568
+ # @param page_token [::String]
1569
+ # The standard list page token.
1570
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1571
+ # Mask specifying which fields to read.
1572
+ # @param order_by [::String]
1573
+ # A comma-separated list of fields to order by, sorted in ascending order.
1574
+ # Use "desc" after a field name for descending.
1575
+ # @yield [result, operation] Access the result along with the TransportOperation object
1576
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SavedQuery>]
1577
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1578
+ #
1579
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SavedQuery>]
1580
+ #
1581
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1582
+ #
1583
+ # @example Basic example
1584
+ # require "google/cloud/ai_platform/v1"
1585
+ #
1586
+ # # Create a client object. The client can be reused for multiple calls.
1587
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1588
+ #
1589
+ # # Create a request. To set request fields, pass in keyword arguments.
1590
+ # request = Google::Cloud::AIPlatform::V1::ListSavedQueriesRequest.new
1591
+ #
1592
+ # # Call the list_saved_queries method.
1593
+ # result = client.list_saved_queries request
1594
+ #
1595
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1596
+ # # over elements, and API calls will be issued to fetch pages as needed.
1597
+ # result.each do |item|
1598
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::SavedQuery.
1599
+ # p item
1600
+ # end
1601
+ #
1602
+ def list_saved_queries request, options = nil
1603
+ raise ::ArgumentError, "request must be provided" if request.nil?
1604
+
1605
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListSavedQueriesRequest
1606
+
1607
+ # Converts hash and nil to an options object
1608
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1609
+
1610
+ # Customize the options with defaults
1611
+ call_metadata = @config.rpcs.list_saved_queries.metadata.to_h
1612
+
1613
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1614
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1615
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1616
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1617
+ transports_version_send: [:rest]
1618
+
1619
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1620
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1621
+
1622
+ options.apply_defaults timeout: @config.rpcs.list_saved_queries.timeout,
1623
+ metadata: call_metadata,
1624
+ retry_policy: @config.rpcs.list_saved_queries.retry_policy
1625
+
1626
+ options.apply_defaults timeout: @config.timeout,
1627
+ metadata: @config.metadata,
1628
+ retry_policy: @config.retry_policy
1629
+
1630
+ @dataset_service_stub.list_saved_queries request, options do |result, operation|
1631
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_saved_queries, "saved_queries", request, result, options
1632
+ yield result, operation if block_given?
1633
+ return result
1634
+ end
1635
+ rescue ::Gapic::Rest::Error => e
1636
+ raise ::Google::Cloud::Error.from_error(e)
1637
+ end
1638
+
1639
+ ##
1640
+ # Deletes a SavedQuery.
1641
+ #
1642
+ # @overload delete_saved_query(request, options = nil)
1643
+ # Pass arguments to `delete_saved_query` via a request object, either of type
1644
+ # {::Google::Cloud::AIPlatform::V1::DeleteSavedQueryRequest} or an equivalent Hash.
1645
+ #
1646
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteSavedQueryRequest, ::Hash]
1647
+ # A request object representing the call parameters. Required. To specify no
1648
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1649
+ # @param options [::Gapic::CallOptions, ::Hash]
1650
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1651
+ #
1652
+ # @overload delete_saved_query(name: nil)
1653
+ # Pass arguments to `delete_saved_query` via keyword arguments. Note that at
1654
+ # least one keyword argument is required. To specify no parameters, or to keep all
1655
+ # the default parameter values, pass an empty Hash as a request object (see above).
1656
+ #
1657
+ # @param name [::String]
1658
+ # Required. The resource name of the SavedQuery to delete.
1659
+ # Format:
1660
+ # `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
1661
+ # @yield [result, operation] Access the result along with the TransportOperation object
1662
+ # @yieldparam result [::Gapic::Operation]
1663
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1664
+ #
1665
+ # @return [::Gapic::Operation]
1666
+ #
1667
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1668
+ #
1669
+ # @example Basic example
1670
+ # require "google/cloud/ai_platform/v1"
1671
+ #
1672
+ # # Create a client object. The client can be reused for multiple calls.
1673
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1674
+ #
1675
+ # # Create a request. To set request fields, pass in keyword arguments.
1676
+ # request = Google::Cloud::AIPlatform::V1::DeleteSavedQueryRequest.new
1677
+ #
1678
+ # # Call the delete_saved_query method.
1679
+ # result = client.delete_saved_query request
1680
+ #
1681
+ # # The returned object is of type Gapic::Operation. You can use it to
1682
+ # # check the status of an operation, cancel it, or wait for results.
1683
+ # # Here is how to wait for a response.
1684
+ # result.wait_until_done! timeout: 60
1685
+ # if result.response?
1686
+ # p result.response
1687
+ # else
1688
+ # puts "No response received."
1689
+ # end
1690
+ #
1691
+ def delete_saved_query request, options = nil
1692
+ raise ::ArgumentError, "request must be provided" if request.nil?
1693
+
1694
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteSavedQueryRequest
1695
+
1696
+ # Converts hash and nil to an options object
1697
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1698
+
1699
+ # Customize the options with defaults
1700
+ call_metadata = @config.rpcs.delete_saved_query.metadata.to_h
1701
+
1702
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1703
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1704
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1705
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1706
+ transports_version_send: [:rest]
1707
+
1708
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1709
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1710
+
1711
+ options.apply_defaults timeout: @config.rpcs.delete_saved_query.timeout,
1712
+ metadata: call_metadata,
1713
+ retry_policy: @config.rpcs.delete_saved_query.retry_policy
1714
+
1715
+ options.apply_defaults timeout: @config.timeout,
1716
+ metadata: @config.metadata,
1717
+ retry_policy: @config.retry_policy
1718
+
1719
+ @dataset_service_stub.delete_saved_query request, options do |result, operation|
1720
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1721
+ yield result, operation if block_given?
1722
+ return result
1723
+ end
1724
+ rescue ::Gapic::Rest::Error => e
1725
+ raise ::Google::Cloud::Error.from_error(e)
1726
+ end
1727
+
1728
+ ##
1729
+ # Gets an AnnotationSpec.
1730
+ #
1731
+ # @overload get_annotation_spec(request, options = nil)
1732
+ # Pass arguments to `get_annotation_spec` via a request object, either of type
1733
+ # {::Google::Cloud::AIPlatform::V1::GetAnnotationSpecRequest} or an equivalent Hash.
1734
+ #
1735
+ # @param request [::Google::Cloud::AIPlatform::V1::GetAnnotationSpecRequest, ::Hash]
1736
+ # A request object representing the call parameters. Required. To specify no
1737
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1738
+ # @param options [::Gapic::CallOptions, ::Hash]
1739
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1740
+ #
1741
+ # @overload get_annotation_spec(name: nil, read_mask: nil)
1742
+ # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at
1743
+ # least one keyword argument is required. To specify no parameters, or to keep all
1744
+ # the default parameter values, pass an empty Hash as a request object (see above).
1745
+ #
1746
+ # @param name [::String]
1747
+ # Required. The name of the AnnotationSpec resource.
1748
+ # Format:
1749
+ # `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
1750
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1751
+ # Mask specifying which fields to read.
1752
+ # @yield [result, operation] Access the result along with the TransportOperation object
1753
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::AnnotationSpec]
1754
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1755
+ #
1756
+ # @return [::Google::Cloud::AIPlatform::V1::AnnotationSpec]
1757
+ #
1758
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1759
+ #
1760
+ # @example Basic example
1761
+ # require "google/cloud/ai_platform/v1"
1762
+ #
1763
+ # # Create a client object. The client can be reused for multiple calls.
1764
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1765
+ #
1766
+ # # Create a request. To set request fields, pass in keyword arguments.
1767
+ # request = Google::Cloud::AIPlatform::V1::GetAnnotationSpecRequest.new
1768
+ #
1769
+ # # Call the get_annotation_spec method.
1770
+ # result = client.get_annotation_spec request
1771
+ #
1772
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::AnnotationSpec.
1773
+ # p result
1774
+ #
1775
+ def get_annotation_spec request, options = nil
1776
+ raise ::ArgumentError, "request must be provided" if request.nil?
1777
+
1778
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetAnnotationSpecRequest
1779
+
1780
+ # Converts hash and nil to an options object
1781
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1782
+
1783
+ # Customize the options with defaults
1784
+ call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h
1785
+
1786
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1787
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1788
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1789
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1790
+ transports_version_send: [:rest]
1791
+
1792
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1793
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1794
+
1795
+ options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout,
1796
+ metadata: call_metadata,
1797
+ retry_policy: @config.rpcs.get_annotation_spec.retry_policy
1798
+
1799
+ options.apply_defaults timeout: @config.timeout,
1800
+ metadata: @config.metadata,
1801
+ retry_policy: @config.retry_policy
1802
+
1803
+ @dataset_service_stub.get_annotation_spec request, options do |result, operation|
1804
+ yield result, operation if block_given?
1805
+ return result
1806
+ end
1807
+ rescue ::Gapic::Rest::Error => e
1808
+ raise ::Google::Cloud::Error.from_error(e)
1809
+ end
1810
+
1811
+ ##
1812
+ # Lists Annotations belongs to a dataitem
1813
+ #
1814
+ # @overload list_annotations(request, options = nil)
1815
+ # Pass arguments to `list_annotations` via a request object, either of type
1816
+ # {::Google::Cloud::AIPlatform::V1::ListAnnotationsRequest} or an equivalent Hash.
1817
+ #
1818
+ # @param request [::Google::Cloud::AIPlatform::V1::ListAnnotationsRequest, ::Hash]
1819
+ # A request object representing the call parameters. Required. To specify no
1820
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1821
+ # @param options [::Gapic::CallOptions, ::Hash]
1822
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1823
+ #
1824
+ # @overload list_annotations(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
1825
+ # Pass arguments to `list_annotations` via keyword arguments. Note that at
1826
+ # least one keyword argument is required. To specify no parameters, or to keep all
1827
+ # the default parameter values, pass an empty Hash as a request object (see above).
1828
+ #
1829
+ # @param parent [::String]
1830
+ # Required. The resource name of the DataItem to list Annotations from.
1831
+ # Format:
1832
+ # `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
1833
+ # @param filter [::String]
1834
+ # The standard list filter.
1835
+ # @param page_size [::Integer]
1836
+ # The standard list page size.
1837
+ # @param page_token [::String]
1838
+ # The standard list page token.
1839
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1840
+ # Mask specifying which fields to read.
1841
+ # @param order_by [::String]
1842
+ # A comma-separated list of fields to order by, sorted in ascending order.
1843
+ # Use "desc" after a field name for descending.
1844
+ # @yield [result, operation] Access the result along with the TransportOperation object
1845
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Annotation>]
1846
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1847
+ #
1848
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Annotation>]
1849
+ #
1850
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1851
+ #
1852
+ # @example Basic example
1853
+ # require "google/cloud/ai_platform/v1"
1854
+ #
1855
+ # # Create a client object. The client can be reused for multiple calls.
1856
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1857
+ #
1858
+ # # Create a request. To set request fields, pass in keyword arguments.
1859
+ # request = Google::Cloud::AIPlatform::V1::ListAnnotationsRequest.new
1860
+ #
1861
+ # # Call the list_annotations method.
1862
+ # result = client.list_annotations request
1863
+ #
1864
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1865
+ # # over elements, and API calls will be issued to fetch pages as needed.
1866
+ # result.each do |item|
1867
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Annotation.
1868
+ # p item
1869
+ # end
1870
+ #
1871
+ def list_annotations request, options = nil
1872
+ raise ::ArgumentError, "request must be provided" if request.nil?
1873
+
1874
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListAnnotationsRequest
1875
+
1876
+ # Converts hash and nil to an options object
1877
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1878
+
1879
+ # Customize the options with defaults
1880
+ call_metadata = @config.rpcs.list_annotations.metadata.to_h
1881
+
1882
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1883
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1884
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1885
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1886
+ transports_version_send: [:rest]
1887
+
1888
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1889
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1890
+
1891
+ options.apply_defaults timeout: @config.rpcs.list_annotations.timeout,
1892
+ metadata: call_metadata,
1893
+ retry_policy: @config.rpcs.list_annotations.retry_policy
1894
+
1895
+ options.apply_defaults timeout: @config.timeout,
1896
+ metadata: @config.metadata,
1897
+ retry_policy: @config.retry_policy
1898
+
1899
+ @dataset_service_stub.list_annotations request, options do |result, operation|
1900
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_annotations, "annotations", request, result, options
1901
+ yield result, operation if block_given?
1902
+ return result
1903
+ end
1904
+ rescue ::Gapic::Rest::Error => e
1905
+ raise ::Google::Cloud::Error.from_error(e)
1906
+ end
1907
+
1908
+ ##
1909
+ # Configuration class for the DatasetService REST API.
1910
+ #
1911
+ # This class represents the configuration for DatasetService REST,
1912
+ # providing control over timeouts, retry behavior, logging, transport
1913
+ # parameters, and other low-level controls. Certain parameters can also be
1914
+ # applied individually to specific RPCs. See
1915
+ # {::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client::Configuration::Rpcs}
1916
+ # for a list of RPCs that can be configured independently.
1917
+ #
1918
+ # Configuration can be applied globally to all clients, or to a single client
1919
+ # on construction.
1920
+ #
1921
+ # @example
1922
+ #
1923
+ # # Modify the global config, setting the timeout for
1924
+ # # create_dataset to 20 seconds,
1925
+ # # and all remaining timeouts to 10 seconds.
1926
+ # ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.configure do |config|
1927
+ # config.timeout = 10.0
1928
+ # config.rpcs.create_dataset.timeout = 20.0
1929
+ # end
1930
+ #
1931
+ # # Apply the above configuration only to a new client.
1932
+ # client = ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new do |config|
1933
+ # config.timeout = 10.0
1934
+ # config.rpcs.create_dataset.timeout = 20.0
1935
+ # end
1936
+ #
1937
+ # @!attribute [rw] endpoint
1938
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1939
+ # nil, indicating to use the default endpoint in the current universe domain.
1940
+ # @return [::String,nil]
1941
+ # @!attribute [rw] credentials
1942
+ # Credentials to send with calls. You may provide any of the following types:
1943
+ # * (`String`) The path to a service account key file in JSON format
1944
+ # * (`Hash`) A service account key as a Hash
1945
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1946
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1947
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1948
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1949
+ # * (`nil`) indicating no credentials
1950
+ # @return [::Object]
1951
+ # @!attribute [rw] scope
1952
+ # The OAuth scopes
1953
+ # @return [::Array<::String>]
1954
+ # @!attribute [rw] lib_name
1955
+ # The library name as recorded in instrumentation and logging
1956
+ # @return [::String]
1957
+ # @!attribute [rw] lib_version
1958
+ # The library version as recorded in instrumentation and logging
1959
+ # @return [::String]
1960
+ # @!attribute [rw] timeout
1961
+ # The call timeout in seconds.
1962
+ # @return [::Numeric]
1963
+ # @!attribute [rw] metadata
1964
+ # Additional headers to be sent with the call.
1965
+ # @return [::Hash{::Symbol=>::String}]
1966
+ # @!attribute [rw] retry_policy
1967
+ # The retry policy. The value is a hash with the following keys:
1968
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1969
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1970
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1971
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1972
+ # trigger a retry.
1973
+ # @return [::Hash]
1974
+ # @!attribute [rw] quota_project
1975
+ # A separate project against which to charge quota.
1976
+ # @return [::String]
1977
+ # @!attribute [rw] universe_domain
1978
+ # The universe domain within which to make requests. This determines the
1979
+ # default endpoint URL. The default value of nil uses the environment
1980
+ # universe (usually the default "googleapis.com" universe).
1981
+ # @return [::String,nil]
1982
+ #
1983
+ class Configuration
1984
+ extend ::Gapic::Config
1985
+
1986
+ # @private
1987
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1988
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
1989
+
1990
+ config_attr :endpoint, nil, ::String, nil
1991
+ config_attr :credentials, nil do |value|
1992
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1993
+ allowed.any? { |klass| klass === value }
1994
+ end
1995
+ config_attr :scope, nil, ::String, ::Array, nil
1996
+ config_attr :lib_name, nil, ::String, nil
1997
+ config_attr :lib_version, nil, ::String, nil
1998
+ config_attr :timeout, nil, ::Numeric, nil
1999
+ config_attr :metadata, nil, ::Hash, nil
2000
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2001
+ config_attr :quota_project, nil, ::String, nil
2002
+ config_attr :universe_domain, nil, ::String, nil
2003
+
2004
+ # @private
2005
+ # Overrides for http bindings for the RPCs of this service
2006
+ # are only used when this service is used as mixin, and only
2007
+ # by the host service.
2008
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2009
+ config_attr :bindings_override, {}, ::Hash, nil
2010
+
2011
+ # @private
2012
+ def initialize parent_config = nil
2013
+ @parent_config = parent_config unless parent_config.nil?
2014
+
2015
+ yield self if block_given?
2016
+ end
2017
+
2018
+ ##
2019
+ # Configurations for individual RPCs
2020
+ # @return [Rpcs]
2021
+ #
2022
+ def rpcs
2023
+ @rpcs ||= begin
2024
+ parent_rpcs = nil
2025
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2026
+ Rpcs.new parent_rpcs
2027
+ end
2028
+ end
2029
+
2030
+ ##
2031
+ # Configuration RPC class for the DatasetService API.
2032
+ #
2033
+ # Includes fields providing the configuration for each RPC in this service.
2034
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2035
+ # the following configuration fields:
2036
+ #
2037
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2038
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2039
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2040
+ # include the following keys:
2041
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2042
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2043
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2044
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2045
+ # trigger a retry.
2046
+ #
2047
+ class Rpcs
2048
+ ##
2049
+ # RPC-specific configuration for `create_dataset`
2050
+ # @return [::Gapic::Config::Method]
2051
+ #
2052
+ attr_reader :create_dataset
2053
+ ##
2054
+ # RPC-specific configuration for `get_dataset`
2055
+ # @return [::Gapic::Config::Method]
2056
+ #
2057
+ attr_reader :get_dataset
2058
+ ##
2059
+ # RPC-specific configuration for `update_dataset`
2060
+ # @return [::Gapic::Config::Method]
2061
+ #
2062
+ attr_reader :update_dataset
2063
+ ##
2064
+ # RPC-specific configuration for `list_datasets`
2065
+ # @return [::Gapic::Config::Method]
2066
+ #
2067
+ attr_reader :list_datasets
2068
+ ##
2069
+ # RPC-specific configuration for `delete_dataset`
2070
+ # @return [::Gapic::Config::Method]
2071
+ #
2072
+ attr_reader :delete_dataset
2073
+ ##
2074
+ # RPC-specific configuration for `import_data`
2075
+ # @return [::Gapic::Config::Method]
2076
+ #
2077
+ attr_reader :import_data
2078
+ ##
2079
+ # RPC-specific configuration for `export_data`
2080
+ # @return [::Gapic::Config::Method]
2081
+ #
2082
+ attr_reader :export_data
2083
+ ##
2084
+ # RPC-specific configuration for `create_dataset_version`
2085
+ # @return [::Gapic::Config::Method]
2086
+ #
2087
+ attr_reader :create_dataset_version
2088
+ ##
2089
+ # RPC-specific configuration for `delete_dataset_version`
2090
+ # @return [::Gapic::Config::Method]
2091
+ #
2092
+ attr_reader :delete_dataset_version
2093
+ ##
2094
+ # RPC-specific configuration for `get_dataset_version`
2095
+ # @return [::Gapic::Config::Method]
2096
+ #
2097
+ attr_reader :get_dataset_version
2098
+ ##
2099
+ # RPC-specific configuration for `list_dataset_versions`
2100
+ # @return [::Gapic::Config::Method]
2101
+ #
2102
+ attr_reader :list_dataset_versions
2103
+ ##
2104
+ # RPC-specific configuration for `restore_dataset_version`
2105
+ # @return [::Gapic::Config::Method]
2106
+ #
2107
+ attr_reader :restore_dataset_version
2108
+ ##
2109
+ # RPC-specific configuration for `list_data_items`
2110
+ # @return [::Gapic::Config::Method]
2111
+ #
2112
+ attr_reader :list_data_items
2113
+ ##
2114
+ # RPC-specific configuration for `search_data_items`
2115
+ # @return [::Gapic::Config::Method]
2116
+ #
2117
+ attr_reader :search_data_items
2118
+ ##
2119
+ # RPC-specific configuration for `list_saved_queries`
2120
+ # @return [::Gapic::Config::Method]
2121
+ #
2122
+ attr_reader :list_saved_queries
2123
+ ##
2124
+ # RPC-specific configuration for `delete_saved_query`
2125
+ # @return [::Gapic::Config::Method]
2126
+ #
2127
+ attr_reader :delete_saved_query
2128
+ ##
2129
+ # RPC-specific configuration for `get_annotation_spec`
2130
+ # @return [::Gapic::Config::Method]
2131
+ #
2132
+ attr_reader :get_annotation_spec
2133
+ ##
2134
+ # RPC-specific configuration for `list_annotations`
2135
+ # @return [::Gapic::Config::Method]
2136
+ #
2137
+ attr_reader :list_annotations
2138
+
2139
+ # @private
2140
+ def initialize parent_rpcs = nil
2141
+ create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset
2142
+ @create_dataset = ::Gapic::Config::Method.new create_dataset_config
2143
+ get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset
2144
+ @get_dataset = ::Gapic::Config::Method.new get_dataset_config
2145
+ update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset
2146
+ @update_dataset = ::Gapic::Config::Method.new update_dataset_config
2147
+ list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets
2148
+ @list_datasets = ::Gapic::Config::Method.new list_datasets_config
2149
+ delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset
2150
+ @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config
2151
+ import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data
2152
+ @import_data = ::Gapic::Config::Method.new import_data_config
2153
+ export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data
2154
+ @export_data = ::Gapic::Config::Method.new export_data_config
2155
+ create_dataset_version_config = parent_rpcs.create_dataset_version if parent_rpcs.respond_to? :create_dataset_version
2156
+ @create_dataset_version = ::Gapic::Config::Method.new create_dataset_version_config
2157
+ delete_dataset_version_config = parent_rpcs.delete_dataset_version if parent_rpcs.respond_to? :delete_dataset_version
2158
+ @delete_dataset_version = ::Gapic::Config::Method.new delete_dataset_version_config
2159
+ get_dataset_version_config = parent_rpcs.get_dataset_version if parent_rpcs.respond_to? :get_dataset_version
2160
+ @get_dataset_version = ::Gapic::Config::Method.new get_dataset_version_config
2161
+ list_dataset_versions_config = parent_rpcs.list_dataset_versions if parent_rpcs.respond_to? :list_dataset_versions
2162
+ @list_dataset_versions = ::Gapic::Config::Method.new list_dataset_versions_config
2163
+ restore_dataset_version_config = parent_rpcs.restore_dataset_version if parent_rpcs.respond_to? :restore_dataset_version
2164
+ @restore_dataset_version = ::Gapic::Config::Method.new restore_dataset_version_config
2165
+ list_data_items_config = parent_rpcs.list_data_items if parent_rpcs.respond_to? :list_data_items
2166
+ @list_data_items = ::Gapic::Config::Method.new list_data_items_config
2167
+ search_data_items_config = parent_rpcs.search_data_items if parent_rpcs.respond_to? :search_data_items
2168
+ @search_data_items = ::Gapic::Config::Method.new search_data_items_config
2169
+ list_saved_queries_config = parent_rpcs.list_saved_queries if parent_rpcs.respond_to? :list_saved_queries
2170
+ @list_saved_queries = ::Gapic::Config::Method.new list_saved_queries_config
2171
+ delete_saved_query_config = parent_rpcs.delete_saved_query if parent_rpcs.respond_to? :delete_saved_query
2172
+ @delete_saved_query = ::Gapic::Config::Method.new delete_saved_query_config
2173
+ get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec
2174
+ @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config
2175
+ list_annotations_config = parent_rpcs.list_annotations if parent_rpcs.respond_to? :list_annotations
2176
+ @list_annotations = ::Gapic::Config::Method.new list_annotations_config
2177
+
2178
+ yield self if block_given?
2179
+ end
2180
+ end
2181
+ end
2182
+ end
2183
+ end
2184
+ end
2185
+ end
2186
+ end
2187
+ end
2188
+ end