google-api-client 0.10.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
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,34 @@
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/ml_v1/service.rb'
16
+ require 'google/apis/ml_v1/classes.rb'
17
+ require 'google/apis/ml_v1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Google Cloud Machine Learning Engine
22
+ #
23
+ # An API to enable creating and using machine learning models.
24
+ #
25
+ # @see https://cloud.google.com/ml/
26
+ module MlV1
27
+ VERSION = 'V1'
28
+ REVISION = '20170320'
29
+
30
+ # View and manage your data across Google Cloud Platform services
31
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,1617 @@
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 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module MlV1
24
+
25
+ # Message that represents an arbitrary HTTP body. It should only be used for
26
+ # payload formats that can't be represented as JSON, such as raw binary or
27
+ # an HTML page.
28
+ # This message can be used both in streaming and non-streaming API methods in
29
+ # the request as well as the response.
30
+ # It can be used as a top-level request field, which is convenient if one
31
+ # wants to extract parameters from either the URL or HTTP template into the
32
+ # request fields and also want access to the raw HTTP body.
33
+ # Example:
34
+ # message GetResourceRequest `
35
+ # // A unique request id.
36
+ # string request_id = 1;
37
+ # // The raw HTTP body is bound to this field.
38
+ # google.api.HttpBody http_body = 2;
39
+ # `
40
+ # service ResourceService `
41
+ # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
42
+ # rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);
43
+ # `
44
+ # Example with streaming methods:
45
+ # service CaldavService `
46
+ # rpc GetCalendar(stream google.api.HttpBody)
47
+ # returns (stream google.api.HttpBody);
48
+ # rpc UpdateCalendar(stream google.api.HttpBody)
49
+ # returns (stream google.api.HttpBody);
50
+ # `
51
+ # Use of this type only changes how the request and response bodies are
52
+ # handled, all other features will continue to work unchanged.
53
+ class GoogleApiHttpBody
54
+ include Google::Apis::Core::Hashable
55
+
56
+ # HTTP body binary data.
57
+ # Corresponds to the JSON property `data`
58
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
59
+ # @return [String]
60
+ attr_accessor :data
61
+
62
+ # The HTTP Content-Type string representing the content type of the body.
63
+ # Corresponds to the JSON property `contentType`
64
+ # @return [String]
65
+ attr_accessor :content_type
66
+
67
+ def initialize(**args)
68
+ update!(**args)
69
+ end
70
+
71
+ # Update properties of this object
72
+ def update!(**args)
73
+ @data = args[:data] if args.key?(:data)
74
+ @content_type = args[:content_type] if args.key?(:content_type)
75
+ end
76
+ end
77
+
78
+ # Represents a version of the model.
79
+ # Each version is a trained model deployed in the cloud, ready to handle
80
+ # prediction requests. A model can have multiple versions. You can get
81
+ # information about all of the versions of a given model by calling
82
+ # [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.
83
+ # models.versions/list).
84
+ class GoogleCloudMlV1beta1Version
85
+ include Google::Apis::Core::Hashable
86
+
87
+ # Output only. The time the version was last used for prediction.
88
+ # Corresponds to the JSON property `lastUseTime`
89
+ # @return [String]
90
+ attr_accessor :last_use_time
91
+
92
+ # Optional. The Google Cloud ML runtime version to use for this deployment.
93
+ # If not set, Google Cloud ML will choose a version.
94
+ # Corresponds to the JSON property `runtimeVersion`
95
+ # @return [String]
96
+ attr_accessor :runtime_version
97
+
98
+ # Optional. The description specified for the version when it was created.
99
+ # Corresponds to the JSON property `description`
100
+ # @return [String]
101
+ attr_accessor :description
102
+
103
+ # Required. The Google Cloud Storage location of the trained model used to
104
+ # create the version. See the
105
+ # [overview of model deployment](/ml-engine/docs/concepts/deployment-overview)
106
+ # for
107
+ # more informaiton.
108
+ # When passing Version to
109
+ # [projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects.
110
+ # models.versions/create)
111
+ # the model service uses the specified location as the source of the model.
112
+ # Once deployed, the model version is hosted by the prediction service, so
113
+ # this location is useful only as a historical record.
114
+ # Corresponds to the JSON property `deploymentUri`
115
+ # @return [String]
116
+ attr_accessor :deployment_uri
117
+
118
+ # Output only. If true, this version will be used to handle prediction
119
+ # requests that do not specify a version.
120
+ # You can change the default version by calling
121
+ # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/
122
+ # projects.models.versions/setDefault).
123
+ # Corresponds to the JSON property `isDefault`
124
+ # @return [Boolean]
125
+ attr_accessor :is_default
126
+ alias_method :is_default?, :is_default
127
+
128
+ # Output only. The time the version was created.
129
+ # Corresponds to the JSON property `createTime`
130
+ # @return [String]
131
+ attr_accessor :create_time
132
+
133
+ # Options for manually scaling a model.
134
+ # Corresponds to the JSON property `manualScaling`
135
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1beta1ManualScaling]
136
+ attr_accessor :manual_scaling
137
+
138
+ # Required.The name specified for the version when it was created.
139
+ # The version name must be unique within the model it is created in.
140
+ # Corresponds to the JSON property `name`
141
+ # @return [String]
142
+ attr_accessor :name
143
+
144
+ def initialize(**args)
145
+ update!(**args)
146
+ end
147
+
148
+ # Update properties of this object
149
+ def update!(**args)
150
+ @last_use_time = args[:last_use_time] if args.key?(:last_use_time)
151
+ @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
152
+ @description = args[:description] if args.key?(:description)
153
+ @deployment_uri = args[:deployment_uri] if args.key?(:deployment_uri)
154
+ @is_default = args[:is_default] if args.key?(:is_default)
155
+ @create_time = args[:create_time] if args.key?(:create_time)
156
+ @manual_scaling = args[:manual_scaling] if args.key?(:manual_scaling)
157
+ @name = args[:name] if args.key?(:name)
158
+ end
159
+ end
160
+
161
+ # Returns service account information associated with a project.
162
+ class GoogleCloudMlV1GetConfigResponse
163
+ include Google::Apis::Core::Hashable
164
+
165
+ # The project number for `service_account`.
166
+ # Corresponds to the JSON property `serviceAccountProject`
167
+ # @return [String]
168
+ attr_accessor :service_account_project
169
+
170
+ # The service account Cloud ML uses to access resources in the project.
171
+ # Corresponds to the JSON property `serviceAccount`
172
+ # @return [String]
173
+ attr_accessor :service_account
174
+
175
+ def initialize(**args)
176
+ update!(**args)
177
+ end
178
+
179
+ # Update properties of this object
180
+ def update!(**args)
181
+ @service_account_project = args[:service_account_project] if args.key?(:service_account_project)
182
+ @service_account = args[:service_account] if args.key?(:service_account)
183
+ end
184
+ end
185
+
186
+ # Represents the result of a single hyperparameter tuning trial from a
187
+ # training job. The TrainingOutput object that is returned on successful
188
+ # completion of a training job with hyperparameter tuning includes a list
189
+ # of HyperparameterOutput objects, one for each successful trial.
190
+ class GoogleCloudMlV1HyperparameterOutput
191
+ include Google::Apis::Core::Hashable
192
+
193
+ # An observed value of a metric.
194
+ # Corresponds to the JSON property `finalMetric`
195
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1HyperparameterOutputHyperparameterMetric]
196
+ attr_accessor :final_metric
197
+
198
+ # The hyperparameters given to this trial.
199
+ # Corresponds to the JSON property `hyperparameters`
200
+ # @return [Hash<String,String>]
201
+ attr_accessor :hyperparameters
202
+
203
+ # The trial id for these results.
204
+ # Corresponds to the JSON property `trialId`
205
+ # @return [String]
206
+ attr_accessor :trial_id
207
+
208
+ # All recorded object metrics for this trial.
209
+ # Corresponds to the JSON property `allMetrics`
210
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1HyperparameterOutputHyperparameterMetric>]
211
+ attr_accessor :all_metrics
212
+
213
+ def initialize(**args)
214
+ update!(**args)
215
+ end
216
+
217
+ # Update properties of this object
218
+ def update!(**args)
219
+ @final_metric = args[:final_metric] if args.key?(:final_metric)
220
+ @hyperparameters = args[:hyperparameters] if args.key?(:hyperparameters)
221
+ @trial_id = args[:trial_id] if args.key?(:trial_id)
222
+ @all_metrics = args[:all_metrics] if args.key?(:all_metrics)
223
+ end
224
+ end
225
+
226
+ # Represents results of a prediction job.
227
+ class GoogleCloudMlV1PredictionOutput
228
+ include Google::Apis::Core::Hashable
229
+
230
+ # The number of generated predictions.
231
+ # Corresponds to the JSON property `predictionCount`
232
+ # @return [String]
233
+ attr_accessor :prediction_count
234
+
235
+ # The number of data instances which resulted in errors.
236
+ # Corresponds to the JSON property `errorCount`
237
+ # @return [String]
238
+ attr_accessor :error_count
239
+
240
+ # The output Google Cloud Storage location provided at the job creation time.
241
+ # Corresponds to the JSON property `outputPath`
242
+ # @return [String]
243
+ attr_accessor :output_path
244
+
245
+ # Node hours used by the batch prediction job.
246
+ # Corresponds to the JSON property `nodeHours`
247
+ # @return [Float]
248
+ attr_accessor :node_hours
249
+
250
+ def initialize(**args)
251
+ update!(**args)
252
+ end
253
+
254
+ # Update properties of this object
255
+ def update!(**args)
256
+ @prediction_count = args[:prediction_count] if args.key?(:prediction_count)
257
+ @error_count = args[:error_count] if args.key?(:error_count)
258
+ @output_path = args[:output_path] if args.key?(:output_path)
259
+ @node_hours = args[:node_hours] if args.key?(:node_hours)
260
+ end
261
+ end
262
+
263
+ # The response message for Operations.ListOperations.
264
+ class GoogleLongrunningListOperationsResponse
265
+ include Google::Apis::Core::Hashable
266
+
267
+ # The standard List next-page token.
268
+ # Corresponds to the JSON property `nextPageToken`
269
+ # @return [String]
270
+ attr_accessor :next_page_token
271
+
272
+ # A list of operations that matches the specified filter in the request.
273
+ # Corresponds to the JSON property `operations`
274
+ # @return [Array<Google::Apis::MlV1::GoogleLongrunningOperation>]
275
+ attr_accessor :operations
276
+
277
+ def initialize(**args)
278
+ update!(**args)
279
+ end
280
+
281
+ # Update properties of this object
282
+ def update!(**args)
283
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
284
+ @operations = args[:operations] if args.key?(:operations)
285
+ end
286
+ end
287
+
288
+ # Options for manually scaling a model.
289
+ class GoogleCloudMlV1ManualScaling
290
+ include Google::Apis::Core::Hashable
291
+
292
+ # The number of nodes to allocate for this model. These nodes are always up,
293
+ # starting from the time the model is deployed, so the cost of operating
294
+ # this model will be proportional to nodes * number of hours since
295
+ # deployment.
296
+ # Corresponds to the JSON property `nodes`
297
+ # @return [Fixnum]
298
+ attr_accessor :nodes
299
+
300
+ def initialize(**args)
301
+ update!(**args)
302
+ end
303
+
304
+ # Update properties of this object
305
+ def update!(**args)
306
+ @nodes = args[:nodes] if args.key?(:nodes)
307
+ end
308
+ end
309
+
310
+ # Represents results of a training job. Output only.
311
+ class GoogleCloudMlV1TrainingOutput
312
+ include Google::Apis::Core::Hashable
313
+
314
+ # The number of hyperparameter tuning trials that completed successfully.
315
+ # Only set for hyperparameter tuning jobs.
316
+ # Corresponds to the JSON property `completedTrialCount`
317
+ # @return [String]
318
+ attr_accessor :completed_trial_count
319
+
320
+ # Whether this job is a hyperparameter tuning job.
321
+ # Corresponds to the JSON property `isHyperparameterTuningJob`
322
+ # @return [Boolean]
323
+ attr_accessor :is_hyperparameter_tuning_job
324
+ alias_method :is_hyperparameter_tuning_job?, :is_hyperparameter_tuning_job
325
+
326
+ # The amount of ML units consumed by the job.
327
+ # Corresponds to the JSON property `consumedMLUnits`
328
+ # @return [Float]
329
+ attr_accessor :consumed_ml_units
330
+
331
+ # Results for individual Hyperparameter trials.
332
+ # Only set for hyperparameter tuning jobs.
333
+ # Corresponds to the JSON property `trials`
334
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1HyperparameterOutput>]
335
+ attr_accessor :trials
336
+
337
+ def initialize(**args)
338
+ update!(**args)
339
+ end
340
+
341
+ # Update properties of this object
342
+ def update!(**args)
343
+ @completed_trial_count = args[:completed_trial_count] if args.key?(:completed_trial_count)
344
+ @is_hyperparameter_tuning_job = args[:is_hyperparameter_tuning_job] if args.key?(:is_hyperparameter_tuning_job)
345
+ @consumed_ml_units = args[:consumed_ml_units] if args.key?(:consumed_ml_units)
346
+ @trials = args[:trials] if args.key?(:trials)
347
+ end
348
+ end
349
+
350
+ # Request for predictions to be issued against a trained model.
351
+ # The body of the request is a single JSON object with a single top-level
352
+ # field:
353
+ # <dl>
354
+ # <dt>instances</dt>
355
+ # <dd>A JSON array containing values representing the instances to use for
356
+ # prediction.</dd>
357
+ # </dl>
358
+ # The structure of each element of the instances list is determined by your
359
+ # model's input definition. Instances can include named inputs or can contain
360
+ # only unlabeled values.
361
+ # Not all data includes named inputs. Some instances will be simple
362
+ # JSON values (boolean, number, or string). However, instances are often lists
363
+ # of simple values, or complex nested lists. Here are some examples of request
364
+ # bodies:
365
+ # CSV data with each row encoded as a string value:
366
+ # <pre>
367
+ # `"instances": ["1.0,true,\\"x\\"", "-2.0,false,\\"y\\""]`
368
+ # </pre>
369
+ # Plain text:
370
+ # <pre>
371
+ # `"instances": ["the quick brown fox", "la bruja le dio"]`
372
+ # </pre>
373
+ # Sentences encoded as lists of words (vectors of strings):
374
+ # <pre>
375
+ # `
376
+ # "instances": [
377
+ # ["the","quick","brown"],
378
+ # ["la","bruja","le"],
379
+ # ...
380
+ # ]
381
+ # `
382
+ # </pre>
383
+ # Floating point scalar values:
384
+ # <pre>
385
+ # `"instances": [0.0, 1.1, 2.2]`
386
+ # </pre>
387
+ # Vectors of integers:
388
+ # <pre>
389
+ # `
390
+ # "instances": [
391
+ # [0, 1, 2],
392
+ # [3, 4, 5],
393
+ # ...
394
+ # ]
395
+ # `
396
+ # </pre>
397
+ # Tensors (in this case, two-dimensional tensors):
398
+ # <pre>
399
+ # `
400
+ # "instances": [
401
+ # [
402
+ # [0, 1, 2],
403
+ # [3, 4, 5]
404
+ # ],
405
+ # ...
406
+ # ]
407
+ # `
408
+ # </pre>
409
+ # Images can be represented different ways. In this encoding scheme the first
410
+ # two dimensions represent the rows and columns of the image, and the third
411
+ # contains lists (vectors) of the R, G, and B values for each pixel.
412
+ # <pre>
413
+ # `
414
+ # "instances": [
415
+ # [
416
+ # [
417
+ # [138, 30, 66],
418
+ # [130, 20, 56],
419
+ # ...
420
+ # ],
421
+ # [
422
+ # [126, 38, 61],
423
+ # [122, 24, 57],
424
+ # ...
425
+ # ],
426
+ # ...
427
+ # ],
428
+ # ...
429
+ # ]
430
+ # `
431
+ # </pre>
432
+ # JSON strings must be encoded as UTF-8. To send binary data, you must
433
+ # base64-encode the data and mark it as binary. To mark a JSON string
434
+ # as binary, replace it with a JSON object with a single attribute named `b64`:
435
+ # <pre>`"b64": "..."` </pre>
436
+ # For example:
437
+ # Two Serialized tf.Examples (fake data, for illustrative purposes only):
438
+ # <pre>
439
+ # `"instances": [`"b64": "X5ad6u"`, `"b64": "IA9j4nx"`]`
440
+ # </pre>
441
+ # Two JPEG image byte strings (fake data, for illustrative purposes only):
442
+ # <pre>
443
+ # `"instances": [`"b64": "ASa8asdf"`, `"b64": "JLK7ljk3"`]`
444
+ # </pre>
445
+ # If your data includes named references, format each instance as a JSON object
446
+ # with the named references as the keys:
447
+ # JSON input data to be preprocessed:
448
+ # <pre>
449
+ # `
450
+ # "instances": [
451
+ # `
452
+ # "a": 1.0,
453
+ # "b": true,
454
+ # "c": "x"
455
+ # `,
456
+ # `
457
+ # "a": -2.0,
458
+ # "b": false,
459
+ # "c": "y"
460
+ # `
461
+ # ]
462
+ # `
463
+ # </pre>
464
+ # Some models have an underlying TensorFlow graph that accepts multiple input
465
+ # tensors. In this case, you should use the names of JSON name/value pairs to
466
+ # identify the input tensors, as shown in the following exmaples:
467
+ # For a graph with input tensor aliases "tag" (string) and "image"
468
+ # (base64-encoded string):
469
+ # <pre>
470
+ # `
471
+ # "instances": [
472
+ # `
473
+ # "tag": "beach",
474
+ # "image": `"b64": "ASa8asdf"`
475
+ # `,
476
+ # `
477
+ # "tag": "car",
478
+ # "image": `"b64": "JLK7ljk3"`
479
+ # `
480
+ # ]
481
+ # `
482
+ # </pre>
483
+ # For a graph with input tensor aliases "tag" (string) and "image"
484
+ # (3-dimensional array of 8-bit ints):
485
+ # <pre>
486
+ # `
487
+ # "instances": [
488
+ # `
489
+ # "tag": "beach",
490
+ # "image": [
491
+ # [
492
+ # [138, 30, 66],
493
+ # [130, 20, 56],
494
+ # ...
495
+ # ],
496
+ # [
497
+ # [126, 38, 61],
498
+ # [122, 24, 57],
499
+ # ...
500
+ # ],
501
+ # ...
502
+ # ]
503
+ # `,
504
+ # `
505
+ # "tag": "car",
506
+ # "image": [
507
+ # [
508
+ # [255, 0, 102],
509
+ # [255, 0, 97],
510
+ # ...
511
+ # ],
512
+ # [
513
+ # [254, 1, 101],
514
+ # [254, 2, 93],
515
+ # ...
516
+ # ],
517
+ # ...
518
+ # ]
519
+ # `,
520
+ # ...
521
+ # ]
522
+ # `
523
+ # </pre>
524
+ # If the call is successful, the response body will contain one prediction
525
+ # entry per instance in the request body. If prediction fails for any
526
+ # instance, the response body will contain no predictions and will contian
527
+ # a single error entry instead.
528
+ class GoogleCloudMlV1PredictRequest
529
+ include Google::Apis::Core::Hashable
530
+
531
+ # Message that represents an arbitrary HTTP body. It should only be used for
532
+ # payload formats that can't be represented as JSON, such as raw binary or
533
+ # an HTML page.
534
+ # This message can be used both in streaming and non-streaming API methods in
535
+ # the request as well as the response.
536
+ # It can be used as a top-level request field, which is convenient if one
537
+ # wants to extract parameters from either the URL or HTTP template into the
538
+ # request fields and also want access to the raw HTTP body.
539
+ # Example:
540
+ # message GetResourceRequest `
541
+ # // A unique request id.
542
+ # string request_id = 1;
543
+ # // The raw HTTP body is bound to this field.
544
+ # google.api.HttpBody http_body = 2;
545
+ # `
546
+ # service ResourceService `
547
+ # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
548
+ # rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);
549
+ # `
550
+ # Example with streaming methods:
551
+ # service CaldavService `
552
+ # rpc GetCalendar(stream google.api.HttpBody)
553
+ # returns (stream google.api.HttpBody);
554
+ # rpc UpdateCalendar(stream google.api.HttpBody)
555
+ # returns (stream google.api.HttpBody);
556
+ # `
557
+ # Use of this type only changes how the request and response bodies are
558
+ # handled, all other features will continue to work unchanged.
559
+ # Corresponds to the JSON property `httpBody`
560
+ # @return [Google::Apis::MlV1::GoogleApiHttpBody]
561
+ attr_accessor :http_body
562
+
563
+ def initialize(**args)
564
+ update!(**args)
565
+ end
566
+
567
+ # Update properties of this object
568
+ def update!(**args)
569
+ @http_body = args[:http_body] if args.key?(:http_body)
570
+ end
571
+ end
572
+
573
+ # An observed value of a metric.
574
+ class GoogleCloudMlV1HyperparameterOutputHyperparameterMetric
575
+ include Google::Apis::Core::Hashable
576
+
577
+ # The global training step for this metric.
578
+ # Corresponds to the JSON property `trainingStep`
579
+ # @return [String]
580
+ attr_accessor :training_step
581
+
582
+ # The objective value at this training step.
583
+ # Corresponds to the JSON property `objectiveValue`
584
+ # @return [Float]
585
+ attr_accessor :objective_value
586
+
587
+ def initialize(**args)
588
+ update!(**args)
589
+ end
590
+
591
+ # Update properties of this object
592
+ def update!(**args)
593
+ @training_step = args[:training_step] if args.key?(:training_step)
594
+ @objective_value = args[:objective_value] if args.key?(:objective_value)
595
+ end
596
+ end
597
+
598
+ # Represents a version of the model.
599
+ # Each version is a trained model deployed in the cloud, ready to handle
600
+ # prediction requests. A model can have multiple versions. You can get
601
+ # information about all of the versions of a given model by calling
602
+ # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.
603
+ # versions/list).
604
+ class GoogleCloudMlV1Version
605
+ include Google::Apis::Core::Hashable
606
+
607
+ # Optional. The Google Cloud ML runtime version to use for this deployment.
608
+ # If not set, Google Cloud ML will choose a version.
609
+ # Corresponds to the JSON property `runtimeVersion`
610
+ # @return [String]
611
+ attr_accessor :runtime_version
612
+
613
+ # Output only. The time the version was last used for prediction.
614
+ # Corresponds to the JSON property `lastUseTime`
615
+ # @return [String]
616
+ attr_accessor :last_use_time
617
+
618
+ # Optional. The description specified for the version when it was created.
619
+ # Corresponds to the JSON property `description`
620
+ # @return [String]
621
+ attr_accessor :description
622
+
623
+ # Required. The Google Cloud Storage location of the trained model used to
624
+ # create the version. See the
625
+ # [overview of model deployment](/ml-engine/docs/concepts/deployment-overview)
626
+ # for
627
+ # more informaiton.
628
+ # When passing Version to
629
+ # [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.models.
630
+ # versions/create)
631
+ # the model service uses the specified location as the source of the model.
632
+ # Once deployed, the model version is hosted by the prediction service, so
633
+ # this location is useful only as a historical record.
634
+ # Corresponds to the JSON property `deploymentUri`
635
+ # @return [String]
636
+ attr_accessor :deployment_uri
637
+
638
+ # Output only. If true, this version will be used to handle prediction
639
+ # requests that do not specify a version.
640
+ # You can change the default version by calling
641
+ # [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/projects.
642
+ # models.versions/setDefault).
643
+ # Corresponds to the JSON property `isDefault`
644
+ # @return [Boolean]
645
+ attr_accessor :is_default
646
+ alias_method :is_default?, :is_default
647
+
648
+ # Output only. The time the version was created.
649
+ # Corresponds to the JSON property `createTime`
650
+ # @return [String]
651
+ attr_accessor :create_time
652
+
653
+ # Options for manually scaling a model.
654
+ # Corresponds to the JSON property `manualScaling`
655
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ManualScaling]
656
+ attr_accessor :manual_scaling
657
+
658
+ # Required.The name specified for the version when it was created.
659
+ # The version name must be unique within the model it is created in.
660
+ # Corresponds to the JSON property `name`
661
+ # @return [String]
662
+ attr_accessor :name
663
+
664
+ def initialize(**args)
665
+ update!(**args)
666
+ end
667
+
668
+ # Update properties of this object
669
+ def update!(**args)
670
+ @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
671
+ @last_use_time = args[:last_use_time] if args.key?(:last_use_time)
672
+ @description = args[:description] if args.key?(:description)
673
+ @deployment_uri = args[:deployment_uri] if args.key?(:deployment_uri)
674
+ @is_default = args[:is_default] if args.key?(:is_default)
675
+ @create_time = args[:create_time] if args.key?(:create_time)
676
+ @manual_scaling = args[:manual_scaling] if args.key?(:manual_scaling)
677
+ @name = args[:name] if args.key?(:name)
678
+ end
679
+ end
680
+
681
+ # Represents a single hyperparameter to optimize.
682
+ class GoogleCloudMlV1ParameterSpec
683
+ include Google::Apis::Core::Hashable
684
+
685
+ # Required if type is `CATEGORICAL`. The list of possible categories.
686
+ # Corresponds to the JSON property `categoricalValues`
687
+ # @return [Array<String>]
688
+ attr_accessor :categorical_values
689
+
690
+ # Required. The parameter name must be unique amongst all ParameterConfigs in
691
+ # a HyperparameterSpec message. E.g., "learning_rate".
692
+ # Corresponds to the JSON property `parameterName`
693
+ # @return [String]
694
+ attr_accessor :parameter_name
695
+
696
+ # Required if type is `DOUBLE` or `INTEGER`. This field
697
+ # should be unset if type is `CATEGORICAL`. This value should be integers if
698
+ # type is INTEGER.
699
+ # Corresponds to the JSON property `minValue`
700
+ # @return [Float]
701
+ attr_accessor :min_value
702
+
703
+ # Required if type is `DISCRETE`.
704
+ # A list of feasible points.
705
+ # The list should be in strictly increasing order. For instance, this
706
+ # parameter might have possible settings of 1.5, 2.5, and 4.0. This list
707
+ # should not contain more than 1,000 values.
708
+ # Corresponds to the JSON property `discreteValues`
709
+ # @return [Array<Float>]
710
+ attr_accessor :discrete_values
711
+
712
+ # Optional. How the parameter should be scaled to the hypercube.
713
+ # Leave unset for categorical parameters.
714
+ # Some kind of scaling is strongly recommended for real or integral
715
+ # parameters (e.g., `UNIT_LINEAR_SCALE`).
716
+ # Corresponds to the JSON property `scaleType`
717
+ # @return [String]
718
+ attr_accessor :scale_type
719
+
720
+ # Required if typeis `DOUBLE` or `INTEGER`. This field
721
+ # should be unset if type is `CATEGORICAL`. This value should be integers if
722
+ # type is `INTEGER`.
723
+ # Corresponds to the JSON property `maxValue`
724
+ # @return [Float]
725
+ attr_accessor :max_value
726
+
727
+ # Required. The type of the parameter.
728
+ # Corresponds to the JSON property `type`
729
+ # @return [String]
730
+ attr_accessor :type
731
+
732
+ def initialize(**args)
733
+ update!(**args)
734
+ end
735
+
736
+ # Update properties of this object
737
+ def update!(**args)
738
+ @categorical_values = args[:categorical_values] if args.key?(:categorical_values)
739
+ @parameter_name = args[:parameter_name] if args.key?(:parameter_name)
740
+ @min_value = args[:min_value] if args.key?(:min_value)
741
+ @discrete_values = args[:discrete_values] if args.key?(:discrete_values)
742
+ @scale_type = args[:scale_type] if args.key?(:scale_type)
743
+ @max_value = args[:max_value] if args.key?(:max_value)
744
+ @type = args[:type] if args.key?(:type)
745
+ end
746
+ end
747
+
748
+ # Represents input parameters for a prediction job.
749
+ class GoogleCloudMlV1PredictionInput
750
+ include Google::Apis::Core::Hashable
751
+
752
+ # Use this field if you want to specify a version of the model to use. The
753
+ # string is formatted the same way as `model_version`, with the addition
754
+ # of the version information:
755
+ # `"projects/<var>[YOUR_PROJECT]</var>/models/<var>YOUR_MODEL/versions/<var>[
756
+ # YOUR_VERSION]</var>"`
757
+ # Corresponds to the JSON property `versionName`
758
+ # @return [String]
759
+ attr_accessor :version_name
760
+
761
+ # Use this field if you want to use the default version for the specified
762
+ # model. The string must use the following format:
763
+ # `"projects/<var>[YOUR_PROJECT]</var>/models/<var>[YOUR_MODEL]</var>"`
764
+ # Corresponds to the JSON property `modelName`
765
+ # @return [String]
766
+ attr_accessor :model_name
767
+
768
+ # Required. The output Google Cloud Storage location.
769
+ # Corresponds to the JSON property `outputPath`
770
+ # @return [String]
771
+ attr_accessor :output_path
772
+
773
+ # Use this field if you want to specify a Google Cloud Storage path for
774
+ # the model to use.
775
+ # Corresponds to the JSON property `uri`
776
+ # @return [String]
777
+ attr_accessor :uri
778
+
779
+ # Optional. The maximum number of workers to be used for parallel processing.
780
+ # Defaults to 10 if not specified.
781
+ # Corresponds to the JSON property `maxWorkerCount`
782
+ # @return [String]
783
+ attr_accessor :max_worker_count
784
+
785
+ # Required. The format of the input data files.
786
+ # Corresponds to the JSON property `dataFormat`
787
+ # @return [String]
788
+ attr_accessor :data_format
789
+
790
+ # Optional. The Google Cloud ML runtime version to use for this batch
791
+ # prediction. If not set, Google Cloud ML will pick the runtime version used
792
+ # during the CreateVersion request for this model version, or choose the
793
+ # latest stable version when model version information is not available
794
+ # such as when the model is specified by uri.
795
+ # Corresponds to the JSON property `runtimeVersion`
796
+ # @return [String]
797
+ attr_accessor :runtime_version
798
+
799
+ # Required. The Google Cloud Storage location of the input data files.
800
+ # May contain wildcards.
801
+ # Corresponds to the JSON property `inputPaths`
802
+ # @return [Array<String>]
803
+ attr_accessor :input_paths
804
+
805
+ # Required. The Google Compute Engine region to run the prediction job in.
806
+ # Corresponds to the JSON property `region`
807
+ # @return [String]
808
+ attr_accessor :region
809
+
810
+ def initialize(**args)
811
+ update!(**args)
812
+ end
813
+
814
+ # Update properties of this object
815
+ def update!(**args)
816
+ @version_name = args[:version_name] if args.key?(:version_name)
817
+ @model_name = args[:model_name] if args.key?(:model_name)
818
+ @output_path = args[:output_path] if args.key?(:output_path)
819
+ @uri = args[:uri] if args.key?(:uri)
820
+ @max_worker_count = args[:max_worker_count] if args.key?(:max_worker_count)
821
+ @data_format = args[:data_format] if args.key?(:data_format)
822
+ @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
823
+ @input_paths = args[:input_paths] if args.key?(:input_paths)
824
+ @region = args[:region] if args.key?(:region)
825
+ end
826
+ end
827
+
828
+ # Represents the metadata of the long-running operation.
829
+ class GoogleCloudMlV1OperationMetadata
830
+ include Google::Apis::Core::Hashable
831
+
832
+ # Contains the name of the model associated with the operation.
833
+ # Corresponds to the JSON property `modelName`
834
+ # @return [String]
835
+ attr_accessor :model_name
836
+
837
+ # Represents a version of the model.
838
+ # Each version is a trained model deployed in the cloud, ready to handle
839
+ # prediction requests. A model can have multiple versions. You can get
840
+ # information about all of the versions of a given model by calling
841
+ # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.
842
+ # versions/list).
843
+ # Corresponds to the JSON property `version`
844
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Version]
845
+ attr_accessor :version
846
+
847
+ # The time operation processing completed.
848
+ # Corresponds to the JSON property `endTime`
849
+ # @return [String]
850
+ attr_accessor :end_time
851
+
852
+ # The operation type.
853
+ # Corresponds to the JSON property `operationType`
854
+ # @return [String]
855
+ attr_accessor :operation_type
856
+
857
+ # The time operation processing started.
858
+ # Corresponds to the JSON property `startTime`
859
+ # @return [String]
860
+ attr_accessor :start_time
861
+
862
+ # Indicates whether a request to cancel this operation has been made.
863
+ # Corresponds to the JSON property `isCancellationRequested`
864
+ # @return [Boolean]
865
+ attr_accessor :is_cancellation_requested
866
+ alias_method :is_cancellation_requested?, :is_cancellation_requested
867
+
868
+ # The time the operation was submitted.
869
+ # Corresponds to the JSON property `createTime`
870
+ # @return [String]
871
+ attr_accessor :create_time
872
+
873
+ def initialize(**args)
874
+ update!(**args)
875
+ end
876
+
877
+ # Update properties of this object
878
+ def update!(**args)
879
+ @model_name = args[:model_name] if args.key?(:model_name)
880
+ @version = args[:version] if args.key?(:version)
881
+ @end_time = args[:end_time] if args.key?(:end_time)
882
+ @operation_type = args[:operation_type] if args.key?(:operation_type)
883
+ @start_time = args[:start_time] if args.key?(:start_time)
884
+ @is_cancellation_requested = args[:is_cancellation_requested] if args.key?(:is_cancellation_requested)
885
+ @create_time = args[:create_time] if args.key?(:create_time)
886
+ end
887
+ end
888
+
889
+ # Represents the metadata of the long-running operation.
890
+ class GoogleCloudMlV1beta1OperationMetadata
891
+ include Google::Apis::Core::Hashable
892
+
893
+ # The operation type.
894
+ # Corresponds to the JSON property `operationType`
895
+ # @return [String]
896
+ attr_accessor :operation_type
897
+
898
+ # The time operation processing started.
899
+ # Corresponds to the JSON property `startTime`
900
+ # @return [String]
901
+ attr_accessor :start_time
902
+
903
+ # Indicates whether a request to cancel this operation has been made.
904
+ # Corresponds to the JSON property `isCancellationRequested`
905
+ # @return [Boolean]
906
+ attr_accessor :is_cancellation_requested
907
+ alias_method :is_cancellation_requested?, :is_cancellation_requested
908
+
909
+ # The time the operation was submitted.
910
+ # Corresponds to the JSON property `createTime`
911
+ # @return [String]
912
+ attr_accessor :create_time
913
+
914
+ # Contains the name of the model associated with the operation.
915
+ # Corresponds to the JSON property `modelName`
916
+ # @return [String]
917
+ attr_accessor :model_name
918
+
919
+ # Represents a version of the model.
920
+ # Each version is a trained model deployed in the cloud, ready to handle
921
+ # prediction requests. A model can have multiple versions. You can get
922
+ # information about all of the versions of a given model by calling
923
+ # [projects.models.versions.list](/ml-engine/reference/rest/v1beta1/projects.
924
+ # models.versions/list).
925
+ # Corresponds to the JSON property `version`
926
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1beta1Version]
927
+ attr_accessor :version
928
+
929
+ # The time operation processing completed.
930
+ # Corresponds to the JSON property `endTime`
931
+ # @return [String]
932
+ attr_accessor :end_time
933
+
934
+ def initialize(**args)
935
+ update!(**args)
936
+ end
937
+
938
+ # Update properties of this object
939
+ def update!(**args)
940
+ @operation_type = args[:operation_type] if args.key?(:operation_type)
941
+ @start_time = args[:start_time] if args.key?(:start_time)
942
+ @is_cancellation_requested = args[:is_cancellation_requested] if args.key?(:is_cancellation_requested)
943
+ @create_time = args[:create_time] if args.key?(:create_time)
944
+ @model_name = args[:model_name] if args.key?(:model_name)
945
+ @version = args[:version] if args.key?(:version)
946
+ @end_time = args[:end_time] if args.key?(:end_time)
947
+ end
948
+ end
949
+
950
+ # Represents a set of hyperparameters to optimize.
951
+ class GoogleCloudMlV1HyperparameterSpec
952
+ include Google::Apis::Core::Hashable
953
+
954
+ # Required. The set of parameters to tune.
955
+ # Corresponds to the JSON property `params`
956
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1ParameterSpec>]
957
+ attr_accessor :params
958
+
959
+ # Optional. How many training trials should be attempted to optimize
960
+ # the specified hyperparameters.
961
+ # Defaults to one.
962
+ # Corresponds to the JSON property `maxTrials`
963
+ # @return [Fixnum]
964
+ attr_accessor :max_trials
965
+
966
+ # Optional. The number of training trials to run concurrently.
967
+ # You can reduce the time it takes to perform hyperparameter tuning by adding
968
+ # trials in parallel. However, each trail only benefits from the information
969
+ # gained in completed trials. That means that a trial does not get access to
970
+ # the results of trials running at the same time, which could reduce the
971
+ # quality of the overall optimization.
972
+ # Each trial will use the same scale tier and machine types.
973
+ # Defaults to one.
974
+ # Corresponds to the JSON property `maxParallelTrials`
975
+ # @return [Fixnum]
976
+ attr_accessor :max_parallel_trials
977
+
978
+ # Required. The type of goal to use for tuning. Available types are
979
+ # `MAXIMIZE` and `MINIMIZE`.
980
+ # Defaults to `MAXIMIZE`.
981
+ # Corresponds to the JSON property `goal`
982
+ # @return [String]
983
+ attr_accessor :goal
984
+
985
+ # Optional. The Tensorflow summary tag name to use for optimizing trials. For
986
+ # current versions of Tensorflow, this tag name should exactly match what is
987
+ # shown in Tensorboard, including all scopes. For versions of Tensorflow
988
+ # prior to 0.12, this should be only the tag passed to tf.Summary.
989
+ # By default, "training/hptuning/metric" will be used.
990
+ # Corresponds to the JSON property `hyperparameterMetricTag`
991
+ # @return [String]
992
+ attr_accessor :hyperparameter_metric_tag
993
+
994
+ def initialize(**args)
995
+ update!(**args)
996
+ end
997
+
998
+ # Update properties of this object
999
+ def update!(**args)
1000
+ @params = args[:params] if args.key?(:params)
1001
+ @max_trials = args[:max_trials] if args.key?(:max_trials)
1002
+ @max_parallel_trials = args[:max_parallel_trials] if args.key?(:max_parallel_trials)
1003
+ @goal = args[:goal] if args.key?(:goal)
1004
+ @hyperparameter_metric_tag = args[:hyperparameter_metric_tag] if args.key?(:hyperparameter_metric_tag)
1005
+ end
1006
+ end
1007
+
1008
+ # Response message for the ListJobs method.
1009
+ class GoogleCloudMlV1ListJobsResponse
1010
+ include Google::Apis::Core::Hashable
1011
+
1012
+ # The list of jobs.
1013
+ # Corresponds to the JSON property `jobs`
1014
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Job>]
1015
+ attr_accessor :jobs
1016
+
1017
+ # Optional. Pass this token as the `page_token` field of the request for a
1018
+ # subsequent call.
1019
+ # Corresponds to the JSON property `nextPageToken`
1020
+ # @return [String]
1021
+ attr_accessor :next_page_token
1022
+
1023
+ def initialize(**args)
1024
+ update!(**args)
1025
+ end
1026
+
1027
+ # Update properties of this object
1028
+ def update!(**args)
1029
+ @jobs = args[:jobs] if args.key?(:jobs)
1030
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1031
+ end
1032
+ end
1033
+
1034
+ # Request message for the SetDefaultVersion request.
1035
+ class GoogleCloudMlV1SetDefaultVersionRequest
1036
+ include Google::Apis::Core::Hashable
1037
+
1038
+ def initialize(**args)
1039
+ update!(**args)
1040
+ end
1041
+
1042
+ # Update properties of this object
1043
+ def update!(**args)
1044
+ end
1045
+ end
1046
+
1047
+ # This resource represents a long-running operation that is the result of a
1048
+ # network API call.
1049
+ class GoogleLongrunningOperation
1050
+ include Google::Apis::Core::Hashable
1051
+
1052
+ # If the value is `false`, it means the operation is still in progress.
1053
+ # If true, the operation is completed, and either `error` or `response` is
1054
+ # available.
1055
+ # Corresponds to the JSON property `done`
1056
+ # @return [Boolean]
1057
+ attr_accessor :done
1058
+ alias_method :done?, :done
1059
+
1060
+ # The normal response of the operation in case of success. If the original
1061
+ # method returns no data on success, such as `Delete`, the response is
1062
+ # `google.protobuf.Empty`. If the original method is standard
1063
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
1064
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
1065
+ # is the original method name. For example, if the original method name
1066
+ # is `TakeSnapshot()`, the inferred response type is
1067
+ # `TakeSnapshotResponse`.
1068
+ # Corresponds to the JSON property `response`
1069
+ # @return [Hash<String,Object>]
1070
+ attr_accessor :response
1071
+
1072
+ # The server-assigned name, which is only unique within the same service that
1073
+ # originally returns it. If you use the default HTTP mapping, the
1074
+ # `name` should have the format of `operations/some/unique/name`.
1075
+ # Corresponds to the JSON property `name`
1076
+ # @return [String]
1077
+ attr_accessor :name
1078
+
1079
+ # The `Status` type defines a logical error model that is suitable for different
1080
+ # programming environments, including REST APIs and RPC APIs. It is used by
1081
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
1082
+ # - Simple to use and understand for most users
1083
+ # - Flexible enough to meet unexpected needs
1084
+ # # Overview
1085
+ # The `Status` message contains three pieces of data: error code, error message,
1086
+ # and error details. The error code should be an enum value of
1087
+ # google.rpc.Code, but it may accept additional error codes if needed. The
1088
+ # error message should be a developer-facing English message that helps
1089
+ # developers *understand* and *resolve* the error. If a localized user-facing
1090
+ # error message is needed, put the localized message in the error details or
1091
+ # localize it in the client. The optional error details may contain arbitrary
1092
+ # information about the error. There is a predefined set of error detail types
1093
+ # in the package `google.rpc` which can be used for common error conditions.
1094
+ # # Language mapping
1095
+ # The `Status` message is the logical representation of the error model, but it
1096
+ # is not necessarily the actual wire format. When the `Status` message is
1097
+ # exposed in different client libraries and different wire protocols, it can be
1098
+ # mapped differently. For example, it will likely be mapped to some exceptions
1099
+ # in Java, but more likely mapped to some error codes in C.
1100
+ # # Other uses
1101
+ # The error model and the `Status` message can be used in a variety of
1102
+ # environments, either with or without APIs, to provide a
1103
+ # consistent developer experience across different environments.
1104
+ # Example uses of this error model include:
1105
+ # - Partial errors. If a service needs to return partial errors to the client,
1106
+ # it may embed the `Status` in the normal response to indicate the partial
1107
+ # errors.
1108
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
1109
+ # have a `Status` message for error reporting purpose.
1110
+ # - Batch operations. If a client uses batch request and batch response, the
1111
+ # `Status` message should be used directly inside batch response, one for
1112
+ # each error sub-response.
1113
+ # - Asynchronous operations. If an API call embeds asynchronous operation
1114
+ # results in its response, the status of those operations should be
1115
+ # represented directly using the `Status` message.
1116
+ # - Logging. If some API errors are stored in logs, the message `Status` could
1117
+ # be used directly after any stripping needed for security/privacy reasons.
1118
+ # Corresponds to the JSON property `error`
1119
+ # @return [Google::Apis::MlV1::GoogleRpcStatus]
1120
+ attr_accessor :error
1121
+
1122
+ # Service-specific metadata associated with the operation. It typically
1123
+ # contains progress information and common metadata such as create time.
1124
+ # Some services might not provide such metadata. Any method that returns a
1125
+ # long-running operation should document the metadata type, if any.
1126
+ # Corresponds to the JSON property `metadata`
1127
+ # @return [Hash<String,Object>]
1128
+ attr_accessor :metadata
1129
+
1130
+ def initialize(**args)
1131
+ update!(**args)
1132
+ end
1133
+
1134
+ # Update properties of this object
1135
+ def update!(**args)
1136
+ @done = args[:done] if args.key?(:done)
1137
+ @response = args[:response] if args.key?(:response)
1138
+ @name = args[:name] if args.key?(:name)
1139
+ @error = args[:error] if args.key?(:error)
1140
+ @metadata = args[:metadata] if args.key?(:metadata)
1141
+ end
1142
+ end
1143
+
1144
+ # Represents a machine learning solution.
1145
+ # A model can have multiple versions, each of which is a deployed, trained
1146
+ # model ready to receive prediction requests. The model itself is just a
1147
+ # container.
1148
+ class GoogleCloudMlV1Model
1149
+ include Google::Apis::Core::Hashable
1150
+
1151
+ # Represents a version of the model.
1152
+ # Each version is a trained model deployed in the cloud, ready to handle
1153
+ # prediction requests. A model can have multiple versions. You can get
1154
+ # information about all of the versions of a given model by calling
1155
+ # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models.
1156
+ # versions/list).
1157
+ # Corresponds to the JSON property `defaultVersion`
1158
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Version]
1159
+ attr_accessor :default_version
1160
+
1161
+ # Optional. The list of regions where the model is going to be deployed.
1162
+ # Currently only one region per model is supported.
1163
+ # Defaults to 'us-central1' if nothing is set.
1164
+ # Note:
1165
+ # * No matter where a model is deployed, it can always be accessed by
1166
+ # users from anywhere, both for online and batch prediction.
1167
+ # * The region for a batch prediction job is set by the region field when
1168
+ # submitting the batch prediction job and does not take its value from
1169
+ # this field.
1170
+ # Corresponds to the JSON property `regions`
1171
+ # @return [Array<String>]
1172
+ attr_accessor :regions
1173
+
1174
+ # Required. The name specified for the model when it was created.
1175
+ # The model name must be unique within the project it is created in.
1176
+ # Corresponds to the JSON property `name`
1177
+ # @return [String]
1178
+ attr_accessor :name
1179
+
1180
+ # Optional. The description specified for the model when it was created.
1181
+ # Corresponds to the JSON property `description`
1182
+ # @return [String]
1183
+ attr_accessor :description
1184
+
1185
+ # Optional. If true, enables StackDriver Logging for online prediction.
1186
+ # Default is false.
1187
+ # Corresponds to the JSON property `onlinePredictionLogging`
1188
+ # @return [Boolean]
1189
+ attr_accessor :online_prediction_logging
1190
+ alias_method :online_prediction_logging?, :online_prediction_logging
1191
+
1192
+ def initialize(**args)
1193
+ update!(**args)
1194
+ end
1195
+
1196
+ # Update properties of this object
1197
+ def update!(**args)
1198
+ @default_version = args[:default_version] if args.key?(:default_version)
1199
+ @regions = args[:regions] if args.key?(:regions)
1200
+ @name = args[:name] if args.key?(:name)
1201
+ @description = args[:description] if args.key?(:description)
1202
+ @online_prediction_logging = args[:online_prediction_logging] if args.key?(:online_prediction_logging)
1203
+ end
1204
+ end
1205
+
1206
+ # A generic empty message that you can re-use to avoid defining duplicated
1207
+ # empty messages in your APIs. A typical example is to use it as the request
1208
+ # or the response type of an API method. For instance:
1209
+ # service Foo `
1210
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1211
+ # `
1212
+ # The JSON representation for `Empty` is empty JSON object ````.
1213
+ class GoogleProtobufEmpty
1214
+ include Google::Apis::Core::Hashable
1215
+
1216
+ def initialize(**args)
1217
+ update!(**args)
1218
+ end
1219
+
1220
+ # Update properties of this object
1221
+ def update!(**args)
1222
+ end
1223
+ end
1224
+
1225
+ # Request message for the CancelJob method.
1226
+ class GoogleCloudMlV1CancelJobRequest
1227
+ include Google::Apis::Core::Hashable
1228
+
1229
+ def initialize(**args)
1230
+ update!(**args)
1231
+ end
1232
+
1233
+ # Update properties of this object
1234
+ def update!(**args)
1235
+ end
1236
+ end
1237
+
1238
+ # Response message for the ListVersions method.
1239
+ class GoogleCloudMlV1ListVersionsResponse
1240
+ include Google::Apis::Core::Hashable
1241
+
1242
+ # Optional. Pass this token as the `page_token` field of the request for a
1243
+ # subsequent call.
1244
+ # Corresponds to the JSON property `nextPageToken`
1245
+ # @return [String]
1246
+ attr_accessor :next_page_token
1247
+
1248
+ # The list of versions.
1249
+ # Corresponds to the JSON property `versions`
1250
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Version>]
1251
+ attr_accessor :versions
1252
+
1253
+ def initialize(**args)
1254
+ update!(**args)
1255
+ end
1256
+
1257
+ # Update properties of this object
1258
+ def update!(**args)
1259
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1260
+ @versions = args[:versions] if args.key?(:versions)
1261
+ end
1262
+ end
1263
+
1264
+ # Options for manually scaling a model.
1265
+ class GoogleCloudMlV1beta1ManualScaling
1266
+ include Google::Apis::Core::Hashable
1267
+
1268
+ # The number of nodes to allocate for this model. These nodes are always up,
1269
+ # starting from the time the model is deployed, so the cost of operating
1270
+ # this model will be proportional to nodes * number of hours since
1271
+ # deployment.
1272
+ # Corresponds to the JSON property `nodes`
1273
+ # @return [Fixnum]
1274
+ attr_accessor :nodes
1275
+
1276
+ def initialize(**args)
1277
+ update!(**args)
1278
+ end
1279
+
1280
+ # Update properties of this object
1281
+ def update!(**args)
1282
+ @nodes = args[:nodes] if args.key?(:nodes)
1283
+ end
1284
+ end
1285
+
1286
+ # The `Status` type defines a logical error model that is suitable for different
1287
+ # programming environments, including REST APIs and RPC APIs. It is used by
1288
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
1289
+ # - Simple to use and understand for most users
1290
+ # - Flexible enough to meet unexpected needs
1291
+ # # Overview
1292
+ # The `Status` message contains three pieces of data: error code, error message,
1293
+ # and error details. The error code should be an enum value of
1294
+ # google.rpc.Code, but it may accept additional error codes if needed. The
1295
+ # error message should be a developer-facing English message that helps
1296
+ # developers *understand* and *resolve* the error. If a localized user-facing
1297
+ # error message is needed, put the localized message in the error details or
1298
+ # localize it in the client. The optional error details may contain arbitrary
1299
+ # information about the error. There is a predefined set of error detail types
1300
+ # in the package `google.rpc` which can be used for common error conditions.
1301
+ # # Language mapping
1302
+ # The `Status` message is the logical representation of the error model, but it
1303
+ # is not necessarily the actual wire format. When the `Status` message is
1304
+ # exposed in different client libraries and different wire protocols, it can be
1305
+ # mapped differently. For example, it will likely be mapped to some exceptions
1306
+ # in Java, but more likely mapped to some error codes in C.
1307
+ # # Other uses
1308
+ # The error model and the `Status` message can be used in a variety of
1309
+ # environments, either with or without APIs, to provide a
1310
+ # consistent developer experience across different environments.
1311
+ # Example uses of this error model include:
1312
+ # - Partial errors. If a service needs to return partial errors to the client,
1313
+ # it may embed the `Status` in the normal response to indicate the partial
1314
+ # errors.
1315
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
1316
+ # have a `Status` message for error reporting purpose.
1317
+ # - Batch operations. If a client uses batch request and batch response, the
1318
+ # `Status` message should be used directly inside batch response, one for
1319
+ # each error sub-response.
1320
+ # - Asynchronous operations. If an API call embeds asynchronous operation
1321
+ # results in its response, the status of those operations should be
1322
+ # represented directly using the `Status` message.
1323
+ # - Logging. If some API errors are stored in logs, the message `Status` could
1324
+ # be used directly after any stripping needed for security/privacy reasons.
1325
+ class GoogleRpcStatus
1326
+ include Google::Apis::Core::Hashable
1327
+
1328
+ # A list of messages that carry the error details. There will be a
1329
+ # common set of message types for APIs to use.
1330
+ # Corresponds to the JSON property `details`
1331
+ # @return [Array<Hash<String,Object>>]
1332
+ attr_accessor :details
1333
+
1334
+ # The status code, which should be an enum value of google.rpc.Code.
1335
+ # Corresponds to the JSON property `code`
1336
+ # @return [Fixnum]
1337
+ attr_accessor :code
1338
+
1339
+ # A developer-facing error message, which should be in English. Any
1340
+ # user-facing error message should be localized and sent in the
1341
+ # google.rpc.Status.details field, or localized by the client.
1342
+ # Corresponds to the JSON property `message`
1343
+ # @return [String]
1344
+ attr_accessor :message
1345
+
1346
+ def initialize(**args)
1347
+ update!(**args)
1348
+ end
1349
+
1350
+ # Update properties of this object
1351
+ def update!(**args)
1352
+ @details = args[:details] if args.key?(:details)
1353
+ @code = args[:code] if args.key?(:code)
1354
+ @message = args[:message] if args.key?(:message)
1355
+ end
1356
+ end
1357
+
1358
+ # Represents input parameters for a training job.
1359
+ class GoogleCloudMlV1TrainingInput
1360
+ include Google::Apis::Core::Hashable
1361
+
1362
+ # Required. Specifies the machine types, the number of replicas for workers
1363
+ # and parameter servers.
1364
+ # Corresponds to the JSON property `scaleTier`
1365
+ # @return [String]
1366
+ attr_accessor :scale_tier
1367
+
1368
+ # Optional. A Google Cloud Storage path in which to store training outputs
1369
+ # and other data needed for training. This path is passed to your TensorFlow
1370
+ # program as the 'job_dir' command-line argument. The benefit of specifying
1371
+ # this field is that Cloud ML validates the path for use in training.
1372
+ # Corresponds to the JSON property `jobDir`
1373
+ # @return [String]
1374
+ attr_accessor :job_dir
1375
+
1376
+ # Represents a set of hyperparameters to optimize.
1377
+ # Corresponds to the JSON property `hyperparameters`
1378
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec]
1379
+ attr_accessor :hyperparameters
1380
+
1381
+ # Optional. The number of parameter server replicas to use for the training
1382
+ # job. Each replica in the cluster will be of the type specified in
1383
+ # `parameter_server_type`.
1384
+ # This value can only be used when `scale_tier` is set to `CUSTOM`.If you
1385
+ # set this value, you must also set `parameter_server_type`.
1386
+ # Corresponds to the JSON property `parameterServerCount`
1387
+ # @return [String]
1388
+ attr_accessor :parameter_server_count
1389
+
1390
+ # Required. The Google Cloud Storage location of the packages with
1391
+ # the training program and any additional dependencies.
1392
+ # Corresponds to the JSON property `packageUris`
1393
+ # @return [Array<String>]
1394
+ attr_accessor :package_uris
1395
+
1396
+ # Optional. The number of worker replicas to use for the training job. Each
1397
+ # replica in the cluster will be of the type specified in `worker_type`.
1398
+ # This value can only be used when `scale_tier` is set to `CUSTOM`. If you
1399
+ # set this value, you must also set `worker_type`.
1400
+ # Corresponds to the JSON property `workerCount`
1401
+ # @return [String]
1402
+ attr_accessor :worker_count
1403
+
1404
+ # Optional. Specifies the type of virtual machine to use for your training
1405
+ # job's master worker.
1406
+ # The following types are supported:
1407
+ # <dl>
1408
+ # <dt>standard</dt>
1409
+ # <dd>
1410
+ # A basic machine configuration suitable for training simple models with
1411
+ # small to moderate datasets.
1412
+ # </dd>
1413
+ # <dt>large_model</dt>
1414
+ # <dd>
1415
+ # A machine with a lot of memory, specially suited for parameter servers
1416
+ # when your model is large (having many hidden layers or layers with very
1417
+ # large numbers of nodes).
1418
+ # </dd>
1419
+ # <dt>complex_model_s</dt>
1420
+ # <dd>
1421
+ # A machine suitable for the master and workers of the cluster when your
1422
+ # model requires more computation than the standard machine can handle
1423
+ # satisfactorily.
1424
+ # </dd>
1425
+ # <dt>complex_model_m</dt>
1426
+ # <dd>
1427
+ # A machine with roughly twice the number of cores and roughly double the
1428
+ # memory of <code suppresswarning="true">complex_model_s</code>.
1429
+ # </dd>
1430
+ # <dt>complex_model_l</dt>
1431
+ # <dd>
1432
+ # A machine with roughly twice the number of cores and roughly double the
1433
+ # memory of <code suppresswarning="true">complex_model_m</code>.
1434
+ # </dd>
1435
+ # <dt>standard_gpu</dt>
1436
+ # <dd>
1437
+ # A machine equivalent to <code suppresswarning="true">standard</code> that
1438
+ # also includes a
1439
+ # <a href="/ml-engine/docs/how-tos/using-gpus">
1440
+ # GPU that you can use in your trainer</a>.
1441
+ # </dd>
1442
+ # <dt>complex_model_m_gpu</dt>
1443
+ # <dd>
1444
+ # A machine equivalent to
1445
+ # <code suppresswarning="true">coplex_model_m</code> that also includes
1446
+ # four GPUs.
1447
+ # </dd>
1448
+ # </dl>
1449
+ # You must set this value when `scaleTier` is set to `CUSTOM`.
1450
+ # Corresponds to the JSON property `masterType`
1451
+ # @return [String]
1452
+ attr_accessor :master_type
1453
+
1454
+ # Optional. The Google Cloud ML runtime version to use for training. If not
1455
+ # set, Google Cloud ML will choose the latest stable version.
1456
+ # Corresponds to the JSON property `runtimeVersion`
1457
+ # @return [String]
1458
+ attr_accessor :runtime_version
1459
+
1460
+ # Required. The Python module name to run after installing the packages.
1461
+ # Corresponds to the JSON property `pythonModule`
1462
+ # @return [String]
1463
+ attr_accessor :python_module
1464
+
1465
+ # Required. The Google Compute Engine region to run the training job in.
1466
+ # Corresponds to the JSON property `region`
1467
+ # @return [String]
1468
+ attr_accessor :region
1469
+
1470
+ # Optional. Command line arguments to pass to the program.
1471
+ # Corresponds to the JSON property `args`
1472
+ # @return [Array<String>]
1473
+ attr_accessor :args
1474
+
1475
+ # Optional. Specifies the type of virtual machine to use for your training
1476
+ # job's worker nodes.
1477
+ # The supported values are the same as those described in the entry for
1478
+ # `masterType`.
1479
+ # This value must be present when `scaleTier` is set to `CUSTOM` and
1480
+ # `workerCount` is greater than zero.
1481
+ # Corresponds to the JSON property `workerType`
1482
+ # @return [String]
1483
+ attr_accessor :worker_type
1484
+
1485
+ # Optional. Specifies the type of virtual machine to use for your training
1486
+ # job's parameter server.
1487
+ # The supported values are the same as those described in the entry for
1488
+ # `master_type`.
1489
+ # This value must be present when `scaleTier` is set to `CUSTOM` and
1490
+ # `parameter_server_count` is greater than zero.
1491
+ # Corresponds to the JSON property `parameterServerType`
1492
+ # @return [String]
1493
+ attr_accessor :parameter_server_type
1494
+
1495
+ def initialize(**args)
1496
+ update!(**args)
1497
+ end
1498
+
1499
+ # Update properties of this object
1500
+ def update!(**args)
1501
+ @scale_tier = args[:scale_tier] if args.key?(:scale_tier)
1502
+ @job_dir = args[:job_dir] if args.key?(:job_dir)
1503
+ @hyperparameters = args[:hyperparameters] if args.key?(:hyperparameters)
1504
+ @parameter_server_count = args[:parameter_server_count] if args.key?(:parameter_server_count)
1505
+ @package_uris = args[:package_uris] if args.key?(:package_uris)
1506
+ @worker_count = args[:worker_count] if args.key?(:worker_count)
1507
+ @master_type = args[:master_type] if args.key?(:master_type)
1508
+ @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
1509
+ @python_module = args[:python_module] if args.key?(:python_module)
1510
+ @region = args[:region] if args.key?(:region)
1511
+ @args = args[:args] if args.key?(:args)
1512
+ @worker_type = args[:worker_type] if args.key?(:worker_type)
1513
+ @parameter_server_type = args[:parameter_server_type] if args.key?(:parameter_server_type)
1514
+ end
1515
+ end
1516
+
1517
+ # Response message for the ListModels method.
1518
+ class GoogleCloudMlV1ListModelsResponse
1519
+ include Google::Apis::Core::Hashable
1520
+
1521
+ # Optional. Pass this token as the `page_token` field of the request for a
1522
+ # subsequent call.
1523
+ # Corresponds to the JSON property `nextPageToken`
1524
+ # @return [String]
1525
+ attr_accessor :next_page_token
1526
+
1527
+ # The list of models.
1528
+ # Corresponds to the JSON property `models`
1529
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Model>]
1530
+ attr_accessor :models
1531
+
1532
+ def initialize(**args)
1533
+ update!(**args)
1534
+ end
1535
+
1536
+ # Update properties of this object
1537
+ def update!(**args)
1538
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1539
+ @models = args[:models] if args.key?(:models)
1540
+ end
1541
+ end
1542
+
1543
+ # Represents a training or prediction job.
1544
+ class GoogleCloudMlV1Job
1545
+ include Google::Apis::Core::Hashable
1546
+
1547
+ # Output only. When the job processing was completed.
1548
+ # Corresponds to the JSON property `endTime`
1549
+ # @return [String]
1550
+ attr_accessor :end_time
1551
+
1552
+ # Output only. When the job processing was started.
1553
+ # Corresponds to the JSON property `startTime`
1554
+ # @return [String]
1555
+ attr_accessor :start_time
1556
+
1557
+ # Represents results of a prediction job.
1558
+ # Corresponds to the JSON property `predictionOutput`
1559
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1PredictionOutput]
1560
+ attr_accessor :prediction_output
1561
+
1562
+ # Represents results of a training job. Output only.
1563
+ # Corresponds to the JSON property `trainingOutput`
1564
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1TrainingOutput]
1565
+ attr_accessor :training_output
1566
+
1567
+ # Output only. When the job was created.
1568
+ # Corresponds to the JSON property `createTime`
1569
+ # @return [String]
1570
+ attr_accessor :create_time
1571
+
1572
+ # Represents input parameters for a training job.
1573
+ # Corresponds to the JSON property `trainingInput`
1574
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1TrainingInput]
1575
+ attr_accessor :training_input
1576
+
1577
+ # Output only. The detailed state of a job.
1578
+ # Corresponds to the JSON property `state`
1579
+ # @return [String]
1580
+ attr_accessor :state
1581
+
1582
+ # Represents input parameters for a prediction job.
1583
+ # Corresponds to the JSON property `predictionInput`
1584
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1PredictionInput]
1585
+ attr_accessor :prediction_input
1586
+
1587
+ # Output only. The details of a failure or a cancellation.
1588
+ # Corresponds to the JSON property `errorMessage`
1589
+ # @return [String]
1590
+ attr_accessor :error_message
1591
+
1592
+ # Required. The user-specified id of the job.
1593
+ # Corresponds to the JSON property `jobId`
1594
+ # @return [String]
1595
+ attr_accessor :job_id
1596
+
1597
+ def initialize(**args)
1598
+ update!(**args)
1599
+ end
1600
+
1601
+ # Update properties of this object
1602
+ def update!(**args)
1603
+ @end_time = args[:end_time] if args.key?(:end_time)
1604
+ @start_time = args[:start_time] if args.key?(:start_time)
1605
+ @prediction_output = args[:prediction_output] if args.key?(:prediction_output)
1606
+ @training_output = args[:training_output] if args.key?(:training_output)
1607
+ @create_time = args[:create_time] if args.key?(:create_time)
1608
+ @training_input = args[:training_input] if args.key?(:training_input)
1609
+ @state = args[:state] if args.key?(:state)
1610
+ @prediction_input = args[:prediction_input] if args.key?(:prediction_input)
1611
+ @error_message = args[:error_message] if args.key?(:error_message)
1612
+ @job_id = args[:job_id] if args.key?(:job_id)
1613
+ end
1614
+ end
1615
+ end
1616
+ end
1617
+ end