google-api-client 0.25.0 → 0.26.0

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 (265) hide show
  1. checksums.yaml +4 -4
  2. data/{CONTRIBUTING.md → .github/CONTRIBUTING.md} +0 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
  5. data/.github/ISSUE_TEMPLATE/support_request.md +7 -0
  6. data/.kokoro/build.bat +8 -0
  7. data/.kokoro/build.sh +36 -0
  8. data/.kokoro/common.cfg +22 -0
  9. data/.kokoro/continuous/common.cfg +20 -0
  10. data/.kokoro/continuous/linux.cfg +15 -0
  11. data/.kokoro/continuous/osx.cfg +3 -0
  12. data/.kokoro/continuous/windows.cfg +3 -0
  13. data/.kokoro/osx.sh +35 -0
  14. data/.kokoro/presubmit/common.cfg +19 -0
  15. data/.kokoro/presubmit/linux.cfg +14 -0
  16. data/.kokoro/presubmit/osx.cfg +3 -0
  17. data/.kokoro/presubmit/windows.cfg +3 -0
  18. data/.kokoro/trampoline.sh +24 -0
  19. data/.kokoro/windows.sh +32 -0
  20. data/CHANGELOG.md +83 -0
  21. data/Gemfile +2 -2
  22. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  23. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +3 -1
  24. data/generated/google/apis/alertcenter_v1beta1.rb +5 -3
  25. data/generated/google/apis/alertcenter_v1beta1/classes.rb +110 -101
  26. data/generated/google/apis/alertcenter_v1beta1/representations.rb +13 -0
  27. data/generated/google/apis/alertcenter_v1beta1/service.rb +83 -76
  28. data/generated/google/apis/androiddeviceprovisioning_v1.rb +1 -1
  29. data/generated/google/apis/androiddeviceprovisioning_v1/classes.rb +7 -0
  30. data/generated/google/apis/androiddeviceprovisioning_v1/representations.rb +2 -0
  31. data/generated/google/apis/androiddeviceprovisioning_v1/service.rb +1 -1
  32. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  33. data/generated/google/apis/androidenterprise_v1/classes.rb +129 -44
  34. data/generated/google/apis/androidenterprise_v1/representations.rb +48 -0
  35. data/generated/google/apis/androidenterprise_v1/service.rb +218 -0
  36. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  37. data/generated/google/apis/androidmanagement_v1/classes.rb +1 -1
  38. data/generated/google/apis/androidpublisher_v3.rb +1 -1
  39. data/generated/google/apis/androidpublisher_v3/classes.rb +8 -0
  40. data/generated/google/apis/androidpublisher_v3/representations.rb +1 -0
  41. data/generated/google/apis/appengine_v1.rb +1 -1
  42. data/generated/google/apis/appengine_v1beta.rb +1 -1
  43. data/generated/google/apis/bigquery_v2.rb +1 -1
  44. data/generated/google/apis/bigquery_v2/classes.rb +87 -29
  45. data/generated/google/apis/bigquery_v2/representations.rb +21 -0
  46. data/generated/google/apis/bigquery_v2/service.rb +7 -9
  47. data/generated/google/apis/calendar_v3.rb +2 -2
  48. data/generated/google/apis/calendar_v3/classes.rb +14 -6
  49. data/generated/google/apis/classroom_v1.rb +1 -1
  50. data/generated/google/apis/classroom_v1/service.rb +1 -1
  51. data/generated/google/apis/cloudasset_v1beta1.rb +1 -1
  52. data/generated/google/apis/cloudasset_v1beta1/classes.rb +14 -10
  53. data/generated/google/apis/cloudasset_v1beta1/service.rb +4 -4
  54. data/generated/google/apis/clouddebugger_v2.rb +1 -1
  55. data/generated/google/apis/clouddebugger_v2/classes.rb +2 -2
  56. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  57. data/generated/google/apis/cloudfunctions_v1/classes.rb +2 -3
  58. data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
  59. data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +2 -3
  60. data/generated/google/apis/cloudiot_v1.rb +1 -1
  61. data/generated/google/apis/cloudiot_v1/classes.rb +127 -0
  62. data/generated/google/apis/cloudiot_v1/representations.rb +70 -0
  63. data/generated/google/apis/cloudiot_v1/service.rb +172 -2
  64. data/generated/google/apis/cloudkms_v1.rb +1 -1
  65. data/generated/google/apis/cloudkms_v1/service.rb +107 -0
  66. data/generated/google/apis/{cloudiot_v1beta1.rb → cloudscheduler_v1beta1.rb} +8 -12
  67. data/generated/google/apis/cloudscheduler_v1beta1/classes.rb +882 -0
  68. data/generated/google/apis/cloudscheduler_v1beta1/representations.rb +264 -0
  69. data/generated/google/apis/cloudscheduler_v1beta1/service.rb +445 -0
  70. data/generated/google/apis/cloudsearch_v1.rb +1 -1
  71. data/generated/google/apis/cloudsearch_v1/classes.rb +79 -1
  72. data/generated/google/apis/cloudsearch_v1/representations.rb +44 -0
  73. data/generated/google/apis/cloudsearch_v1/service.rb +88 -3
  74. data/generated/google/apis/composer_v1.rb +1 -1
  75. data/generated/google/apis/composer_v1/classes.rb +9 -0
  76. data/generated/google/apis/composer_v1/representations.rb +1 -0
  77. data/generated/google/apis/compute_alpha.rb +1 -1
  78. data/generated/google/apis/compute_alpha/classes.rb +938 -117
  79. data/generated/google/apis/compute_alpha/representations.rb +310 -2
  80. data/generated/google/apis/compute_alpha/service.rb +1203 -245
  81. data/generated/google/apis/compute_beta.rb +1 -1
  82. data/generated/google/apis/compute_beta/classes.rb +1175 -219
  83. data/generated/google/apis/compute_beta/representations.rb +375 -2
  84. data/generated/google/apis/compute_beta/service.rb +907 -139
  85. data/generated/google/apis/compute_v1.rb +1 -1
  86. data/generated/google/apis/compute_v1/classes.rb +1485 -143
  87. data/generated/google/apis/compute_v1/representations.rb +503 -0
  88. data/generated/google/apis/compute_v1/service.rb +1375 -85
  89. data/generated/google/apis/container_v1.rb +3 -3
  90. data/generated/google/apis/container_v1/classes.rb +99 -6
  91. data/generated/google/apis/container_v1/representations.rb +39 -0
  92. data/generated/google/apis/container_v1/service.rb +2 -2
  93. data/generated/google/apis/container_v1beta1.rb +3 -3
  94. data/generated/google/apis/container_v1beta1/classes.rb +162 -9
  95. data/generated/google/apis/container_v1beta1/representations.rb +80 -0
  96. data/generated/google/apis/container_v1beta1/service.rb +3 -3
  97. data/generated/google/apis/content_v2.rb +1 -1
  98. data/generated/google/apis/content_v2/classes.rb +40 -32
  99. data/generated/google/apis/content_v2/representations.rb +0 -1
  100. data/generated/google/apis/content_v2/service.rb +3 -3
  101. data/generated/google/apis/content_v2_1.rb +35 -0
  102. data/generated/google/apis/content_v2_1/classes.rb +9104 -0
  103. data/generated/google/apis/content_v2_1/representations.rb +3967 -0
  104. data/generated/google/apis/content_v2_1/service.rb +3463 -0
  105. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  106. data/generated/google/apis/dataflow_v1b3/classes.rb +82 -0
  107. data/generated/google/apis/dataflow_v1b3/representations.rb +33 -0
  108. data/generated/google/apis/dataflow_v1b3/service.rb +97 -6
  109. data/generated/google/apis/dataproc_v1.rb +1 -1
  110. data/generated/google/apis/dataproc_v1/classes.rb +15 -1
  111. data/generated/google/apis/dataproc_v1/representations.rb +2 -0
  112. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  113. data/generated/google/apis/dataproc_v1beta2/classes.rb +125 -1
  114. data/generated/google/apis/dataproc_v1beta2/representations.rb +41 -0
  115. data/generated/google/apis/dialogflow_v2.rb +1 -1
  116. data/generated/google/apis/dialogflow_v2/classes.rb +13 -6
  117. data/generated/google/apis/dialogflow_v2/service.rb +2 -0
  118. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  119. data/generated/google/apis/dialogflow_v2beta1/classes.rb +26 -6
  120. data/generated/google/apis/dialogflow_v2beta1/representations.rb +12 -0
  121. data/generated/google/apis/dialogflow_v2beta1/service.rb +261 -12
  122. data/generated/google/apis/dlp_v2.rb +1 -1
  123. data/generated/google/apis/dlp_v2/classes.rb +4 -4
  124. data/generated/google/apis/dns_v1beta2.rb +1 -1
  125. data/generated/google/apis/dns_v1beta2/classes.rb +326 -0
  126. data/generated/google/apis/dns_v1beta2/representations.rb +149 -0
  127. data/generated/google/apis/dns_v1beta2/service.rb +246 -0
  128. data/generated/google/apis/drive_v2.rb +3 -3
  129. data/generated/google/apis/drive_v3.rb +3 -3
  130. data/generated/google/apis/driveactivity_v2.rb +37 -0
  131. data/generated/google/apis/driveactivity_v2/classes.rb +1388 -0
  132. data/generated/google/apis/driveactivity_v2/representations.rb +799 -0
  133. data/generated/google/apis/driveactivity_v2/service.rb +89 -0
  134. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  135. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +8 -1
  136. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +1 -0
  137. data/generated/google/apis/firebasehosting_v1beta1.rb +3 -2
  138. data/generated/google/apis/firebasehosting_v1beta1/classes.rb +43 -17
  139. data/generated/google/apis/firebasehosting_v1beta1/representations.rb +13 -0
  140. data/generated/google/apis/firebasehosting_v1beta1/service.rb +74 -1
  141. data/generated/google/apis/firestore_v1.rb +1 -1
  142. data/generated/google/apis/firestore_v1/classes.rb +2225 -520
  143. data/generated/google/apis/firestore_v1/representations.rb +800 -33
  144. data/generated/google/apis/firestore_v1/service.rb +526 -0
  145. data/generated/google/apis/fitness_v1.rb +1 -1
  146. data/generated/google/apis/fitness_v1/classes.rb +1 -2
  147. data/generated/google/apis/fitness_v1/service.rb +7 -3
  148. data/generated/google/apis/games_management_v1management.rb +1 -4
  149. data/generated/google/apis/games_v1.rb +1 -4
  150. data/generated/google/apis/genomics_v2alpha1.rb +1 -1
  151. data/generated/google/apis/genomics_v2alpha1/classes.rb +6 -1
  152. data/generated/google/apis/gmail_v1.rb +2 -2
  153. data/generated/google/apis/iap_v1.rb +34 -0
  154. data/generated/google/apis/iap_v1/classes.rb +308 -0
  155. data/generated/google/apis/iap_v1/representations.rb +126 -0
  156. data/generated/google/apis/iap_v1/service.rb +725 -0
  157. data/generated/google/apis/iap_v1beta1.rb +1 -1
  158. data/generated/google/apis/iap_v1beta1/classes.rb +0 -132
  159. data/generated/google/apis/iap_v1beta1/representations.rb +0 -32
  160. data/generated/google/apis/jobs_v2.rb +1 -1
  161. data/generated/google/apis/jobs_v2/classes.rb +8 -9
  162. data/generated/google/apis/jobs_v3.rb +1 -1
  163. data/generated/google/apis/jobs_v3/classes.rb +6 -6
  164. data/generated/google/apis/jobs_v3/service.rb +8 -8
  165. data/generated/google/apis/jobs_v3p1beta1.rb +1 -1
  166. data/generated/google/apis/jobs_v3p1beta1/classes.rb +9 -9
  167. data/generated/google/apis/jobs_v3p1beta1/service.rb +8 -8
  168. data/generated/google/apis/monitoring_v3.rb +1 -1
  169. data/generated/google/apis/monitoring_v3/classes.rb +20 -7
  170. data/generated/google/apis/monitoring_v3/representations.rb +1 -0
  171. data/generated/google/apis/monitoring_v3/service.rb +0 -365
  172. data/generated/google/apis/pagespeedonline_v5.rb +32 -0
  173. data/generated/google/apis/pagespeedonline_v5/classes.rb +724 -0
  174. data/generated/google/apis/pagespeedonline_v5/representations.rb +315 -0
  175. data/generated/google/apis/pagespeedonline_v5/service.rb +116 -0
  176. data/generated/google/apis/people_v1.rb +3 -3
  177. data/generated/google/apis/pubsub_v1.rb +1 -1
  178. data/generated/google/apis/pubsub_v1/classes.rb +63 -12
  179. data/generated/google/apis/pubsub_v1/representations.rb +15 -0
  180. data/generated/google/apis/pubsub_v1/service.rb +26 -18
  181. data/generated/google/apis/redis_v1.rb +2 -3
  182. data/generated/google/apis/redis_v1/service.rb +1 -2
  183. data/generated/google/apis/redis_v1beta1.rb +2 -3
  184. data/generated/google/apis/redis_v1beta1/service.rb +1 -2
  185. data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
  186. data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +2 -2
  187. data/generated/google/apis/script_v1.rb +24 -6
  188. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  189. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +66 -1
  190. data/generated/google/apis/serviceconsumermanagement_v1/representations.rb +30 -0
  191. data/generated/google/apis/serviceconsumermanagement_v1/service.rb +89 -0
  192. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  193. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  194. data/generated/google/apis/servicemanagement_v1/classes.rb +7 -0
  195. data/generated/google/apis/servicemanagement_v1/representations.rb +1 -0
  196. data/generated/google/apis/servicenetworking_v1beta.rb +1 -1
  197. data/generated/google/apis/servicenetworking_v1beta/classes.rb +84 -37
  198. data/generated/google/apis/servicenetworking_v1beta/representations.rb +15 -0
  199. data/generated/google/apis/servicenetworking_v1beta/service.rb +132 -43
  200. data/generated/google/apis/serviceusage_v1.rb +1 -1
  201. data/generated/google/apis/serviceusage_v1/classes.rb +1 -1
  202. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  203. data/generated/google/apis/serviceusage_v1beta1/classes.rb +1 -1
  204. data/generated/google/apis/sheets_v4.rb +4 -4
  205. data/generated/google/apis/slides_v1.rb +4 -4
  206. data/generated/google/apis/slides_v1/classes.rb +187 -2
  207. data/generated/google/apis/slides_v1/representations.rb +67 -0
  208. data/generated/google/apis/slides_v1/service.rb +4 -3
  209. data/generated/google/apis/sourcerepo_v1.rb +2 -2
  210. data/generated/google/apis/sourcerepo_v1/service.rb +1 -1
  211. data/generated/google/apis/speech_v1.rb +1 -1
  212. data/generated/google/apis/speech_v1/classes.rb +58 -10
  213. data/generated/google/apis/speech_v1/representations.rb +29 -1
  214. data/generated/google/apis/{speech_v1beta1.rb → speech_v1p1beta1.rb} +6 -6
  215. data/generated/google/apis/speech_v1p1beta1/classes.rb +922 -0
  216. data/generated/google/apis/speech_v1p1beta1/representations.rb +294 -0
  217. data/generated/google/apis/{speech_v1beta1 → speech_v1p1beta1}/service.rb +33 -35
  218. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  219. data/generated/google/apis/sqladmin_v1beta4/classes.rb +64 -3
  220. data/generated/google/apis/sqladmin_v1beta4/representations.rb +31 -0
  221. data/generated/google/apis/storage_v1.rb +1 -1
  222. data/generated/google/apis/storage_v1/classes.rb +54 -0
  223. data/generated/google/apis/storage_v1/representations.rb +31 -0
  224. data/generated/google/apis/streetviewpublish_v1.rb +1 -1
  225. data/generated/google/apis/streetviewpublish_v1/classes.rb +26 -0
  226. data/generated/google/apis/streetviewpublish_v1/representations.rb +4 -0
  227. data/generated/google/apis/streetviewpublish_v1/service.rb +29 -3
  228. data/generated/google/apis/tasks_v1.rb +1 -1
  229. data/generated/google/apis/testing_v1.rb +1 -1
  230. data/generated/google/apis/testing_v1/classes.rb +49 -19
  231. data/generated/google/apis/testing_v1/representations.rb +20 -2
  232. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  233. data/generated/google/apis/toolresults_v1beta3/classes.rb +77 -70
  234. data/generated/google/apis/vault_v1.rb +1 -1
  235. data/generated/google/apis/vault_v1/classes.rb +78 -7
  236. data/generated/google/apis/vault_v1/representations.rb +34 -1
  237. data/generated/google/apis/vault_v1/service.rb +141 -0
  238. data/generated/google/apis/vision_v1.rb +1 -1
  239. data/generated/google/apis/vision_v1/classes.rb +33 -0
  240. data/generated/google/apis/vision_v1/representations.rb +16 -0
  241. data/generated/google/apis/vision_v1/service.rb +2 -2
  242. data/generated/google/apis/vision_v1p1beta1.rb +1 -1
  243. data/generated/google/apis/vision_v1p1beta1/classes.rb +33 -0
  244. data/generated/google/apis/vision_v1p1beta1/representations.rb +16 -0
  245. data/generated/google/apis/vision_v1p2beta1.rb +1 -1
  246. data/generated/google/apis/vision_v1p2beta1/classes.rb +33 -0
  247. data/generated/google/apis/vision_v1p2beta1/representations.rb +16 -0
  248. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  249. data/google-api-client.gemspec +1 -1
  250. data/lib/google/api_client/auth/installed_app.rb +17 -2
  251. data/lib/google/api_client/client_secrets.rb +1 -1
  252. data/lib/google/apis/core/download.rb +2 -2
  253. data/lib/google/apis/errors.rb +9 -0
  254. data/lib/google/apis/generator/annotator.rb +2 -2
  255. data/lib/google/apis/version.rb +1 -1
  256. metadata +46 -17
  257. data/generated/google/apis/cloudiot_v1beta1/classes.rb +0 -959
  258. data/generated/google/apis/cloudiot_v1beta1/representations.rb +0 -375
  259. data/generated/google/apis/cloudiot_v1beta1/service.rb +0 -618
  260. data/generated/google/apis/dfareporting_v3_0.rb +0 -40
  261. data/generated/google/apis/dfareporting_v3_0/classes.rb +0 -12119
  262. data/generated/google/apis/dfareporting_v3_0/representations.rb +0 -4336
  263. data/generated/google/apis/dfareporting_v3_0/service.rb +0 -8701
  264. data/generated/google/apis/speech_v1beta1/classes.rb +0 -480
  265. data/generated/google/apis/speech_v1beta1/representations.rb +0 -194
