google-api-client 0.42.0 → 0.42.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +70 -0
  3. data/generated/google/apis/admob_v1.rb +1 -1
  4. data/generated/google/apis/admob_v1/service.rb +1 -1
  5. data/generated/google/apis/appsmarket_v2.rb +1 -1
  6. data/generated/google/apis/billingbudgets_v1beta1.rb +1 -1
  7. data/generated/google/apis/billingbudgets_v1beta1/classes.rb +28 -13
  8. data/generated/google/apis/billingbudgets_v1beta1/representations.rb +1 -0
  9. data/generated/google/apis/blogger_v3.rb +1 -1
  10. data/generated/google/apis/chat_v1.rb +1 -1
  11. data/generated/google/apis/chat_v1/classes.rb +111 -0
  12. data/generated/google/apis/chat_v1/representations.rb +50 -0
  13. data/generated/google/apis/chat_v1/service.rb +32 -0
  14. data/generated/google/apis/classroom_v1.rb +1 -1
  15. data/generated/google/apis/classroom_v1/service.rb +5 -2
  16. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  17. data/generated/google/apis/cloudbuild_v1/classes.rb +1 -1
  18. data/generated/google/apis/cloudidentity_v1beta1.rb +1 -1
  19. data/generated/google/apis/cloudidentity_v1beta1/classes.rb +25 -0
  20. data/generated/google/apis/cloudidentity_v1beta1/representations.rb +15 -0
  21. data/generated/google/apis/cloudscheduler_v1.rb +1 -1
  22. data/generated/google/apis/cloudscheduler_v1/classes.rb +5 -5
  23. data/generated/google/apis/cloudscheduler_v1beta1.rb +1 -1
  24. data/generated/google/apis/cloudscheduler_v1beta1/classes.rb +5 -5
  25. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  26. data/generated/google/apis/cloudtrace_v1/classes.rb +2 -3
  27. data/generated/google/apis/cloudtrace_v1/service.rb +1 -7
  28. data/generated/google/apis/cloudtrace_v2.rb +1 -1
  29. data/generated/google/apis/cloudtrace_v2/classes.rb +6 -5
  30. data/generated/google/apis/cloudtrace_v2/service.rb +3 -6
  31. data/generated/google/apis/compute_beta.rb +1 -1
  32. data/generated/google/apis/compute_beta/classes.rb +279 -0
  33. data/generated/google/apis/compute_beta/representations.rb +90 -0
  34. data/generated/google/apis/compute_beta/service.rb +257 -0
  35. data/generated/google/apis/compute_v1.rb +1 -1
  36. data/generated/google/apis/compute_v1/classes.rb +279 -0
  37. data/generated/google/apis/compute_v1/representations.rb +90 -0
  38. data/generated/google/apis/compute_v1/service.rb +257 -0
  39. data/generated/google/apis/container_v1.rb +1 -1
  40. data/generated/google/apis/container_v1/classes.rb +9 -0
  41. data/generated/google/apis/container_v1/representations.rb +1 -0
  42. data/generated/google/apis/container_v1beta1.rb +1 -1
  43. data/generated/google/apis/container_v1beta1/classes.rb +15 -0
  44. data/generated/google/apis/container_v1beta1/representations.rb +2 -0
  45. data/generated/google/apis/content_v2.rb +1 -1
  46. data/generated/google/apis/content_v2/classes.rb +2 -2
  47. data/generated/google/apis/content_v2_1.rb +1 -1
  48. data/generated/google/apis/content_v2_1/classes.rb +4 -4
  49. data/generated/google/apis/customsearch_v1.rb +1 -1
  50. data/generated/google/apis/customsearch_v1/service.rb +12 -2
  51. data/generated/google/apis/datacatalog_v1beta1.rb +1 -1
  52. data/generated/google/apis/datacatalog_v1beta1/classes.rb +3 -3
  53. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  54. data/generated/google/apis/dataflow_v1b3/service.rb +2 -2
  55. data/generated/google/apis/dataproc_v1.rb +1 -1
  56. data/generated/google/apis/dataproc_v1/classes.rb +9 -9
  57. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  58. data/generated/google/apis/dataproc_v1beta2/classes.rb +9 -9
  59. data/generated/google/apis/datastore_v1.rb +1 -1
  60. data/generated/google/apis/datastore_v1/classes.rb +1 -1
  61. data/generated/google/apis/displayvideo_v1.rb +1 -1
  62. data/generated/google/apis/displayvideo_v1/service.rb +2 -1
  63. data/generated/google/apis/dlp_v2.rb +1 -1
  64. data/generated/google/apis/dlp_v2/classes.rb +5 -2
  65. data/generated/google/apis/dns_v1.rb +1 -1
  66. data/generated/google/apis/dns_v1beta2.rb +1 -1
  67. data/generated/google/apis/dns_v2beta1.rb +4 -4
  68. data/generated/google/apis/dns_v2beta1/classes.rb +313 -162
  69. data/generated/google/apis/dns_v2beta1/service.rb +247 -180
  70. data/generated/google/apis/drive_v2.rb +1 -1
  71. data/generated/google/apis/drive_v2/classes.rb +66 -2
  72. data/generated/google/apis/drive_v2/representations.rb +22 -0
  73. data/generated/google/apis/drive_v2/service.rb +23 -10
  74. data/generated/google/apis/drive_v3.rb +1 -1
  75. data/generated/google/apis/drive_v3/classes.rb +65 -2
  76. data/generated/google/apis/drive_v3/representations.rb +22 -0
  77. data/generated/google/apis/drive_v3/service.rb +8 -5
  78. data/generated/google/apis/firestore_v1.rb +1 -1
  79. data/generated/google/apis/firestore_v1/classes.rb +152 -0
  80. data/generated/google/apis/firestore_v1/representations.rb +63 -0
  81. data/generated/google/apis/firestore_v1/service.rb +78 -0
  82. data/generated/google/apis/firestore_v1beta1.rb +1 -1
  83. data/generated/google/apis/firestore_v1beta1/classes.rb +152 -0
  84. data/generated/google/apis/firestore_v1beta1/representations.rb +63 -0
  85. data/generated/google/apis/firestore_v1beta1/service.rb +78 -0
  86. data/generated/google/apis/gmail_v1.rb +1 -1
  87. data/generated/google/apis/gmail_v1/classes.rb +53 -53
  88. data/generated/google/apis/gmail_v1/service.rb +72 -72
  89. data/generated/google/apis/healthcare_v1.rb +1 -1
  90. data/generated/google/apis/healthcare_v1/service.rb +48 -1
  91. data/generated/google/apis/healthcare_v1beta1.rb +1 -1
  92. data/generated/google/apis/healthcare_v1beta1/service.rb +60 -1
  93. data/generated/google/apis/iam_v1.rb +1 -1
  94. data/generated/google/apis/iam_v1/classes.rb +22 -3
  95. data/generated/google/apis/iam_v1/service.rb +18 -6
  96. data/generated/google/apis/memcache_v1beta2.rb +1 -1
  97. data/generated/google/apis/memcache_v1beta2/classes.rb +1 -1
  98. data/generated/google/apis/ml_v1.rb +1 -1
  99. data/generated/google/apis/ml_v1/classes.rb +17 -11
  100. data/generated/google/apis/monitoring_v3.rb +1 -1
  101. data/generated/google/apis/monitoring_v3/classes.rb +54 -30
  102. data/generated/google/apis/networkmanagement_v1.rb +1 -1
  103. data/generated/google/apis/networkmanagement_v1/classes.rb +6 -6
  104. data/generated/google/apis/networkmanagement_v1beta1.rb +1 -1
  105. data/generated/google/apis/networkmanagement_v1beta1/classes.rb +6 -6
  106. data/generated/google/apis/osconfig_v1.rb +1 -1
  107. data/generated/google/apis/osconfig_v1/classes.rb +2 -2
  108. data/generated/google/apis/osconfig_v1beta.rb +1 -1
  109. data/generated/google/apis/osconfig_v1beta/classes.rb +2 -2
  110. data/generated/google/apis/realtimebidding_v1.rb +1 -1
  111. data/generated/google/apis/recommendationengine_v1beta1.rb +36 -0
  112. data/generated/google/apis/recommendationengine_v1beta1/classes.rb +2015 -0
  113. data/generated/google/apis/recommendationengine_v1beta1/representations.rb +848 -0
  114. data/generated/google/apis/recommendationengine_v1beta1/service.rb +990 -0
  115. data/generated/google/apis/remotebuildexecution_v1.rb +1 -1
  116. data/generated/google/apis/remotebuildexecution_v1alpha.rb +1 -1
  117. data/generated/google/apis/remotebuildexecution_v2.rb +1 -1
  118. data/generated/google/apis/reseller_v1.rb +4 -3
  119. data/generated/google/apis/reseller_v1/classes.rb +219 -160
  120. data/generated/google/apis/reseller_v1/service.rb +247 -252
  121. data/generated/google/apis/run_v1.rb +2 -2
  122. data/generated/google/apis/run_v1/classes.rb +6 -1
  123. data/generated/google/apis/run_v1/service.rb +1 -1
  124. data/generated/google/apis/run_v1alpha1.rb +2 -2
  125. data/generated/google/apis/run_v1alpha1/service.rb +1 -1
  126. data/generated/google/apis/run_v1beta1.rb +2 -2
  127. data/generated/google/apis/run_v1beta1/service.rb +1 -1
  128. data/generated/google/apis/searchconsole_v1.rb +4 -3
  129. data/generated/google/apis/searchconsole_v1/service.rb +3 -2
  130. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  131. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +2 -2
  132. data/generated/google/apis/serviceconsumermanagement_v1beta1.rb +1 -1
  133. data/generated/google/apis/serviceconsumermanagement_v1beta1/classes.rb +2 -2
  134. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  135. data/generated/google/apis/servicecontrol_v1/classes.rb +6 -6
  136. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  137. data/generated/google/apis/servicemanagement_v1/classes.rb +2 -2
  138. data/generated/google/apis/servicenetworking_v1.rb +1 -1
  139. data/generated/google/apis/servicenetworking_v1/classes.rb +2 -2
  140. data/generated/google/apis/servicenetworking_v1beta.rb +1 -1
  141. data/generated/google/apis/servicenetworking_v1beta/classes.rb +2 -2
  142. data/generated/google/apis/serviceusage_v1.rb +1 -1
  143. data/generated/google/apis/serviceusage_v1/classes.rb +2 -2
  144. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  145. data/generated/google/apis/serviceusage_v1beta1/classes.rb +2 -2
  146. data/generated/google/apis/sheets_v4.rb +1 -1
  147. data/generated/google/apis/sheets_v4/classes.rb +28 -28
  148. data/generated/google/apis/vision_v1.rb +1 -1
  149. data/generated/google/apis/vision_v1/classes.rb +2 -0
  150. data/generated/google/apis/vision_v1p1beta1.rb +1 -1
  151. data/generated/google/apis/vision_v1p1beta1/classes.rb +2 -0
  152. data/generated/google/apis/vision_v1p2beta1.rb +1 -1
  153. data/generated/google/apis/vision_v1p2beta1/classes.rb +2 -0
  154. data/generated/google/apis/youtube_v3.rb +1 -1
  155. data/generated/google/apis/youtube_v3/classes.rb +2 -2
  156. data/generated/google/apis/youtube_v3/service.rb +1 -0
  157. data/lib/google/apis/version.rb +1 -1
  158. metadata +7 -3
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://cloud.google.com/firestore
27
27
  module FirestoreV1
