google-api-client 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/MIGRATING.md +22 -7
  4. data/README.md +4 -8
  5. data/api_names.yaml +1210 -37815
  6. data/generated/google/apis/acceleratedmobilepageurl_v1.rb +32 -0
  7. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +144 -0
  8. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +86 -0
  9. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +90 -0
  10. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  11. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +764 -764
  12. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +180 -180
  13. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +421 -421
  14. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +1 -0
  15. data/generated/google/apis/admin_directory_v1/classes.rb +1 -0
  16. data/generated/google/apis/admin_reports_v1.rb +1 -1
  17. data/generated/google/apis/adsense_v1_4.rb +1 -1
  18. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  19. data/generated/google/apis/analyticsreporting_v4/classes.rb +187 -187
  20. data/generated/google/apis/analyticsreporting_v4/representations.rb +42 -42
  21. data/generated/google/apis/appengine_v1.rb +40 -0
  22. data/generated/google/apis/appengine_v1/classes.rb +2251 -0
  23. data/generated/google/apis/appengine_v1/representations.rb +858 -0
  24. data/generated/google/apis/appengine_v1/service.rb +894 -0
  25. data/generated/google/apis/bigquery_v2.rb +1 -1
  26. data/generated/google/apis/bigquery_v2/classes.rb +11 -6
  27. data/generated/google/apis/books_v1.rb +1 -1
  28. data/generated/google/apis/books_v1/classes.rb +26 -0
  29. data/generated/google/apis/books_v1/representations.rb +15 -0
  30. data/generated/google/apis/books_v1/service.rb +4 -1
  31. data/generated/google/apis/calendar_v3.rb +1 -1
  32. data/generated/google/apis/classroom_v1.rb +1 -1
  33. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  34. data/generated/google/apis/cloudbuild_v1/classes.rb +638 -637
  35. data/generated/google/apis/cloudbuild_v1/representations.rb +110 -110
  36. data/generated/google/apis/cloudbuild_v1/service.rb +139 -139
  37. data/generated/google/apis/clouddebugger_v2.rb +3 -3
  38. data/generated/google/apis/clouddebugger_v2/classes.rb +131 -131
  39. data/generated/google/apis/clouddebugger_v2/representations.rb +25 -25
  40. data/generated/google/apis/clouderrorreporting_v1beta1.rb +36 -0
  41. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +590 -0
  42. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +252 -0
  43. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +350 -0
  44. data/generated/google/apis/cloudfunctions_v1.rb +35 -0
  45. data/generated/google/apis/cloudfunctions_v1/classes.rb +98 -0
  46. data/generated/google/apis/cloudfunctions_v1/representations.rb +57 -0
  47. data/generated/google/apis/cloudfunctions_v1/service.rb +89 -0
  48. data/generated/google/apis/cloudkms_v1/classes.rb +277 -270
  49. data/generated/google/apis/cloudkms_v1/representations.rb +73 -73
  50. data/generated/google/apis/cloudkms_v1/service.rb +194 -194
  51. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  52. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1147 -1144
  53. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +188 -188
  54. data/generated/google/apis/cloudresourcemanager_v1/service.rb +513 -936
  55. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  56. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +307 -916
  57. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +63 -285
  58. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +333 -681
  59. data/generated/google/apis/cloudtrace_v1/classes.rb +38 -38
  60. data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
  61. data/generated/google/apis/cloudtrace_v1/service.rb +16 -16
  62. data/generated/google/apis/compute_beta.rb +1 -1
  63. data/generated/google/apis/compute_beta/classes.rb +32 -7
  64. data/generated/google/apis/compute_beta/representations.rb +2 -0
  65. data/generated/google/apis/compute_beta/service.rb +11 -11
  66. data/generated/google/apis/compute_v1.rb +1 -1
  67. data/generated/google/apis/compute_v1/classes.rb +95 -2
  68. data/generated/google/apis/compute_v1/representations.rb +33 -0
  69. data/generated/google/apis/dataflow_v1b3/classes.rb +3333 -3333
  70. data/generated/google/apis/dataflow_v1b3/representations.rb +759 -759
  71. data/generated/google/apis/dataflow_v1b3/service.rb +154 -154
  72. data/generated/google/apis/dataproc_v1.rb +1 -1
  73. data/generated/google/apis/dataproc_v1/classes.rb +1097 -1097
  74. data/generated/google/apis/dataproc_v1/representations.rb +200 -200
  75. data/generated/google/apis/dataproc_v1/service.rb +356 -356
  76. data/generated/google/apis/datastore_v1.rb +4 -4
  77. data/generated/google/apis/datastore_v1/classes.rb +701 -690
  78. data/generated/google/apis/datastore_v1/representations.rb +160 -160
  79. data/generated/google/apis/datastore_v1/service.rb +52 -52
  80. data/generated/google/apis/deploymentmanager_v2/classes.rb +4 -0
  81. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  82. data/generated/google/apis/drive_v2.rb +1 -1
  83. data/generated/google/apis/drive_v2/classes.rb +158 -35
  84. data/generated/google/apis/drive_v2/representations.rb +39 -0
  85. data/generated/google/apis/drive_v2/service.rb +4 -4
  86. data/generated/google/apis/drive_v3.rb +1 -1
  87. data/generated/google/apis/drive_v3/classes.rb +162 -33
  88. data/generated/google/apis/drive_v3/representations.rb +39 -0
  89. data/generated/google/apis/drive_v3/service.rb +4 -4
  90. data/generated/google/apis/firebasedynamiclinks_v1.rb +35 -0
  91. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +466 -0
  92. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +222 -0
  93. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +95 -0
  94. data/generated/google/apis/firebaserules_v1.rb +41 -0
  95. data/generated/google/apis/firebaserules_v1/classes.rb +425 -0
  96. data/generated/google/apis/firebaserules_v1/representations.rb +222 -0
  97. data/generated/google/apis/firebaserules_v1/service.rb +495 -0
  98. data/generated/google/apis/games_v1/classes.rb +4 -0
  99. data/generated/google/apis/genomics_v1.rb +7 -7
  100. data/generated/google/apis/genomics_v1/classes.rb +2336 -2335
  101. data/generated/google/apis/genomics_v1/representations.rb +387 -387
  102. data/generated/google/apis/genomics_v1/service.rb +1187 -1187
  103. data/generated/google/apis/gmail_v1/classes.rb +3 -0
  104. data/generated/google/apis/iam_v1.rb +1 -1
  105. data/generated/google/apis/iam_v1/classes.rb +123 -117
  106. data/generated/google/apis/iam_v1/representations.rb +33 -33
  107. data/generated/google/apis/iam_v1/service.rb +109 -109
  108. data/generated/google/apis/identitytoolkit_v3/classes.rb +5 -0
  109. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  110. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  111. data/generated/google/apis/kgsearch_v1/service.rb +4 -4
  112. data/generated/google/apis/language_v1.rb +36 -0
  113. data/generated/google/apis/language_v1/classes.rb +757 -0
  114. data/generated/google/apis/language_v1/representations.rb +338 -0
  115. data/generated/google/apis/language_v1/service.rb +185 -0
  116. data/generated/google/apis/language_v1beta1/classes.rb +407 -407
  117. data/generated/google/apis/language_v1beta1/representations.rb +103 -103
  118. data/generated/google/apis/language_v1beta1/service.rb +45 -45
  119. data/generated/google/apis/logging_v2.rb +46 -0
  120. data/generated/google/apis/logging_v2/classes.rb +1271 -0
  121. data/generated/google/apis/logging_v2/representations.rb +421 -0
  122. data/generated/google/apis/logging_v2/service.rb +1569 -0
  123. data/generated/google/apis/logging_v2beta1.rb +1 -1
  124. data/generated/google/apis/logging_v2beta1/classes.rb +886 -886
  125. data/generated/google/apis/logging_v2beta1/representations.rb +132 -132
  126. data/generated/google/apis/logging_v2beta1/service.rb +235 -235
  127. data/generated/google/apis/manufacturers_v1/classes.rb +147 -147
  128. data/generated/google/apis/manufacturers_v1/representations.rb +29 -29
  129. data/generated/google/apis/ml_v1.rb +34 -0
  130. data/generated/google/apis/ml_v1/classes.rb +1617 -0
  131. data/generated/google/apis/ml_v1/representations.rb +498 -0
  132. data/generated/google/apis/ml_v1/service.rb +769 -0
  133. data/generated/google/apis/monitoring_v3.rb +4 -4
  134. data/generated/google/apis/monitoring_v3/classes.rb +630 -630
  135. data/generated/google/apis/monitoring_v3/representations.rb +134 -134
  136. data/generated/google/apis/monitoring_v3/service.rb +240 -240
  137. data/generated/google/apis/pagespeedonline_v2/classes.rb +1 -0
  138. data/generated/google/apis/partners_v2.rb +1 -1
  139. data/generated/google/apis/partners_v2/classes.rb +639 -639
  140. data/generated/google/apis/partners_v2/representations.rb +168 -168
  141. data/generated/google/apis/partners_v2/service.rb +381 -381
  142. data/generated/google/apis/people_v1.rb +10 -10
  143. data/generated/google/apis/people_v1/classes.rb +524 -524
  144. data/generated/google/apis/people_v1/representations.rb +143 -143
  145. data/generated/google/apis/people_v1/service.rb +30 -30
  146. data/generated/google/apis/plus_domains_v1.rb +1 -1
  147. data/generated/google/apis/plus_v1.rb +1 -1
  148. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +454 -444
  149. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +90 -90
  150. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +110 -110
  151. data/generated/google/apis/pubsub_v1/classes.rb +175 -173
  152. data/generated/google/apis/pubsub_v1/representations.rb +53 -53
  153. data/generated/google/apis/pubsub_v1/service.rb +210 -210
  154. data/generated/google/apis/replicapool_v1beta2/classes.rb +2 -0
  155. data/generated/google/apis/runtimeconfig_v1.rb +38 -0
  156. data/generated/google/apis/runtimeconfig_v1/classes.rb +252 -0
  157. data/generated/google/apis/runtimeconfig_v1/representations.rb +98 -0
  158. data/generated/google/apis/runtimeconfig_v1/service.rb +176 -0
  159. data/generated/google/apis/script_v1.rb +1 -1
  160. data/generated/google/apis/script_v1/classes.rb +6 -6
  161. data/generated/google/apis/script_v1/representations.rb +1 -1
  162. data/generated/google/apis/searchconsole_v1.rb +31 -0
  163. data/generated/google/apis/searchconsole_v1/classes.rb +205 -0
  164. data/generated/google/apis/searchconsole_v1/representations.rb +129 -0
  165. data/generated/google/apis/searchconsole_v1/service.rb +88 -0
  166. data/generated/google/apis/servicecontrol_v1.rb +38 -0
  167. data/generated/google/apis/servicecontrol_v1/classes.rb +1675 -0
  168. data/generated/google/apis/servicecontrol_v1/representations.rb +601 -0
  169. data/generated/google/apis/servicecontrol_v1/service.rb +337 -0
  170. data/generated/google/apis/servicemanagement_v1.rb +45 -0
  171. data/generated/google/apis/servicemanagement_v1/classes.rb +4934 -0
  172. data/generated/google/apis/servicemanagement_v1/representations.rb +1526 -0
  173. data/generated/google/apis/servicemanagement_v1/service.rb +860 -0
  174. data/generated/google/apis/serviceuser_v1.rb +42 -0
  175. data/generated/google/apis/serviceuser_v1/classes.rb +3746 -0
  176. data/generated/google/apis/serviceuser_v1/representations.rb +1041 -0
  177. data/generated/google/apis/serviceuser_v1/service.rb +214 -0
  178. data/generated/google/apis/sheets_v4.rb +3 -3
  179. data/generated/google/apis/sheets_v4/classes.rb +4390 -4390
  180. data/generated/google/apis/sheets_v4/representations.rb +381 -381
  181. data/generated/google/apis/sheets_v4/service.rb +48 -48
  182. data/generated/google/apis/slides_v1.rb +3 -3
  183. data/generated/google/apis/slides_v1/classes.rb +2860 -2860
  184. data/generated/google/apis/slides_v1/representations.rb +693 -693
  185. data/generated/google/apis/slides_v1/service.rb +30 -30
  186. data/generated/google/apis/sourcerepo_v1.rb +34 -0
  187. data/generated/google/apis/sourcerepo_v1/classes.rb +687 -0
  188. data/generated/google/apis/sourcerepo_v1/representations.rb +285 -0
  189. data/generated/google/apis/sourcerepo_v1/service.rb +291 -0
  190. data/generated/google/apis/spanner_v1.rb +35 -0
  191. data/generated/google/apis/spanner_v1/classes.rb +3294 -0
  192. data/generated/google/apis/spanner_v1/representations.rb +984 -0
  193. data/generated/google/apis/spanner_v1/service.rb +1504 -0
  194. data/generated/google/apis/speech_v1beta1.rb +1 -1
  195. data/generated/google/apis/speech_v1beta1/classes.rb +197 -196
  196. data/generated/google/apis/speech_v1beta1/representations.rb +53 -53
  197. data/generated/google/apis/speech_v1beta1/service.rb +27 -27
  198. data/generated/google/apis/storage_v1.rb +1 -1
  199. data/generated/google/apis/storage_v1/classes.rb +131 -0
  200. data/generated/google/apis/storage_v1/representations.rb +51 -0
  201. data/generated/google/apis/storage_v1/service.rb +182 -0
  202. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  203. data/generated/google/apis/storagetransfer_v1/classes.rb +732 -661
  204. data/generated/google/apis/storagetransfer_v1/representations.rb +132 -132
  205. data/generated/google/apis/storagetransfer_v1/service.rb +174 -197
  206. data/generated/google/apis/surveys_v2.rb +40 -0
  207. data/generated/google/apis/surveys_v2/classes.rb +806 -0
  208. data/generated/google/apis/surveys_v2/representations.rb +347 -0
  209. data/generated/google/apis/surveys_v2/service.rb +477 -0
  210. data/generated/google/apis/tagmanager_v2.rb +52 -0
  211. data/generated/google/apis/tagmanager_v2/classes.rb +2435 -0
  212. data/generated/google/apis/tagmanager_v2/representations.rb +993 -0
  213. data/generated/google/apis/tagmanager_v2/service.rb +2865 -0
  214. data/generated/google/apis/toolresults_v1beta3.rb +34 -0
  215. data/generated/google/apis/toolresults_v1beta3/classes.rb +2160 -0
  216. data/generated/google/apis/toolresults_v1beta3/representations.rb +729 -0
  217. data/generated/google/apis/toolresults_v1beta3/service.rb +1236 -0
  218. data/generated/google/apis/tracing_v1.rb +40 -0
  219. data/generated/google/apis/tracing_v1/classes.rb +664 -0
  220. data/generated/google/apis/tracing_v1/representations.rb +279 -0
  221. data/generated/google/apis/tracing_v1/service.rb +225 -0
  222. data/generated/google/apis/vision_v1.rb +1 -1
  223. data/generated/google/apis/vision_v1/classes.rb +1223 -1222
  224. data/generated/google/apis/vision_v1/representations.rb +234 -234
  225. data/generated/google/apis/vision_v1/service.rb +10 -10
  226. data/generated/google/apis/webfonts_v1.rb +33 -0
  227. data/generated/google/apis/webfonts_v1/classes.rb +113 -0
  228. data/generated/google/apis/webfonts_v1/representations.rb +62 -0
  229. data/generated/google/apis/webfonts_v1/service.rb +102 -0
  230. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  231. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  232. data/generated/google/apis/youtube_partner_v1/classes.rb +31 -0
  233. data/generated/google/apis/youtube_partner_v1/representations.rb +6 -0
  234. data/generated/google/apis/youtube_partner_v1/service.rb +41 -0
  235. data/generated/google/apis/youtube_v3/classes.rb +1 -0
  236. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  237. data/generated/google/apis/youtubereporting_v1/classes.rb +76 -76
  238. data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
  239. data/generated/google/apis/youtubereporting_v1/service.rb +95 -95
  240. data/lib/google/apis/generator/annotator.rb +5 -4
  241. data/lib/google/apis/generator/templates/_class.tmpl +3 -0
  242. data/lib/google/apis/version.rb +1 -1
  243. data/samples/cli/lib/samples/adsense.rb +99 -0
  244. data/samples/cli/lib/samples/analytics.rb +18 -0
  245. data/samples/cli/lib/samples/gmail.rb +33 -0
  246. data/samples/cli/lib/samples/vision.rb +69 -0
  247. metadata +89 -4
  248. data/sync.rb +0 -71