@@ -250,6 +250,12 @@ module Google
250
250
  include Google::Apis::Core::JsonObjectSupport
251
251
  end
252
252
 
253
+ class GoogleCloudVisionV1p1beta1NormalizedVertex
254
+ class Representation < Google::Apis::Core::JsonRepresentation; end
255
+
256
+ include Google::Apis::Core::JsonObjectSupport
257
+ end
258
+
253
259
  class GoogleCloudVisionV1p1beta1OperationMetadata
254
260
  class Representation < Google::Apis::Core::JsonRepresentation; end
255
261
 
@@ -1522,6 +1528,8 @@ module Google
1522
1528
  class GoogleCloudVisionV1p1beta1BoundingPoly
1523
1529
  # @private
1524
1530
  class Representation < Google::Apis::Core::JsonRepresentation
1531
+ collection :normalized_vertices, as: 'normalizedVertices', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p1beta1NormalizedVertex, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p1beta1NormalizedVertex::Representation
1532
+
1525
1533
  collection :vertices, as: 'vertices', class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p1beta1Vertex, decorator: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p1beta1Vertex::Representation
1526
1534
 
1527
1535
  end
@@ -1673,6 +1681,14 @@ module Google
1673
1681
  end
1674
1682
  end
1675
1683
 
1684
+ class GoogleCloudVisionV1p1beta1NormalizedVertex
1685
+ # @private
1686
+ class Representation < Google::Apis::Core::JsonRepresentation
1687
+ property :x, as: 'x'
1688
+ property :y, as: 'y'
1689
+ end
1690
+ end
1691
+
1676
1692
  class GoogleCloudVisionV1p1beta1OperationMetadata