28
28
  VERSION = 'V1'
29
- REVISION = '20200311'
29
+ REVISION = '20200709'
30
30
 
31
31
  # View and manage your data across Google Cloud Platform services
32
32
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -138,6 +138,63 @@ module Google
138
138
  end
139
139
  end
140
140
 
141
+ # The request for Firestore.BatchWrite.
142
+ class BatchWriteRequest
143
+ include Google::Apis::Core::Hashable
144
+
145
+ # Labels associated with this batch write.
146
+ # Corresponds to the JSON property `labels`
147
+ # @return [Hash<String,String>]
148
+ attr_accessor :labels
149
+
150
+ # The writes to apply.
151
+ # Method does not apply writes atomically and does not guarantee ordering.
152
+ # Each write succeeds or fails independently. You cannot write to the same
153
+ # document more than once per request.
154
+ # Corresponds to the JSON property `writes`
155
+ # @return [Array<Google::Apis::FirestoreV1::Write>]
156
+ attr_accessor :writes
157
+
158
+ def initialize(**args)
159
+ update!(**args)
160
+ end
161
+
162
+ # Update properties of this object
163
+ def update!(**args)
164
+ @labels = args[:labels] if args.key?(:labels)
165
+ @writes = args[:writes] if args.key?(:writes)
166
+ end
167
+ end
168
+
169
+ # The response from Firestore.BatchWrite.
170
+ class BatchWriteResponse
171
+ include Google::Apis::Core::Hashable
172
+
173
+ # The status of applying the writes.
174
+ # This i-th write status corresponds to the i-th write in the
175
+ # request.
176
+ # Corresponds to the JSON property `status`
177
+ # @return [Array<Google::Apis::FirestoreV1::Status>]
178
+ attr_accessor :status
179
+
180
+ # The result of applying the writes.
181
+ # This i-th write result corresponds to the i-th write in the
182
+ # request.
183
+ # Corresponds to the JSON property `writeResults`
184
+ # @return [Array<Google::Apis::FirestoreV1::WriteResult>]
185
+ attr_accessor :write_results
186
+
187
+ def initialize(**args)
188
+ update!(**args)
189
+ end
190
+
191
+ # Update properties of this object
192
+ def update!(**args)
193
+ @status = args[:status] if args.key?(:status)
194
+ @write_results = args[:write_results] if args.key?(:write_results)
195
+ end
196
+ end
197
+
141
198
  # The request for Firestore.BeginTransaction.