@@ -0,0 +1,769 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module MlV1
23
+ # Google Cloud Machine Learning Engine
24
+ #
25
+ # An API to enable creating and using machine learning models.
26
+ #
27
+ # @example
28
+ # require 'google/apis/ml_v1'
29
+ #
30
+ # Ml = Google::Apis::MlV1 # Alias the module
31
+ # service = Ml::CloudMachineLearningEngineService.new
32
+ #
33
+ # @see https://cloud.google.com/ml/
34
+ class CloudMachineLearningEngineService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://ml.googleapis.com/', '')
47
+ end
48
+
49
+ # Get the service account information associated with your project. You need
50
+ # this information in order to grant the service account persmissions for
51
+ # the Google Cloud Storage location where you put your model training code
52
+ # for training the model with Google Cloud Machine Learning.
53
+ # @param [String] name
54
+ # Required. The project name.
55
+ # Authorization: requires `Viewer` role on the specified project.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_project_config(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v1/{+name}:getConfig', options)
75
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse::Representation
76
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Performs prediction on the data in the request.
84
+ # **** REMOVE FROM GENERATED DOCUMENTATION
85
+ # @param [String] name
86
+ # Required. The resource name of a model or a version.
87
+ # Authorization: requires `Viewer` role on the parent project.
88
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1PredictRequest] google_cloud_ml_v1__predict_request_object
89
+ # @param [String] fields
90
+ # Selector specifying which fields to include in a partial response.
91
+ # @param [String] quota_user
92
+ # Available to use for quota purposes for server-side applications. Can be any
93
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
94
+ # @param [Google::Apis::RequestOptions] options
95
+ # Request-specific options
96
+ #
97
+ # @yield [result, err] Result & error if block supplied
98
+ # @yieldparam result [Google::Apis::MlV1::GoogleApiHttpBody] parsed result object
99
+ # @yieldparam err [StandardError] error object if request failed
100
+ #
101
+ # @return [Google::Apis::MlV1::GoogleApiHttpBody]
102
+ #
103
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
104
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
105
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
106
+ def predict_project(name, google_cloud_ml_v1__predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
107
+ command = make_simple_command(:post, 'v1/{+name}:predict', options)
108
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1PredictRequest::Representation
109
+ command.request_object = google_cloud_ml_v1__predict_request_object
110
+ command.response_representation = Google::Apis::MlV1::GoogleApiHttpBody::Representation
111
+ command.response_class = Google::Apis::MlV1::GoogleApiHttpBody
112
+ command.params['name'] = name unless name.nil?
113
+ command.query['fields'] = fields unless fields.nil?
114
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
115
+ execute_or_queue_command(command, &block)
116
+ end
117
+
118
+ # Cancels a running job.
119
+ # @param [String] name
120
+ # Required. The name of the job to cancel.
121
+ # Authorization: requires `Editor` role on the parent project.
122
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1CancelJobRequest] google_cloud_ml_v1__cancel_job_request_object
123
+ # @param [String] fields
124
+ # Selector specifying which fields to include in a partial response.
125
+ # @param [String] quota_user
126
+ # Available to use for quota purposes for server-side applications. Can be any
127
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
128
+ # @param [Google::Apis::RequestOptions] options
129
+ # Request-specific options
130
+ #
131
+ # @yield [result, err] Result & error if block supplied
132
+ # @yieldparam result [Google::Apis::MlV1::GoogleProtobufEmpty] parsed result object
133
+ # @yieldparam err [StandardError] error object if request failed
134
+ #
135
+ # @return [Google::Apis::MlV1::GoogleProtobufEmpty]
136
+ #
137
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
138
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
139
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
140
+ def cancel_project_job(name, google_cloud_ml_v1__cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
141
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
142
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1CancelJobRequest::Representation
143
+ command.request_object = google_cloud_ml_v1__cancel_job_request_object
144
+ command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation
145
+ command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty
146
+ command.params['name'] = name unless name.nil?
147
+ command.query['fields'] = fields unless fields.nil?
148
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
149
+ execute_or_queue_command(command, &block)
150
+ end
151
+
152
+ # Lists the jobs in the project.
153
+ # @param [String] parent
154
+ # Required. The name of the project for which to list jobs.
155
+ # Authorization: requires `Viewer` role on the specified project.
156
+ # @param [String] page_token
157
+ # Optional. A page token to request the next page of results.
158
+ # You get the token from the `next_page_token` field of the response from
159
+ # the previous call.
160
+ # @param [Fixnum] page_size
161
+ # Optional. The number of jobs to retrieve per "page" of results. If there
162
+ # are more remaining results than this number, the response message will
163
+ # contain a valid value in the `next_page_token` field.
164
+ # The default value is 20, and the maximum page size is 100.
165
+ # @param [String] filter
166
+ # Optional. Specifies the subset of jobs to retrieve.
167
+ # @param [String] fields
168
+ # Selector specifying which fields to include in a partial response.
169
+ # @param [String] quota_user
170
+ # Available to use for quota purposes for server-side applications. Can be any
171
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
172
+ # @param [Google::Apis::RequestOptions] options
173
+ # Request-specific options
174
+ #
175
+ # @yield [result, err] Result & error if block supplied
176
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse] parsed result object
177
+ # @yieldparam err [StandardError] error object if request failed
178
+ #
179
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse]
180
+ #
181
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
182
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
183
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
184
+ def list_project_jobs(parent, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
185
+ command = make_simple_command(:get, 'v1/{+parent}/jobs', options)
186
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse::Representation
187
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse
188
+ command.params['parent'] = parent unless parent.nil?
189
+ command.query['pageToken'] = page_token unless page_token.nil?
190
+ command.query['pageSize'] = page_size unless page_size.nil?
191
+ command.query['filter'] = filter unless filter.nil?
192
+ command.query['fields'] = fields unless fields.nil?
193
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
194
+ execute_or_queue_command(command, &block)
195
+ end
196
+
197
+ # Describes a job.
198
+ # @param [String] name
199
+ # Required. The name of the job to get the description of.
200
+ # Authorization: requires `Viewer` role on the parent project.
201
+ # @param [String] fields
202
+ # Selector specifying which fields to include in a partial response.
203
+ # @param [String] quota_user
204
+ # Available to use for quota purposes for server-side applications. Can be any
205
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
206
+ # @param [Google::Apis::RequestOptions] options
207
+ # Request-specific options
208
+ #
209
+ # @yield [result, err] Result & error if block supplied
210
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Job] parsed result object
211
+ # @yieldparam err [StandardError] error object if request failed
212
+ #
213
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Job]
214
+ #
215
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
216
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
217
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
218
+ def get_project_job(name, fields: nil, quota_user: nil, options: nil, &block)
219
+ command = make_simple_command(:get, 'v1/{+name}', options)
220
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
221
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Job
222
+ command.params['name'] = name unless name.nil?
223
+ command.query['fields'] = fields unless fields.nil?
224
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
225
+ execute_or_queue_command(command, &block)
226
+ end
227
+
228
+ # Creates a training or a batch prediction job.
229
+ # @param [String] parent
230
+ # Required. The project name.
231
+ # Authorization: requires `Editor` role on the specified project.
232
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1Job] google_cloud_ml_v1__job_object
233
+ # @param [String] fields
234
+ # Selector specifying which fields to include in a partial response.
235
+ # @param [String] quota_user
236
+ # Available to use for quota purposes for server-side applications. Can be any
237
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
238
+ # @param [Google::Apis::RequestOptions] options
239
+ # Request-specific options
240
+ #
241
+ # @yield [result, err] Result & error if block supplied
242
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Job] parsed result object
243
+ # @yieldparam err [StandardError] error object if request failed
244
+ #
245
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Job]
246
+ #
247
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
248
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
249
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
250
+ def create_project_job(parent, google_cloud_ml_v1__job_object = nil, fields: nil, quota_user: nil, options: nil, &block)
251
+ command = make_simple_command(:post, 'v1/{+parent}/jobs', options)
252
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
253
+ command.request_object = google_cloud_ml_v1__job_object
254
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
255
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Job
256
+ command.params['parent'] = parent unless parent.nil?
257
+ command.query['fields'] = fields unless fields.nil?
258
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
259
+ execute_or_queue_command(command, &block)
260
+ end
261
+
262
+ # Starts asynchronous cancellation on a long-running operation. The server
263
+ # makes a best effort to cancel the operation, but success is not
264
+ # guaranteed. If the server doesn't support this method, it returns
265
+ # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
266
+ # Operations.GetOperation or
267
+ # other methods to check whether the cancellation succeeded or whether the
268
+ # operation completed despite cancellation. On successful cancellation,
269
+ # the operation is not deleted; instead, it becomes an operation with
270
+ # an Operation.error value with a google.rpc.Status.code of 1,
271
+ # corresponding to `Code.CANCELLED`.
272
+ # @param [String] name
273
+ # The name of the operation resource to be cancelled.
274
+ # @param [String] fields
275
+ # Selector specifying which fields to include in a partial response.
276
+ # @param [String] quota_user
277
+ # Available to use for quota purposes for server-side applications. Can be any
278
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
279
+ # @param [Google::Apis::RequestOptions] options
280
+ # Request-specific options
281
+ #
282
+ # @yield [result, err] Result & error if block supplied
283
+ # @yieldparam result [Google::Apis::MlV1::GoogleProtobufEmpty] parsed result object
284
+ # @yieldparam err [StandardError] error object if request failed
285
+ #
286
+ # @return [Google::Apis::MlV1::GoogleProtobufEmpty]
287
+ #
288
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
289
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
290
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
291
+ def cancel_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
292
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
293
+ command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation
294
+ command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty
295
+ command.params['name'] = name unless name.nil?
296
+ command.query['fields'] = fields unless fields.nil?
297
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
298
+ execute_or_queue_command(command, &block)
299
+ end
300
+
301
+ # Deletes a long-running operation. This method indicates that the client is
302
+ # no longer interested in the operation result. It does not cancel the
303
+ # operation. If the server doesn't support this method, it returns
304
+ # `google.rpc.Code.UNIMPLEMENTED`.
305
+ # @param [String] name
306
+ # The name of the operation resource to be deleted.
307
+ # @param [String] fields
308
+ # Selector specifying which fields to include in a partial response.
309
+ # @param [String] quota_user
310
+ # Available to use for quota purposes for server-side applications. Can be any
311
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
312
+ # @param [Google::Apis::RequestOptions] options
313
+ # Request-specific options
314
+ #
315
+ # @yield [result, err] Result & error if block supplied
316
+ # @yieldparam result [Google::Apis::MlV1::GoogleProtobufEmpty] parsed result object
317
+ # @yieldparam err [StandardError] error object if request failed
318
+ #
319
+ # @return [Google::Apis::MlV1::GoogleProtobufEmpty]
320
+ #
321
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
322
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
323
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
324
+ def delete_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
325
+ command = make_simple_command(:delete, 'v1/{+name}', options)
326
+ command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation
327
+ command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty
328
+ command.params['name'] = name unless name.nil?
329
+ command.query['fields'] = fields unless fields.nil?
330
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
331
+ execute_or_queue_command(command, &block)
332
+ end
333
+
334
+ # Lists operations that match the specified filter in the request. If the
335
+ # server doesn't support this method, it returns `UNIMPLEMENTED`.
336
+ # NOTE: the `name` binding below allows API services to override the binding
337
+ # to use different resource name schemes, such as `users/*/operations`.
338
+ # @param [String] name
339
+ # The name of the operation collection.
340
+ # @param [String] page_token
341
+ # The standard list page token.
342
+ # @param [Fixnum] page_size
343
+ # The standard list page size.
344
+ # @param [String] filter
345
+ # The standard list filter.
346
+ # @param [String] fields
347
+ # Selector specifying which fields to include in a partial response.
348
+ # @param [String] quota_user
349
+ # Available to use for quota purposes for server-side applications. Can be any
350
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
351
+ # @param [Google::Apis::RequestOptions] options
352
+ # Request-specific options
353
+ #
354
+ # @yield [result, err] Result & error if block supplied
355
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningListOperationsResponse] parsed result object
356
+ # @yieldparam err [StandardError] error object if request failed
357
+ #
358
+ # @return [Google::Apis::MlV1::GoogleLongrunningListOperationsResponse]
359
+ #
360
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
361
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
362
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
363
+ def list_project_operations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
364
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
365
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningListOperationsResponse::Representation
366
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningListOperationsResponse
367
+ command.params['name'] = name unless name.nil?
368
+ command.query['pageToken'] = page_token unless page_token.nil?
369
+ command.query['pageSize'] = page_size unless page_size.nil?
370
+ command.query['filter'] = filter unless filter.nil?
371
+ command.query['fields'] = fields unless fields.nil?
372
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
373
+ execute_or_queue_command(command, &block)
374
+ end
375
+
376
+ # Gets the latest state of a long-running operation. Clients can use this
377
+ # method to poll the operation result at intervals as recommended by the API
378
+ # service.
379
+ # @param [String] name
380
+ # The name of the operation resource.
381
+ # @param [String] fields
382
+ # Selector specifying which fields to include in a partial response.
383
+ # @param [String] quota_user
384
+ # Available to use for quota purposes for server-side applications. Can be any
385
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
386
+ # @param [Google::Apis::RequestOptions] options
387
+ # Request-specific options
388
+ #
389
+ # @yield [result, err] Result & error if block supplied
390
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
391
+ # @yieldparam err [StandardError] error object if request failed
392
+ #
393
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
394
+ #
395
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
396
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
397
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
398
+ def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
399
+ command = make_simple_command(:get, 'v1/{+name}', options)
400
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
401
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
402
+ command.params['name'] = name unless name.nil?
403
+ command.query['fields'] = fields unless fields.nil?
404
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
405
+ execute_or_queue_command(command, &block)
406
+ end
407
+
408
+ # Deletes a model.
409
+ # You can only delete a model if there are no versions in it. You can delete
410
+ # versions by calling
411
+ # [projects.models.versions.delete](/ml-engine/reference/rest/v1/projects.models.
412
+ # versions/delete).
413
+ # @param [String] name
414
+ # Required. The name of the model.
415
+ # Authorization: requires `Editor` role on the parent project.
416
+ # @param [String] fields
417
+ # Selector specifying which fields to include in a partial response.
418
+ # @param [String] quota_user
419
+ # Available to use for quota purposes for server-side applications. Can be any
420
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
421
+ # @param [Google::Apis::RequestOptions] options
422
+ # Request-specific options
423
+ #
424
+ # @yield [result, err] Result & error if block supplied
425
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
426
+ # @yieldparam err [StandardError] error object if request failed
427
+ #
428
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
429
+ #
430
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
431
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
432
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
433
+ def delete_project_model(name, fields: nil, quota_user: nil, options: nil, &block)
434
+ command = make_simple_command(:delete, 'v1/{+name}', options)
435
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
436
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
437
+ command.params['name'] = name unless name.nil?
438
+ command.query['fields'] = fields unless fields.nil?
439
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
440
+ execute_or_queue_command(command, &block)
441
+ end
442
+
443
+ # Lists the models in a project.
444
+ # Each project can contain multiple models, and each model can have multiple
445
+ # versions.
446
+ # @param [String] parent
447
+ # Required. The name of the project whose models are to be listed.
448
+ # Authorization: requires `Viewer` role on the specified project.
449
+ # @param [String] page_token
450
+ # Optional. A page token to request the next page of results.
451
+ # You get the token from the `next_page_token` field of the response from
452
+ # the previous call.
453
+ # @param [Fixnum] page_size
454
+ # Optional. The number of models to retrieve per "page" of results. If there
455
+ # are more remaining results than this number, the response message will
456
+ # contain a valid value in the `next_page_token` field.
457
+ # The default value is 20, and the maximum page size is 100.
458
+ # @param [String] fields
459
+ # Selector specifying which fields to include in a partial response.
460
+ # @param [String] quota_user
461
+ # Available to use for quota purposes for server-side applications. Can be any
462
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
463
+ # @param [Google::Apis::RequestOptions] options
464
+ # Request-specific options
465
+ #
466
+ # @yield [result, err] Result & error if block supplied
467
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse] parsed result object
468
+ # @yieldparam err [StandardError] error object if request failed
469
+ #
470
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse]
471
+ #
472
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
473
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
474
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
475
+ def list_project_models(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
476
+ command = make_simple_command(:get, 'v1/{+parent}/models', options)
477
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse::Representation
478
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse
479
+ command.params['parent'] = parent unless parent.nil?
480
+ command.query['pageToken'] = page_token unless page_token.nil?
481
+ command.query['pageSize'] = page_size unless page_size.nil?
482
+ command.query['fields'] = fields unless fields.nil?
483
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
484
+ execute_or_queue_command(command, &block)
485
+ end
486
+
487
+ # Gets information about a model, including its name, the description (if
488
+ # set), and the default version (if at least one version of the model has
489
+ # been deployed).
490
+ # @param [String] name
491
+ # Required. The name of the model.
492
+ # Authorization: requires `Viewer` role on the parent project.
493
+ # @param [String] fields
494
+ # Selector specifying which fields to include in a partial response.
495
+ # @param [String] quota_user
496
+ # Available to use for quota purposes for server-side applications. Can be any
497
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
498
+ # @param [Google::Apis::RequestOptions] options
499
+ # Request-specific options
500
+ #
501
+ # @yield [result, err] Result & error if block supplied
502
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Model] parsed result object
503
+ # @yieldparam err [StandardError] error object if request failed
504
+ #
505
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Model]
506
+ #
507
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
508
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
509
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
510
+ def get_project_model(name, fields: nil, quota_user: nil, options: nil, &block)
511
+ command = make_simple_command(:get, 'v1/{+name}', options)
512
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation
513
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Model
514
+ command.params['name'] = name unless name.nil?
515
+ command.query['fields'] = fields unless fields.nil?
516
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
517
+ execute_or_queue_command(command, &block)
518
+ end
519
+
520
+ # Creates a model which will later contain one or more versions.
521
+ # You must add at least one version before you can request predictions from
522
+ # the model. Add versions by calling
523
+ # [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.
524
+ # versions/create).
525
+ # @param [String] parent
526
+ # Required. The project name.
527
+ # Authorization: requires `Editor` role on the specified project.
528
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1Model] google_cloud_ml_v1__model_object
529
+ # @param [String] fields
530
+ # Selector specifying which fields to include in a partial response.
531
+ # @param [String] quota_user
532
+ # Available to use for quota purposes for server-side applications. Can be any
533
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
534
+ # @param [Google::Apis::RequestOptions] options
535
+ # Request-specific options
536
+ #
537
+ # @yield [result, err] Result & error if block supplied
538
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Model] parsed result object
539
+ # @yieldparam err [StandardError] error object if request failed
540
+ #
541
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Model]
542
+ #
543
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
544
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
545
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
546
+ def create_project_model(parent, google_cloud_ml_v1__model_object = nil, fields: nil, quota_user: nil, options: nil, &block)
547
+ command = make_simple_command(:post, 'v1/{+parent}/models', options)
548
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation
549
+ command.request_object = google_cloud_ml_v1__model_object
550
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation
551
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Model
552
+ command.params['parent'] = parent unless parent.nil?
553
+ command.query['fields'] = fields unless fields.nil?
554
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
555
+ execute_or_queue_command(command, &block)
556
+ end
557
+
558
+ # Deletes a model version.
559
+ # Each model can have multiple versions deployed and in use at any given
560
+ # time. Use this method to remove a single version.
561
+ # Note: You cannot delete the version that is set as the default version
562
+ # of the model unless it is the only remaining version.
563
+ # @param [String] name
564
+ # Required. The name of the version. You can get the names of all the
565
+ # versions of a model by calling
566
+ # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.
567
+ # versions/list).
568
+ # Authorization: requires `Editor` role on the parent project.
569
+ # @param [String] fields
570
+ # Selector specifying which fields to include in a partial response.
571
+ # @param [String] quota_user
572
+ # Available to use for quota purposes for server-side applications. Can be any
573
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
574
+ # @param [Google::Apis::RequestOptions] options
575
+ # Request-specific options
576
+ #
577
+ # @yield [result, err] Result & error if block supplied
578
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
579
+ # @yieldparam err [StandardError] error object if request failed
580
+ #
581
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
582
+ #
583
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
584
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
585
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
586
+ def delete_project_model_version(name, fields: nil, quota_user: nil, options: nil, &block)
587
+ command = make_simple_command(:delete, 'v1/{+name}', options)
588
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
589
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
590
+ command.params['name'] = name unless name.nil?
591
+ command.query['fields'] = fields unless fields.nil?
592
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
593
+ execute_or_queue_command(command, &block)
594
+ end
595
+
596
+ # Gets basic information about all the versions of a model.
597
+ # If you expect that a model has a lot of versions, or if you need to handle
598
+ # only a limited number of results at a time, you can request that the list
599
+ # be retrieved in batches (called pages):
600
+ # @param [String] parent
601
+ # Required. The name of the model for which to list the version.
602
+ # Authorization: requires `Viewer` role on the parent project.
603
+ # @param [String] page_token
604
+ # Optional. A page token to request the next page of results.
605
+ # You get the token from the `next_page_token` field of the response from
606
+ # the previous call.
607
+ # @param [Fixnum] page_size
608
+ # Optional. The number of versions to retrieve per "page" of results. If
609
+ # there are more remaining results than this number, the response message
610
+ # will contain a valid value in the `next_page_token` field.
611
+ # The default value is 20, and the maximum page size is 100.
612
+ # @param [String] fields
613
+ # Selector specifying which fields to include in a partial response.
614
+ # @param [String] quota_user
615
+ # Available to use for quota purposes for server-side applications. Can be any
616
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
617
+ # @param [Google::Apis::RequestOptions] options
618
+ # Request-specific options
619
+ #
620
+ # @yield [result, err] Result & error if block supplied
621
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse] parsed result object
622
+ # @yieldparam err [StandardError] error object if request failed
623
+ #
624
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse]
625
+ #
626
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
627
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
628
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
629
+ def list_project_model_versions(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
630
+ command = make_simple_command(:get, 'v1/{+parent}/versions', options)
631
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse::Representation
632
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse
633
+ command.params['parent'] = parent unless parent.nil?
634
+ command.query['pageToken'] = page_token unless page_token.nil?
635
+ command.query['pageSize'] = page_size unless page_size.nil?
636
+ command.query['fields'] = fields unless fields.nil?
637
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
638
+ execute_or_queue_command(command, &block)
639
+ end
640
+
641
+ # Gets information about a model version.
642
+ # Models can have multiple versions. You can call
643
+ # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.
644
+ # versions/list)
645
+ # to get the same information that this method returns for all of the
646
+ # versions of a model.
647
+ # @param [String] name
648
+ # Required. The name of the version.
649
+ # Authorization: requires `Viewer` role on the parent project.
650
+ # @param [String] fields
651
+ # Selector specifying which fields to include in a partial response.
652
+ # @param [String] quota_user
653
+ # Available to use for quota purposes for server-side applications. Can be any
654
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
655
+ # @param [Google::Apis::RequestOptions] options
656
+ # Request-specific options
657
+ #
658
+ # @yield [result, err] Result & error if block supplied
659
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Version] parsed result object
660
+ # @yieldparam err [StandardError] error object if request failed
661
+ #
662
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Version]
663
+ #
664
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
665
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
666
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
667
+ def get_project_model_version(name, fields: nil, quota_user: nil, options: nil, &block)
668
+ command = make_simple_command(:get, 'v1/{+name}', options)
669
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation
670
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Version
671
+ command.params['name'] = name unless name.nil?
672
+ command.query['fields'] = fields unless fields.nil?
673
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
674
+ execute_or_queue_command(command, &block)
675
+ end
676
+
677
+ # Creates a new version of a model from a trained TensorFlow model.
678
+ # If the version created in the cloud by this call is the first deployed
679
+ # version of the specified model, it will be made the default version of the
680
+ # model. When you add a version to a model that already has one or more
681
+ # versions, the default version does not automatically change. If you want a
682
+ # new version to be the default, you must call
683
+ # [projects.models.versions.setDefault](/ml-engine/reference/rest/v1/projects.
684
+ # models.versions/setDefault).
685
+ # @param [String] parent
686
+ # Required. The name of the model.
687
+ # Authorization: requires `Editor` role on the parent project.
688
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1Version] google_cloud_ml_v1__version_object
689
+ # @param [String] fields
690
+ # Selector specifying which fields to include in a partial response.
691
+ # @param [String] quota_user
692
+ # Available to use for quota purposes for server-side applications. Can be any
693
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
694
+ # @param [Google::Apis::RequestOptions] options
695
+ # Request-specific options
696
+ #
697
+ # @yield [result, err] Result & error if block supplied
698
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
699
+ # @yieldparam err [StandardError] error object if request failed
700
+ #
701
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
702
+ #
703
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
704
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
705
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
706
+ def create_project_model_version(parent, google_cloud_ml_v1__version_object = nil, fields: nil, quota_user: nil, options: nil, &block)
707
+ command = make_simple_command(:post, 'v1/{+parent}/versions', options)
708
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation
709
+ command.request_object = google_cloud_ml_v1__version_object
710
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
711
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
712
+ command.params['parent'] = parent unless parent.nil?
713
+ command.query['fields'] = fields unless fields.nil?
714
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
715
+ execute_or_queue_command(command, &block)
716
+ end
717
+
718
+ # Designates a version to be the default for the model.
719
+ # The default version is used for prediction requests made against the model
720
+ # that don't specify a version.
721
+ # The first version to be created for a model is automatically set as the
722
+ # default. You must make any subsequent changes to the default version
723
+ # setting manually using this method.
724
+ # @param [String] name
725
+ # Required. The name of the version to make the default for the model. You
726
+ # can get the names of all the versions of a model by calling
727
+ # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.
728
+ # versions/list).
729
+ # Authorization: requires `Editor` role on the parent project.
730
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1SetDefaultVersionRequest] google_cloud_ml_v1__set_default_version_request_object
731
+ # @param [String] fields
732
+ # Selector specifying which fields to include in a partial response.
733
+ # @param [String] quota_user
734
+ # Available to use for quota purposes for server-side applications. Can be any
735
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
736
+ # @param [Google::Apis::RequestOptions] options
737
+ # Request-specific options
738
+ #
739
+ # @yield [result, err] Result & error if block supplied
740
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Version] parsed result object
741
+ # @yieldparam err [StandardError] error object if request failed
742
+ #
743
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Version]
744
+ #
745
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
746
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
747
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
748
+ def set_project_model_version_default(name, google_cloud_ml_v1__set_default_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
749
+ command = make_simple_command(:post, 'v1/{+name}:setDefault', options)
750
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1SetDefaultVersionRequest::Representation
751
+ command.request_object = google_cloud_ml_v1__set_default_version_request_object
752
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation
753
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Version
754
+ command.params['name'] = name unless name.nil?
755
+ command.query['fields'] = fields unless fields.nil?
756
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
757
+ execute_or_queue_command(command, &block)
758
+ end
759
+
760
+ protected
761
+
762
+ def apply_command_defaults(command)
763
+ command.query['key'] = key unless key.nil?
764
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
765
+ end
766
+ end
767
+ end
768
+ end
769
+ end