1677
1693
  # @private
1678
1694
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/youtube/partner/
26
26
  module YoutubePartnerV1
27
27
  VERSION = 'V1'
28
- REVISION = '20181029'
28
+ REVISION = '20181203'
29
29
 
30
30
  # View and manage your assets and associated content on YouTube
31
31
  AUTH_YOUTUBEPARTNER = 'https://www.googleapis.com/auth/youtubepartner'
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_runtime_dependency 'addressable', '~> 2.5', '>= 2.5.1'
26
26
  spec.add_runtime_dependency 'mime-types', '~> 3.0'
27
27
  spec.add_runtime_dependency 'signet', '~> 0.10'
28
- spec.add_runtime_dependency 'googleauth', '>= 0.5', '< 0.7.0'
28
+ spec.add_runtime_dependency 'googleauth', '>= 0.5', '< 0.8.0'
29
29
  spec.add_runtime_dependency 'httpclient', '>= 2.8.1', '< 3.0'
30
30
  spec.add_development_dependency 'thor', '~> 0.19'
31
31
  spec.add_development_dependency 'activesupport', '>= 4.2', '< 5.1'
@@ -13,7 +13,16 @@
13
13
  # limitations under the License.
14
14
 
15
15
  require 'webrick'
16
- require 'launchy'
16
+
17
+ launchy_available =
18
+ begin
19
+ require 'launchy'
20
+ true
21
+ rescue LoadError
22
+ warn "Attempted to require google/api_client/auth/installed_app.rb when" \
23
+ " launchy is not available. The InstalledAppFlow class is disabled."
24
+ false
25
+ end
17
26
 
18
27
  module Google
19
28
  class APIClient
@@ -21,6 +30,12 @@ module Google
21
30
  # Small helper for the sample apps for performing OAuth 2.0 flows from the command
22
31
  # line or in any other installed app environment.
23
32
  #
33
+ # This class is used in some sample apps and tests but is not really part
34
+ # of the client libraries, and probably does not belong here. As such, it
35
+ # is deprecated. If you do choose to use it, note that you must include the
36
+ # `launchy` gem in your bundle, as it is required by this class but not
37
+ # listed in the google-api-client gem's requirements.
38
+ #
24
39
  # @example
25
40
  #
26
41
  # flow = Google::APIClient::InstalledAppFlow.new(
@@ -125,4 +140,4 @@ module Google
125
140
  end
126
141
 
127
142
  end
128
- end
143
+ end if launchy_available
@@ -62,7 +62,7 @@ module Google
62
62
  search_path ||= File.expand_path('.')
63
63
  if File.exists?(File.join(search_path, 'client_secrets.json'))
64
64
  filename = File.join(search_path, 'client_secrets.json')
65
- elsif search_path == '/' || search_path =~ /[a-zA-Z]:[\/\\]/
65
+ elsif search_path == File.expand_path('..', search_path)
66
66
  raise ArgumentError,
67
67
  'No client_secrets.json filename supplied ' +
68
68
  'and/or could not be found in search path.'
@@ -99,7 +99,7 @@ module Google
99
99
  @offset += next_chunk.bytesize
100
100
  end
101
101
 
102
- @download_io.flush
102
+ @download_io.flush if @download_io.respond_to?(:flush)
103
103
 
104
104
  if @close_io_on_finish
105
105
  result = nil
@@ -109,7 +109,7 @@ module Google
109
109
  check_status(http_res.status.to_i, http_res.header, http_res.body)
110
110
  success(result, &block)
111
111
  rescue => e
112
- @download_io.flush
112
+ @download_io.flush if @download_io.respond_to?(:flush)
113
113
  error(e, rethrow: true, &block)
114
114
  end
115
115
  end
@@ -41,6 +41,15 @@ module Google
41
41
  super
42
42
  end
43
43
  end
44
+
45
+ def inspect
46
+ extra = ""
47
+ extra << " status_code: #{status_code.inspect}" unless status_code.nil?
48
+ extra << " header: #{header.inspect}" unless header.nil?
49
+ extra << " body: #{body.inspect}" unless body.nil?
50
+
51
+ "#<#{self.class.name}: #{message}#{extra}>"
52
+ end
44
53
  end
45
54
 
46
55
  # An error which is raised when there is an unexpected response or other
@@ -42,13 +42,13 @@ module Google
42
42
  include NameHelpers
43
43
 
44
44
  def initialize(names_out_file_path = nil, names_file_path = nil)
45
- if names_out_file_path
45
+ if names_out_file_path && File.file?(names_out_file_path)
46
46
  logger.info { sprintf('Loading API names from %s', names_out_file_path) }
47
47
  @names = YAML.load(File.read(names_out_file_path)) || {}
48
48
  else
49
49
  @names = {}
50
50
  end
51
- if names_file_path
51
+ if names_file_path && File.file?(names_file_path)
52
52
  logger.info { sprintf('Loading API names from %s', names_file_path) }
53
53
  @names = @names.merge(YAML.load(File.read(names_file_path)) || {})
54
54
  end
@@ -15,7 +15,7 @@
15
15
  module Google
16
16
  module Apis
17
17
  # Client library version
18
- VERSION = '0.25.0'.freeze
18
+ VERSION = '0.26.0'.freeze
19
19
 
20
20
  # Current operating system
21
21
  # @private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Bazyl
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-11-06 00:00:00.000000000 Z
14
+ date: 2018-12-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: representable
@@ -104,7 +104,7 @@ dependencies:
104
104
  version: '0.5'