142
199
  class BeginTransactionRequest
143
200
  include Google::Apis::Core::Hashable
@@ -1792,6 +1849,101 @@ module Google
1792
1849
  end
1793
1850
  end
1794
1851
 
1852
+ # The request for Firestore.PartitionQuery.
1853
+ class PartitionQueryRequest
1854
+ include Google::Apis::Core::Hashable
1855
+
1856
+ # The maximum number of partitions to return in this call, subject to
1857
+ # `partition_count`.
1858
+ # For example, if `partition_count` = 10 and `page_size` = 8, the first call
1859
+ # to PartitionQuery will return up to 8 partitions and a `next_page_token`
1860
+ # if more results exist. A second call to PartitionQuery will return up to
1861
+ # 2 partitions, to complete the total of 10 specified in `partition_count`.
1862
+ # Corresponds to the JSON property `pageSize`
1863
+ # @return [Fixnum]
1864
+ attr_accessor :page_size
1865
+
1866
+ # The `next_page_token` value returned from a previous call to
1867
+ # PartitionQuery that may be used to get an additional set of results.
1868
+ # There are no ordering guarantees between sets of results. Thus, using
1869
+ # multiple sets of results will require merging the different result sets.
1870
+ # For example, two subsequent calls using a page_token may return:
1871
+ # * cursor B, cursor M, cursor Q
1872
+ # * cursor A, cursor U, cursor W
1873
+ # To obtain a complete result set ordered with respect to the results of the
1874
+ # query supplied to PartitionQuery, the results sets should be merged:
1875
+ # cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
1876
+ # Corresponds to the JSON property `pageToken`
1877
+ # @return [String]
1878
+ attr_accessor :page_token
1879
+
1880
+ # The desired maximum number of partition points.
1881
+ # The partitions may be returned across multiple pages of results.
1882
+ # The number must be strictly positive. The actual number of partitions
1883
+ # returned may be fewer.
1884
+ # For example, this may be set to one fewer than the number of parallel
1885
+ # queries to be run, or in running a data pipeline job, one fewer than the
1886
+ # number of workers or compute instances available.
1887
+ # Corresponds to the JSON property `partitionCount`
1888
+ # @return [Fixnum]
1889
+ attr_accessor :partition_count
1890
+
1891
+ # A Firestore query.
1892
+ # Corresponds to the JSON property `structuredQuery`
1893
+ # @return [Google::Apis::FirestoreV1::StructuredQuery]
1894
+ attr_accessor :structured_query
1895
+
1896
+ def initialize(**args)
1897
+ update!(**args)
1898
+ end
1899
+
1900
+ # Update properties of this object
1901
+ def update!(**args)
1902
+ @page_size = args[:page_size] if args.key?(:page_size)
1903
+ @page_token = args[:page_token] if args.key?(:page_token)
1904
+ @partition_count = args[:partition_count] if args.key?(:partition_count)
1905
+ @structured_query = args[:structured_query] if args.key?(:structured_query)
1906
+ end
1907
+ end
1908
+
1909
+ # The response for Firestore.PartitionQuery.
1910
+ class PartitionQueryResponse
1911
+ include Google::Apis::Core::Hashable
1912
+
1913
+ # A page token that may be used to request an additional set of results, up
1914
+ # to the number specified by `partition_count` in the PartitionQuery request.
1915
+ # If blank, there are no more results.
1916
+ # Corresponds to the JSON property `nextPageToken`
1917
+ # @return [String]
1918
+ attr_accessor :next_page_token
1919
+
1920
+ # Partition results.
1921
+ # Each partition is a split point that can be used by RunQuery as a starting
1922
+ # or end point for the query results. The RunQuery requests must be made with
1923
+ # the same query supplied to this PartitionQuery request. The partition
1924
+ # cursors will be ordered according to same ordering as the results of the
1925
+ # query supplied to PartitionQuery.
1926
+ # For example, if a PartitionQuery request returns partition cursors A and B,
1927
+ # running the following three queries will return the entire result set of
1928
+ # the original query:
1929
+ # * query, end_at A
1930
+ # * query, start_at A, end_at B
1931
+ # * query, start_at B
1932
+ # Corresponds to the JSON property `partitions`
1933
+ # @return [Array<Google::Apis::FirestoreV1::Cursor>]
1934
+ attr_accessor :partitions
1935
+
1936
+ def initialize(**args)
1937
+ update!(**args)
1938
+ end
1939
+
1940
+ # Update properties of this object
1941
+ def update!(**args)
1942
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1943
+ @partitions = args[:partitions] if args.key?(:partitions)
1944
+ end
1945
+ end
1946
+
1795
1947
  # A precondition on a document, used for conditional operations.
