-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
firestore-gen.go
2574 lines (2335 loc) · 105 KB
/
firestore-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2021 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package firestore provides access to the Cloud Firestore API.
//
// This package is DEPRECATED. Use package cloud.google.com/go/firestore instead.
//
// For product documentation, see: https://cloud.google.com/firestore
//
// Creating a client
//
// Usage example:
//
// import "google.golang.org/api/firestore/v1beta2"
// ...
// ctx := context.Background()
// firestoreService, err := firestore.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for authentication.
//
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// Other authentication options
//
// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
//
// firestoreService, err := firestore.NewService(ctx, option.WithScopes(firestore.DatastoreScope))
//
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
//
// firestoreService, err := firestore.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// firestoreService, err := firestore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package firestore // import "google.golang.org/api/firestore/v1beta2"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "firestore:v1beta2"
const apiName = "firestore"
const apiVersion = "v1beta2"
const basePath = "https://firestore.googleapis.com/"
const mtlsBasePath = "https://firestore.mtls.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// See, edit, configure, and delete your Google Cloud Platform data
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
// View and manage your Google Cloud Datastore data
DatastoreScope = "https://www.googleapis.com/auth/datastore"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := option.WithScopes(
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Databases = NewProjectsDatabasesService(s)
return rs
}
type ProjectsService struct {
s *Service
Databases *ProjectsDatabasesService
}
func NewProjectsDatabasesService(s *Service) *ProjectsDatabasesService {
rs := &ProjectsDatabasesService{s: s}
rs.CollectionGroups = NewProjectsDatabasesCollectionGroupsService(s)
return rs
}
type ProjectsDatabasesService struct {
s *Service
CollectionGroups *ProjectsDatabasesCollectionGroupsService
}
func NewProjectsDatabasesCollectionGroupsService(s *Service) *ProjectsDatabasesCollectionGroupsService {
rs := &ProjectsDatabasesCollectionGroupsService{s: s}
rs.Fields = NewProjectsDatabasesCollectionGroupsFieldsService(s)
rs.Indexes = NewProjectsDatabasesCollectionGroupsIndexesService(s)
return rs
}
type ProjectsDatabasesCollectionGroupsService struct {
s *Service
Fields *ProjectsDatabasesCollectionGroupsFieldsService
Indexes *ProjectsDatabasesCollectionGroupsIndexesService
}
func NewProjectsDatabasesCollectionGroupsFieldsService(s *Service) *ProjectsDatabasesCollectionGroupsFieldsService {
rs := &ProjectsDatabasesCollectionGroupsFieldsService{s: s}
return rs
}
type ProjectsDatabasesCollectionGroupsFieldsService struct {
s *Service
}
func NewProjectsDatabasesCollectionGroupsIndexesService(s *Service) *ProjectsDatabasesCollectionGroupsIndexesService {
rs := &ProjectsDatabasesCollectionGroupsIndexesService{s: s}
return rs
}
type ProjectsDatabasesCollectionGroupsIndexesService struct {
s *Service
}
// Empty: A generic empty message that you can re-use to avoid defining
// duplicated empty messages in your APIs. A typical example is to use
// it as the request or the response type of an API method. For
// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
// (google.protobuf.Empty); } The JSON representation for `Empty` is
// empty JSON object `{}`.
type Empty struct {
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
}
// GoogleFirestoreAdminV1beta2ExportDocumentsMetadata: Metadata for
// google.longrunning.Operation results from
// FirestoreAdmin.ExportDocuments.
type GoogleFirestoreAdminV1beta2ExportDocumentsMetadata struct {
// CollectionIds: Which collection ids are being exported.
CollectionIds []string `json:"collectionIds,omitempty"`
// EndTime: The time this operation completed. Will be unset if
// operation still in progress.
EndTime string `json:"endTime,omitempty"`
// OperationState: The state of the export operation.
//
// Possible values:
// "OPERATION_STATE_UNSPECIFIED" - Unspecified.
// "INITIALIZING" - Request is being prepared for processing.
// "PROCESSING" - Request is actively being processed.
// "CANCELLING" - Request is in the process of being cancelled after
// user called google.longrunning.Operations.CancelOperation on the
// operation.
// "FINALIZING" - Request has been processed and is in its
// finalization stage.
// "SUCCESSFUL" - Request has completed successfully.
// "FAILED" - Request has finished being processed, but encountered an
// error.
// "CANCELLED" - Request has finished being cancelled after user
// called google.longrunning.Operations.CancelOperation.
OperationState string `json:"operationState,omitempty"`
// OutputUriPrefix: Where the entities are being exported to.
OutputUriPrefix string `json:"outputUriPrefix,omitempty"`
// ProgressBytes: The progress, in bytes, of this operation.
ProgressBytes *GoogleFirestoreAdminV1beta2Progress `json:"progressBytes,omitempty"`
// ProgressDocuments: The progress, in documents, of this operation.
ProgressDocuments *GoogleFirestoreAdminV1beta2Progress `json:"progressDocuments,omitempty"`
// StartTime: The time this operation started.
StartTime string `json:"startTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CollectionIds") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CollectionIds") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2ExportDocumentsMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2ExportDocumentsMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2ExportDocumentsRequest: The request for
// FirestoreAdmin.ExportDocuments.
type GoogleFirestoreAdminV1beta2ExportDocumentsRequest struct {
// CollectionIds: Which collection ids to export. Unspecified means all
// collections.
CollectionIds []string `json:"collectionIds,omitempty"`
// OutputUriPrefix: The output URI. Currently only supports Google Cloud
// Storage URIs of the form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where
// `BUCKET_NAME` is the name of the Google Cloud Storage bucket and
// `NAMESPACE_PATH` is an optional Google Cloud Storage namespace path.
// When choosing a name, be sure to consider Google Cloud Storage naming
// guidelines: https://cloud.google.com/storage/docs/naming. If the URI
// is a bucket (without a namespace path), a prefix will be generated
// based on the start time.
OutputUriPrefix string `json:"outputUriPrefix,omitempty"`
// ForceSendFields is a list of field names (e.g. "CollectionIds") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CollectionIds") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2ExportDocumentsRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2ExportDocumentsRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2ExportDocumentsResponse: Returned in the
// google.longrunning.Operation response field.
type GoogleFirestoreAdminV1beta2ExportDocumentsResponse struct {
// OutputUriPrefix: Location of the output files. This can be used to
// begin an import into Cloud Firestore (this project or another
// project) after the operation completes successfully.
OutputUriPrefix string `json:"outputUriPrefix,omitempty"`
// ForceSendFields is a list of field names (e.g. "OutputUriPrefix") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "OutputUriPrefix") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2ExportDocumentsResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2ExportDocumentsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2Field: Represents a single field in the
// database. Fields are grouped by their "Collection Group", which
// represent all collections in the database with the same id.
type GoogleFirestoreAdminV1beta2Field struct {
// IndexConfig: The index configuration for this field. If unset, field
// indexing will revert to the configuration defined by the
// `ancestor_field`. To explicitly remove all indexes for this field,
// specify an index config with an empty list of indexes.
IndexConfig *GoogleFirestoreAdminV1beta2IndexConfig `json:"indexConfig,omitempty"`
// Name: A field name of the form
// `projects/{project_id}/databases/{database_id}/collectionGroups/{colle
// ction_id}/fields/{field_path}` A field path may be a simple field
// name, e.g. `address` or a path to fields within map_value , e.g.
// `address.city`, or a special field path. The only valid special field
// is `*`, which represents any field. Field paths may be quoted using `
// (backtick). The only character that needs to be escaped within a
// quoted field path is the backtick character itself, escaped using a
// backslash. Special characters in field paths that must be quoted
// include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii
// symbolic characters. Examples: (Note: Comments here are written in
// markdown syntax, so there is an additional layer of backticks to
// represent a code block) `\`address.city\`` represents a field named
// `address.city`, not the map key `city` in the field `address`.
// `\`*\`` represents a field named `*`, not any field. A special
// `Field` contains the default indexing settings for all fields. This
// field's resource name is:
// `projects/{project_id}/databases/{database_id}/collectionGroups/__defa
// ult__/fields/*` Indexes defined on this `Field` will be applied to
// all fields which do not have their own `Field` index configuration.
Name string `json:"name,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "IndexConfig") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "IndexConfig") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2Field) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2Field
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2FieldOperationMetadata: Metadata for
// google.longrunning.Operation results from FirestoreAdmin.UpdateField.
type GoogleFirestoreAdminV1beta2FieldOperationMetadata struct {
// BytesProgress: The progress, in bytes, of this operation.
BytesProgress *GoogleFirestoreAdminV1beta2Progress `json:"bytesProgress,omitempty"`
// DocumentProgress: The progress, in documents, of this operation.
DocumentProgress *GoogleFirestoreAdminV1beta2Progress `json:"documentProgress,omitempty"`
// EndTime: The time this operation completed. Will be unset if
// operation still in progress.
EndTime string `json:"endTime,omitempty"`
// Field: The field resource that this operation is acting on. For
// example:
// `projects/{project_id}/databases/{database_id}/collectionGroups/{colle
// ction_id}/fields/{field_path}`
Field string `json:"field,omitempty"`
// IndexConfigDeltas: A list of IndexConfigDelta, which describe the
// intent of this operation.
IndexConfigDeltas []*GoogleFirestoreAdminV1beta2IndexConfigDelta `json:"indexConfigDeltas,omitempty"`
// StartTime: The time this operation started.
StartTime string `json:"startTime,omitempty"`
// State: The state of the operation.
//
// Possible values:
// "OPERATION_STATE_UNSPECIFIED" - Unspecified.
// "INITIALIZING" - Request is being prepared for processing.
// "PROCESSING" - Request is actively being processed.
// "CANCELLING" - Request is in the process of being cancelled after
// user called google.longrunning.Operations.CancelOperation on the
// operation.
// "FINALIZING" - Request has been processed and is in its
// finalization stage.
// "SUCCESSFUL" - Request has completed successfully.
// "FAILED" - Request has finished being processed, but encountered an
// error.
// "CANCELLED" - Request has finished being cancelled after user
// called google.longrunning.Operations.CancelOperation.
State string `json:"state,omitempty"`
// ForceSendFields is a list of field names (e.g. "BytesProgress") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BytesProgress") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2FieldOperationMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2FieldOperationMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2ImportDocumentsMetadata: Metadata for
// google.longrunning.Operation results from
// FirestoreAdmin.ImportDocuments.
type GoogleFirestoreAdminV1beta2ImportDocumentsMetadata struct {
// CollectionIds: Which collection ids are being imported.
CollectionIds []string `json:"collectionIds,omitempty"`
// EndTime: The time this operation completed. Will be unset if
// operation still in progress.
EndTime string `json:"endTime,omitempty"`
// InputUriPrefix: The location of the documents being imported.
InputUriPrefix string `json:"inputUriPrefix,omitempty"`
// OperationState: The state of the import operation.
//
// Possible values:
// "OPERATION_STATE_UNSPECIFIED" - Unspecified.
// "INITIALIZING" - Request is being prepared for processing.
// "PROCESSING" - Request is actively being processed.
// "CANCELLING" - Request is in the process of being cancelled after
// user called google.longrunning.Operations.CancelOperation on the
// operation.
// "FINALIZING" - Request has been processed and is in its
// finalization stage.
// "SUCCESSFUL" - Request has completed successfully.
// "FAILED" - Request has finished being processed, but encountered an
// error.
// "CANCELLED" - Request has finished being cancelled after user
// called google.longrunning.Operations.CancelOperation.
OperationState string `json:"operationState,omitempty"`
// ProgressBytes: The progress, in bytes, of this operation.
ProgressBytes *GoogleFirestoreAdminV1beta2Progress `json:"progressBytes,omitempty"`
// ProgressDocuments: The progress, in documents, of this operation.
ProgressDocuments *GoogleFirestoreAdminV1beta2Progress `json:"progressDocuments,omitempty"`
// StartTime: The time this operation started.
StartTime string `json:"startTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CollectionIds") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CollectionIds") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2ImportDocumentsMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2ImportDocumentsMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2ImportDocumentsRequest: The request for
// FirestoreAdmin.ImportDocuments.
type GoogleFirestoreAdminV1beta2ImportDocumentsRequest struct {
// CollectionIds: Which collection ids to import. Unspecified means all
// collections included in the import.
CollectionIds []string `json:"collectionIds,omitempty"`
// InputUriPrefix: Location of the exported files. This must match the
// output_uri_prefix of an ExportDocumentsResponse from an export that
// has completed successfully. See:
// google.firestore.admin.v1beta2.ExportDocumentsResponse.output_uri_pref
// ix.
InputUriPrefix string `json:"inputUriPrefix,omitempty"`
// ForceSendFields is a list of field names (e.g. "CollectionIds") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CollectionIds") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2ImportDocumentsRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2ImportDocumentsRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2Index: Cloud Firestore indexes enable
// simple and complex queries against documents in a database.
type GoogleFirestoreAdminV1beta2Index struct {
// Fields: The fields supported by this index. For composite indexes,
// this is always 2 or more fields. The last field entry is always for
// the field path `__name__`. If, on creation, `__name__` was not
// specified as the last field, it will be added automatically with the
// same direction as that of the last field defined. If the final field
// in a composite index is not directional, the `__name__` will be
// ordered ASCENDING (unless explicitly specified). For single field
// indexes, this will always be exactly one entry with a field path
// equal to the field path of the associated field.
Fields []*GoogleFirestoreAdminV1beta2IndexField `json:"fields,omitempty"`
// Name: Output only. A server defined name for this index. The form of
// this name for composite indexes will be:
// `projects/{project_id}/databases/{database_id}/collectionGroups/{colle
// ction_id}/indexes/{composite_index_id}` For single field indexes,
// this field will be empty.
Name string `json:"name,omitempty"`
// QueryScope: Indexes with a collection query scope specified allow
// queries against a collection that is the child of a specific
// document, specified at query time, and that has the same collection
// id. Indexes with a collection group query scope specified allow
// queries against all collections descended from a specific document,
// specified at query time, and that have the same collection id as this
// index.
//
// Possible values:
// "QUERY_SCOPE_UNSPECIFIED" - The query scope is unspecified. Not a
// valid option.
// "COLLECTION" - Indexes with a collection query scope specified
// allow queries against a collection that is the child of a specific
// document, specified at query time, and that has the collection id
// specified by the index.
// "COLLECTION_GROUP" - Indexes with a collection group query scope
// specified allow queries against all collections that has the
// collection id specified by the index.
QueryScope string `json:"queryScope,omitempty"`
// State: Output only. The serving state of the index.
//
// Possible values:
// "STATE_UNSPECIFIED" - The state is unspecified.
// "CREATING" - The index is being created. There is an active
// long-running operation for the index. The index is updated when
// writing a document. Some index data may exist.
// "READY" - The index is ready to be used. The index is updated when
// writing a document. The index is fully populated from all stored
// documents it applies to.
// "NEEDS_REPAIR" - The index was being created, but something went
// wrong. There is no active long-running operation for the index, and
// the most recently finished long-running operation failed. The index
// is not updated when writing a document. Some index data may exist.
// Use the google.longrunning.Operations API to determine why the
// operation that last attempted to create this index failed, then
// re-create the index.
State string `json:"state,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Fields") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Fields") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2Index) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2Index
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2IndexConfig: The index configuration for
// this field.
type GoogleFirestoreAdminV1beta2IndexConfig struct {
// AncestorField: Output only. Specifies the resource name of the
// `Field` from which this field's index configuration is set (when
// `uses_ancestor_config` is true), or from which it *would* be set if
// this field had no index configuration (when `uses_ancestor_config` is
// false).
AncestorField string `json:"ancestorField,omitempty"`
// Indexes: The indexes supported for this field.
Indexes []*GoogleFirestoreAdminV1beta2Index `json:"indexes,omitempty"`
// Reverting: Output only When true, the `Field`'s index configuration
// is in the process of being reverted. Once complete, the index config
// will transition to the same state as the field specified by
// `ancestor_field`, at which point `uses_ancestor_config` will be
// `true` and `reverting` will be `false`.
Reverting bool `json:"reverting,omitempty"`
// UsesAncestorConfig: Output only. When true, the `Field`'s index
// configuration is set from the configuration specified by the
// `ancestor_field`. When false, the `Field`'s index configuration is
// defined explicitly.
UsesAncestorConfig bool `json:"usesAncestorConfig,omitempty"`
// ForceSendFields is a list of field names (e.g. "AncestorField") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AncestorField") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2IndexConfig) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2IndexConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2IndexConfigDelta: Information about an
// index configuration change.
type GoogleFirestoreAdminV1beta2IndexConfigDelta struct {
// ChangeType: Specifies how the index is changing.
//
// Possible values:
// "CHANGE_TYPE_UNSPECIFIED" - The type of change is not specified or
// known.
// "ADD" - The single field index is being added.
// "REMOVE" - The single field index is being removed.
ChangeType string `json:"changeType,omitempty"`
// Index: The index being changed.
Index *GoogleFirestoreAdminV1beta2Index `json:"index,omitempty"`
// ForceSendFields is a list of field names (e.g. "ChangeType") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ChangeType") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2IndexConfigDelta) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2IndexConfigDelta
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2IndexField: A field in an index. The
// field_path describes which field is indexed, the value_mode describes
// how the field value is indexed.
type GoogleFirestoreAdminV1beta2IndexField struct {
// ArrayConfig: Indicates that this field supports operations on
// `array_value`s.
//
// Possible values:
// "ARRAY_CONFIG_UNSPECIFIED" - The index does not support additional
// array queries.
// "CONTAINS" - The index supports array containment queries.
ArrayConfig string `json:"arrayConfig,omitempty"`
// FieldPath: Can be __name__. For single field indexes, this must match
// the name of the field or may be omitted.
FieldPath string `json:"fieldPath,omitempty"`
// Order: Indicates that this field supports ordering by the specified
// order or comparing using =, <, <=, >, >=.
//
// Possible values:
// "ORDER_UNSPECIFIED" - The ordering is unspecified. Not a valid
// option.
// "ASCENDING" - The field is ordered by ascending field value.
// "DESCENDING" - The field is ordered by descending field value.
Order string `json:"order,omitempty"`
// ForceSendFields is a list of field names (e.g. "ArrayConfig") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ArrayConfig") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2IndexField) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2IndexField
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2IndexOperationMetadata: Metadata for
// google.longrunning.Operation results from FirestoreAdmin.CreateIndex.
type GoogleFirestoreAdminV1beta2IndexOperationMetadata struct {
// EndTime: The time this operation completed. Will be unset if
// operation still in progress.
EndTime string `json:"endTime,omitempty"`
// Index: The index resource that this operation is acting on. For
// example:
// `projects/{project_id}/databases/{database_id}/collectionGroups/{colle
// ction_id}/indexes/{index_id}`
Index string `json:"index,omitempty"`
// ProgressBytes: The progress, in bytes, of this operation.
ProgressBytes *GoogleFirestoreAdminV1beta2Progress `json:"progressBytes,omitempty"`
// ProgressDocuments: The progress, in documents, of this operation.
ProgressDocuments *GoogleFirestoreAdminV1beta2Progress `json:"progressDocuments,omitempty"`
// StartTime: The time this operation started.
StartTime string `json:"startTime,omitempty"`
// State: The state of the operation.
//
// Possible values:
// "OPERATION_STATE_UNSPECIFIED" - Unspecified.
// "INITIALIZING" - Request is being prepared for processing.
// "PROCESSING" - Request is actively being processed.
// "CANCELLING" - Request is in the process of being cancelled after
// user called google.longrunning.Operations.CancelOperation on the
// operation.
// "FINALIZING" - Request has been processed and is in its
// finalization stage.
// "SUCCESSFUL" - Request has completed successfully.
// "FAILED" - Request has finished being processed, but encountered an
// error.
// "CANCELLED" - Request has finished being cancelled after user
// called google.longrunning.Operations.CancelOperation.
State string `json:"state,omitempty"`
// ForceSendFields is a list of field names (e.g. "EndTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EndTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2IndexOperationMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2IndexOperationMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2ListFieldsResponse: The response for
// FirestoreAdmin.ListFields.
type GoogleFirestoreAdminV1beta2ListFieldsResponse struct {
// Fields: The requested fields.
Fields []*GoogleFirestoreAdminV1beta2Field `json:"fields,omitempty"`
// NextPageToken: A page token that may be used to request another page
// of results. If blank, this is the last page.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Fields") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Fields") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2ListFieldsResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2ListFieldsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2ListIndexesResponse: The response for
// FirestoreAdmin.ListIndexes.
type GoogleFirestoreAdminV1beta2ListIndexesResponse struct {
// Indexes: The requested indexes.
Indexes []*GoogleFirestoreAdminV1beta2Index `json:"indexes,omitempty"`
// NextPageToken: A page token that may be used to request another page
// of results. If blank, this is the last page.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Indexes") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Indexes") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2ListIndexesResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2ListIndexesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleFirestoreAdminV1beta2Progress: Describes the progress of the
// operation. Unit of work is generic and must be interpreted based on
// where Progress is used.
type GoogleFirestoreAdminV1beta2Progress struct {
// CompletedWork: The amount of work completed.
CompletedWork int64 `json:"completedWork,omitempty,string"`
// EstimatedWork: The amount of work estimated.
EstimatedWork int64 `json:"estimatedWork,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "CompletedWork") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CompletedWork") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleFirestoreAdminV1beta2Progress) MarshalJSON() ([]byte, error) {
type NoMethod GoogleFirestoreAdminV1beta2Progress
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleLongrunningOperation: This resource represents a long-running
// operation that is the result of a network API call.
type GoogleLongrunningOperation struct {
// Done: If the value is `false`, it means the operation is still in
// progress. If `true`, the operation is completed, and either `error`
// or `response` is available.
Done bool `json:"done,omitempty"`
// Error: The error result of the operation in case of failure or
// cancellation.
Error *Status `json:"error,omitempty"`
// Metadata: Service-specific metadata associated with the operation. It
// typically contains progress information and common metadata such as
// create time. Some services might not provide such metadata. Any
// method that returns a long-running operation should document the
// metadata type, if any.
Metadata googleapi.RawMessage `json:"metadata,omitempty"`
// Name: The server-assigned name, which is only unique within the same
// service that originally returns it. If you use the default HTTP
// mapping, the `name` should be a resource name ending with
// `operations/{unique_id}`.
Name string `json:"name,omitempty"`
// Response: The normal response of the operation in case of success. If
// the original method returns no data on success, such as `Delete`, the