105
105
  - - "<"
106
106
  - !ruby/object:Gem::Version
107
- version: 0.7.0
107
+ version: 0.8.0
108
108
  type: :runtime
109
109
  prerelease: false
110
110
  version_requirements: !ruby/object:Gem::Requirement
@@ -114,7 +114,7 @@ dependencies:
114
114
  version: '0.5'
115
115
  - - "<"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.7.0
117
+ version: 0.8.0
118
118
  - !ruby/object:Gem::Dependency
119
119
  name: httpclient
120
120
  requirement: !ruby/object:Gem::Requirement
@@ -177,7 +177,25 @@ executables:
177
177
  extensions: []
178
178
  extra_rdoc_files: []
179
179
  files:
180
+ - ".github/CONTRIBUTING.md"
181
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
182
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
183
+ - ".github/ISSUE_TEMPLATE/support_request.md"
180
184
  - ".gitignore"
185
+ - ".kokoro/build.bat"
186
+ - ".kokoro/build.sh"
187
+ - ".kokoro/common.cfg"
188
+ - ".kokoro/continuous/common.cfg"
189
+ - ".kokoro/continuous/linux.cfg"
190
+ - ".kokoro/continuous/osx.cfg"
191
+ - ".kokoro/continuous/windows.cfg"
192
+ - ".kokoro/osx.sh"
193
+ - ".kokoro/presubmit/common.cfg"
194
+ - ".kokoro/presubmit/linux.cfg"
195
+ - ".kokoro/presubmit/osx.cfg"
196
+ - ".kokoro/presubmit/windows.cfg"
197
+ - ".kokoro/trampoline.sh"
198
+ - ".kokoro/windows.sh"
181
199
  - ".rspec"
182
200
  - ".rubocop.yml"
183
201
  - ".rubocop_todo.yml"
@@ -185,7 +203,6 @@ files:
185
203
  - ".yardopts"
186
204
  - CHANGELOG.md
187
205
  - CODE_OF_CONDUCT.md
188
- - CONTRIBUTING.md
189
206
  - Gemfile
190
207
  - LICENSE
191
208
  - MIGRATING.md
@@ -393,10 +410,6 @@ files:
393
410
  - generated/google/apis/cloudiot_v1/classes.rb
394
411
  - generated/google/apis/cloudiot_v1/representations.rb
395
412
  - generated/google/apis/cloudiot_v1/service.rb
396
- - generated/google/apis/cloudiot_v1beta1.rb
397
- - generated/google/apis/cloudiot_v1beta1/classes.rb
398
- - generated/google/apis/cloudiot_v1beta1/representations.rb
399
- - generated/google/apis/cloudiot_v1beta1/service.rb
400
413
  - generated/google/apis/cloudkms_v1.rb
401
414
  - generated/google/apis/cloudkms_v1/classes.rb
402
415
  - generated/google/apis/cloudkms_v1/representations.rb
@@ -421,6 +434,10 @@ files:
421
434
  - generated/google/apis/cloudresourcemanager_v2beta1/classes.rb
422
435
  - generated/google/apis/cloudresourcemanager_v2beta1/representations.rb
423
436
  - generated/google/apis/cloudresourcemanager_v2beta1/service.rb
437
+ - generated/google/apis/cloudscheduler_v1beta1.rb
438
+ - generated/google/apis/cloudscheduler_v1beta1/classes.rb
439
+ - generated/google/apis/cloudscheduler_v1beta1/representations.rb
440
+ - generated/google/apis/cloudscheduler_v1beta1/service.rb
424
441
  - generated/google/apis/cloudsearch_v1.rb
425
442
  - generated/google/apis/cloudsearch_v1/classes.rb
426
443
  - generated/google/apis/cloudsearch_v1/representations.rb
@@ -481,6 +498,10 @@ files:
481
498
  - generated/google/apis/content_v2/classes.rb
482
499
  - generated/google/apis/content_v2/representations.rb
483
500
  - generated/google/apis/content_v2/service.rb
501
+ - generated/google/apis/content_v2_1.rb
502
+ - generated/google/apis/content_v2_1/classes.rb
503
+ - generated/google/apis/content_v2_1/representations.rb
504
+ - generated/google/apis/content_v2_1/service.rb
484
505
  - generated/google/apis/customsearch_v1.rb
485
506
  - generated/google/apis/customsearch_v1/classes.rb
486
507
  - generated/google/apis/customsearch_v1/representations.rb
@@ -521,10 +542,6 @@ files:
521
542
  - generated/google/apis/deploymentmanager_v2beta/classes.rb
522
543
  - generated/google/apis/deploymentmanager_v2beta/representations.rb
523
544
  - generated/google/apis/deploymentmanager_v2beta/service.rb
524
- - generated/google/apis/dfareporting_v3_0.rb
525
- - generated/google/apis/dfareporting_v3_0/classes.rb
526
- - generated/google/apis/dfareporting_v3_0/representations.rb
527
- - generated/google/apis/dfareporting_v3_0/service.rb
528
545
  - generated/google/apis/dfareporting_v3_1.rb
529
546
  - generated/google/apis/dfareporting_v3_1/classes.rb
530
547
  - generated/google/apis/dfareporting_v3_1/representations.rb
@@ -581,6 +598,10 @@ files:
581
598
  - generated/google/apis/drive_v3/classes.rb
582
599
  - generated/google/apis/drive_v3/representations.rb
583
600
  - generated/google/apis/drive_v3/service.rb
601
+ - generated/google/apis/driveactivity_v2.rb
602
+ - generated/google/apis/driveactivity_v2/classes.rb
603
+ - generated/google/apis/driveactivity_v2/representations.rb
604
+ - generated/google/apis/driveactivity_v2/service.rb
584
605
  - generated/google/apis/file_v1beta1.rb
585
606
  - generated/google/apis/file_v1beta1/classes.rb
586
607
  - generated/google/apis/file_v1beta1/representations.rb
@@ -665,6 +686,10 @@ files:
665
686
  - generated/google/apis/iamcredentials_v1/classes.rb
666
687
  - generated/google/apis/iamcredentials_v1/representations.rb
667
688
  - generated/google/apis/iamcredentials_v1/service.rb
689
+ - generated/google/apis/iap_v1.rb
690
+ - generated/google/apis/iap_v1/classes.rb
691
+ - generated/google/apis/iap_v1/representations.rb
692
+ - generated/google/apis/iap_v1/service.rb
668
693
  - generated/google/apis/iap_v1beta1.rb
669
694
  - generated/google/apis/iap_v1beta1/classes.rb
670
695
  - generated/google/apis/iap_v1beta1/representations.rb
@@ -765,6 +790,10 @@ files:
765
790
  - generated/google/apis/pagespeedonline_v4/classes.rb
766
791
  - generated/google/apis/pagespeedonline_v4/representations.rb
767
792
  - generated/google/apis/pagespeedonline_v4/service.rb
793
+ - generated/google/apis/pagespeedonline_v5.rb
794
+ - generated/google/apis/pagespeedonline_v5/classes.rb
795
+ - generated/google/apis/pagespeedonline_v5/representations.rb
796
+ - generated/google/apis/pagespeedonline_v5/service.rb
768
797
  - generated/google/apis/partners_v2.rb
769
798
  - generated/google/apis/partners_v2/classes.rb
770
799
  - generated/google/apis/partners_v2/representations.rb
@@ -905,10 +934,10 @@ files:
905
934
  - generated/google/apis/speech_v1/classes.rb
906
935
  - generated/google/apis/speech_v1/representations.rb
907
936
  - generated/google/apis/speech_v1/service.rb
908
- - generated/google/apis/speech_v1beta1.rb
909
- - generated/google/apis/speech_v1beta1/classes.rb
910
- - generated/google/apis/speech_v1beta1/representations.rb
911
- - generated/google/apis/speech_v1beta1/service.rb
937
+ - generated/google/apis/speech_v1p1beta1.rb
938
+ - generated/google/apis/speech_v1p1beta1/classes.rb
939
+ - generated/google/apis/speech_v1p1beta1/representations.rb
940
+ - generated/google/apis/speech_v1p1beta1/service.rb
912
941
  - generated/google/apis/sqladmin_v1beta4.rb
913
942
  - generated/google/apis/sqladmin_v1beta4/classes.rb
914
943
  - generated/google/apis/sqladmin_v1beta4/representations.rb