1796
1948
  class Precondition
1797
1949
  include Google::Apis::Core::Hashable
@@ -40,6 +40,18 @@ module Google
40
40
  include Google::Apis::Core::JsonObjectSupport
41
41
  end
42
42
 
43
+ class BatchWriteRequest
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class BatchWriteResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
43
55
  class BeginTransactionRequest
44
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
45
57
 
@@ -334,6 +346,18 @@ module Google
334
346
  include Google::Apis::Core::JsonObjectSupport
335
347
  end
336
348
 
349
+ class PartitionQueryRequest
350
+ class Representation < Google::Apis::Core::JsonRepresentation; end
351
+
352
+ include Google::Apis::Core::JsonObjectSupport
353
+ end
354
+
355
+ class PartitionQueryResponse
356
+ class Representation < Google::Apis::Core::JsonRepresentation; end
357
+
358
+ include Google::Apis::Core::JsonObjectSupport
359
+ end
360
+
337
361
  class Precondition
338
362
  class Representation < Google::Apis::Core::JsonRepresentation; end
339
363
 
@@ -480,6 +504,25 @@ module Google
480
504
  end
481
505
  end
482
506
 
507
+ class BatchWriteRequest
508
+ # @private
509
+ class Representation < Google::Apis::Core::JsonRepresentation
510
+ hash :labels, as: 'labels'
511
+ collection :writes, as: 'writes', class: Google::Apis::FirestoreV1::Write, decorator: Google::Apis::FirestoreV1::Write::Representation
512
+
513
+ end
514
+ end
515
+
516
+ class BatchWriteResponse
517
+ # @private
518
+ class Representation < Google::Apis::Core::JsonRepresentation
519
+ collection :status, as: 'status', class: Google::Apis::FirestoreV1::Status, decorator: Google::Apis::FirestoreV1::Status::Representation
520
+
521
+ collection :write_results, as: 'writeResults', class: Google::Apis::FirestoreV1::WriteResult, decorator: Google::Apis::FirestoreV1::WriteResult::Representation
522
+
523
+ end
524
+ end
525
+
483
526
  class BeginTransactionRequest
