google-api-client 0.25.0 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -425,6 +425,532 @@ module Google
425
425
  execute_or_queue_command(command, &block)
426
426
  end
427
427
 
428
+ # Gets multiple documents.
429
+ # Documents returned by this method are not guaranteed to be returned in the
430
+ # same order that they were requested.
431
+ # @param [String] database
432
+ # The database name. In the format:
433
+ # `projects/`project_id`/databases/`database_id``.
434
+ # @param [Google::Apis::FirestoreV1::BatchGetDocumentsRequest] batch_get_documents_request_object
435
+ # @param [String] fields
436
+ # Selector specifying which fields to include in a partial response.
437
+ # @param [String] quota_user
438
+ # Available to use for quota purposes for server-side applications. Can be any
439
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
440
+ # @param [Google::Apis::RequestOptions] options
441
+ # Request-specific options
442
+ #
443
+ # @yield [result, err] Result & error if block supplied
444
+ # @yieldparam result [Google::Apis::FirestoreV1::BatchGetDocumentsResponse] parsed result object
445
+ # @yieldparam err [StandardError] error object if request failed
446
+ #
447
+ # @return [Google::Apis::FirestoreV1::BatchGetDocumentsResponse]
448
+ #
449
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
450
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
451
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
452
+ def batch_get_documents(database, batch_get_documents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
453
+ command = make_simple_command(:post, 'v1/{+database}/documents:batchGet', options)
454
+ command.request_representation = Google::Apis::FirestoreV1::BatchGetDocumentsRequest::Representation
455
+ command.request_object = batch_get_documents_request_object
456
+ command.response_representation = Google::Apis::FirestoreV1::BatchGetDocumentsResponse::Representation
457
+ command.response_class = Google::Apis::FirestoreV1::BatchGetDocumentsResponse
458
+ command.params['database'] = database unless database.nil?
459
+ command.query['fields'] = fields unless fields.nil?
460
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
461
+ execute_or_queue_command(command, &block)
462
+ end
463
+
464
+ # Starts a new transaction.
465
+ # @param [String] database
466
+ # The database name. In the format:
467
+ # `projects/`project_id`/databases/`database_id``.
468
+ # @param [Google::Apis::FirestoreV1::BeginTransactionRequest] begin_transaction_request_object
469
+ # @param [String] fields
470
+ # Selector specifying which fields to include in a partial response.
471
+ # @param [String] quota_user
472
+ # Available to use for quota purposes for server-side applications. Can be any
473
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
474
+ # @param [Google::Apis::RequestOptions] options
475
+ # Request-specific options
476
+ #
477
+ # @yield [result, err] Result & error if block supplied
478
+ # @yieldparam result [Google::Apis::FirestoreV1::BeginTransactionResponse] parsed result object
479
+ # @yieldparam err [StandardError] error object if request failed
480
+ #
481
+ # @return [Google::Apis::FirestoreV1::BeginTransactionResponse]
482
+ #
483
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
484
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
485
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
486
+ def begin_document_transaction(database, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
487
+ command = make_simple_command(:post, 'v1/{+database}/documents:beginTransaction', options)
488
+ command.request_representation = Google::Apis::FirestoreV1::BeginTransactionRequest::Representation
489
+ command.request_object = begin_transaction_request_object
490
+ command.response_representation = Google::Apis::FirestoreV1::BeginTransactionResponse::Representation
491
+ command.response_class = Google::Apis::FirestoreV1::BeginTransactionResponse
492
+ command.params['database'] = database unless database.nil?
493
+ command.query['fields'] = fields unless fields.nil?
494
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
495
+ execute_or_queue_command(command, &block)
496
+ end
497
+
498
+ # Commits a transaction, while optionally updating documents.
499
+ # @param [String] database
500
+ # The database name. In the format:
501
+ # `projects/`project_id`/databases/`database_id``.
502
+ # @param [Google::Apis::FirestoreV1::CommitRequest] commit_request_object
503
+ # @param [String] fields
504
+ # Selector specifying which fields to include in a partial response.
505
+ # @param [String] quota_user
506
+ # Available to use for quota purposes for server-side applications. Can be any
507
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
508
+ # @param [Google::Apis::RequestOptions] options
509
+ # Request-specific options
510
+ #
511
+ # @yield [result, err] Result & error if block supplied
512
+ # @yieldparam result [Google::Apis::FirestoreV1::CommitResponse] parsed result object
513
+ # @yieldparam err [StandardError] error object if request failed
514
+ #
515
+ # @return [Google::Apis::FirestoreV1::CommitResponse]
516
+ #
517
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
518
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
519
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
520
+ def commit_document(database, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
521
+ command = make_simple_command(:post, 'v1/{+database}/documents:commit', options)
522
+ command.request_representation = Google::Apis::FirestoreV1::CommitRequest::Representation
523
+ command.request_object = commit_request_object
524
+ command.response_representation = Google::Apis::FirestoreV1::CommitResponse::Representation
525
+ command.response_class = Google::Apis::FirestoreV1::CommitResponse
526
+ command.params['database'] = database unless database.nil?
527
+ command.query['fields'] = fields unless fields.nil?
528
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
529
+ execute_or_queue_command(command, &block)
530
+ end
531
+
532
+ # Creates a new document.
533
+ # @param [String] parent
534
+ # The parent resource. For example:
535
+ # `projects/`project_id`/databases/`database_id`/documents` or
536
+ # `projects/`project_id`/databases/`database_id`/documents/chatrooms/`
537
+ # chatroom_id``
538
+ # @param [String] collection_id
539
+ # The collection ID, relative to `parent`, to list. For example: `chatrooms`.
540
+ # @param [Google::Apis::FirestoreV1::Document] document_object
541
+ # @param [String] document_id
542
+ # The client-assigned document ID to use for this document.
543
+ # Optional. If not specified, an ID will be assigned by the service.
544
+ # @param [Array<String>, String] mask_field_paths
545
+ # The list of field paths in the mask. See Document.fields for a field
546
+ # path syntax reference.
547
+ # @param [String] fields
548
+ # Selector specifying which fields to include in a partial response.
549
+ # @param [String] quota_user
550
+ # Available to use for quota purposes for server-side applications. Can be any
551
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
552
+ # @param [Google::Apis::RequestOptions] options
553
+ # Request-specific options
554
+ #
555
+ # @yield [result, err] Result & error if block supplied
556
+ # @yieldparam result [Google::Apis::FirestoreV1::Document] parsed result object
557
+ # @yieldparam err [StandardError] error object if request failed
558
+ #
559
+ # @return [Google::Apis::FirestoreV1::Document]
560
+ #
561
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
562
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
563
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
564
+ def create_project_database_document_document(parent, collection_id, document_object = nil, document_id: nil, mask_field_paths: nil, fields: nil, quota_user: nil, options: nil, &block)
565
+ command = make_simple_command(:post, 'v1/{+parent}/{collectionId}', options)
566
+ command.request_representation = Google::Apis::FirestoreV1::Document::Representation
567
+ command.request_object = document_object
568
+ command.response_representation = Google::Apis::FirestoreV1::Document::Representation
569
+ command.response_class = Google::Apis::FirestoreV1::Document
570
+ command.params['parent'] = parent unless parent.nil?
571
+ command.params['collectionId'] = collection_id unless collection_id.nil?
572
+ command.query['documentId'] = document_id unless document_id.nil?
573
+ command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.nil?
574
+ command.query['fields'] = fields unless fields.nil?
575
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
576
+ execute_or_queue_command(command, &block)
577
+ end
578
+
579
+ # Deletes a document.
580
+ # @param [String] name
581
+ # The resource name of the Document to delete. In the format:
582
+ # `projects/`project_id`/databases/`database_id`/documents/`document_path``.
583
+ # @param [Boolean] current_document_exists
584
+ # When set to `true`, the target document must exist.
585
+ # When set to `false`, the target document must not exist.
586
+ # @param [String] current_document_update_time
587
+ # When set, the target document must exist and have been last updated at
588
+ # that time.
589
+ # @param [String] fields
590
+ # Selector specifying which fields to include in a partial response.
591
+ # @param [String] quota_user
592
+ # Available to use for quota purposes for server-side applications. Can be any
593
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
594
+ # @param [Google::Apis::RequestOptions] options
595
+ # Request-specific options
596
+ #
597
+ # @yield [result, err] Result & error if block supplied
598
+ # @yieldparam result [Google::Apis::FirestoreV1::Empty] parsed result object
599
+ # @yieldparam err [StandardError] error object if request failed
600
+ #
601
+ # @return [Google::Apis::FirestoreV1::Empty]
602
+ #
603
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
604
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
605
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
606
+ def delete_project_database_document(name, current_document_exists: nil, current_document_update_time: nil, fields: nil, quota_user: nil, options: nil, &block)
607
+ command = make_simple_command(:delete, 'v1/{+name}', options)
608
+ command.response_representation = Google::Apis::FirestoreV1::Empty::Representation
609
+ command.response_class = Google::Apis::FirestoreV1::Empty
610
+ command.params['name'] = name unless name.nil?
611
+ command.query['currentDocument.exists'] = current_document_exists unless current_document_exists.nil?
612
+ command.query['currentDocument.updateTime'] = current_document_update_time unless current_document_update_time.nil?
613
+ command.query['fields'] = fields unless fields.nil?
614
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
615
+ execute_or_queue_command(command, &block)
616
+ end
617
+
618
+ # Gets a single document.
619
+ # @param [String] name
620
+ # The resource name of the Document to get. In the format:
621
+ # `projects/`project_id`/databases/`database_id`/documents/`document_path``.
622
+ # @param [Array<String>, String] mask_field_paths
623
+ # The list of field paths in the mask. See Document.fields for a field
624
+ # path syntax reference.
625
+ # @param [String] read_time
626
+ # Reads the version of the document at the given time.
627
+ # This may not be older than 60 seconds.
628
+ # @param [String] transaction
629
+ # Reads the document in a transaction.
630
+ # @param [String] fields
631
+ # Selector specifying which fields to include in a partial response.
632
+ # @param [String] quota_user
633
+ # Available to use for quota purposes for server-side applications. Can be any
634
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
635
+ # @param [Google::Apis::RequestOptions] options
636
+ # Request-specific options
637
+ #
638
+ # @yield [result, err] Result & error if block supplied
639
+ # @yieldparam result [Google::Apis::FirestoreV1::Document] parsed result object
640
+ # @yieldparam err [StandardError] error object if request failed
641
+ #
642
+ # @return [Google::Apis::FirestoreV1::Document]
643
+ #
644
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
645
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
646
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
647
+ def get_project_database_document(name, mask_field_paths: nil, read_time: nil, transaction: nil, fields: nil, quota_user: nil, options: nil, &block)
648
+ command = make_simple_command(:get, 'v1/{+name}', options)
649
+ command.response_representation = Google::Apis::FirestoreV1::Document::Representation
650
+ command.response_class = Google::Apis::FirestoreV1::Document
651
+ command.params['name'] = name unless name.nil?
652
+ command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.nil?
653
+ command.query['readTime'] = read_time unless read_time.nil?
654
+ command.query['transaction'] = transaction unless transaction.nil?
655
+ command.query['fields'] = fields unless fields.nil?
656
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
657
+ execute_or_queue_command(command, &block)
658
+ end
659
+
660
+ # Lists documents.
661
+ # @param [String] parent
662
+ # The parent resource name. In the format:
663
+ # `projects/`project_id`/databases/`database_id`/documents` or
664
+ # `projects/`project_id`/databases/`database_id`/documents/`document_path``.
665
+ # For example:
666
+ # `projects/my-project/databases/my-database/documents` or
667
+ # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
668
+ # @param [String] collection_id
669
+ # The collection ID, relative to `parent`, to list. For example: `chatrooms`
670
+ # or `messages`.
671
+ # @param [Array<String>, String] mask_field_paths
672
+ # The list of field paths in the mask. See Document.fields for a field
673
+ # path syntax reference.
674
+ # @param [String] order_by
675
+ # The order to sort results by. For example: `priority desc, name`.
676
+ # @param [Fixnum] page_size
677
+ # The maximum number of documents to return.
678
+ # @param [String] page_token
679
+ # The `next_page_token` value returned from a previous List request, if any.
680
+ # @param [String] read_time
681
+ # Reads documents as they were at the given time.
682
+ # This may not be older than 60 seconds.
683
+ # @param [Boolean] show_missing
684
+ # If the list should show missing documents. A missing document is a
685
+ # document that does not exist but has sub-documents. These documents will
686
+ # be returned with a key but will not have fields, Document.create_time,
687
+ # or Document.update_time set.
688
+ # Requests with `show_missing` may not specify `where` or
689
+ # `order_by`.
690
+ # @param [String] transaction
691
+ # Reads documents in a transaction.
692
+ # @param [String] fields
693
+ # Selector specifying which fields to include in a partial response.
694
+ # @param [String] quota_user
695
+ # Available to use for quota purposes for server-side applications. Can be any
696
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
697
+ # @param [Google::Apis::RequestOptions] options
698
+ # Request-specific options
699
+ #
700
+ # @yield [result, err] Result & error if block supplied
701
+ # @yieldparam result [Google::Apis::FirestoreV1::ListDocumentsResponse] parsed result object
702
+ # @yieldparam err [StandardError] error object if request failed
703
+ #
704
+ # @return [Google::Apis::FirestoreV1::ListDocumentsResponse]
705
+ #
706
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
707
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
708
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
709
+ def list_project_database_documents(parent, collection_id, mask_field_paths: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, show_missing: nil, transaction: nil, fields: nil, quota_user: nil, options: nil, &block)
710
+ command = make_simple_command(:get, 'v1/{+parent}/{collectionId}', options)
711
+ command.response_representation = Google::Apis::FirestoreV1::ListDocumentsResponse::Representation
712
+ command.response_class = Google::Apis::FirestoreV1::ListDocumentsResponse
713
+ command.params['parent'] = parent unless parent.nil?
714
+ command.params['collectionId'] = collection_id unless collection_id.nil?
715
+ command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.nil?
716
+ command.query['orderBy'] = order_by unless order_by.nil?
717
+ command.query['pageSize'] = page_size unless page_size.nil?
718
+ command.query['pageToken'] = page_token unless page_token.nil?
719
+ command.query['readTime'] = read_time unless read_time.nil?
720
+ command.query['showMissing'] = show_missing unless show_missing.nil?
721
+ command.query['transaction'] = transaction unless transaction.nil?
722
+ command.query['fields'] = fields unless fields.nil?
723
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
724
+ execute_or_queue_command(command, &block)
725
+ end
726
+
727
+ # Lists all the collection IDs underneath a document.
728
+ # @param [String] parent
729
+ # The parent document. In the format:
730
+ # `projects/`project_id`/databases/`database_id`/documents/`document_path``.
731
+ # For example:
732
+ # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
733
+ # @param [Google::Apis::FirestoreV1::ListCollectionIdsRequest] list_collection_ids_request_object
734
+ # @param [String] fields
735
+ # Selector specifying which fields to include in a partial response.
736
+ # @param [String] quota_user
737
+ # Available to use for quota purposes for server-side applications. Can be any
738
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
739
+ # @param [Google::Apis::RequestOptions] options
740
+ # Request-specific options
741
+ #
742
+ # @yield [result, err] Result & error if block supplied
743
+ # @yieldparam result [Google::Apis::FirestoreV1::ListCollectionIdsResponse] parsed result object
744
+ # @yieldparam err [StandardError] error object if request failed
745
+ #
746
+ # @return [Google::Apis::FirestoreV1::ListCollectionIdsResponse]
747
+ #
748
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
749
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
750
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
751
+ def list_document_collection_ids(parent, list_collection_ids_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
752
+ command = make_simple_command(:post, 'v1/{+parent}:listCollectionIds', options)
753
+ command.request_representation = Google::Apis::FirestoreV1::ListCollectionIdsRequest::Representation
754
+ command.request_object = list_collection_ids_request_object
755
+ command.response_representation = Google::Apis::FirestoreV1::ListCollectionIdsResponse::Representation
756
+ command.response_class = Google::Apis::FirestoreV1::ListCollectionIdsResponse
757
+ command.params['parent'] = parent unless parent.nil?
758
+ command.query['fields'] = fields unless fields.nil?
759
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
760
+ execute_or_queue_command(command, &block)
761
+ end
762
+
763
+ # Listens to changes.
764
+ # @param [String] database
765
+ # The database name. In the format:
766
+ # `projects/`project_id`/databases/`database_id``.
767
+ # @param [Google::Apis::FirestoreV1::ListenRequest] listen_request_object
768
+ # @param [String] fields
769
+ # Selector specifying which fields to include in a partial response.
770
+ # @param [String] quota_user
771
+ # Available to use for quota purposes for server-side applications. Can be any
772
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
773
+ # @param [Google::Apis::RequestOptions] options
774
+ # Request-specific options
775
+ #
776
+ # @yield [result, err] Result & error if block supplied
777
+ # @yieldparam result [Google::Apis::FirestoreV1::ListenResponse] parsed result object
778
+ # @yieldparam err [StandardError] error object if request failed
779
+ #
780
+ # @return [Google::Apis::FirestoreV1::ListenResponse]
781
+ #
782
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
783
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
784
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
785
+ def listen_document(database, listen_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
786
+ command = make_simple_command(:post, 'v1/{+database}/documents:listen', options)
787
+ command.request_representation = Google::Apis::FirestoreV1::ListenRequest::Representation
788
+ command.request_object = listen_request_object
789
+ command.response_representation = Google::Apis::FirestoreV1::ListenResponse::Representation
790
+ command.response_class = Google::Apis::FirestoreV1::ListenResponse
791
+ command.params['database'] = database unless database.nil?
792
+ command.query['fields'] = fields unless fields.nil?
793
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
794
+ execute_or_queue_command(command, &block)
795
+ end
796
+
797
+ # Updates or inserts a document.
798
+ # @param [String] name
799
+ # The resource name of the document, for example
800
+ # `projects/`project_id`/databases/`database_id`/documents/`document_path``.
801
+ # @param [Google::Apis::FirestoreV1::Document] document_object
802
+ # @param [Boolean] current_document_exists
803
+ # When set to `true`, the target document must exist.
804
+ # When set to `false`, the target document must not exist.
805
+ # @param [String] current_document_update_time
806
+ # When set, the target document must exist and have been last updated at
807
+ # that time.
808
+ # @param [Array<String>, String] mask_field_paths
809
+ # The list of field paths in the mask. See Document.fields for a field
810
+ # path syntax reference.
811
+ # @param [Array<String>, String] update_mask_field_paths
812
+ # The list of field paths in the mask. See Document.fields for a field
813
+ # path syntax reference.
814
+ # @param [String] fields
815
+ # Selector specifying which fields to include in a partial response.
816
+ # @param [String] quota_user
817
+ # Available to use for quota purposes for server-side applications. Can be any
818
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
819
+ # @param [Google::Apis::RequestOptions] options
820
+ # Request-specific options
821
+ #
822
+ # @yield [result, err] Result & error if block supplied
823
+ # @yieldparam result [Google::Apis::FirestoreV1::Document] parsed result object
824
+ # @yieldparam err [StandardError] error object if request failed
825
+ #
826
+ # @return [Google::Apis::FirestoreV1::Document]
827
+ #
828
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
829
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
830
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
831
+ def patch_project_database_document(name, document_object = nil, current_document_exists: nil, current_document_update_time: nil, mask_field_paths: nil, update_mask_field_paths: nil, fields: nil, quota_user: nil, options: nil, &block)
832
+ command = make_simple_command(:patch, 'v1/{+name}', options)
833
+ command.request_representation = Google::Apis::FirestoreV1::Document::Representation
834
+ command.request_object = document_object
835
+ command.response_representation = Google::Apis::FirestoreV1::Document::Representation
836
+ command.response_class = Google::Apis::FirestoreV1::Document
837
+ command.params['name'] = name unless name.nil?
838
+ command.query['currentDocument.exists'] = current_document_exists unless current_document_exists.nil?
839
+ command.query['currentDocument.updateTime'] = current_document_update_time unless current_document_update_time.nil?
840
+ command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.nil?
841
+ command.query['updateMask.fieldPaths'] = update_mask_field_paths unless update_mask_field_paths.nil?
842
+ command.query['fields'] = fields unless fields.nil?
843
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
844
+ execute_or_queue_command(command, &block)
845
+ end
846
+
847
+ # Rolls back a transaction.
848
+ # @param [String] database
849
+ # The database name. In the format:
850
+ # `projects/`project_id`/databases/`database_id``.
851
+ # @param [Google::Apis::FirestoreV1::RollbackRequest] rollback_request_object
852
+ # @param [String] fields
853
+ # Selector specifying which fields to include in a partial response.
854
+ # @param [String] quota_user
855
+ # Available to use for quota purposes for server-side applications. Can be any
856
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
857
+ # @param [Google::Apis::RequestOptions] options
858
+ # Request-specific options
859
+ #
860
+ # @yield [result, err] Result & error if block supplied
861
+ # @yieldparam result [Google::Apis::FirestoreV1::Empty] parsed result object
862
+ # @yieldparam err [StandardError] error object if request failed
863
+ #
864
+ # @return [Google::Apis::FirestoreV1::Empty]
865
+ #
866
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
867
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
868
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
869
+ def rollback_document(database, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
870
+ command = make_simple_command(:post, 'v1/{+database}/documents:rollback', options)
871
+ command.request_representation = Google::Apis::FirestoreV1::RollbackRequest::Representation
872
+ command.request_object = rollback_request_object
873
+ command.response_representation = Google::Apis::FirestoreV1::Empty::Representation
874
+ command.response_class = Google::Apis::FirestoreV1::Empty
875
+ command.params['database'] = database unless database.nil?
876
+ command.query['fields'] = fields unless fields.nil?
877
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
878
+ execute_or_queue_command(command, &block)
879
+ end
880
+
881
+ # Runs a query.
882
+ # @param [String] parent
883
+ # The parent resource name. In the format:
884
+ # `projects/`project_id`/databases/`database_id`/documents` or
885
+ # `projects/`project_id`/databases/`database_id`/documents/`document_path``.
886
+ # For example:
887
+ # `projects/my-project/databases/my-database/documents` or
888
+ # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
889
+ # @param [Google::Apis::FirestoreV1::RunQueryRequest] run_query_request_object
890
+ # @param [String] fields
891
+ # Selector specifying which fields to include in a partial response.
892
+ # @param [String] quota_user
893
+ # Available to use for quota purposes for server-side applications. Can be any
894
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
895
+ # @param [Google::Apis::RequestOptions] options
896
+ # Request-specific options
897
+ #
898
+ # @yield [result, err] Result & error if block supplied
899
+ # @yieldparam result [Google::Apis::FirestoreV1::RunQueryResponse] parsed result object
900
+ # @yieldparam err [StandardError] error object if request failed
901
+ #
902
+ # @return [Google::Apis::FirestoreV1::RunQueryResponse]
903
+ #
904
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
905
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
906
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
907
+ def run_document_query(parent, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
908
+ command = make_simple_command(:post, 'v1/{+parent}:runQuery', options)
909
+ command.request_representation = Google::Apis::FirestoreV1::RunQueryRequest::Representation
910
+ command.request_object = run_query_request_object
911
+ command.response_representation = Google::Apis::FirestoreV1::RunQueryResponse::Representation
912
+ command.response_class = Google::Apis::FirestoreV1::RunQueryResponse
913
+ command.params['parent'] = parent unless parent.nil?
914
+ command.query['fields'] = fields unless fields.nil?
915
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
916
+ execute_or_queue_command(command, &block)
917
+ end
918
+
919
+ # Streams batches of document updates and deletes, in order.
920
+ # @param [String] database
921
+ # The database name. In the format:
922
+ # `projects/`project_id`/databases/`database_id``.
923
+ # This is only required in the first message.
924
+ # @param [Google::Apis::FirestoreV1::WriteRequest] write_request_object
925
+ # @param [String] fields
926
+ # Selector specifying which fields to include in a partial response.
927
+ # @param [String] quota_user
928
+ # Available to use for quota purposes for server-side applications. Can be any
929
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
930
+ # @param [Google::Apis::RequestOptions] options
931
+ # Request-specific options
932
+ #
933
+ # @yield [result, err] Result & error if block supplied
934
+ # @yieldparam result [Google::Apis::FirestoreV1::WriteResponse] parsed result object
935
+ # @yieldparam err [StandardError] error object if request failed
936
+ #
937
+ # @return [Google::Apis::FirestoreV1::WriteResponse]
938
+ #
939
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
940
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
941
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
942
+ def write_document(database, write_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
943
+ command = make_simple_command(:post, 'v1/{+database}/documents:write', options)
944
+ command.request_representation = Google::Apis::FirestoreV1::WriteRequest::Representation
945
+ command.request_object = write_request_object
946
+ command.response_representation = Google::Apis::FirestoreV1::WriteResponse::Representation
947
+ command.response_class = Google::Apis::FirestoreV1::WriteResponse
948
+ command.params['database'] = database unless database.nil?
949
+ command.query['fields'] = fields unless fields.nil?
950
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
951
+ execute_or_queue_command(command, &block)
952
+ end
953
+
428
954
  # Starts asynchronous cancellation on a long-running operation. The server
429
955
  # makes a best effort to cancel the operation, but success is not
430
956
  # guaranteed. If the server doesn't support this method, it returns