@@ -1,959 +0,0 @@
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 CloudiotV1beta1
24
-
25
- # Specifies the audit configuration for a service.
26
- # The configuration determines which permission types are logged, and what
27
- # identities, if any, are exempted from logging.
28
- # An AuditConfig must have one or more AuditLogConfigs.
29
- # If there are AuditConfigs for both `allServices` and a specific service,
30
- # the union of the two AuditConfigs is used for that service: the log_types
31
- # specified in each AuditConfig are enabled, and the exempted_members in each
32
- # AuditConfig are exempted.
33
- # Example Policy with multiple AuditConfigs:
34
- # `
35
- # "audit_configs": [
36
- # `
37
- # "service": "allServices"
38
- # "audit_log_configs": [
39
- # `
40
- # "log_type": "DATA_READ",
41
- # "exempted_members": [
42
- # "user:foo@gmail.com"
43
- # ]
44
- # `,
45
- # `
46
- # "log_type": "DATA_WRITE",
47
- # `,
48
- # `
49
- # "log_type": "ADMIN_READ",
50
- # `
51
- # ]
52
- # `,
53
- # `
54
- # "service": "fooservice.googleapis.com"
55
- # "audit_log_configs": [
56
- # `
57
- # "log_type": "DATA_READ",
58
- # `,
59
- # `
60
- # "log_type": "DATA_WRITE",
61
- # "exempted_members": [
62
- # "user:bar@gmail.com"
63
- # ]
64
- # `
65
- # ]
66
- # `
67
- # ]
68
- # `
69
- # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
70
- # logging. It also exempts foo@gmail.com from DATA_READ logging, and
71
- # bar@gmail.com from DATA_WRITE logging.
72
- class AuditConfig
73
- include Google::Apis::Core::Hashable
74
-
75
- # The configuration for logging of each type of permission.
76
- # Next ID: 4
77
- # Corresponds to the JSON property `auditLogConfigs`
78
- # @return [Array<Google::Apis::CloudiotV1beta1::AuditLogConfig>]
79
- attr_accessor :audit_log_configs
80
-
81
- #
82
- # Corresponds to the JSON property `exemptedMembers`
83
- # @return [Array<String>]
84
- attr_accessor :exempted_members
85
-
86
- # Specifies a service that will be enabled for audit logging.
87
- # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
88
- # `allServices` is a special value that covers all services.
89
- # Corresponds to the JSON property `service`
90
- # @return [String]
91
- attr_accessor :service
92
-
93
- def initialize(**args)
94
- update!(**args)
95
- end
96
-
97
- # Update properties of this object
98
- def update!(**args)
99
- @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
100
- @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
101
- @service = args[:service] if args.key?(:service)
102
- end
103
- end
104
-
105
- # Provides the configuration for logging a type of permissions.
106
- # Example:
107
- # `
108
- # "audit_log_configs": [
109
- # `
110
- # "log_type": "DATA_READ",
111
- # "exempted_members": [
112
- # "user:foo@gmail.com"
113
- # ]
114
- # `,
115
- # `
116
- # "log_type": "DATA_WRITE",
117
- # `
118
- # ]
119
- # `
120
- # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
121
- # foo@gmail.com from DATA_READ logging.
122
- class AuditLogConfig
123
- include Google::Apis::Core::Hashable
124
-
125
- # Specifies the identities that do not cause logging for this type of
126
- # permission.
127
- # Follows the same format of Binding.members.
128
- # Corresponds to the JSON property `exemptedMembers`
129
- # @return [Array<String>]
130
- attr_accessor :exempted_members
131
-
132
- # The log type that this config enables.
133
- # Corresponds to the JSON property `logType`
134
- # @return [String]
135
- attr_accessor :log_type
136
-
137
- def initialize(**args)
138
- update!(**args)
139
- end
140
-
141
- # Update properties of this object
142
- def update!(**args)
143
- @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
144
- @log_type = args[:log_type] if args.key?(:log_type)
145
- end
146
- end
147
-
148
- # Associates `members` with a `role`.
149
- class Binding
150
- include Google::Apis::Core::Hashable
151
-
152
- # Represents an expression text. Example:
153
- # title: "User account presence"
154
- # description: "Determines whether the request has a user account"
155
- # expression: "size(request.user) > 0"
156
- # Corresponds to the JSON property `condition`
157
- # @return [Google::Apis::CloudiotV1beta1::Expr]
158
- attr_accessor :condition
159
-
160
- # Specifies the identities requesting access for a Cloud Platform resource.
161
- # `members` can have the following values:
162
- # * `allUsers`: A special identifier that represents anyone who is
163
- # on the internet; with or without a Google account.
164
- # * `allAuthenticatedUsers`: A special identifier that represents anyone
165
- # who is authenticated with a Google account or a service account.
166
- # * `user:`emailid``: An email address that represents a specific Google
167
- # account. For example, `alice@gmail.com` or `joe@example.com`.
168
- # * `serviceAccount:`emailid``: An email address that represents a service
169
- # account. For example, `my-other-app@appspot.gserviceaccount.com`.
170
- # * `group:`emailid``: An email address that represents a Google group.
171
- # For example, `admins@example.com`.
172
- # * `domain:`domain``: A Google Apps domain name that represents all the
173
- # users of that domain. For example, `google.com` or `example.com`.
174
- # Corresponds to the JSON property `members`
175
- # @return [Array<String>]
176
- attr_accessor :members
177
-
178
- # Role that is assigned to `members`.
179
- # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
180
- # Required
181
- # Corresponds to the JSON property `role`
182
- # @return [String]
183
- attr_accessor :role
184
-
185
- def initialize(**args)
186
- update!(**args)
187
- end
188
-
189
- # Update properties of this object
190
- def update!(**args)
191
- @condition = args[:condition] if args.key?(:condition)
192
- @members = args[:members] if args.key?(:members)
193
- @role = args[:role] if args.key?(:role)
194
- end
195
- end
196
-
197
- # The device resource.
198
- class Device
199
- include Google::Apis::Core::Hashable
200
-
201
- # The device configuration and its metadata. Eventually delivered to devices.
202
- # Corresponds to the JSON property `config`
203
- # @return [Google::Apis::CloudiotV1beta1::DeviceConfig]
204
- attr_accessor :config
205
-
206
- # The credentials used to authenticate this device. To allow credential
207
- # rotation without interruption, multiple device credentials can be bound to
208
- # this device. No more than 3 credentials can be bound to a single device at
209
- # a time.
210
- # Corresponds to the JSON property `credentials`
211
- # @return [Array<Google::Apis::CloudiotV1beta1::DeviceCredential>]
212
- attr_accessor :credentials
213
-
214
- # If a device is disabled, communication from it will be blocked. Can be used
215
- # to temporarily prevent the device from connecting if, for example, the
216
- # sensor is generating bad data and needs maintenance.
217
- # Corresponds to the JSON property `enabledState`
218
- # @return [String]
219
- attr_accessor :enabled_state
220
-
221
- # The user-defined device identifier. The device ID must be unique
222
- # within a device registry.
223
- # Corresponds to the JSON property `id`
224
- # @return [String]
225
- attr_accessor :id
226
-
227
- # [Output only] The last time a cloud-to-device config version acknowledgment
228
- # was received from the device.
229
- # Corresponds to the JSON property `lastConfigAckTime`
230
- # @return [String]
231
- attr_accessor :last_config_ack_time
232
-
233
- # The `Status` type defines a logical error model that is suitable for different
234
- # programming environments, including REST APIs and RPC APIs. It is used by
235
- # [gRPC](https://github.com/grpc). The error model is designed to be:
236
- # - Simple to use and understand for most users
237
- # - Flexible enough to meet unexpected needs
238
- # # Overview
239
- # The `Status` message contains three pieces of data: error code, error message,
240
- # and error details. The error code should be an enum value of
241
- # google.rpc.Code, but it may accept additional error codes if needed. The
242
- # error message should be a developer-facing English message that helps
243
- # developers *understand* and *resolve* the error. If a localized user-facing
244
- # error message is needed, put the localized message in the error details or
245
- # localize it in the client. The optional error details may contain arbitrary
246
- # information about the error. There is a predefined set of error detail types
247
- # in the package `google.rpc` that can be used for common error conditions.
248
- # # Language mapping
249
- # The `Status` message is the logical representation of the error model, but it
250
- # is not necessarily the actual wire format. When the `Status` message is
251
- # exposed in different client libraries and different wire protocols, it can be
252
- # mapped differently. For example, it will likely be mapped to some exceptions
253
- # in Java, but more likely mapped to some error codes in C.
254
- # # Other uses
255
- # The error model and the `Status` message can be used in a variety of
256
- # environments, either with or without APIs, to provide a
257
- # consistent developer experience across different environments.
258
- # Example uses of this error model include:
259
- # - Partial errors. If a service needs to return partial errors to the client,
260
- # it may embed the `Status` in the normal response to indicate the partial
261
- # errors.
262
- # - Workflow errors. A typical workflow has multiple steps. Each step may
263
- # have a `Status` message for error reporting.
264
- # - Batch operations. If a client uses batch request and batch response, the
265
- # `Status` message should be used directly inside batch response, one for
266
- # each error sub-response.
267
- # - Asynchronous operations. If an API call embeds asynchronous operation
268
- # results in its response, the status of those operations should be
269
- # represented directly using the `Status` message.
270
- # - Logging. If some API errors are stored in logs, the message `Status` could
271
- # be used directly after any stripping needed for security/privacy reasons.
272
- # Corresponds to the JSON property `lastErrorStatus`
273
- # @return [Google::Apis::CloudiotV1beta1::Status]
274
- attr_accessor :last_error_status
275
-
276
- # [Output only] The last time an error happened, e.g., failed to publish to
277
- # Cloud Pub/Sub. This field is the timestamp of 'last_error_status'.
278
- # Corresponds to the JSON property `lastErrorTime`
279
- # @return [String]
280
- attr_accessor :last_error_time
281
-
282
- # [Output only] The last time an event was received. Timestamps are
283
- # periodically collected and written to storage; they may be stale by a few
284
- # minutes.
285
- # Corresponds to the JSON property `lastEventTime`
286
- # @return [String]
287
- attr_accessor :last_event_time
288
-
289
- # [Output only] The last time a heartbeat was received. Timestamps are
290
- # periodically collected and written to storage; they may be stale by a few
291
- # minutes.
292
- # Corresponds to the JSON property `lastHeartbeatTime`
293
- # @return [String]
294
- attr_accessor :last_heartbeat_time
295
-
296
- # The resource path name. For example,
297
- # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
298
- # `projects/p1/locations/us-central1/registries/registry0/devices/`num_id``.
299
- # When `name` is populated as a response from the service, it always ends
300
- # in the device numeric ID.
301
- # Corresponds to the JSON property `name`
302
- # @return [String]
303
- attr_accessor :name
304
-
305
- # [Output only] A server-defined unique numeric ID for the device. This is a
306
- # more compact way to identify devices, and it is globally unique.
307
- # Corresponds to the JSON property `numId`
308
- # @return [Fixnum]
309
- attr_accessor :num_id
310
-
311
- def initialize(**args)
312
- update!(**args)
313
- end
314
-
315
- # Update properties of this object
316
- def update!(**args)
317
- @config = args[:config] if args.key?(:config)
318
- @credentials = args[:credentials] if args.key?(:credentials)
319
- @enabled_state = args[:enabled_state] if args.key?(:enabled_state)
320
- @id = args[:id] if args.key?(:id)
321
- @last_config_ack_time = args[:last_config_ack_time] if args.key?(:last_config_ack_time)
322
- @last_error_status = args[:last_error_status] if args.key?(:last_error_status)
323
- @last_error_time = args[:last_error_time] if args.key?(:last_error_time)
324
- @last_event_time = args[:last_event_time] if args.key?(:last_event_time)
325
- @last_heartbeat_time = args[:last_heartbeat_time] if args.key?(:last_heartbeat_time)
326
- @name = args[:name] if args.key?(:name)
327
- @num_id = args[:num_id] if args.key?(:num_id)
328
- end
329
- end
330
-
331
- # The device configuration and its metadata. Eventually delivered to devices.
332
- class DeviceConfig
333
- include Google::Apis::Core::Hashable
334
-
335
- # [Output only] The time when this version state was updated in the Cloud IoT
336
- # Core service. This timestamp is set by the server.
337
- # Corresponds to the JSON property `cloudUpdateTime`
338
- # @return [String]
339
- attr_accessor :cloud_update_time
340
-
341
- # The data for a device configuration. Only binary data is currently supported.
342
- # Corresponds to the JSON property `data`
343
- # @return [Google::Apis::CloudiotV1beta1::DeviceConfigData]
344
- attr_accessor :data
345
-
346
- # [Output only] The time when the Cloud IoT Core server received the
347
- # acknowledgment from the device, indicating that the device has received
348
- # this configuration version. If this field is not present, the device has
349
- # not yet acknowledged that it received this version. Note that when sending
350
- # the config to the device, there may have been many config versions on the
351
- # Cloud IoT Core service while the device was disconnected; and on
352
- # connection, only the latest version is sent to the device. Some of the
353
- # versions may never be sent to the device, and therefore are never
354
- # acknowledged. This timestamp is set by the Cloud IoT Core service.
355
- # Corresponds to the JSON property `deviceAckTime`
356
- # @return [String]
357
- attr_accessor :device_ack_time
358
-
359
- # [Output only] The version of this update. The version number is assigned by
360
- # the server, and is always greater than zero after device creation. The
361
- # version must be zero on the `CreateDevice` request if a `config` is
362
- # specified; the response of `CreateDevice` will always have a value of one.
363
- # Corresponds to the JSON property `version`
364
- # @return [Fixnum]
365
- attr_accessor :version
366
-
367
- def initialize(**args)
368
- update!(**args)
369
- end
370
-
371
- # Update properties of this object
372
- def update!(**args)
373
- @cloud_update_time = args[:cloud_update_time] if args.key?(:cloud_update_time)
374
- @data = args[:data] if args.key?(:data)
375
- @device_ack_time = args[:device_ack_time] if args.key?(:device_ack_time)
376
- @version = args[:version] if args.key?(:version)
377
- end
378
- end
379
-
380
- # The data for a device configuration. Only binary data is currently supported.
381
- class DeviceConfigData
382
- include Google::Apis::Core::Hashable
383
-
384
- # The configuration sent to the device, as bytes.
385
- # Corresponds to the JSON property `binaryData`
386
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
387
- # @return [String]
388
- attr_accessor :binary_data
389
-
390
- def initialize(**args)
391
- update!(**args)
392
- end
393
-
394
- # Update properties of this object
395
- def update!(**args)
396
- @binary_data = args[:binary_data] if args.key?(:binary_data)
397
- end
398
- end
399
-
400
- # A server-stored device credential used for authentication.
401
- class DeviceCredential
402
- include Google::Apis::Core::Hashable
403
-
404
- # [Optional] The time at which this credential becomes invalid. This
405
- # credential will be ignored for new client authentication requests after
406
- # this timestamp; however, it will not be automatically deleted.
407
- # Corresponds to the JSON property `expirationTime`
408
- # @return [String]
409
- attr_accessor :expiration_time
410
-
411
- # A public key format and data.
412
- # Corresponds to the JSON property `publicKey`
413
- # @return [Google::Apis::CloudiotV1beta1::PublicKeyCredential]
414
- attr_accessor :public_key
415
-
416
- def initialize(**args)
417
- update!(**args)
418
- end
419
-
420
- # Update properties of this object
421
- def update!(**args)
422
- @expiration_time = args[:expiration_time] if args.key?(:expiration_time)
423
- @public_key = args[:public_key] if args.key?(:public_key)
424
- end
425
- end
426
-
427
- # A container for a group of devices.
428
- class DeviceRegistry
429
- include Google::Apis::Core::Hashable
430
-
431
- # Configuration to forward messages such as telemetry events.
432
- # Corresponds to the JSON property `eventNotificationConfig`
433
- # @return [Google::Apis::CloudiotV1beta1::NotificationConfig]
434
- attr_accessor :event_notification_config
435
-
436
- # The identifier of this device registry. For example, `myRegistry`.
437
- # Corresponds to the JSON property `id`
438
- # @return [String]
439
- attr_accessor :id
440
-
441
- # The configuration of MQTT for a device registry.
442
- # Corresponds to the JSON property `mqttConfig`
443
- # @return [Google::Apis::CloudiotV1beta1::MqttConfig]
444
- attr_accessor :mqtt_config
445
-
446
- # The resource path name. For example,
447
- # `projects/example-project/locations/us-central1/registries/my-registry`.
448
- # Corresponds to the JSON property `name`
449
- # @return [String]
450
- attr_accessor :name
451
-
452
- def initialize(**args)
453
- update!(**args)
454
- end
455
-
456
- # Update properties of this object
457
- def update!(**args)
458
- @event_notification_config = args[:event_notification_config] if args.key?(:event_notification_config)
459
- @id = args[:id] if args.key?(:id)
460
- @mqtt_config = args[:mqtt_config] if args.key?(:mqtt_config)
461
- @name = args[:name] if args.key?(:name)
462
- end
463
- end
464
-
465
- # A generic empty message that you can re-use to avoid defining duplicated
466
- # empty messages in your APIs. A typical example is to use it as the request
467
- # or the response type of an API method. For instance:
468
- # service Foo `
469
- # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
470
- # `
471
- # The JSON representation for `Empty` is empty JSON object ````.
472
- class Empty
473
- include Google::Apis::Core::Hashable
474
-
475
- def initialize(**args)
476
- update!(**args)
477
- end
478
-
479
- # Update properties of this object
480
- def update!(**args)
481
- end
482
- end
483
-
484
- # Represents an expression text. Example:
485
- # title: "User account presence"
486
- # description: "Determines whether the request has a user account"
487
- # expression: "size(request.user) > 0"
488
- class Expr
489
- include Google::Apis::Core::Hashable
490
-
491
- # An optional description of the expression. This is a longer text which
492
- # describes the expression, e.g. when hovered over it in a UI.
493
- # Corresponds to the JSON property `description`
494
- # @return [String]
495
- attr_accessor :description
496
-
497
- # Textual representation of an expression in
498
- # Common Expression Language syntax.
499
- # The application context of the containing message determines which
500
- # well-known feature set of CEL is supported.
501
- # Corresponds to the JSON property `expression`
502
- # @return [String]
503
- attr_accessor :expression
504
-
505
- # An optional string indicating the location of the expression for error
506
- # reporting, e.g. a file name and a position in the file.
507
- # Corresponds to the JSON property `location`
508
- # @return [String]
509
- attr_accessor :location
510
-
511
- # An optional title for the expression, i.e. a short string describing
512
- # its purpose. This can be used e.g. in UIs which allow to enter the
513
- # expression.
514
- # Corresponds to the JSON property `title`
515
- # @return [String]
516
- attr_accessor :title
517
-
518
- def initialize(**args)
519
- update!(**args)
520
- end
521
-
522
- # Update properties of this object
523
- def update!(**args)
524
- @description = args[:description] if args.key?(:description)
525
- @expression = args[:expression] if args.key?(:expression)
526
- @location = args[:location] if args.key?(:location)
527
- @title = args[:title] if args.key?(:title)
528
- end
529
- end
530
-
531
- # Request message for `GetIamPolicy` method.
532
- class GetIamPolicyRequest
533
- include Google::Apis::Core::Hashable
534
-
535
- def initialize(**args)
536
- update!(**args)
537
- end
538
-
539
- # Update properties of this object
540
- def update!(**args)
541
- end
542
- end
543
-
544
- # Response for `ListDeviceConfigVersions`.
545
- class ListDeviceConfigVersionsResponse
546
- include Google::Apis::Core::Hashable
547
-
548
- # The device configuration for the last few versions. Versions are listed
549
- # in decreasing order, starting from the most recent one.
550
- # Corresponds to the JSON property `deviceConfigs`
551
- # @return [Array<Google::Apis::CloudiotV1beta1::DeviceConfig>]
552
- attr_accessor :device_configs
553
-
554
- def initialize(**args)
555
- update!(**args)
556
- end
557
-
558
- # Update properties of this object
559
- def update!(**args)
560
- @device_configs = args[:device_configs] if args.key?(:device_configs)
561
- end
562
- end
563
-
564
- # Response for `ListDeviceRegistries`.
565
- class ListDeviceRegistriesResponse
566
- include Google::Apis::Core::Hashable
567
-
568
- # The registries that matched the query.
569
- # Corresponds to the JSON property `deviceRegistries`
570
- # @return [Array<Google::Apis::CloudiotV1beta1::DeviceRegistry>]
571
- attr_accessor :device_registries
572
-
573
- # If not empty, indicates that there may be more registries that match the
574
- # request; this value should be passed in a new
575
- # `ListDeviceRegistriesRequest`.
576
- # Corresponds to the JSON property `nextPageToken`
577
- # @return [String]
578
- attr_accessor :next_page_token
579
-
580
- def initialize(**args)
581
- update!(**args)
582
- end
583
-
584
- # Update properties of this object
585
- def update!(**args)
586
- @device_registries = args[:device_registries] if args.key?(:device_registries)
587
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
588
- end
589
- end
590
-
591
- # Response for `ListDevices`.
592
- class ListDevicesResponse
593
- include Google::Apis::Core::Hashable
594
-
595
- # The devices that match the request.
596
- # Corresponds to the JSON property `devices`
597
- # @return [Array<Google::Apis::CloudiotV1beta1::Device>]
598
- attr_accessor :devices
599
-
600
- # If not empty, indicates that there may be more devices that match the
601
- # request; this value should be passed in a new `ListDevicesRequest`.
602
- # Corresponds to the JSON property `nextPageToken`
603
- # @return [String]
604
- attr_accessor :next_page_token
605
-
606
- def initialize(**args)
607
- update!(**args)
608
- end
609
-
610
- # Update properties of this object
611
- def update!(**args)
612
- @devices = args[:devices] if args.key?(:devices)
613
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
614
- end
615
- end
616
-
617
- # Request for `ModifyCloudToDeviceConfig`.
618
- class ModifyCloudToDeviceConfigRequest
619
- include Google::Apis::Core::Hashable
620
-
621
- # The data for a device configuration. Only binary data is currently supported.
622
- # Corresponds to the JSON property `data`
623
- # @return [Google::Apis::CloudiotV1beta1::DeviceConfigData]
624
- attr_accessor :data
625
-
626
- # The version number to update. If this value is zero, it will not check the
627
- # version number of the server and will always update the current version;
628
- # otherwise, this update will fail if the version number found on the server
629
- # does not match this version number. This is used to support multiple
630
- # simultaneous updates without losing data.
631
- # Corresponds to the JSON property `versionToUpdate`
632
- # @return [Fixnum]
633
- attr_accessor :version_to_update
634
-
635
- def initialize(**args)
636
- update!(**args)
637
- end
638
-
639
- # Update properties of this object
640
- def update!(**args)
641
- @data = args[:data] if args.key?(:data)
642
- @version_to_update = args[:version_to_update] if args.key?(:version_to_update)
643
- end
644
- end
645
-
646
- # The configuration of MQTT for a device registry.
647
- class MqttConfig
648
- include Google::Apis::Core::Hashable
649
-
650
- # If enabled, allows connections using the MQTT protocol. Otherwise any MQTT
651
- # connection to this registry will fail.
652
- # Corresponds to the JSON property `mqttConfigState`
653
- # @return [String]
654
- attr_accessor :mqtt_config_state
655
-
656
- def initialize(**args)
657
- update!(**args)
658
- end
659
-
660
- # Update properties of this object
661
- def update!(**args)
662
- @mqtt_config_state = args[:mqtt_config_state] if args.key?(:mqtt_config_state)
663
- end
664
- end
665
-
666
- # Configuration to forward messages such as telemetry events.
667
- class NotificationConfig
668
- include Google::Apis::Core::Hashable
669
-
670
- # A Cloud Pub/Sub topic name. For example,
671
- # `projects/myProject/topics/deviceEvents`.
672
- # Corresponds to the JSON property `pubsubTopicName`
673
- # @return [String]
674
- attr_accessor :pubsub_topic_name
675
-
676
- def initialize(**args)
677
- update!(**args)
678
- end
679
-
680
- # Update properties of this object
681
- def update!(**args)
682
- @pubsub_topic_name = args[:pubsub_topic_name] if args.key?(:pubsub_topic_name)
683
- end
684
- end
685
-
686
- # Defines an Identity and Access Management (IAM) policy. It is used to
687
- # specify access control policies for Cloud Platform resources.
688
- # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
689
- # `members` to a `role`, where the members can be user accounts, Google groups,
690
- # Google domains, and service accounts. A `role` is a named list of permissions
691
- # defined by IAM.
692
- # **Example**
693
- # `
694
- # "bindings": [
695
- # `
696
- # "role": "roles/owner",
697
- # "members": [
698
- # "user:mike@example.com",
699
- # "group:admins@example.com",
700
- # "domain:google.com",
701
- # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
702
- # ]
703
- # `,
704
- # `
705
- # "role": "roles/viewer",
706
- # "members": ["user:sean@example.com"]
707
- # `
708
- # ]
709
- # `
710
- # For a description of IAM and its features, see the
711
- # [IAM developer's guide](https://cloud.google.com/iam/docs).
712
- class Policy
713
- include Google::Apis::Core::Hashable
714
-
715
- # Specifies cloud audit logging configuration for this policy.
716
- # Corresponds to the JSON property `auditConfigs`
717
- # @return [Array<Google::Apis::CloudiotV1beta1::AuditConfig>]
718
- attr_accessor :audit_configs
719
-
720
- # Associates a list of `members` to a `role`.
721
- # `bindings` with no members will result in an error.
722
- # Corresponds to the JSON property `bindings`
723
- # @return [Array<Google::Apis::CloudiotV1beta1::Binding>]
724
- attr_accessor :bindings
725
-
726
- # `etag` is used for optimistic concurrency control as a way to help
727
- # prevent simultaneous updates of a policy from overwriting each other.
728
- # It is strongly suggested that systems make use of the `etag` in the
729
- # read-modify-write cycle to perform policy updates in order to avoid race
730
- # conditions: An `etag` is returned in the response to `getIamPolicy`, and
731
- # systems are expected to put that etag in the request to `setIamPolicy` to
732
- # ensure that their change will be applied to the same version of the policy.
733
- # If no `etag` is provided in the call to `setIamPolicy`, then the existing
734
- # policy is overwritten blindly.
735
- # Corresponds to the JSON property `etag`
736
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
737
- # @return [String]
738
- attr_accessor :etag
739
-
740
- #
741
- # Corresponds to the JSON property `iamOwned`
742
- # @return [Boolean]
743
- attr_accessor :iam_owned
744
- alias_method :iam_owned?, :iam_owned
745
-
746
- # Deprecated.
747
- # Corresponds to the JSON property `version`
748
- # @return [Fixnum]
749
- attr_accessor :version
750
-
751
- def initialize(**args)
752
- update!(**args)
753
- end
754
-
755
- # Update properties of this object
756
- def update!(**args)
757
- @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
758
- @bindings = args[:bindings] if args.key?(:bindings)
759
- @etag = args[:etag] if args.key?(:etag)
760
- @iam_owned = args[:iam_owned] if args.key?(:iam_owned)
761
- @version = args[:version] if args.key?(:version)
762
- end
763
- end
764
-
765
- # A public key format and data.
766
- class PublicKeyCredential
767
- include Google::Apis::Core::Hashable
768
-
769
- # The format of the key.
770
- # Corresponds to the JSON property `format`
771
- # @return [String]
772
- attr_accessor :format
773
-
774
- # The key data.
775
- # Corresponds to the JSON property `key`
776
- # @return [String]
777
- attr_accessor :key
778
-
779
- def initialize(**args)
780
- update!(**args)
781
- end
782
-
783
- # Update properties of this object
784
- def update!(**args)
785
- @format = args[:format] if args.key?(:format)
786
- @key = args[:key] if args.key?(:key)
787
- end
788
- end
789
-
790
- # Request message for `SetIamPolicy` method.
791
- class SetIamPolicyRequest
792
- include Google::Apis::Core::Hashable
793
-
794
- # Defines an Identity and Access Management (IAM) policy. It is used to
795
- # specify access control policies for Cloud Platform resources.
796
- # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
797
- # `members` to a `role`, where the members can be user accounts, Google groups,
798
- # Google domains, and service accounts. A `role` is a named list of permissions
799
- # defined by IAM.
800
- # **Example**
801
- # `
802
- # "bindings": [
803
- # `
804
- # "role": "roles/owner",
805
- # "members": [
806
- # "user:mike@example.com",
807
- # "group:admins@example.com",
808
- # "domain:google.com",
809
- # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
810
- # ]
811
- # `,
812
- # `
813
- # "role": "roles/viewer",
814
- # "members": ["user:sean@example.com"]
815
- # `
816
- # ]
817
- # `
818
- # For a description of IAM and its features, see the
819
- # [IAM developer's guide](https://cloud.google.com/iam/docs).
820
- # Corresponds to the JSON property `policy`
821
- # @return [Google::Apis::CloudiotV1beta1::Policy]
822
- attr_accessor :policy
823
-
824
- # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
825
- # the fields in the mask will be modified. If no mask is provided, the
826
- # following default mask is used:
827
- # paths: "bindings, etag"
828
- # This field is only used by Cloud IAM.
829
- # Corresponds to the JSON property `updateMask`
830
- # @return [String]
831
- attr_accessor :update_mask
832
-
833
- def initialize(**args)
834
- update!(**args)
835
- end
836
-
837
- # Update properties of this object
838
- def update!(**args)
839
- @policy = args[:policy] if args.key?(:policy)
840
- @update_mask = args[:update_mask] if args.key?(:update_mask)
841
- end
842
- end
843
-
844
- # The `Status` type defines a logical error model that is suitable for different
845
- # programming environments, including REST APIs and RPC APIs. It is used by
846
- # [gRPC](https://github.com/grpc). The error model is designed to be:
847
- # - Simple to use and understand for most users
848
- # - Flexible enough to meet unexpected needs
849
- # # Overview
850
- # The `Status` message contains three pieces of data: error code, error message,
851
- # and error details. The error code should be an enum value of
852
- # google.rpc.Code, but it may accept additional error codes if needed. The
853
- # error message should be a developer-facing English message that helps
854
- # developers *understand* and *resolve* the error. If a localized user-facing
855
- # error message is needed, put the localized message in the error details or
856
- # localize it in the client. The optional error details may contain arbitrary
857
- # information about the error. There is a predefined set of error detail types
858
- # in the package `google.rpc` that can be used for common error conditions.
859
- # # Language mapping
860
- # The `Status` message is the logical representation of the error model, but it
861
- # is not necessarily the actual wire format. When the `Status` message is
862
- # exposed in different client libraries and different wire protocols, it can be
863
- # mapped differently. For example, it will likely be mapped to some exceptions
864
- # in Java, but more likely mapped to some error codes in C.
865
- # # Other uses
866
- # The error model and the `Status` message can be used in a variety of
867
- # environments, either with or without APIs, to provide a
868
- # consistent developer experience across different environments.
869
- # Example uses of this error model include:
870
- # - Partial errors. If a service needs to return partial errors to the client,
871
- # it may embed the `Status` in the normal response to indicate the partial
872
- # errors.
873
- # - Workflow errors. A typical workflow has multiple steps. Each step may
874
- # have a `Status` message for error reporting.
875
- # - Batch operations. If a client uses batch request and batch response, the
876
- # `Status` message should be used directly inside batch response, one for
877
- # each error sub-response.
878
- # - Asynchronous operations. If an API call embeds asynchronous operation
879
- # results in its response, the status of those operations should be
880
- # represented directly using the `Status` message.
881
- # - Logging. If some API errors are stored in logs, the message `Status` could
882
- # be used directly after any stripping needed for security/privacy reasons.
883
- class Status
884
- include Google::Apis::Core::Hashable
885
-
886
- # The status code, which should be an enum value of google.rpc.Code.
887
- # Corresponds to the JSON property `code`
888
- # @return [Fixnum]
889
- attr_accessor :code
890
-
891
- # A list of messages that carry the error details. There is a common set of
892
- # message types for APIs to use.
893
- # Corresponds to the JSON property `details`
894
- # @return [Array<Hash<String,Object>>]
895
- attr_accessor :details
896
-
897
- # A developer-facing error message, which should be in English. Any
898
- # user-facing error message should be localized and sent in the
899
- # google.rpc.Status.details field, or localized by the client.
900
- # Corresponds to the JSON property `message`
901
- # @return [String]
902
- attr_accessor :message
903
-
904
- def initialize(**args)
905
- update!(**args)
906
- end
907
-
908
- # Update properties of this object
909
- def update!(**args)
910
- @code = args[:code] if args.key?(:code)
911
- @details = args[:details] if args.key?(:details)
912
- @message = args[:message] if args.key?(:message)
913
- end
914
- end
915
-
916
- # Request message for `TestIamPermissions` method.
917
- class TestIamPermissionsRequest
918
- include Google::Apis::Core::Hashable
919
-
920
- # The set of permissions to check for the `resource`. Permissions with
921
- # wildcards (such as '*' or 'storage.*') are not allowed. For more
922
- # information see
923
- # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
924
- # Corresponds to the JSON property `permissions`
925
- # @return [Array<String>]
926
- attr_accessor :permissions
927
-
928
- def initialize(**args)
929
- update!(**args)
930
- end
931
-
932
- # Update properties of this object
933
- def update!(**args)
934
- @permissions = args[:permissions] if args.key?(:permissions)
935
- end
936
- end
937
-
938
- # Response message for `TestIamPermissions` method.
939
- class TestIamPermissionsResponse
940
- include Google::Apis::Core::Hashable
941
-
942
- # A subset of `TestPermissionsRequest.permissions` that the caller is
943
- # allowed.
944
- # Corresponds to the JSON property `permissions`
945
- # @return [Array<String>]
946
- attr_accessor :permissions
947
-
948
- def initialize(**args)
949
- update!(**args)
950
- end
951
-
952
- # Update properties of this object
953
- def update!(**args)
954
- @permissions = args[:permissions] if args.key?(:permissions)
955
- end
956
- end
957
- end
958
- end
959
- end