484
527
  # @private
485
528
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -950,6 +993,26 @@ module Google
950
993
  end
951
994
  end
952
995
 
996
+ class PartitionQueryRequest
997
+ # @private
998
+ class Representation < Google::Apis::Core::JsonRepresentation
999
+ property :page_size, as: 'pageSize'
1000
+ property :page_token, as: 'pageToken'
1001
+ property :partition_count, :numeric_string => true, as: 'partitionCount'
1002
+ property :structured_query, as: 'structuredQuery', class: Google::Apis::FirestoreV1::StructuredQuery, decorator: Google::Apis::FirestoreV1::StructuredQuery::Representation
1003
+
1004
+ end
1005
+ end
1006
+
1007
+ class PartitionQueryResponse
1008
+ # @private
1009
+ class Representation < Google::Apis::Core::JsonRepresentation
1010
+ property :next_page_token, as: 'nextPageToken'
1011
+ collection :partitions, as: 'partitions', class: Google::Apis::FirestoreV1::Cursor, decorator: Google::Apis::FirestoreV1::Cursor::Representation
1012
+
1013
+ end
1014
+ end
1015
+
953
1016
  class Precondition
954
1017
  # @private
955
1018
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -461,6 +461,46 @@ module Google
461
461
  execute_or_queue_command(command, &block)
