google-api-client 0.14.5 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +11 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +1 -0
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +63 -0
- data/generated/google/apis/androidenterprise_v1/representations.rb +18 -0
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +14 -0
- data/generated/google/apis/bigquery_v2/representations.rb +2 -0
- data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
- data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +28 -50
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
- data/generated/google/apis/cloudtasks_v2beta2/classes.rb +116 -111
- data/generated/google/apis/cloudtasks_v2beta2/representations.rb +17 -17
- data/generated/google/apis/cloudtasks_v2beta2/service.rb +8 -0
- data/generated/google/apis/cloudtrace_v2.rb +1 -1
- data/generated/google/apis/cloudtrace_v2/classes.rb +51 -58
- data/generated/google/apis/cloudtrace_v2/representations.rb +14 -15
- data/generated/google/apis/compute_alpha.rb +1 -1
- data/generated/google/apis/compute_alpha/classes.rb +157 -17
- data/generated/google/apis/compute_alpha/representations.rb +52 -0
- data/generated/google/apis/compute_alpha/service.rb +57 -0
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +46 -17
- data/generated/google/apis/compute_beta/representations.rb +2 -0
- data/generated/google/apis/compute_beta/service.rb +10 -1
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +4767 -337
- data/generated/google/apis/compute_v1/representations.rb +2044 -27
- data/generated/google/apis/compute_v1/service.rb +111 -0
- data/generated/google/apis/container_v1.rb +1 -1
- data/generated/google/apis/container_v1/classes.rb +1 -1
- data/generated/google/apis/container_v1beta1.rb +1 -1
- data/generated/google/apis/container_v1beta1/classes.rb +34 -1
- data/generated/google/apis/container_v1beta1/representations.rb +17 -0
- data/generated/google/apis/dataflow_v1b3.rb +1 -1
- data/generated/google/apis/dataflow_v1b3/classes.rb +0 -2
- data/generated/google/apis/dataproc_v1beta2.rb +1 -1
- data/generated/google/apis/dataproc_v1beta2/service.rb +5 -1
- data/generated/google/apis/{ml_v1beta1.rb → firestore_v1beta1.rb} +11 -8
- data/generated/google/apis/firestore_v1beta1/classes.rb +2115 -0
- data/generated/google/apis/firestore_v1beta1/representations.rb +899 -0
- data/generated/google/apis/firestore_v1beta1/service.rb +734 -0
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +93 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +35 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +35 -0
- data/generated/google/apis/logging_v2.rb +1 -1
- data/generated/google/apis/logging_v2/classes.rb +4 -9
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +4 -9
- data/generated/google/apis/ml_v1.rb +1 -1
- data/generated/google/apis/ml_v1/service.rb +102 -0
- data/generated/google/apis/monitoring_v3.rb +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +4 -9
- data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +17 -0
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +1 -0
- data/generated/google/apis/servicecontrol_v1.rb +1 -1
- data/generated/google/apis/servicecontrol_v1/classes.rb +5 -11
- data/generated/google/apis/servicecontrol_v1/representations.rb +1 -1
- data/generated/google/apis/servicemanagement_v1.rb +1 -1
- data/generated/google/apis/serviceuser_v1.rb +1 -1
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +81 -26
- data/generated/google/apis/sheets_v4/representations.rb +23 -0
- data/generated/google/apis/sheets_v4/service.rb +5 -5
- data/generated/google/apis/streetviewpublish_v1.rb +1 -1
- data/generated/google/apis/streetviewpublish_v1/classes.rb +97 -0
- data/generated/google/apis/streetviewpublish_v1/representations.rb +18 -0
- data/generated/google/apis/toolresults_v1beta3.rb +1 -1
- data/generated/google/apis/toolresults_v1beta3/classes.rb +121 -0
- data/generated/google/apis/toolresults_v1beta3/representations.rb +41 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +4 -2
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/lib/google/apis/version.rb +1 -1
- metadata +6 -6
- data/generated/google/apis/ml_v1beta1/classes.rb +0 -2396
- data/generated/google/apis/ml_v1beta1/representations.rb +0 -755
- data/generated/google/apis/ml_v1beta1/service.rb +0 -975
@@ -0,0 +1,734 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module FirestoreV1beta1
|
23
|
+
# Google Cloud Firestore API
|
24
|
+
#
|
25
|
+
#
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/firestore_v1beta1'
|
29
|
+
#
|
30
|
+
# Firestore = Google::Apis::FirestoreV1beta1 # Alias the module
|
31
|
+
# service = Firestore::FirestoreService.new
|
32
|
+
#
|
33
|
+
# @see https://cloud.google.com/firestore
|
34
|
+
class FirestoreService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://firestore.googleapis.com/', '')
|
47
|
+
@batch_path = 'batch'
|
48
|
+
end
|
49
|
+
|
50
|
+
# Gets multiple documents.
|
51
|
+
# Documents returned by this method are not guaranteed to be returned in the
|
52
|
+
# same order that they were requested.
|
53
|
+
# @param [String] database
|
54
|
+
# The database name. In the format:
|
55
|
+
# `projects/`project_id`/databases/`database_id``.
|
56
|
+
# @param [Google::Apis::FirestoreV1beta1::BatchGetDocumentsRequest] batch_get_documents_request_object
|
57
|
+
# @param [String] fields
|
58
|
+
# Selector specifying which fields to include in a partial response.
|
59
|
+
# @param [String] quota_user
|
60
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
61
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
62
|
+
# @param [Google::Apis::RequestOptions] options
|
63
|
+
# Request-specific options
|
64
|
+
#
|
65
|
+
# @yield [result, err] Result & error if block supplied
|
66
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::BatchGetDocumentsResponse] parsed result object
|
67
|
+
# @yieldparam err [StandardError] error object if request failed
|
68
|
+
#
|
69
|
+
# @return [Google::Apis::FirestoreV1beta1::BatchGetDocumentsResponse]
|
70
|
+
#
|
71
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
72
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
73
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
74
|
+
def batch_get_documents(database, batch_get_documents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
75
|
+
command = make_simple_command(:post, 'v1beta1/{+database}/documents:batchGet', options)
|
76
|
+
command.request_representation = Google::Apis::FirestoreV1beta1::BatchGetDocumentsRequest::Representation
|
77
|
+
command.request_object = batch_get_documents_request_object
|
78
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::BatchGetDocumentsResponse::Representation
|
79
|
+
command.response_class = Google::Apis::FirestoreV1beta1::BatchGetDocumentsResponse
|
80
|
+
command.params['database'] = database unless database.nil?
|
81
|
+
command.query['fields'] = fields unless fields.nil?
|
82
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
83
|
+
execute_or_queue_command(command, &block)
|
84
|
+
end
|
85
|
+
|
86
|
+
# Starts a new transaction.
|
87
|
+
# @param [String] database
|
88
|
+
# The database name. In the format:
|
89
|
+
# `projects/`project_id`/databases/`database_id``.
|
90
|
+
# @param [Google::Apis::FirestoreV1beta1::BeginTransactionRequest] begin_transaction_request_object
|
91
|
+
# @param [String] fields
|
92
|
+
# Selector specifying which fields to include in a partial response.
|
93
|
+
# @param [String] quota_user
|
94
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
95
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
96
|
+
# @param [Google::Apis::RequestOptions] options
|
97
|
+
# Request-specific options
|
98
|
+
#
|
99
|
+
# @yield [result, err] Result & error if block supplied
|
100
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::BeginTransactionResponse] parsed result object
|
101
|
+
# @yieldparam err [StandardError] error object if request failed
|
102
|
+
#
|
103
|
+
# @return [Google::Apis::FirestoreV1beta1::BeginTransactionResponse]
|
104
|
+
#
|
105
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
106
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
107
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
108
|
+
def begin_document_transaction(database, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
109
|
+
command = make_simple_command(:post, 'v1beta1/{+database}/documents:beginTransaction', options)
|
110
|
+
command.request_representation = Google::Apis::FirestoreV1beta1::BeginTransactionRequest::Representation
|
111
|
+
command.request_object = begin_transaction_request_object
|
112
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::BeginTransactionResponse::Representation
|
113
|
+
command.response_class = Google::Apis::FirestoreV1beta1::BeginTransactionResponse
|
114
|
+
command.params['database'] = database unless database.nil?
|
115
|
+
command.query['fields'] = fields unless fields.nil?
|
116
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
117
|
+
execute_or_queue_command(command, &block)
|
118
|
+
end
|
119
|
+
|
120
|
+
# Commits a transaction, while optionally updating documents.
|
121
|
+
# @param [String] database
|
122
|
+
# The database name. In the format:
|
123
|
+
# `projects/`project_id`/databases/`database_id``.
|
124
|
+
# @param [Google::Apis::FirestoreV1beta1::CommitRequest] commit_request_object
|
125
|
+
# @param [String] fields
|
126
|
+
# Selector specifying which fields to include in a partial response.
|
127
|
+
# @param [String] quota_user
|
128
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
129
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
130
|
+
# @param [Google::Apis::RequestOptions] options
|
131
|
+
# Request-specific options
|
132
|
+
#
|
133
|
+
# @yield [result, err] Result & error if block supplied
|
134
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::CommitResponse] parsed result object
|
135
|
+
# @yieldparam err [StandardError] error object if request failed
|
136
|
+
#
|
137
|
+
# @return [Google::Apis::FirestoreV1beta1::CommitResponse]
|
138
|
+
#
|
139
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
140
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
141
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
142
|
+
def commit_document(database, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
143
|
+
command = make_simple_command(:post, 'v1beta1/{+database}/documents:commit', options)
|
144
|
+
command.request_representation = Google::Apis::FirestoreV1beta1::CommitRequest::Representation
|
145
|
+
command.request_object = commit_request_object
|
146
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::CommitResponse::Representation
|
147
|
+
command.response_class = Google::Apis::FirestoreV1beta1::CommitResponse
|
148
|
+
command.params['database'] = database unless database.nil?
|
149
|
+
command.query['fields'] = fields unless fields.nil?
|
150
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
151
|
+
execute_or_queue_command(command, &block)
|
152
|
+
end
|
153
|
+
|
154
|
+
# Creates a new document.
|
155
|
+
# @param [String] parent
|
156
|
+
# The parent resource. For example:
|
157
|
+
# `projects/`project_id`/databases/`database_id`/documents` or
|
158
|
+
# `projects/`project_id`/databases/`database_id`/documents/chatrooms/`
|
159
|
+
# chatroom_id``
|
160
|
+
# @param [String] collection_id
|
161
|
+
# The collection ID, relative to `parent`, to list. For example: `chatrooms`.
|
162
|
+
# @param [Google::Apis::FirestoreV1beta1::Document] document_object
|
163
|
+
# @param [String] document_id
|
164
|
+
# The client-assigned document ID to use for this document.
|
165
|
+
# Optional. If not specified, an ID will be assigned by the service.
|
166
|
+
# @param [Array<String>, String] mask_field_paths
|
167
|
+
# The list of field paths in the mask. See Document.fields for a field
|
168
|
+
# path syntax reference.
|
169
|
+
# @param [String] fields
|
170
|
+
# Selector specifying which fields to include in a partial response.
|
171
|
+
# @param [String] quota_user
|
172
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
173
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
174
|
+
# @param [Google::Apis::RequestOptions] options
|
175
|
+
# Request-specific options
|
176
|
+
#
|
177
|
+
# @yield [result, err] Result & error if block supplied
|
178
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::Document] parsed result object
|
179
|
+
# @yieldparam err [StandardError] error object if request failed
|
180
|
+
#
|
181
|
+
# @return [Google::Apis::FirestoreV1beta1::Document]
|
182
|
+
#
|
183
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
184
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
185
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
186
|
+
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)
|
187
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/{collectionId}', options)
|
188
|
+
command.request_representation = Google::Apis::FirestoreV1beta1::Document::Representation
|
189
|
+
command.request_object = document_object
|
190
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::Document::Representation
|
191
|
+
command.response_class = Google::Apis::FirestoreV1beta1::Document
|
192
|
+
command.params['parent'] = parent unless parent.nil?
|
193
|
+
command.params['collectionId'] = collection_id unless collection_id.nil?
|
194
|
+
command.query['documentId'] = document_id unless document_id.nil?
|
195
|
+
command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.nil?
|
196
|
+
command.query['fields'] = fields unless fields.nil?
|
197
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
198
|
+
execute_or_queue_command(command, &block)
|
199
|
+
end
|
200
|
+
|
201
|
+
# Deletes a document.
|
202
|
+
# @param [String] name
|
203
|
+
# The resource name of the Document to delete. In the format:
|
204
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
205
|
+
# @param [Boolean] current_document_exists
|
206
|
+
# When set to `true`, the target document must exist.
|
207
|
+
# When set to `false`, the target document must not exist.
|
208
|
+
# @param [String] current_document_update_time
|
209
|
+
# When set, the target document must exist and have been last updated at
|
210
|
+
# that time.
|
211
|
+
# @param [String] fields
|
212
|
+
# Selector specifying which fields to include in a partial response.
|
213
|
+
# @param [String] quota_user
|
214
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
215
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
216
|
+
# @param [Google::Apis::RequestOptions] options
|
217
|
+
# Request-specific options
|
218
|
+
#
|
219
|
+
# @yield [result, err] Result & error if block supplied
|
220
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::Empty] parsed result object
|
221
|
+
# @yieldparam err [StandardError] error object if request failed
|
222
|
+
#
|
223
|
+
# @return [Google::Apis::FirestoreV1beta1::Empty]
|
224
|
+
#
|
225
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
226
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
227
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
228
|
+
def delete_project_database_document(name, current_document_exists: nil, current_document_update_time: nil, fields: nil, quota_user: nil, options: nil, &block)
|
229
|
+
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
|
230
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::Empty::Representation
|
231
|
+
command.response_class = Google::Apis::FirestoreV1beta1::Empty
|
232
|
+
command.params['name'] = name unless name.nil?
|
233
|
+
command.query['currentDocument.exists'] = current_document_exists unless current_document_exists.nil?
|
234
|
+
command.query['currentDocument.updateTime'] = current_document_update_time unless current_document_update_time.nil?
|
235
|
+
command.query['fields'] = fields unless fields.nil?
|
236
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
237
|
+
execute_or_queue_command(command, &block)
|
238
|
+
end
|
239
|
+
|
240
|
+
# Gets a single document.
|
241
|
+
# @param [String] name
|
242
|
+
# The resource name of the Document to get. In the format:
|
243
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
244
|
+
# @param [Array<String>, String] mask_field_paths
|
245
|
+
# The list of field paths in the mask. See Document.fields for a field
|
246
|
+
# path syntax reference.
|
247
|
+
# @param [String] read_time
|
248
|
+
# Reads the version of the document at the given time.
|
249
|
+
# This may not be older than 60 seconds.
|
250
|
+
# @param [String] transaction
|
251
|
+
# Reads the document in a transaction.
|
252
|
+
# @param [String] fields
|
253
|
+
# Selector specifying which fields to include in a partial response.
|
254
|
+
# @param [String] quota_user
|
255
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
256
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
257
|
+
# @param [Google::Apis::RequestOptions] options
|
258
|
+
# Request-specific options
|
259
|
+
#
|
260
|
+
# @yield [result, err] Result & error if block supplied
|
261
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::Document] parsed result object
|
262
|
+
# @yieldparam err [StandardError] error object if request failed
|
263
|
+
#
|
264
|
+
# @return [Google::Apis::FirestoreV1beta1::Document]
|
265
|
+
#
|
266
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
267
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
268
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
269
|
+
def get_project_database_document(name, mask_field_paths: nil, read_time: nil, transaction: nil, fields: nil, quota_user: nil, options: nil, &block)
|
270
|
+
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
271
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::Document::Representation
|
272
|
+
command.response_class = Google::Apis::FirestoreV1beta1::Document
|
273
|
+
command.params['name'] = name unless name.nil?
|
274
|
+
command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.nil?
|
275
|
+
command.query['readTime'] = read_time unless read_time.nil?
|
276
|
+
command.query['transaction'] = transaction unless transaction.nil?
|
277
|
+
command.query['fields'] = fields unless fields.nil?
|
278
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
279
|
+
execute_or_queue_command(command, &block)
|
280
|
+
end
|
281
|
+
|
282
|
+
# Lists documents.
|
283
|
+
# @param [String] parent
|
284
|
+
# The parent resource name. In the format:
|
285
|
+
# `projects/`project_id`/databases/`database_id`/documents` or
|
286
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
287
|
+
# For example:
|
288
|
+
# `projects/my-project/databases/my-database/documents` or
|
289
|
+
# `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
|
290
|
+
# @param [String] collection_id
|
291
|
+
# The collection ID, relative to `parent`, to list. For example: `chatrooms`
|
292
|
+
# or `messages`.
|
293
|
+
# @param [Array<String>, String] mask_field_paths
|
294
|
+
# The list of field paths in the mask. See Document.fields for a field
|
295
|
+
# path syntax reference.
|
296
|
+
# @param [String] order_by
|
297
|
+
# The order to sort results by. For example: `priority desc, name`.
|
298
|
+
# @param [Fixnum] page_size
|
299
|
+
# The maximum number of documents to return.
|
300
|
+
# @param [String] page_token
|
301
|
+
# The `next_page_token` value returned from a previous List request, if any.
|
302
|
+
# @param [String] read_time
|
303
|
+
# Reads documents as they were at the given time.
|
304
|
+
# This may not be older than 60 seconds.
|
305
|
+
# @param [Boolean] show_missing
|
306
|
+
# If the list should show missing documents. A missing document is a
|
307
|
+
# document that does not exist but has sub-documents. These documents will
|
308
|
+
# be returned with a key but will not have fields, Document.create_time,
|
309
|
+
# or Document.update_time set.
|
310
|
+
# Requests with `show_missing` may not specify `where` or
|
311
|
+
# `order_by`.
|
312
|
+
# @param [String] transaction
|
313
|
+
# Reads documents in a transaction.
|
314
|
+
# @param [String] fields
|
315
|
+
# Selector specifying which fields to include in a partial response.
|
316
|
+
# @param [String] quota_user
|
317
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
318
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
319
|
+
# @param [Google::Apis::RequestOptions] options
|
320
|
+
# Request-specific options
|
321
|
+
#
|
322
|
+
# @yield [result, err] Result & error if block supplied
|
323
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::ListDocumentsResponse] parsed result object
|
324
|
+
# @yieldparam err [StandardError] error object if request failed
|
325
|
+
#
|
326
|
+
# @return [Google::Apis::FirestoreV1beta1::ListDocumentsResponse]
|
327
|
+
#
|
328
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
329
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
330
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
331
|
+
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)
|
332
|
+
command = make_simple_command(:get, 'v1beta1/{+parent}/{collectionId}', options)
|
333
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::ListDocumentsResponse::Representation
|
334
|
+
command.response_class = Google::Apis::FirestoreV1beta1::ListDocumentsResponse
|
335
|
+
command.params['parent'] = parent unless parent.nil?
|
336
|
+
command.params['collectionId'] = collection_id unless collection_id.nil?
|
337
|
+
command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.nil?
|
338
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
339
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
340
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
341
|
+
command.query['readTime'] = read_time unless read_time.nil?
|
342
|
+
command.query['showMissing'] = show_missing unless show_missing.nil?
|
343
|
+
command.query['transaction'] = transaction unless transaction.nil?
|
344
|
+
command.query['fields'] = fields unless fields.nil?
|
345
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
346
|
+
execute_or_queue_command(command, &block)
|
347
|
+
end
|
348
|
+
|
349
|
+
# Lists all the collection IDs underneath a document.
|
350
|
+
# @param [String] parent
|
351
|
+
# The parent document. In the format:
|
352
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
353
|
+
# For example:
|
354
|
+
# `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
|
355
|
+
# @param [Fixnum] page_size
|
356
|
+
# The maximum number of results to return.
|
357
|
+
# @param [String] page_token
|
358
|
+
# A page token. Must be a value from
|
359
|
+
# ListCollectionIdsResponse.
|
360
|
+
# @param [String] fields
|
361
|
+
# Selector specifying which fields to include in a partial response.
|
362
|
+
# @param [String] quota_user
|
363
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
364
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
365
|
+
# @param [Google::Apis::RequestOptions] options
|
366
|
+
# Request-specific options
|
367
|
+
#
|
368
|
+
# @yield [result, err] Result & error if block supplied
|
369
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::ListCollectionIdsResponse] parsed result object
|
370
|
+
# @yieldparam err [StandardError] error object if request failed
|
371
|
+
#
|
372
|
+
# @return [Google::Apis::FirestoreV1beta1::ListCollectionIdsResponse]
|
373
|
+
#
|
374
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
375
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
376
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
377
|
+
def list_project_database_document_collection_ids(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
378
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}:listCollectionIds', options)
|
379
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::ListCollectionIdsResponse::Representation
|
380
|
+
command.response_class = Google::Apis::FirestoreV1beta1::ListCollectionIdsResponse
|
381
|
+
command.params['parent'] = parent unless parent.nil?
|
382
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
383
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
384
|
+
command.query['fields'] = fields unless fields.nil?
|
385
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
386
|
+
execute_or_queue_command(command, &block)
|
387
|
+
end
|
388
|
+
|
389
|
+
# Listens to changes.
|
390
|
+
# @param [String] database
|
391
|
+
# The database name. In the format:
|
392
|
+
# `projects/`project_id`/databases/`database_id``.
|
393
|
+
# @param [Google::Apis::FirestoreV1beta1::ListenRequest] listen_request_object
|
394
|
+
# @param [String] fields
|
395
|
+
# Selector specifying which fields to include in a partial response.
|
396
|
+
# @param [String] quota_user
|
397
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
398
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
399
|
+
# @param [Google::Apis::RequestOptions] options
|
400
|
+
# Request-specific options
|
401
|
+
#
|
402
|
+
# @yield [result, err] Result & error if block supplied
|
403
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::ListenResponse] parsed result object
|
404
|
+
# @yieldparam err [StandardError] error object if request failed
|
405
|
+
#
|
406
|
+
# @return [Google::Apis::FirestoreV1beta1::ListenResponse]
|
407
|
+
#
|
408
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
409
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
410
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
411
|
+
def listen_document(database, listen_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
412
|
+
command = make_simple_command(:post, 'v1beta1/{+database}/documents:listen', options)
|
413
|
+
command.request_representation = Google::Apis::FirestoreV1beta1::ListenRequest::Representation
|
414
|
+
command.request_object = listen_request_object
|
415
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::ListenResponse::Representation
|
416
|
+
command.response_class = Google::Apis::FirestoreV1beta1::ListenResponse
|
417
|
+
command.params['database'] = database unless database.nil?
|
418
|
+
command.query['fields'] = fields unless fields.nil?
|
419
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
420
|
+
execute_or_queue_command(command, &block)
|
421
|
+
end
|
422
|
+
|
423
|
+
# Updates or inserts a document.
|
424
|
+
# @param [String] name
|
425
|
+
# The resource name of the document, for example
|
426
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
427
|
+
# @param [Google::Apis::FirestoreV1beta1::Document] document_object
|
428
|
+
# @param [Boolean] current_document_exists
|
429
|
+
# When set to `true`, the target document must exist.
|
430
|
+
# When set to `false`, the target document must not exist.
|
431
|
+
# @param [String] current_document_update_time
|
432
|
+
# When set, the target document must exist and have been last updated at
|
433
|
+
# that time.
|
434
|
+
# @param [Array<String>, String] mask_field_paths
|
435
|
+
# The list of field paths in the mask. See Document.fields for a field
|
436
|
+
# path syntax reference.
|
437
|
+
# @param [Array<String>, String] update_mask_field_paths
|
438
|
+
# The list of field paths in the mask. See Document.fields for a field
|
439
|
+
# path syntax reference.
|
440
|
+
# @param [String] fields
|
441
|
+
# Selector specifying which fields to include in a partial response.
|
442
|
+
# @param [String] quota_user
|
443
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
444
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
445
|
+
# @param [Google::Apis::RequestOptions] options
|
446
|
+
# Request-specific options
|
447
|
+
#
|
448
|
+
# @yield [result, err] Result & error if block supplied
|
449
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::Document] parsed result object
|
450
|
+
# @yieldparam err [StandardError] error object if request failed
|
451
|
+
#
|
452
|
+
# @return [Google::Apis::FirestoreV1beta1::Document]
|
453
|
+
#
|
454
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
455
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
456
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
457
|
+
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)
|
458
|
+
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
|
459
|
+
command.request_representation = Google::Apis::FirestoreV1beta1::Document::Representation
|
460
|
+
command.request_object = document_object
|
461
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::Document::Representation
|
462
|
+
command.response_class = Google::Apis::FirestoreV1beta1::Document
|
463
|
+
command.params['name'] = name unless name.nil?
|
464
|
+
command.query['currentDocument.exists'] = current_document_exists unless current_document_exists.nil?
|
465
|
+
command.query['currentDocument.updateTime'] = current_document_update_time unless current_document_update_time.nil?
|
466
|
+
command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.nil?
|
467
|
+
command.query['updateMask.fieldPaths'] = update_mask_field_paths unless update_mask_field_paths.nil?
|
468
|
+
command.query['fields'] = fields unless fields.nil?
|
469
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
470
|
+
execute_or_queue_command(command, &block)
|
471
|
+
end
|
472
|
+
|
473
|
+
# Rolls back a transaction.
|
474
|
+
# @param [String] database
|
475
|
+
# The database name. In the format:
|
476
|
+
# `projects/`project_id`/databases/`database_id``.
|
477
|
+
# @param [Google::Apis::FirestoreV1beta1::RollbackRequest] rollback_request_object
|
478
|
+
# @param [String] fields
|
479
|
+
# Selector specifying which fields to include in a partial response.
|
480
|
+
# @param [String] quota_user
|
481
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
482
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
483
|
+
# @param [Google::Apis::RequestOptions] options
|
484
|
+
# Request-specific options
|
485
|
+
#
|
486
|
+
# @yield [result, err] Result & error if block supplied
|
487
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::Empty] parsed result object
|
488
|
+
# @yieldparam err [StandardError] error object if request failed
|
489
|
+
#
|
490
|
+
# @return [Google::Apis::FirestoreV1beta1::Empty]
|
491
|
+
#
|
492
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
493
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
494
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
495
|
+
def rollback_document(database, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
496
|
+
command = make_simple_command(:post, 'v1beta1/{+database}/documents:rollback', options)
|
497
|
+
command.request_representation = Google::Apis::FirestoreV1beta1::RollbackRequest::Representation
|
498
|
+
command.request_object = rollback_request_object
|
499
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::Empty::Representation
|
500
|
+
command.response_class = Google::Apis::FirestoreV1beta1::Empty
|
501
|
+
command.params['database'] = database unless database.nil?
|
502
|
+
command.query['fields'] = fields unless fields.nil?
|
503
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
504
|
+
execute_or_queue_command(command, &block)
|
505
|
+
end
|
506
|
+
|
507
|
+
# Runs a query.
|
508
|
+
# @param [String] parent
|
509
|
+
# The parent resource name. In the format:
|
510
|
+
# `projects/`project_id`/databases/`database_id`/documents` or
|
511
|
+
# `projects/`project_id`/databases/`database_id`/documents/`document_path``.
|
512
|
+
# For example:
|
513
|
+
# `projects/my-project/databases/my-database/documents` or
|
514
|
+
# `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
|
515
|
+
# @param [Google::Apis::FirestoreV1beta1::RunQueryRequest] run_query_request_object
|
516
|
+
# @param [String] fields
|
517
|
+
# Selector specifying which fields to include in a partial response.
|
518
|
+
# @param [String] quota_user
|
519
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
520
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
521
|
+
# @param [Google::Apis::RequestOptions] options
|
522
|
+
# Request-specific options
|
523
|
+
#
|
524
|
+
# @yield [result, err] Result & error if block supplied
|
525
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::RunQueryResponse] parsed result object
|
526
|
+
# @yieldparam err [StandardError] error object if request failed
|
527
|
+
#
|
528
|
+
# @return [Google::Apis::FirestoreV1beta1::RunQueryResponse]
|
529
|
+
#
|
530
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
531
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
532
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
533
|
+
def run_document_query(parent, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
534
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}:runQuery', options)
|
535
|
+
command.request_representation = Google::Apis::FirestoreV1beta1::RunQueryRequest::Representation
|
536
|
+
command.request_object = run_query_request_object
|
537
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::RunQueryResponse::Representation
|
538
|
+
command.response_class = Google::Apis::FirestoreV1beta1::RunQueryResponse
|
539
|
+
command.params['parent'] = parent unless parent.nil?
|
540
|
+
command.query['fields'] = fields unless fields.nil?
|
541
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
542
|
+
execute_or_queue_command(command, &block)
|
543
|
+
end
|
544
|
+
|
545
|
+
# Streams batches of document updates and deletes, in order.
|
546
|
+
# @param [String] database
|
547
|
+
# The database name. In the format:
|
548
|
+
# `projects/`project_id`/databases/`database_id``.
|
549
|
+
# This is only required in the first message.
|
550
|
+
# @param [Google::Apis::FirestoreV1beta1::WriteRequest] write_request_object
|
551
|
+
# @param [String] fields
|
552
|
+
# Selector specifying which fields to include in a partial response.
|
553
|
+
# @param [String] quota_user
|
554
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
555
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
556
|
+
# @param [Google::Apis::RequestOptions] options
|
557
|
+
# Request-specific options
|
558
|
+
#
|
559
|
+
# @yield [result, err] Result & error if block supplied
|
560
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::WriteResponse] parsed result object
|
561
|
+
# @yieldparam err [StandardError] error object if request failed
|
562
|
+
#
|
563
|
+
# @return [Google::Apis::FirestoreV1beta1::WriteResponse]
|
564
|
+
#
|
565
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
566
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
567
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
568
|
+
def write_document(database, write_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
569
|
+
command = make_simple_command(:post, 'v1beta1/{+database}/documents:write', options)
|
570
|
+
command.request_representation = Google::Apis::FirestoreV1beta1::WriteRequest::Representation
|
571
|
+
command.request_object = write_request_object
|
572
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::WriteResponse::Representation
|
573
|
+
command.response_class = Google::Apis::FirestoreV1beta1::WriteResponse
|
574
|
+
command.params['database'] = database unless database.nil?
|
575
|
+
command.query['fields'] = fields unless fields.nil?
|
576
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
577
|
+
execute_or_queue_command(command, &block)
|
578
|
+
end
|
579
|
+
|
580
|
+
# Creates the specified index.
|
581
|
+
# A newly created index's initial state is `CREATING`. On completion of the
|
582
|
+
# returned google.longrunning.Operation, the state will be `READY`.
|
583
|
+
# If the index already exists, the call will return an `ALREADY_EXISTS`
|
584
|
+
# status.
|
585
|
+
# During creation, the process could result in an error, in which case the
|
586
|
+
# index will move to the `ERROR` state. The process can be recovered by
|
587
|
+
# fixing the data that caused the error, removing the index with
|
588
|
+
# delete, then re-creating the index with
|
589
|
+
# create.
|
590
|
+
# Indexes with a single field cannot be created.
|
591
|
+
# @param [String] parent
|
592
|
+
# The name of the database this index will apply to. For example:
|
593
|
+
# `projects/`project_id`/databases/`database_id``
|
594
|
+
# @param [Google::Apis::FirestoreV1beta1::Index] index_object
|
595
|
+
# @param [String] fields
|
596
|
+
# Selector specifying which fields to include in a partial response.
|
597
|
+
# @param [String] quota_user
|
598
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
599
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
600
|
+
# @param [Google::Apis::RequestOptions] options
|
601
|
+
# Request-specific options
|
602
|
+
#
|
603
|
+
# @yield [result, err] Result & error if block supplied
|
604
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::Operation] parsed result object
|
605
|
+
# @yieldparam err [StandardError] error object if request failed
|
606
|
+
#
|
607
|
+
# @return [Google::Apis::FirestoreV1beta1::Operation]
|
608
|
+
#
|
609
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
610
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
611
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
612
|
+
def create_project_database_index(parent, index_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
613
|
+
command = make_simple_command(:post, 'v1beta1/{+parent}/indexes', options)
|
614
|
+
command.request_representation = Google::Apis::FirestoreV1beta1::Index::Representation
|
615
|
+
command.request_object = index_object
|
616
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::Operation::Representation
|
617
|
+
command.response_class = Google::Apis::FirestoreV1beta1::Operation
|
618
|
+
command.params['parent'] = parent unless parent.nil?
|
619
|
+
command.query['fields'] = fields unless fields.nil?
|
620
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
621
|
+
execute_or_queue_command(command, &block)
|
622
|
+
end
|
623
|
+
|
624
|
+
# Deletes an index.
|
625
|
+
# @param [String] name
|
626
|
+
# The index name. For example:
|
627
|
+
# `projects/`project_id`/databases/`database_id`/indexes/`index_id``
|
628
|
+
# @param [String] fields
|
629
|
+
# Selector specifying which fields to include in a partial response.
|
630
|
+
# @param [String] quota_user
|
631
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
632
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
633
|
+
# @param [Google::Apis::RequestOptions] options
|
634
|
+
# Request-specific options
|
635
|
+
#
|
636
|
+
# @yield [result, err] Result & error if block supplied
|
637
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::Empty] parsed result object
|
638
|
+
# @yieldparam err [StandardError] error object if request failed
|
639
|
+
#
|
640
|
+
# @return [Google::Apis::FirestoreV1beta1::Empty]
|
641
|
+
#
|
642
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
643
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
644
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
645
|
+
def delete_project_database_index(name, fields: nil, quota_user: nil, options: nil, &block)
|
646
|
+
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
|
647
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::Empty::Representation
|
648
|
+
command.response_class = Google::Apis::FirestoreV1beta1::Empty
|
649
|
+
command.params['name'] = name unless name.nil?
|
650
|
+
command.query['fields'] = fields unless fields.nil?
|
651
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
652
|
+
execute_or_queue_command(command, &block)
|
653
|
+
end
|
654
|
+
|
655
|
+
# Gets an index.
|
656
|
+
# @param [String] name
|
657
|
+
# The name of the index. For example:
|
658
|
+
# `projects/`project_id`/databases/`database_id`/indexes/`index_id``
|
659
|
+
# @param [String] fields
|
660
|
+
# Selector specifying which fields to include in a partial response.
|
661
|
+
# @param [String] quota_user
|
662
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
663
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
664
|
+
# @param [Google::Apis::RequestOptions] options
|
665
|
+
# Request-specific options
|
666
|
+
#
|
667
|
+
# @yield [result, err] Result & error if block supplied
|
668
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::Index] parsed result object
|
669
|
+
# @yieldparam err [StandardError] error object if request failed
|
670
|
+
#
|
671
|
+
# @return [Google::Apis::FirestoreV1beta1::Index]
|
672
|
+
#
|
673
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
674
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
675
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
676
|
+
def get_project_database_index(name, fields: nil, quota_user: nil, options: nil, &block)
|
677
|
+
command = make_simple_command(:get, 'v1beta1/{+name}', options)
|
678
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::Index::Representation
|
679
|
+
command.response_class = Google::Apis::FirestoreV1beta1::Index
|
680
|
+
command.params['name'] = name unless name.nil?
|
681
|
+
command.query['fields'] = fields unless fields.nil?
|
682
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
683
|
+
execute_or_queue_command(command, &block)
|
684
|
+
end
|
685
|
+
|
686
|
+
# Lists the indexes that match the specified filters.
|
687
|
+
# @param [String] parent
|
688
|
+
# The database name. For example:
|
689
|
+
# `projects/`project_id`/databases/`database_id``
|
690
|
+
# @param [String] filter
|
691
|
+
# @param [Fixnum] page_size
|
692
|
+
# The standard List page size.
|
693
|
+
# @param [String] page_token
|
694
|
+
# The standard List page token.
|
695
|
+
# @param [String] fields
|
696
|
+
# Selector specifying which fields to include in a partial response.
|
697
|
+
# @param [String] quota_user
|
698
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
699
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
700
|
+
# @param [Google::Apis::RequestOptions] options
|
701
|
+
# Request-specific options
|
702
|
+
#
|
703
|
+
# @yield [result, err] Result & error if block supplied
|
704
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::ListIndexesResponse] parsed result object
|
705
|
+
# @yieldparam err [StandardError] error object if request failed
|
706
|
+
#
|
707
|
+
# @return [Google::Apis::FirestoreV1beta1::ListIndexesResponse]
|
708
|
+
#
|
709
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
710
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
711
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
712
|
+
def list_project_database_indexes(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
713
|
+
command = make_simple_command(:get, 'v1beta1/{+parent}/indexes', options)
|
714
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::ListIndexesResponse::Representation
|
715
|
+
command.response_class = Google::Apis::FirestoreV1beta1::ListIndexesResponse
|
716
|
+
command.params['parent'] = parent unless parent.nil?
|
717
|
+
command.query['filter'] = filter unless filter.nil?
|
718
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
719
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
720
|
+
command.query['fields'] = fields unless fields.nil?
|
721
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
722
|
+
execute_or_queue_command(command, &block)
|
723
|
+
end
|
724
|
+
|
725
|
+
protected
|
726
|
+
|
727
|
+
def apply_command_defaults(command)
|
728
|
+
command.query['key'] = key unless key.nil?
|
729
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
730
|
+
end
|
731
|
+
end
|
732
|
+
end
|
733
|
+
end
|
734
|
+
end
|