462
462
  end
463
463
 
464
+ # Applies a batch of write operations.
465
+ # The BatchWrite method does not apply the write operations atomically
466
+ # and can apply them out of order. Method does not allow more than one write
467
+ # per document. Each write succeeds or fails independently. See the
468
+ # BatchWriteResponse for the success status of each write.
469
+ # If you require an atomically applied set of writes, use
470
+ # Commit instead.
471
+ # @param [String] database
472
+ # Required. The database name. In the format:
473
+ # `projects/`project_id`/databases/`database_id``.
474
+ # @param [Google::Apis::FirestoreV1::BatchWriteRequest] batch_write_request_object
475
+ # @param [String] fields
476
+ # Selector specifying which fields to include in a partial response.
477
+ # @param [String] quota_user
478
+ # Available to use for quota purposes for server-side applications. Can be any
479
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
480
+ # @param [Google::Apis::RequestOptions] options
481
+ # Request-specific options
482
+ #
483
+ # @yield [result, err] Result & error if block supplied
484
+ # @yieldparam result [Google::Apis::FirestoreV1::BatchWriteResponse] parsed result object
485
+ # @yieldparam err [StandardError] error object if request failed
486
+ #
487
+ # @return [Google::Apis::FirestoreV1::BatchWriteResponse]
488
+ #
489
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
490
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
491
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
492
+ def batch_document_write(database, batch_write_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
493
+ command = make_simple_command(:post, 'v1/{+database}/documents:batchWrite', options)
494
+ command.request_representation = Google::Apis::FirestoreV1::BatchWriteRequest::Representation
495
+ command.request_object = batch_write_request_object
496
+ command.response_representation = Google::Apis::FirestoreV1::BatchWriteResponse::Representation
497
+ command.response_class = Google::Apis::FirestoreV1::BatchWriteResponse
498
+ command.params['database'] = database unless database.nil?
499
+ command.query['fields'] = fields unless fields.nil?
500
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
501
+ execute_or_queue_command(command, &block)
502
+ end
503
+
464
504
  # Starts a new transaction.
465
505
  # @param [String] database
466
506
  # Required. The database name. In the format:
@@ -796,6 +836,44 @@ module Google
796
836
  execute_or_queue_command(command, &block)
797
837
  end
798
838
 
839
+ # Partitions a query by returning partition cursors that can be used to run
840
+ # the query in parallel. The returned partition cursors are split points that
841
+ # can be used by RunQuery as starting/end points for the query results.
842
+ # @param [String] parent
843
+ # Required. The parent resource name. In the format:
844
+ # `projects/`project_id`/databases/`database_id`/documents`.
845
+ # Document resource names are not supported; only database resource names
846
+ # can be specified.
847
+ # @param [Google::Apis::FirestoreV1::PartitionQueryRequest] partition_query_request_object
848
+ # @param [String] fields
849
+ # Selector specifying which fields to include in a partial response.
850
+ # @param [String] quota_user
851
+ # Available to use for quota purposes for server-side applications. Can be any
852
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
853
+ # @param [Google::Apis::RequestOptions] options
854
+ # Request-specific options
855
+ #
856
+ # @yield [result, err] Result & error if block supplied
857
+ # @yieldparam result [Google::Apis::FirestoreV1::PartitionQueryResponse] parsed result object
858
+ # @yieldparam err [StandardError] error object if request failed
859
+ #
860
+ # @return [Google::Apis::FirestoreV1::PartitionQueryResponse]
861
+ #
862
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
863
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
864
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
865
+ def partition_document_query(parent, partition_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
866
+ command = make_simple_command(:post, 'v1/{+parent}:partitionQuery', options)
867
+ command.request_representation = Google::Apis::FirestoreV1::PartitionQueryRequest::Representation
868
+ command.request_object = partition_query_request_object
869
+ command.response_representation = Google::Apis::FirestoreV1::PartitionQueryResponse::Representation
870
+ command.response_class = Google::Apis::FirestoreV1::PartitionQueryResponse
871
+ command.params['parent'] = parent unless parent.nil?
872
+ command.query['fields'] = fields unless fields.nil?
873
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
874
+ execute_or_queue_command(command, &block)
875
+ end
876
+
799
877
  # Updates or inserts a document.
800
878
  # @param [String] name
801
879
  # The resource name of the document, for example
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://cloud.google.com/firestore
27
27
  module FirestoreV1beta1
28
28
  VERSION = 'V1beta1'
29
- REVISION = '20200311'
29
+ REVISION = '20200709'
30
30
 
31
31
  # View and manage your data across Google Cloud Platform services
32
32
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -138,6 +138,63 @@ module Google
138
138
  end
139
139
  end
140
140
 
141
+ # The request for Firestore.BatchWrite.
142
+ class BatchWriteRequest
143
+ include Google::Apis::Core::Hashable
144
+
145
+ # Labels associated with this batch write.
146
+ # Corresponds to the JSON property `labels`
147
+ # @return [Hash<String,String>]
148
+ attr_accessor :labels
149
+
150
+ # The writes to apply.
151
+ # Method does not apply writes atomically and does not guarantee ordering.
152
+ # Each write succeeds or fails independently. You cannot write to the same
153
+ # document more than once per request.
154
+ # Corresponds to the JSON property `writes`
155
+ # @return [Array<Google::Apis::FirestoreV1beta1::Write>]
156
+ attr_accessor :writes
157
+
158
+ def initialize(**args)
159
+ update!(**args)
160
+ end
161
+
162
+ # Update properties of this object
163
+ def update!(**args)
164
+ @labels = args[:labels] if args.key?(:labels)
165
+ @writes = args[:writes] if args.key?(:writes)
166
+ end
167
+ end
168
+
169
+ # The response from Firestore.BatchWrite.
170
+ class BatchWriteResponse
171
+ include Google::Apis::Core::Hashable
172
+
173
+ # The status of applying the writes.
174
+ # This i-th write status corresponds to the i-th write in the
175
+ # request.
176
+ # Corresponds to the JSON property `status`
177
+ # @return [Array<Google::Apis::FirestoreV1beta1::Status>]
178
+ attr_accessor :status
179
+
180
+ # The result of applying the writes.
181
+ # This i-th write result corresponds to the i-th write in the
182
+ # request.
183
+ # Corresponds to the JSON property `writeResults`
184
+ # @return [Array<Google::Apis::FirestoreV1beta1::WriteResult>]
185
+ attr_accessor :write_results
186
+
187
+ def initialize(**args)
188
+ update!(**args)
189
+ end
190
+
191
+ # Update properties of this object
192
+ def update!(**args)
193
+ @status = args[:status] if args.key?(:status)
194
+ @write_results = args[:write_results] if args.key?(:write_results)
195
+ end
196
+ end
197
+
141
198
  # The request for Firestore.BeginTransaction.
142
199
  class BeginTransactionRequest
143
200
  include Google::Apis::Core::Hashable
@@ -1430,6 +1487,101 @@ module Google
1430
1487
  end
1431
1488
  end
1432
1489
 
1490
+ # The request for Firestore.PartitionQuery.
1491
+ class PartitionQueryRequest
1492
+ include Google::Apis::Core::Hashable
1493
+
1494
+ # The maximum number of partitions to return in this call, subject to
1495
+ # `partition_count`.
1496
+ # For example, if `partition_count` = 10 and `page_size` = 8, the first call
1497
+ # to PartitionQuery will return up to 8 partitions and a `next_page_token`
1498
+ # if more results exist. A second call to PartitionQuery will return up to
1499
+ # 2 partitions, to complete the total of 10 specified in `partition_count`.
1500
+ # Corresponds to the JSON property `pageSize`
1501
+ # @return [Fixnum]
1502
+ attr_accessor :page_size
1503
+
1504
+ # The `next_page_token` value returned from a previous call to
1505
+ # PartitionQuery that may be used to get an additional set of results.
1506
+ # There are no ordering guarantees between sets of results. Thus, using
1507
+ # multiple sets of results will require merging the different result sets.
1508
+ # For example, two subsequent calls using a page_token may return:
1509
+ # * cursor B, cursor M, cursor Q
1510
+ # * cursor A, cursor U, cursor W
1511
+ # To obtain a complete result set ordered with respect to the results of the
1512
+ # query supplied to PartitionQuery, the results sets should be merged:
1513
+ # cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
1514
+ # Corresponds to the JSON property `pageToken`
1515
+ # @return [String]
1516
+ attr_accessor :page_token
1517
+
1518
+ # The desired maximum number of partition points.
1519
+ # The partitions may be returned across multiple pages of results.
1520
+ # The number must be strictly positive. The actual number of partitions
1521
+ # returned may be fewer.
1522
+ # For example, this may be set to one fewer than the number of parallel
1523
+ # queries to be run, or in running a data pipeline job, one fewer than the
1524
+ # number of workers or compute instances available.
1525
+ # Corresponds to the JSON property `partitionCount`
1526
+ # @return [Fixnum]
1527
+ attr_accessor :partition_count
1528
+
1529
+ # A Firestore query.
1530
+ # Corresponds to the JSON property `structuredQuery`
1531
+ # @return [Google::Apis::FirestoreV1beta1::StructuredQuery]
1532
+ attr_accessor :structured_query
1533
+
1534
+ def initialize(**args)
1535
+ update!(**args)
1536
+ end
1537
+
1538
+ # Update properties of this object
1539
+ def update!(**args)
1540
+ @page_size = args[:page_size] if args.key?(:page_size)
1541
+ @page_token = args[:page_token] if args.key?(:page_token)
1542
+ @partition_count = args[:partition_count] if args.key?(:partition_count)
1543
+ @structured_query = args[:structured_query] if args.key?(:structured_query)
1544
+ end
1545
+ end
1546
+
1547
+ # The response for Firestore.PartitionQuery.
1548
+ class PartitionQueryResponse
1549
+ include Google::Apis::Core::Hashable
1550
+
1551
+ # A page token that may be used to request an additional set of results, up
1552
+ # to the number specified by `partition_count` in the PartitionQuery request.
1553
+ # If blank, there are no more results.
1554
+ # Corresponds to the JSON property `nextPageToken`
1555
+ # @return [String]
1556
+ attr_accessor :next_page_token
1557
+
1558
+ # Partition results.
1559
+ # Each partition is a split point that can be used by RunQuery as a starting
1560
+ # or end point for the query results. The RunQuery requests must be made with
1561
+ # the same query supplied to this PartitionQuery request. The partition
1562
+ # cursors will be ordered according to same ordering as the results of the
1563
+ # query supplied to PartitionQuery.
1564
+ # For example, if a PartitionQuery request returns partition cursors A and B,
1565
+ # running the following three queries will return the entire result set of
1566
+ # the original query:
1567
+ # * query, end_at A
1568
+ # * query, start_at A, end_at B
1569
+ # * query, start_at B
1570
+ # Corresponds to the JSON property `partitions`
1571
+ # @return [Array<Google::Apis::FirestoreV1beta1::Cursor>]
1572
+ attr_accessor :partitions
1573
+
1574
+ def initialize(**args)
1575
+ update!(**args)
1576
+ end
1577
+
1578
+ # Update properties of this object
1579
+ def update!(**args)
1580
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1581
+ @partitions = args[:partitions] if args.key?(:partitions)
1582
+ end
1583
+ end
1584
+
1433
1585
  # A precondition on a document, used for conditional operations.
1434
1586
  class Precondition
1435
1587
  include Google::Apis::Core::Hashable