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 package firestore
59
60 import (
61 "bytes"
62 "context"
63 "encoding/json"
64 "errors"
65 "fmt"
66 "io"
67 "net/http"
68 "net/url"
69 "strconv"
70 "strings"
71
72 googleapi "google.golang.org/api/googleapi"
73 internal "google.golang.org/api/internal"
74 gensupport "google.golang.org/api/internal/gensupport"
75 option "google.golang.org/api/option"
76 internaloption "google.golang.org/api/option/internaloption"
77 htransport "google.golang.org/api/transport/http"
78 )
79
80
81
82 var _ = bytes.NewBuffer
83 var _ = strconv.Itoa
84 var _ = fmt.Sprintf
85 var _ = json.NewDecoder
86 var _ = io.Copy
87 var _ = url.Parse
88 var _ = gensupport.MarshalJSON
89 var _ = googleapi.Version
90 var _ = errors.New
91 var _ = strings.Replace
92 var _ = context.Canceled
93 var _ = internaloption.WithDefaultEndpoint
94 var _ = internal.Version
95
96 const apiId = "firestore:v1"
97 const apiName = "firestore"
98 const apiVersion = "v1"
99 const basePath = "https://firestore.googleapis.com/"
100 const basePathTemplate = "https://firestore.UNIVERSE_DOMAIN/"
101 const mtlsBasePath = "https://firestore.mtls.googleapis.com/"
102
103
104 const (
105
106
107 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
108
109
110 DatastoreScope = "https://www.googleapis.com/auth/datastore"
111 )
112
113
114 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
115 scopesOption := internaloption.WithDefaultScopes(
116 "https://www.googleapis.com/auth/cloud-platform",
117 "https://www.googleapis.com/auth/datastore",
118 )
119
120 opts = append([]option.ClientOption{scopesOption}, opts...)
121 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
122 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
123 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
124 opts = append(opts, internaloption.EnableNewAuthLibrary())
125 client, endpoint, err := htransport.NewClient(ctx, opts...)
126 if err != nil {
127 return nil, err
128 }
129 s, err := New(client)
130 if err != nil {
131 return nil, err
132 }
133 if endpoint != "" {
134 s.BasePath = endpoint
135 }
136 return s, nil
137 }
138
139
140
141
142
143
144 func New(client *http.Client) (*Service, error) {
145 if client == nil {
146 return nil, errors.New("client is nil")
147 }
148 s := &Service{client: client, BasePath: basePath}
149 s.Projects = NewProjectsService(s)
150 return s, nil
151 }
152
153 type Service struct {
154 client *http.Client
155 BasePath string
156 UserAgent string
157
158 Projects *ProjectsService
159 }
160
161 func (s *Service) userAgent() string {
162 if s.UserAgent == "" {
163 return googleapi.UserAgent
164 }
165 return googleapi.UserAgent + " " + s.UserAgent
166 }
167
168 func NewProjectsService(s *Service) *ProjectsService {
169 rs := &ProjectsService{s: s}
170 rs.Databases = NewProjectsDatabasesService(s)
171 rs.Locations = NewProjectsLocationsService(s)
172 return rs
173 }
174
175 type ProjectsService struct {
176 s *Service
177
178 Databases *ProjectsDatabasesService
179
180 Locations *ProjectsLocationsService
181 }
182
183 func NewProjectsDatabasesService(s *Service) *ProjectsDatabasesService {
184 rs := &ProjectsDatabasesService{s: s}
185 rs.BackupSchedules = NewProjectsDatabasesBackupSchedulesService(s)
186 rs.CollectionGroups = NewProjectsDatabasesCollectionGroupsService(s)
187 rs.Documents = NewProjectsDatabasesDocumentsService(s)
188 rs.Operations = NewProjectsDatabasesOperationsService(s)
189 return rs
190 }
191
192 type ProjectsDatabasesService struct {
193 s *Service
194
195 BackupSchedules *ProjectsDatabasesBackupSchedulesService
196
197 CollectionGroups *ProjectsDatabasesCollectionGroupsService
198
199 Documents *ProjectsDatabasesDocumentsService
200
201 Operations *ProjectsDatabasesOperationsService
202 }
203
204 func NewProjectsDatabasesBackupSchedulesService(s *Service) *ProjectsDatabasesBackupSchedulesService {
205 rs := &ProjectsDatabasesBackupSchedulesService{s: s}
206 return rs
207 }
208
209 type ProjectsDatabasesBackupSchedulesService struct {
210 s *Service
211 }
212
213 func NewProjectsDatabasesCollectionGroupsService(s *Service) *ProjectsDatabasesCollectionGroupsService {
214 rs := &ProjectsDatabasesCollectionGroupsService{s: s}
215 rs.Fields = NewProjectsDatabasesCollectionGroupsFieldsService(s)
216 rs.Indexes = NewProjectsDatabasesCollectionGroupsIndexesService(s)
217 return rs
218 }
219
220 type ProjectsDatabasesCollectionGroupsService struct {
221 s *Service
222
223 Fields *ProjectsDatabasesCollectionGroupsFieldsService
224
225 Indexes *ProjectsDatabasesCollectionGroupsIndexesService
226 }
227
228 func NewProjectsDatabasesCollectionGroupsFieldsService(s *Service) *ProjectsDatabasesCollectionGroupsFieldsService {
229 rs := &ProjectsDatabasesCollectionGroupsFieldsService{s: s}
230 return rs
231 }
232
233 type ProjectsDatabasesCollectionGroupsFieldsService struct {
234 s *Service
235 }
236
237 func NewProjectsDatabasesCollectionGroupsIndexesService(s *Service) *ProjectsDatabasesCollectionGroupsIndexesService {
238 rs := &ProjectsDatabasesCollectionGroupsIndexesService{s: s}
239 return rs
240 }
241
242 type ProjectsDatabasesCollectionGroupsIndexesService struct {
243 s *Service
244 }
245
246 func NewProjectsDatabasesDocumentsService(s *Service) *ProjectsDatabasesDocumentsService {
247 rs := &ProjectsDatabasesDocumentsService{s: s}
248 return rs
249 }
250
251 type ProjectsDatabasesDocumentsService struct {
252 s *Service
253 }
254
255 func NewProjectsDatabasesOperationsService(s *Service) *ProjectsDatabasesOperationsService {
256 rs := &ProjectsDatabasesOperationsService{s: s}
257 return rs
258 }
259
260 type ProjectsDatabasesOperationsService struct {
261 s *Service
262 }
263
264 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
265 rs := &ProjectsLocationsService{s: s}
266 rs.Backups = NewProjectsLocationsBackupsService(s)
267 return rs
268 }
269
270 type ProjectsLocationsService struct {
271 s *Service
272
273 Backups *ProjectsLocationsBackupsService
274 }
275
276 func NewProjectsLocationsBackupsService(s *Service) *ProjectsLocationsBackupsService {
277 rs := &ProjectsLocationsBackupsService{s: s}
278 return rs
279 }
280
281 type ProjectsLocationsBackupsService struct {
282 s *Service
283 }
284
285
286 type Aggregation struct {
287
288
289
290
291
292
293
294
295 Alias string `json:"alias,omitempty"`
296
297 Avg *Avg `json:"avg,omitempty"`
298
299 Count *Count `json:"count,omitempty"`
300
301 Sum *Sum `json:"sum,omitempty"`
302
303
304
305
306
307 ForceSendFields []string `json:"-"`
308
309
310
311
312 NullFields []string `json:"-"`
313 }
314
315 func (s *Aggregation) MarshalJSON() ([]byte, error) {
316 type NoMethod Aggregation
317 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
318 }
319
320
321
322
323
324 type AggregationResult struct {
325
326
327
328
329 AggregateFields map[string]Value `json:"aggregateFields,omitempty"`
330
331
332
333
334
335 ForceSendFields []string `json:"-"`
336
337
338
339
340 NullFields []string `json:"-"`
341 }
342
343 func (s *AggregationResult) MarshalJSON() ([]byte, error) {
344 type NoMethod AggregationResult
345 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
346 }
347
348
349 type ArrayValue struct {
350
351 Values []*Value `json:"values,omitempty"`
352
353
354
355
356
357 ForceSendFields []string `json:"-"`
358
359
360
361
362 NullFields []string `json:"-"`
363 }
364
365 func (s *ArrayValue) MarshalJSON() ([]byte, error) {
366 type NoMethod ArrayValue
367 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
368 }
369
370
371
372
373
374
375 type Avg struct {
376
377 Field *FieldReference `json:"field,omitempty"`
378
379
380
381
382
383 ForceSendFields []string `json:"-"`
384
385
386
387
388 NullFields []string `json:"-"`
389 }
390
391 func (s *Avg) MarshalJSON() ([]byte, error) {
392 type NoMethod Avg
393 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
394 }
395
396
397 type BatchGetDocumentsRequest struct {
398
399
400
401
402 Documents []string `json:"documents,omitempty"`
403
404
405
406 Mask *DocumentMask `json:"mask,omitempty"`
407
408
409
410 NewTransaction *TransactionOptions `json:"newTransaction,omitempty"`
411
412
413
414
415 ReadTime string `json:"readTime,omitempty"`
416
417 Transaction string `json:"transaction,omitempty"`
418
419
420
421
422
423 ForceSendFields []string `json:"-"`
424
425
426
427
428 NullFields []string `json:"-"`
429 }
430
431 func (s *BatchGetDocumentsRequest) MarshalJSON() ([]byte, error) {
432 type NoMethod BatchGetDocumentsRequest
433 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
434 }
435
436
437
438 type BatchGetDocumentsResponse struct {
439
440 Found *Document `json:"found,omitempty"`
441
442
443
444 Missing string `json:"missing,omitempty"`
445
446
447
448 ReadTime string `json:"readTime,omitempty"`
449
450
451
452 Transaction string `json:"transaction,omitempty"`
453
454
455 googleapi.ServerResponse `json:"-"`
456
457
458
459
460
461 ForceSendFields []string `json:"-"`
462
463
464
465
466 NullFields []string `json:"-"`
467 }
468
469 func (s *BatchGetDocumentsResponse) MarshalJSON() ([]byte, error) {
470 type NoMethod BatchGetDocumentsResponse
471 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
472 }
473
474
475 type BatchWriteRequest struct {
476
477 Labels map[string]string `json:"labels,omitempty"`
478
479
480
481 Writes []*Write `json:"writes,omitempty"`
482
483
484
485
486
487 ForceSendFields []string `json:"-"`
488
489
490
491
492 NullFields []string `json:"-"`
493 }
494
495 func (s *BatchWriteRequest) MarshalJSON() ([]byte, error) {
496 type NoMethod BatchWriteRequest
497 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
498 }
499
500
501 type BatchWriteResponse struct {
502
503
504 Status []*Status `json:"status,omitempty"`
505
506
507 WriteResults []*WriteResult `json:"writeResults,omitempty"`
508
509
510 googleapi.ServerResponse `json:"-"`
511
512
513
514
515
516 ForceSendFields []string `json:"-"`
517
518
519
520
521 NullFields []string `json:"-"`
522 }
523
524 func (s *BatchWriteResponse) MarshalJSON() ([]byte, error) {
525 type NoMethod BatchWriteResponse
526 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
527 }
528
529
530 type BeginTransactionRequest struct {
531
532
533 Options *TransactionOptions `json:"options,omitempty"`
534
535
536
537
538
539 ForceSendFields []string `json:"-"`
540
541
542
543
544 NullFields []string `json:"-"`
545 }
546
547 func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) {
548 type NoMethod BeginTransactionRequest
549 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
550 }
551
552
553 type BeginTransactionResponse struct {
554
555 Transaction string `json:"transaction,omitempty"`
556
557
558 googleapi.ServerResponse `json:"-"`
559
560
561
562
563
564 ForceSendFields []string `json:"-"`
565
566
567
568
569 NullFields []string `json:"-"`
570 }
571
572 func (s *BeginTransactionResponse) MarshalJSON() ([]byte, error) {
573 type NoMethod BeginTransactionResponse
574 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
575 }
576
577
578
579
580
581
582
583
584
585
586
587
588
589 type BitSequence struct {
590
591 Bitmap string `json:"bitmap,omitempty"`
592
593
594
595 Padding int64 `json:"padding,omitempty"`
596
597
598
599
600
601 ForceSendFields []string `json:"-"`
602
603
604
605
606 NullFields []string `json:"-"`
607 }
608
609 func (s *BitSequence) MarshalJSON() ([]byte, error) {
610 type NoMethod BitSequence
611 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
612 }
613
614
615
616
617
618
619
620
621
622 type BloomFilter struct {
623
624 Bits *BitSequence `json:"bits,omitempty"`
625
626 HashCount int64 `json:"hashCount,omitempty"`
627
628
629
630
631
632 ForceSendFields []string `json:"-"`
633
634
635
636
637 NullFields []string `json:"-"`
638 }
639
640 func (s *BloomFilter) MarshalJSON() ([]byte, error) {
641 type NoMethod BloomFilter
642 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
643 }
644
645
646 type CollectionSelector struct {
647
648
649
650 AllDescendants bool `json:"allDescendants,omitempty"`
651
652
653 CollectionId string `json:"collectionId,omitempty"`
654
655
656
657
658
659 ForceSendFields []string `json:"-"`
660
661
662
663
664 NullFields []string `json:"-"`
665 }
666
667 func (s *CollectionSelector) MarshalJSON() ([]byte, error) {
668 type NoMethod CollectionSelector
669 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
670 }
671
672
673 type CommitRequest struct {
674
675 Transaction string `json:"transaction,omitempty"`
676
677 Writes []*Write `json:"writes,omitempty"`
678
679
680
681
682
683 ForceSendFields []string `json:"-"`
684
685
686
687
688 NullFields []string `json:"-"`
689 }
690
691 func (s *CommitRequest) MarshalJSON() ([]byte, error) {
692 type NoMethod CommitRequest
693 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
694 }
695
696
697 type CommitResponse struct {
698
699
700 CommitTime string `json:"commitTime,omitempty"`
701
702
703 WriteResults []*WriteResult `json:"writeResults,omitempty"`
704
705
706 googleapi.ServerResponse `json:"-"`
707
708
709
710
711
712 ForceSendFields []string `json:"-"`
713
714
715
716
717 NullFields []string `json:"-"`
718 }
719
720 func (s *CommitResponse) MarshalJSON() ([]byte, error) {
721 type NoMethod CommitResponse
722 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
723 }
724
725
726
727 type CompositeFilter struct {
728
729
730 Filters []*Filter `json:"filters,omitempty"`
731
732
733
734
735
736
737
738 Op string `json:"op,omitempty"`
739
740
741
742
743
744 ForceSendFields []string `json:"-"`
745
746
747
748
749 NullFields []string `json:"-"`
750 }
751
752 func (s *CompositeFilter) MarshalJSON() ([]byte, error) {
753 type NoMethod CompositeFilter
754 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
755 }
756
757
758
759
760 type Count struct {
761
762
763
764
765
766 UpTo int64 `json:"upTo,omitempty,string"`
767
768
769
770
771
772 ForceSendFields []string `json:"-"`
773
774
775
776
777 NullFields []string `json:"-"`
778 }
779
780 func (s *Count) MarshalJSON() ([]byte, error) {
781 type NoMethod Count
782 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
783 }
784
785
786 type Cursor struct {
787
788
789 Before bool `json:"before,omitempty"`
790
791
792
793 Values []*Value `json:"values,omitempty"`
794
795
796
797
798
799 ForceSendFields []string `json:"-"`
800
801
802
803
804 NullFields []string `json:"-"`
805 }
806
807 func (s *Cursor) MarshalJSON() ([]byte, error) {
808 type NoMethod Cursor
809 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
810 }
811
812
813 type Document struct {
814
815
816
817
818 CreateTime string `json:"createTime,omitempty"`
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834 Fields map[string]Value `json:"fields,omitempty"`
835
836
837 Name string `json:"name,omitempty"`
838
839
840
841
842 UpdateTime string `json:"updateTime,omitempty"`
843
844
845 googleapi.ServerResponse `json:"-"`
846
847
848
849
850
851 ForceSendFields []string `json:"-"`
852
853
854
855
856 NullFields []string `json:"-"`
857 }
858
859 func (s *Document) MarshalJSON() ([]byte, error) {
860 type NoMethod Document
861 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
862 }
863
864
865
866
867
868
869
870
871
872 type DocumentChange struct {
873
874
875 Document *Document `json:"document,omitempty"`
876
877
878 RemovedTargetIds []int64 `json:"removedTargetIds,omitempty"`
879
880 TargetIds []int64 `json:"targetIds,omitempty"`
881
882
883
884
885
886 ForceSendFields []string `json:"-"`
887
888
889
890
891 NullFields []string `json:"-"`
892 }
893
894 func (s *DocumentChange) MarshalJSON() ([]byte, error) {
895 type NoMethod DocumentChange
896 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
897 }
898
899
900
901
902
903 type DocumentDelete struct {
904
905 Document string `json:"document,omitempty"`
906
907
908 ReadTime string `json:"readTime,omitempty"`
909
910
911 RemovedTargetIds []int64 `json:"removedTargetIds,omitempty"`
912
913
914
915
916
917 ForceSendFields []string `json:"-"`
918
919
920
921
922 NullFields []string `json:"-"`
923 }
924
925 func (s *DocumentDelete) MarshalJSON() ([]byte, error) {
926 type NoMethod DocumentDelete
927 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
928 }
929
930
931
932
933
934 type DocumentMask struct {
935
936
937 FieldPaths []string `json:"fieldPaths,omitempty"`
938
939
940
941
942
943 ForceSendFields []string `json:"-"`
944
945
946
947
948 NullFields []string `json:"-"`
949 }
950
951 func (s *DocumentMask) MarshalJSON() ([]byte, error) {
952 type NoMethod DocumentMask
953 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
954 }
955
956
957
958
959
960
961
962 type DocumentRemove struct {
963
964 Document string `json:"document,omitempty"`
965
966
967 ReadTime string `json:"readTime,omitempty"`
968
969
970 RemovedTargetIds []int64 `json:"removedTargetIds,omitempty"`
971
972
973
974
975
976 ForceSendFields []string `json:"-"`
977
978
979
980
981 NullFields []string `json:"-"`
982 }
983
984 func (s *DocumentRemove) MarshalJSON() ([]byte, error) {
985 type NoMethod DocumentRemove
986 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
987 }
988
989
990 type DocumentTransform struct {
991
992 Document string `json:"document,omitempty"`
993
994
995 FieldTransforms []*FieldTransform `json:"fieldTransforms,omitempty"`
996
997
998
999
1000
1001 ForceSendFields []string `json:"-"`
1002
1003
1004
1005
1006 NullFields []string `json:"-"`
1007 }
1008
1009 func (s *DocumentTransform) MarshalJSON() ([]byte, error) {
1010 type NoMethod DocumentTransform
1011 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1012 }
1013
1014
1015 type DocumentsTarget struct {
1016
1017
1018
1019
1020 Documents []string `json:"documents,omitempty"`
1021
1022
1023
1024
1025
1026 ForceSendFields []string `json:"-"`
1027
1028
1029
1030
1031 NullFields []string `json:"-"`
1032 }
1033
1034 func (s *DocumentsTarget) MarshalJSON() ([]byte, error) {
1035 type NoMethod DocumentsTarget
1036 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1037 }
1038
1039
1040
1041
1042
1043 type Empty struct {
1044
1045 googleapi.ServerResponse `json:"-"`
1046 }
1047
1048
1049 type ExecutionStats struct {
1050
1051
1052
1053
1054
1055 DebugStats googleapi.RawMessage `json:"debugStats,omitempty"`
1056
1057 ExecutionDuration string `json:"executionDuration,omitempty"`
1058
1059 ReadOperations int64 `json:"readOperations,omitempty,string"`
1060
1061
1062 ResultsReturned int64 `json:"resultsReturned,omitempty,string"`
1063
1064
1065
1066
1067
1068 ForceSendFields []string `json:"-"`
1069
1070
1071
1072
1073 NullFields []string `json:"-"`
1074 }
1075
1076 func (s *ExecutionStats) MarshalJSON() ([]byte, error) {
1077 type NoMethod ExecutionStats
1078 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1079 }
1080
1081
1082 type ExistenceFilter struct {
1083
1084
1085
1086
1087
1088
1089 Count int64 `json:"count,omitempty"`
1090
1091 TargetId int64 `json:"targetId,omitempty"`
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102 UnchangedNames *BloomFilter `json:"unchangedNames,omitempty"`
1103
1104
1105
1106
1107
1108 ForceSendFields []string `json:"-"`
1109
1110
1111
1112
1113 NullFields []string `json:"-"`
1114 }
1115
1116 func (s *ExistenceFilter) MarshalJSON() ([]byte, error) {
1117 type NoMethod ExistenceFilter
1118 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1119 }
1120
1121
1122 type ExplainMetrics struct {
1123
1124
1125 ExecutionStats *ExecutionStats `json:"executionStats,omitempty"`
1126
1127 PlanSummary *PlanSummary `json:"planSummary,omitempty"`
1128
1129
1130
1131
1132
1133 ForceSendFields []string `json:"-"`
1134
1135
1136
1137
1138 NullFields []string `json:"-"`
1139 }
1140
1141 func (s *ExplainMetrics) MarshalJSON() ([]byte, error) {
1142 type NoMethod ExplainMetrics
1143 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1144 }
1145
1146
1147 type ExplainOptions struct {
1148
1149
1150
1151
1152 Analyze bool `json:"analyze,omitempty"`
1153
1154
1155
1156
1157
1158 ForceSendFields []string `json:"-"`
1159
1160
1161
1162
1163 NullFields []string `json:"-"`
1164 }
1165
1166 func (s *ExplainOptions) MarshalJSON() ([]byte, error) {
1167 type NoMethod ExplainOptions
1168 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1169 }
1170
1171
1172 type FieldFilter struct {
1173
1174 Field *FieldReference `json:"field,omitempty"`
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205 Op string `json:"op,omitempty"`
1206
1207 Value *Value `json:"value,omitempty"`
1208
1209
1210
1211
1212
1213 ForceSendFields []string `json:"-"`
1214
1215
1216
1217
1218 NullFields []string `json:"-"`
1219 }
1220
1221 func (s *FieldFilter) MarshalJSON() ([]byte, error) {
1222 type NoMethod FieldFilter
1223 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1224 }
1225
1226
1227
1228 type FieldReference struct {
1229
1230
1231
1232 FieldPath string `json:"fieldPath,omitempty"`
1233
1234
1235
1236
1237
1238 ForceSendFields []string `json:"-"`
1239
1240
1241
1242
1243 NullFields []string `json:"-"`
1244 }
1245
1246 func (s *FieldReference) MarshalJSON() ([]byte, error) {
1247 type NoMethod FieldReference
1248 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1249 }
1250
1251
1252 type FieldTransform struct {
1253
1254
1255
1256
1257
1258
1259
1260
1261 AppendMissingElements *ArrayValue `json:"appendMissingElements,omitempty"`
1262
1263
1264 FieldPath string `json:"fieldPath,omitempty"`
1265
1266
1267
1268
1269
1270
1271
1272
1273 Increment *Value `json:"increment,omitempty"`
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284 Maximum *Value `json:"maximum,omitempty"`
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295 Minimum *Value `json:"minimum,omitempty"`
1296
1297
1298
1299
1300
1301
1302
1303 RemoveAllFromArray *ArrayValue `json:"removeAllFromArray,omitempty"`
1304
1305
1306
1307
1308
1309
1310
1311
1312 SetToServerValue string `json:"setToServerValue,omitempty"`
1313
1314
1315
1316
1317
1318 ForceSendFields []string `json:"-"`
1319
1320
1321
1322
1323 NullFields []string `json:"-"`
1324 }
1325
1326 func (s *FieldTransform) MarshalJSON() ([]byte, error) {
1327 type NoMethod FieldTransform
1328 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1329 }
1330
1331
1332 type Filter struct {
1333
1334 CompositeFilter *CompositeFilter `json:"compositeFilter,omitempty"`
1335
1336 FieldFilter *FieldFilter `json:"fieldFilter,omitempty"`
1337
1338 UnaryFilter *UnaryFilter `json:"unaryFilter,omitempty"`
1339
1340
1341
1342
1343
1344 ForceSendFields []string `json:"-"`
1345
1346
1347
1348
1349 NullFields []string `json:"-"`
1350 }
1351
1352 func (s *Filter) MarshalJSON() ([]byte, error) {
1353 type NoMethod Filter
1354 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1355 }
1356
1357
1358 type FindNearest struct {
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374 DistanceMeasure string `json:"distanceMeasure,omitempty"`
1375
1376
1377 Limit int64 `json:"limit,omitempty"`
1378
1379
1380 QueryVector *Value `json:"queryVector,omitempty"`
1381
1382
1383
1384 VectorField *FieldReference `json:"vectorField,omitempty"`
1385
1386
1387
1388
1389
1390 ForceSendFields []string `json:"-"`
1391
1392
1393
1394
1395 NullFields []string `json:"-"`
1396 }
1397
1398 func (s *FindNearest) MarshalJSON() ([]byte, error) {
1399 type NoMethod FindNearest
1400 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1401 }
1402
1403
1404
1405
1406 type GoogleFirestoreAdminV1Backup struct {
1407
1408
1409 Database string `json:"database,omitempty"`
1410
1411
1412 DatabaseUid string `json:"databaseUid,omitempty"`
1413
1414 ExpireTime string `json:"expireTime,omitempty"`
1415
1416
1417 Name string `json:"name,omitempty"`
1418
1419
1420 SnapshotTime string `json:"snapshotTime,omitempty"`
1421
1422
1423
1424
1425
1426
1427
1428
1429 State string `json:"state,omitempty"`
1430
1431
1432
1433 Stats *GoogleFirestoreAdminV1Stats `json:"stats,omitempty"`
1434
1435
1436 googleapi.ServerResponse `json:"-"`
1437
1438
1439
1440
1441
1442 ForceSendFields []string `json:"-"`
1443
1444
1445
1446
1447 NullFields []string `json:"-"`
1448 }
1449
1450 func (s *GoogleFirestoreAdminV1Backup) MarshalJSON() ([]byte, error) {
1451 type NoMethod GoogleFirestoreAdminV1Backup
1452 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1453 }
1454
1455
1456
1457
1458 type GoogleFirestoreAdminV1BackupSchedule struct {
1459
1460
1461
1462 CreateTime string `json:"createTime,omitempty"`
1463
1464 DailyRecurrence *GoogleFirestoreAdminV1DailyRecurrence `json:"dailyRecurrence,omitempty"`
1465
1466
1467
1468
1469 Name string `json:"name,omitempty"`
1470
1471
1472 Retention string `json:"retention,omitempty"`
1473
1474
1475
1476 UpdateTime string `json:"updateTime,omitempty"`
1477
1478 WeeklyRecurrence *GoogleFirestoreAdminV1WeeklyRecurrence `json:"weeklyRecurrence,omitempty"`
1479
1480
1481 googleapi.ServerResponse `json:"-"`
1482
1483
1484
1485
1486
1487 ForceSendFields []string `json:"-"`
1488
1489
1490
1491
1492 NullFields []string `json:"-"`
1493 }
1494
1495 func (s *GoogleFirestoreAdminV1BackupSchedule) MarshalJSON() ([]byte, error) {
1496 type NoMethod GoogleFirestoreAdminV1BackupSchedule
1497 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1498 }
1499
1500
1501
1502
1503 type GoogleFirestoreAdminV1CmekConfig struct {
1504
1505
1506
1507
1508
1509
1510 ActiveKeyVersion []string `json:"activeKeyVersion,omitempty"`
1511
1512
1513
1514
1515
1516
1517
1518 KmsKeyName string `json:"kmsKeyName,omitempty"`
1519
1520
1521
1522
1523
1524 ForceSendFields []string `json:"-"`
1525
1526
1527
1528
1529 NullFields []string `json:"-"`
1530 }
1531
1532 func (s *GoogleFirestoreAdminV1CmekConfig) MarshalJSON() ([]byte, error) {
1533 type NoMethod GoogleFirestoreAdminV1CmekConfig
1534 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1535 }
1536
1537
1538
1539 type GoogleFirestoreAdminV1CreateDatabaseMetadata struct {
1540 }
1541
1542
1543
1544 type GoogleFirestoreAdminV1DailyRecurrence struct {
1545 }
1546
1547
1548 type GoogleFirestoreAdminV1Database struct {
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561 AppEngineIntegrationMode string `json:"appEngineIntegrationMode,omitempty"`
1562
1563 CmekConfig *GoogleFirestoreAdminV1CmekConfig `json:"cmekConfig,omitempty"`
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577 ConcurrencyMode string `json:"concurrencyMode,omitempty"`
1578
1579
1580 CreateTime string `json:"createTime,omitempty"`
1581
1582
1583
1584
1585
1586
1587
1588 DeleteProtectionState string `json:"deleteProtectionState,omitempty"`
1589
1590
1591 DeleteTime string `json:"deleteTime,omitempty"`
1592
1593
1594
1595
1596
1597
1598
1599 EarliestVersionTime string `json:"earliestVersionTime,omitempty"`
1600
1601
1602
1603 Etag string `json:"etag,omitempty"`
1604
1605
1606
1607
1608
1609 KeyPrefix string `json:"keyPrefix,omitempty"`
1610
1611
1612 LocationId string `json:"locationId,omitempty"`
1613
1614
1615 Name string `json:"name,omitempty"`
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628 PointInTimeRecoveryEnablement string `json:"pointInTimeRecoveryEnablement,omitempty"`
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638 Type string `json:"type,omitempty"`
1639
1640 Uid string `json:"uid,omitempty"`
1641
1642
1643
1644 UpdateTime string `json:"updateTime,omitempty"`
1645
1646
1647
1648
1649
1650 VersionRetentionPeriod string `json:"versionRetentionPeriod,omitempty"`
1651
1652
1653 googleapi.ServerResponse `json:"-"`
1654
1655
1656
1657
1658
1659 ForceSendFields []string `json:"-"`
1660
1661
1662
1663
1664 NullFields []string `json:"-"`
1665 }
1666
1667 func (s *GoogleFirestoreAdminV1Database) MarshalJSON() ([]byte, error) {
1668 type NoMethod GoogleFirestoreAdminV1Database
1669 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1670 }
1671
1672
1673
1674 type GoogleFirestoreAdminV1DatabaseSnapshot struct {
1675
1676
1677 Database string `json:"database,omitempty"`
1678
1679
1680
1681 SnapshotTime string `json:"snapshotTime,omitempty"`
1682
1683
1684
1685
1686
1687 ForceSendFields []string `json:"-"`
1688
1689
1690
1691
1692 NullFields []string `json:"-"`
1693 }
1694
1695 func (s *GoogleFirestoreAdminV1DatabaseSnapshot) MarshalJSON() ([]byte, error) {
1696 type NoMethod GoogleFirestoreAdminV1DatabaseSnapshot
1697 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1698 }
1699
1700
1701
1702 type GoogleFirestoreAdminV1DeleteDatabaseMetadata struct {
1703 }
1704
1705
1706
1707 type GoogleFirestoreAdminV1ExportDocumentsMetadata struct {
1708
1709 CollectionIds []string `json:"collectionIds,omitempty"`
1710
1711
1712 EndTime string `json:"endTime,omitempty"`
1713
1714 NamespaceIds []string `json:"namespaceIds,omitempty"`
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729 OperationState string `json:"operationState,omitempty"`
1730
1731 OutputUriPrefix string `json:"outputUriPrefix,omitempty"`
1732
1733 ProgressBytes *GoogleFirestoreAdminV1Progress `json:"progressBytes,omitempty"`
1734
1735 ProgressDocuments *GoogleFirestoreAdminV1Progress `json:"progressDocuments,omitempty"`
1736
1737
1738
1739 SnapshotTime string `json:"snapshotTime,omitempty"`
1740
1741 StartTime string `json:"startTime,omitempty"`
1742
1743
1744
1745
1746
1747 ForceSendFields []string `json:"-"`
1748
1749
1750
1751
1752 NullFields []string `json:"-"`
1753 }
1754
1755 func (s *GoogleFirestoreAdminV1ExportDocumentsMetadata) MarshalJSON() ([]byte, error) {
1756 type NoMethod GoogleFirestoreAdminV1ExportDocumentsMetadata
1757 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1758 }
1759
1760
1761
1762 type GoogleFirestoreAdminV1ExportDocumentsRequest struct {
1763
1764
1765 CollectionIds []string `json:"collectionIds,omitempty"`
1766
1767
1768
1769
1770
1771 NamespaceIds []string `json:"namespaceIds,omitempty"`
1772
1773
1774
1775
1776
1777
1778
1779
1780 OutputUriPrefix string `json:"outputUriPrefix,omitempty"`
1781
1782
1783
1784
1785
1786
1787 SnapshotTime string `json:"snapshotTime,omitempty"`
1788
1789
1790
1791
1792
1793 ForceSendFields []string `json:"-"`
1794
1795
1796
1797
1798 NullFields []string `json:"-"`
1799 }
1800
1801 func (s *GoogleFirestoreAdminV1ExportDocumentsRequest) MarshalJSON() ([]byte, error) {
1802 type NoMethod GoogleFirestoreAdminV1ExportDocumentsRequest
1803 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1804 }
1805
1806
1807
1808 type GoogleFirestoreAdminV1ExportDocumentsResponse struct {
1809
1810
1811
1812 OutputUriPrefix string `json:"outputUriPrefix,omitempty"`
1813
1814
1815
1816
1817
1818 ForceSendFields []string `json:"-"`
1819
1820
1821
1822
1823 NullFields []string `json:"-"`
1824 }
1825
1826 func (s *GoogleFirestoreAdminV1ExportDocumentsResponse) MarshalJSON() ([]byte, error) {
1827 type NoMethod GoogleFirestoreAdminV1ExportDocumentsResponse
1828 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1829 }
1830
1831
1832
1833
1834 type GoogleFirestoreAdminV1Field struct {
1835
1836
1837
1838
1839 IndexConfig *GoogleFirestoreAdminV1IndexConfig `json:"indexConfig,omitempty"`
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858 Name string `json:"name,omitempty"`
1859
1860
1861 TtlConfig *GoogleFirestoreAdminV1TtlConfig `json:"ttlConfig,omitempty"`
1862
1863
1864 googleapi.ServerResponse `json:"-"`
1865
1866
1867
1868
1869
1870 ForceSendFields []string `json:"-"`
1871
1872
1873
1874
1875 NullFields []string `json:"-"`
1876 }
1877
1878 func (s *GoogleFirestoreAdminV1Field) MarshalJSON() ([]byte, error) {
1879 type NoMethod GoogleFirestoreAdminV1Field
1880 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1881 }
1882
1883
1884
1885 type GoogleFirestoreAdminV1FieldOperationMetadata struct {
1886
1887
1888 EndTime string `json:"endTime,omitempty"`
1889
1890
1891
1892 Field string `json:"field,omitempty"`
1893
1894
1895 IndexConfigDeltas []*GoogleFirestoreAdminV1IndexConfigDelta `json:"indexConfigDeltas,omitempty"`
1896
1897 ProgressBytes *GoogleFirestoreAdminV1Progress `json:"progressBytes,omitempty"`
1898
1899 ProgressDocuments *GoogleFirestoreAdminV1Progress `json:"progressDocuments,omitempty"`
1900
1901 StartTime string `json:"startTime,omitempty"`
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916 State string `json:"state,omitempty"`
1917
1918 TtlConfigDelta *GoogleFirestoreAdminV1TtlConfigDelta `json:"ttlConfigDelta,omitempty"`
1919
1920
1921
1922
1923
1924 ForceSendFields []string `json:"-"`
1925
1926
1927
1928
1929 NullFields []string `json:"-"`
1930 }
1931
1932 func (s *GoogleFirestoreAdminV1FieldOperationMetadata) MarshalJSON() ([]byte, error) {
1933 type NoMethod GoogleFirestoreAdminV1FieldOperationMetadata
1934 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1935 }
1936
1937
1938
1939 type GoogleFirestoreAdminV1FlatIndex struct {
1940 }
1941
1942
1943
1944 type GoogleFirestoreAdminV1ImportDocumentsMetadata struct {
1945
1946 CollectionIds []string `json:"collectionIds,omitempty"`
1947
1948
1949 EndTime string `json:"endTime,omitempty"`
1950
1951 InputUriPrefix string `json:"inputUriPrefix,omitempty"`
1952
1953 NamespaceIds []string `json:"namespaceIds,omitempty"`
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968 OperationState string `json:"operationState,omitempty"`
1969
1970 ProgressBytes *GoogleFirestoreAdminV1Progress `json:"progressBytes,omitempty"`
1971
1972 ProgressDocuments *GoogleFirestoreAdminV1Progress `json:"progressDocuments,omitempty"`
1973
1974 StartTime string `json:"startTime,omitempty"`
1975
1976
1977
1978
1979
1980 ForceSendFields []string `json:"-"`
1981
1982
1983
1984
1985 NullFields []string `json:"-"`
1986 }
1987
1988 func (s *GoogleFirestoreAdminV1ImportDocumentsMetadata) MarshalJSON() ([]byte, error) {
1989 type NoMethod GoogleFirestoreAdminV1ImportDocumentsMetadata
1990 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1991 }
1992
1993
1994
1995 type GoogleFirestoreAdminV1ImportDocumentsRequest struct {
1996
1997
1998 CollectionIds []string `json:"collectionIds,omitempty"`
1999
2000
2001
2002
2003 InputUriPrefix string `json:"inputUriPrefix,omitempty"`
2004
2005
2006
2007
2008
2009 NamespaceIds []string `json:"namespaceIds,omitempty"`
2010
2011
2012
2013
2014
2015 ForceSendFields []string `json:"-"`
2016
2017
2018
2019
2020 NullFields []string `json:"-"`
2021 }
2022
2023 func (s *GoogleFirestoreAdminV1ImportDocumentsRequest) MarshalJSON() ([]byte, error) {
2024 type NoMethod GoogleFirestoreAdminV1ImportDocumentsRequest
2025 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2026 }
2027
2028
2029
2030 type GoogleFirestoreAdminV1Index struct {
2031
2032
2033
2034
2035
2036
2037
2038 ApiScope string `json:"apiScope,omitempty"`
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048 Fields []*GoogleFirestoreAdminV1IndexField `json:"fields,omitempty"`
2049
2050
2051
2052
2053
2054 Name string `json:"name,omitempty"`
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074 QueryScope string `json:"queryScope,omitempty"`
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091 State string `json:"state,omitempty"`
2092
2093
2094 googleapi.ServerResponse `json:"-"`
2095
2096
2097
2098
2099
2100 ForceSendFields []string `json:"-"`
2101
2102
2103
2104
2105 NullFields []string `json:"-"`
2106 }
2107
2108 func (s *GoogleFirestoreAdminV1Index) MarshalJSON() ([]byte, error) {
2109 type NoMethod GoogleFirestoreAdminV1Index
2110 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2111 }
2112
2113
2114 type GoogleFirestoreAdminV1IndexConfig struct {
2115
2116
2117
2118
2119 AncestorField string `json:"ancestorField,omitempty"`
2120
2121 Indexes []*GoogleFirestoreAdminV1Index `json:"indexes,omitempty"`
2122
2123
2124
2125
2126
2127 Reverting bool `json:"reverting,omitempty"`
2128
2129
2130
2131
2132 UsesAncestorConfig bool `json:"usesAncestorConfig,omitempty"`
2133
2134
2135
2136
2137
2138 ForceSendFields []string `json:"-"`
2139
2140
2141
2142
2143 NullFields []string `json:"-"`
2144 }
2145
2146 func (s *GoogleFirestoreAdminV1IndexConfig) MarshalJSON() ([]byte, error) {
2147 type NoMethod GoogleFirestoreAdminV1IndexConfig
2148 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2149 }
2150
2151
2152
2153 type GoogleFirestoreAdminV1IndexConfigDelta struct {
2154
2155
2156
2157
2158
2159
2160 ChangeType string `json:"changeType,omitempty"`
2161
2162 Index *GoogleFirestoreAdminV1Index `json:"index,omitempty"`
2163
2164
2165
2166
2167
2168 ForceSendFields []string `json:"-"`
2169
2170
2171
2172
2173 NullFields []string `json:"-"`
2174 }
2175
2176 func (s *GoogleFirestoreAdminV1IndexConfigDelta) MarshalJSON() ([]byte, error) {
2177 type NoMethod GoogleFirestoreAdminV1IndexConfigDelta
2178 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2179 }
2180
2181
2182
2183
2184 type GoogleFirestoreAdminV1IndexField struct {
2185
2186
2187
2188
2189
2190
2191
2192 ArrayConfig string `json:"arrayConfig,omitempty"`
2193
2194
2195 FieldPath string `json:"fieldPath,omitempty"`
2196
2197
2198
2199
2200
2201
2202
2203 Order string `json:"order,omitempty"`
2204
2205
2206 VectorConfig *GoogleFirestoreAdminV1VectorConfig `json:"vectorConfig,omitempty"`
2207
2208
2209
2210
2211
2212 ForceSendFields []string `json:"-"`
2213
2214
2215
2216
2217 NullFields []string `json:"-"`
2218 }
2219
2220 func (s *GoogleFirestoreAdminV1IndexField) MarshalJSON() ([]byte, error) {
2221 type NoMethod GoogleFirestoreAdminV1IndexField
2222 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2223 }
2224
2225
2226
2227 type GoogleFirestoreAdminV1IndexOperationMetadata struct {
2228
2229
2230 EndTime string `json:"endTime,omitempty"`
2231
2232
2233
2234 Index string `json:"index,omitempty"`
2235
2236 ProgressBytes *GoogleFirestoreAdminV1Progress `json:"progressBytes,omitempty"`
2237
2238 ProgressDocuments *GoogleFirestoreAdminV1Progress `json:"progressDocuments,omitempty"`
2239
2240 StartTime string `json:"startTime,omitempty"`
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255 State string `json:"state,omitempty"`
2256
2257
2258
2259
2260
2261 ForceSendFields []string `json:"-"`
2262
2263
2264
2265
2266 NullFields []string `json:"-"`
2267 }
2268
2269 func (s *GoogleFirestoreAdminV1IndexOperationMetadata) MarshalJSON() ([]byte, error) {
2270 type NoMethod GoogleFirestoreAdminV1IndexOperationMetadata
2271 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2272 }
2273
2274
2275
2276 type GoogleFirestoreAdminV1ListBackupSchedulesResponse struct {
2277
2278 BackupSchedules []*GoogleFirestoreAdminV1BackupSchedule `json:"backupSchedules,omitempty"`
2279
2280
2281 googleapi.ServerResponse `json:"-"`
2282
2283
2284
2285
2286
2287 ForceSendFields []string `json:"-"`
2288
2289
2290
2291
2292 NullFields []string `json:"-"`
2293 }
2294
2295 func (s *GoogleFirestoreAdminV1ListBackupSchedulesResponse) MarshalJSON() ([]byte, error) {
2296 type NoMethod GoogleFirestoreAdminV1ListBackupSchedulesResponse
2297 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2298 }
2299
2300
2301
2302 type GoogleFirestoreAdminV1ListBackupsResponse struct {
2303
2304 Backups []*GoogleFirestoreAdminV1Backup `json:"backups,omitempty"`
2305
2306
2307
2308
2309
2310 Unreachable []string `json:"unreachable,omitempty"`
2311
2312
2313 googleapi.ServerResponse `json:"-"`
2314
2315
2316
2317
2318
2319 ForceSendFields []string `json:"-"`
2320
2321
2322
2323
2324 NullFields []string `json:"-"`
2325 }
2326
2327 func (s *GoogleFirestoreAdminV1ListBackupsResponse) MarshalJSON() ([]byte, error) {
2328 type NoMethod GoogleFirestoreAdminV1ListBackupsResponse
2329 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2330 }
2331
2332
2333
2334 type GoogleFirestoreAdminV1ListDatabasesResponse struct {
2335
2336 Databases []*GoogleFirestoreAdminV1Database `json:"databases,omitempty"`
2337
2338
2339
2340
2341
2342
2343
2344
2345 Unreachable []string `json:"unreachable,omitempty"`
2346
2347
2348 googleapi.ServerResponse `json:"-"`
2349
2350
2351
2352
2353
2354 ForceSendFields []string `json:"-"`
2355
2356
2357
2358
2359 NullFields []string `json:"-"`
2360 }
2361
2362 func (s *GoogleFirestoreAdminV1ListDatabasesResponse) MarshalJSON() ([]byte, error) {
2363 type NoMethod GoogleFirestoreAdminV1ListDatabasesResponse
2364 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2365 }
2366
2367
2368
2369 type GoogleFirestoreAdminV1ListFieldsResponse struct {
2370
2371 Fields []*GoogleFirestoreAdminV1Field `json:"fields,omitempty"`
2372
2373
2374 NextPageToken string `json:"nextPageToken,omitempty"`
2375
2376
2377 googleapi.ServerResponse `json:"-"`
2378
2379
2380
2381
2382
2383 ForceSendFields []string `json:"-"`
2384
2385
2386
2387
2388 NullFields []string `json:"-"`
2389 }
2390
2391 func (s *GoogleFirestoreAdminV1ListFieldsResponse) MarshalJSON() ([]byte, error) {
2392 type NoMethod GoogleFirestoreAdminV1ListFieldsResponse
2393 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2394 }
2395
2396
2397
2398 type GoogleFirestoreAdminV1ListIndexesResponse struct {
2399
2400 Indexes []*GoogleFirestoreAdminV1Index `json:"indexes,omitempty"`
2401
2402
2403 NextPageToken string `json:"nextPageToken,omitempty"`
2404
2405
2406 googleapi.ServerResponse `json:"-"`
2407
2408
2409
2410
2411
2412 ForceSendFields []string `json:"-"`
2413
2414
2415
2416
2417 NullFields []string `json:"-"`
2418 }
2419
2420 func (s *GoogleFirestoreAdminV1ListIndexesResponse) MarshalJSON() ([]byte, error) {
2421 type NoMethod GoogleFirestoreAdminV1ListIndexesResponse
2422 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2423 }
2424
2425
2426
2427 type GoogleFirestoreAdminV1LocationMetadata struct {
2428 }
2429
2430
2431
2432
2433 type GoogleFirestoreAdminV1Progress struct {
2434
2435 CompletedWork int64 `json:"completedWork,omitempty,string"`
2436
2437 EstimatedWork int64 `json:"estimatedWork,omitempty,string"`
2438
2439
2440
2441
2442
2443 ForceSendFields []string `json:"-"`
2444
2445
2446
2447
2448 NullFields []string `json:"-"`
2449 }
2450
2451 func (s *GoogleFirestoreAdminV1Progress) MarshalJSON() ([]byte, error) {
2452 type NoMethod GoogleFirestoreAdminV1Progress
2453 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2454 }
2455
2456
2457
2458 type GoogleFirestoreAdminV1RestoreDatabaseMetadata struct {
2459
2460 Backup string `json:"backup,omitempty"`
2461
2462 Database string `json:"database,omitempty"`
2463
2464 EndTime string `json:"endTime,omitempty"`
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479 OperationState string `json:"operationState,omitempty"`
2480
2481
2482 ProgressPercentage *GoogleFirestoreAdminV1Progress `json:"progressPercentage,omitempty"`
2483
2484 StartTime string `json:"startTime,omitempty"`
2485
2486
2487
2488
2489
2490 ForceSendFields []string `json:"-"`
2491
2492
2493
2494
2495 NullFields []string `json:"-"`
2496 }
2497
2498 func (s *GoogleFirestoreAdminV1RestoreDatabaseMetadata) MarshalJSON() ([]byte, error) {
2499 type NoMethod GoogleFirestoreAdminV1RestoreDatabaseMetadata
2500 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2501 }
2502
2503
2504
2505 type GoogleFirestoreAdminV1RestoreDatabaseRequest struct {
2506
2507
2508 Backup string `json:"backup,omitempty"`
2509
2510
2511
2512
2513
2514
2515
2516 DatabaseId string `json:"databaseId,omitempty"`
2517
2518
2519
2520 DatabaseSnapshot *GoogleFirestoreAdminV1DatabaseSnapshot `json:"databaseSnapshot,omitempty"`
2521
2522
2523
2524
2525
2526 ForceSendFields []string `json:"-"`
2527
2528
2529
2530
2531 NullFields []string `json:"-"`
2532 }
2533
2534 func (s *GoogleFirestoreAdminV1RestoreDatabaseRequest) MarshalJSON() ([]byte, error) {
2535 type NoMethod GoogleFirestoreAdminV1RestoreDatabaseRequest
2536 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2537 }
2538
2539
2540 type GoogleFirestoreAdminV1Stats struct {
2541
2542
2543 DocumentCount int64 `json:"documentCount,omitempty,string"`
2544
2545
2546 IndexCount int64 `json:"indexCount,omitempty,string"`
2547
2548
2549 SizeBytes int64 `json:"sizeBytes,omitempty,string"`
2550
2551
2552
2553
2554
2555 ForceSendFields []string `json:"-"`
2556
2557
2558
2559
2560 NullFields []string `json:"-"`
2561 }
2562
2563 func (s *GoogleFirestoreAdminV1Stats) MarshalJSON() ([]byte, error) {
2564 type NoMethod GoogleFirestoreAdminV1Stats
2565 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2566 }
2567
2568
2569
2570
2571
2572
2573
2574 type GoogleFirestoreAdminV1TtlConfig struct {
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589 State string `json:"state,omitempty"`
2590
2591
2592
2593
2594
2595 ForceSendFields []string `json:"-"`
2596
2597
2598
2599
2600 NullFields []string `json:"-"`
2601 }
2602
2603 func (s *GoogleFirestoreAdminV1TtlConfig) MarshalJSON() ([]byte, error) {
2604 type NoMethod GoogleFirestoreAdminV1TtlConfig
2605 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2606 }
2607
2608
2609
2610 type GoogleFirestoreAdminV1TtlConfigDelta struct {
2611
2612
2613
2614
2615
2616
2617 ChangeType string `json:"changeType,omitempty"`
2618
2619
2620
2621
2622
2623 ForceSendFields []string `json:"-"`
2624
2625
2626
2627
2628 NullFields []string `json:"-"`
2629 }
2630
2631 func (s *GoogleFirestoreAdminV1TtlConfigDelta) MarshalJSON() ([]byte, error) {
2632 type NoMethod GoogleFirestoreAdminV1TtlConfigDelta
2633 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2634 }
2635
2636
2637
2638 type GoogleFirestoreAdminV1UpdateDatabaseMetadata struct {
2639 }
2640
2641
2642
2643 type GoogleFirestoreAdminV1VectorConfig struct {
2644
2645
2646
2647 Dimension int64 `json:"dimension,omitempty"`
2648
2649 Flat *GoogleFirestoreAdminV1FlatIndex `json:"flat,omitempty"`
2650
2651
2652
2653
2654
2655 ForceSendFields []string `json:"-"`
2656
2657
2658
2659
2660 NullFields []string `json:"-"`
2661 }
2662
2663 func (s *GoogleFirestoreAdminV1VectorConfig) MarshalJSON() ([]byte, error) {
2664 type NoMethod GoogleFirestoreAdminV1VectorConfig
2665 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2666 }
2667
2668
2669
2670 type GoogleFirestoreAdminV1WeeklyRecurrence struct {
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682 Day string `json:"day,omitempty"`
2683
2684
2685
2686
2687
2688 ForceSendFields []string `json:"-"`
2689
2690
2691
2692
2693 NullFields []string `json:"-"`
2694 }
2695
2696 func (s *GoogleFirestoreAdminV1WeeklyRecurrence) MarshalJSON() ([]byte, error) {
2697 type NoMethod GoogleFirestoreAdminV1WeeklyRecurrence
2698 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2699 }
2700
2701
2702
2703 type GoogleLongrunningCancelOperationRequest struct {
2704 }
2705
2706
2707
2708 type GoogleLongrunningListOperationsResponse struct {
2709
2710 NextPageToken string `json:"nextPageToken,omitempty"`
2711
2712
2713 Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
2714
2715
2716 googleapi.ServerResponse `json:"-"`
2717
2718
2719
2720
2721
2722 ForceSendFields []string `json:"-"`
2723
2724
2725
2726
2727 NullFields []string `json:"-"`
2728 }
2729
2730 func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
2731 type NoMethod GoogleLongrunningListOperationsResponse
2732 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2733 }
2734
2735
2736
2737 type GoogleLongrunningOperation struct {
2738
2739
2740
2741 Done bool `json:"done,omitempty"`
2742
2743 Error *Status `json:"error,omitempty"`
2744
2745
2746
2747
2748 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2749
2750
2751
2752 Name string `json:"name,omitempty"`
2753
2754
2755
2756
2757
2758
2759
2760 Response googleapi.RawMessage `json:"response,omitempty"`
2761
2762
2763 googleapi.ServerResponse `json:"-"`
2764
2765
2766
2767
2768
2769 ForceSendFields []string `json:"-"`
2770
2771
2772
2773
2774 NullFields []string `json:"-"`
2775 }
2776
2777 func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
2778 type NoMethod GoogleLongrunningOperation
2779 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2780 }
2781
2782
2783
2784
2785
2786 type LatLng struct {
2787
2788 Latitude float64 `json:"latitude,omitempty"`
2789
2790
2791 Longitude float64 `json:"longitude,omitempty"`
2792
2793
2794
2795
2796
2797 ForceSendFields []string `json:"-"`
2798
2799
2800
2801
2802 NullFields []string `json:"-"`
2803 }
2804
2805 func (s *LatLng) MarshalJSON() ([]byte, error) {
2806 type NoMethod LatLng
2807 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2808 }
2809
2810 func (s *LatLng) UnmarshalJSON(data []byte) error {
2811 type NoMethod LatLng
2812 var s1 struct {
2813 Latitude gensupport.JSONFloat64 `json:"latitude"`
2814 Longitude gensupport.JSONFloat64 `json:"longitude"`
2815 *NoMethod
2816 }
2817 s1.NoMethod = (*NoMethod)(s)
2818 if err := json.Unmarshal(data, &s1); err != nil {
2819 return err
2820 }
2821 s.Latitude = float64(s1.Latitude)
2822 s.Longitude = float64(s1.Longitude)
2823 return nil
2824 }
2825
2826
2827 type ListCollectionIdsRequest struct {
2828
2829 PageSize int64 `json:"pageSize,omitempty"`
2830
2831 PageToken string `json:"pageToken,omitempty"`
2832
2833
2834
2835
2836 ReadTime string `json:"readTime,omitempty"`
2837
2838
2839
2840
2841
2842 ForceSendFields []string `json:"-"`
2843
2844
2845
2846
2847 NullFields []string `json:"-"`
2848 }
2849
2850 func (s *ListCollectionIdsRequest) MarshalJSON() ([]byte, error) {
2851 type NoMethod ListCollectionIdsRequest
2852 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2853 }
2854
2855
2856 type ListCollectionIdsResponse struct {
2857
2858 CollectionIds []string `json:"collectionIds,omitempty"`
2859
2860 NextPageToken string `json:"nextPageToken,omitempty"`
2861
2862
2863 googleapi.ServerResponse `json:"-"`
2864
2865
2866
2867
2868
2869 ForceSendFields []string `json:"-"`
2870
2871
2872
2873
2874 NullFields []string `json:"-"`
2875 }
2876
2877 func (s *ListCollectionIdsResponse) MarshalJSON() ([]byte, error) {
2878 type NoMethod ListCollectionIdsResponse
2879 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2880 }
2881
2882
2883 type ListDocumentsResponse struct {
2884
2885 Documents []*Document `json:"documents,omitempty"`
2886
2887
2888 NextPageToken string `json:"nextPageToken,omitempty"`
2889
2890
2891 googleapi.ServerResponse `json:"-"`
2892
2893
2894
2895
2896
2897 ForceSendFields []string `json:"-"`
2898
2899
2900
2901
2902 NullFields []string `json:"-"`
2903 }
2904
2905 func (s *ListDocumentsResponse) MarshalJSON() ([]byte, error) {
2906 type NoMethod ListDocumentsResponse
2907 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2908 }
2909
2910
2911 type ListLocationsResponse struct {
2912
2913
2914 Locations []*Location `json:"locations,omitempty"`
2915
2916 NextPageToken string `json:"nextPageToken,omitempty"`
2917
2918
2919 googleapi.ServerResponse `json:"-"`
2920
2921
2922
2923
2924
2925 ForceSendFields []string `json:"-"`
2926
2927
2928
2929
2930 NullFields []string `json:"-"`
2931 }
2932
2933 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
2934 type NoMethod ListLocationsResponse
2935 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2936 }
2937
2938
2939 type ListenRequest struct {
2940
2941 AddTarget *Target `json:"addTarget,omitempty"`
2942
2943 Labels map[string]string `json:"labels,omitempty"`
2944
2945 RemoveTarget int64 `json:"removeTarget,omitempty"`
2946
2947
2948
2949
2950
2951 ForceSendFields []string `json:"-"`
2952
2953
2954
2955
2956 NullFields []string `json:"-"`
2957 }
2958
2959 func (s *ListenRequest) MarshalJSON() ([]byte, error) {
2960 type NoMethod ListenRequest
2961 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2962 }
2963
2964
2965 type ListenResponse struct {
2966
2967 DocumentChange *DocumentChange `json:"documentChange,omitempty"`
2968
2969 DocumentDelete *DocumentDelete `json:"documentDelete,omitempty"`
2970
2971
2972 DocumentRemove *DocumentRemove `json:"documentRemove,omitempty"`
2973
2974
2975
2976 Filter *ExistenceFilter `json:"filter,omitempty"`
2977
2978 TargetChange *TargetChange `json:"targetChange,omitempty"`
2979
2980
2981 googleapi.ServerResponse `json:"-"`
2982
2983
2984
2985
2986
2987 ForceSendFields []string `json:"-"`
2988
2989
2990
2991
2992 NullFields []string `json:"-"`
2993 }
2994
2995 func (s *ListenResponse) MarshalJSON() ([]byte, error) {
2996 type NoMethod ListenResponse
2997 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2998 }
2999
3000
3001 type Location struct {
3002
3003
3004 DisplayName string `json:"displayName,omitempty"`
3005
3006
3007 Labels map[string]string `json:"labels,omitempty"`
3008
3009 LocationId string `json:"locationId,omitempty"`
3010
3011
3012 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3013
3014
3015
3016 Name string `json:"name,omitempty"`
3017
3018
3019 googleapi.ServerResponse `json:"-"`
3020
3021
3022
3023
3024
3025 ForceSendFields []string `json:"-"`
3026
3027
3028
3029
3030 NullFields []string `json:"-"`
3031 }
3032
3033 func (s *Location) MarshalJSON() ([]byte, error) {
3034 type NoMethod Location
3035 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3036 }
3037
3038
3039 type MapValue struct {
3040
3041
3042
3043
3044 Fields map[string]Value `json:"fields,omitempty"`
3045
3046
3047
3048
3049
3050 ForceSendFields []string `json:"-"`
3051
3052
3053
3054
3055 NullFields []string `json:"-"`
3056 }
3057
3058 func (s *MapValue) MarshalJSON() ([]byte, error) {
3059 type NoMethod MapValue
3060 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3061 }
3062
3063
3064 type Order struct {
3065
3066
3067
3068
3069
3070
3071 Direction string `json:"direction,omitempty"`
3072
3073 Field *FieldReference `json:"field,omitempty"`
3074
3075
3076
3077
3078
3079 ForceSendFields []string `json:"-"`
3080
3081
3082
3083
3084 NullFields []string `json:"-"`
3085 }
3086
3087 func (s *Order) MarshalJSON() ([]byte, error) {
3088 type NoMethod Order
3089 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3090 }
3091
3092
3093 type PartitionQueryRequest struct {
3094
3095
3096
3097
3098
3099
3100 PageSize int64 `json:"pageSize,omitempty"`
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110 PageToken string `json:"pageToken,omitempty"`
3111
3112
3113
3114
3115
3116
3117 PartitionCount int64 `json:"partitionCount,omitempty,string"`
3118
3119
3120
3121
3122 ReadTime string `json:"readTime,omitempty"`
3123
3124
3125
3126 StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"`
3127
3128
3129
3130
3131
3132 ForceSendFields []string `json:"-"`
3133
3134
3135
3136
3137 NullFields []string `json:"-"`
3138 }
3139
3140 func (s *PartitionQueryRequest) MarshalJSON() ([]byte, error) {
3141 type NoMethod PartitionQueryRequest
3142 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3143 }
3144
3145
3146 type PartitionQueryResponse struct {
3147
3148
3149
3150 NextPageToken string `json:"nextPageToken,omitempty"`
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161 Partitions []*Cursor `json:"partitions,omitempty"`
3162
3163
3164 googleapi.ServerResponse `json:"-"`
3165
3166
3167
3168
3169
3170 ForceSendFields []string `json:"-"`
3171
3172
3173
3174
3175 NullFields []string `json:"-"`
3176 }
3177
3178 func (s *PartitionQueryResponse) MarshalJSON() ([]byte, error) {
3179 type NoMethod PartitionQueryResponse
3180 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3181 }
3182
3183
3184 type PlanSummary struct {
3185
3186
3187
3188 IndexesUsed []googleapi.RawMessage `json:"indexesUsed,omitempty"`
3189
3190
3191
3192
3193
3194 ForceSendFields []string `json:"-"`
3195
3196
3197
3198
3199 NullFields []string `json:"-"`
3200 }
3201
3202 func (s *PlanSummary) MarshalJSON() ([]byte, error) {
3203 type NoMethod PlanSummary
3204 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3205 }
3206
3207
3208 type Precondition struct {
3209
3210
3211 Exists bool `json:"exists,omitempty"`
3212
3213
3214 UpdateTime string `json:"updateTime,omitempty"`
3215
3216
3217
3218
3219
3220 ForceSendFields []string `json:"-"`
3221
3222
3223
3224
3225 NullFields []string `json:"-"`
3226 }
3227
3228 func (s *Precondition) MarshalJSON() ([]byte, error) {
3229 type NoMethod Precondition
3230 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3231 }
3232
3233
3234 type Projection struct {
3235
3236
3237 Fields []*FieldReference `json:"fields,omitempty"`
3238
3239
3240
3241
3242
3243 ForceSendFields []string `json:"-"`
3244
3245
3246
3247
3248 NullFields []string `json:"-"`
3249 }
3250
3251 func (s *Projection) MarshalJSON() ([]byte, error) {
3252 type NoMethod Projection
3253 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3254 }
3255
3256
3257 type QueryTarget struct {
3258
3259
3260
3261
3262
3263 Parent string `json:"parent,omitempty"`
3264
3265 StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"`
3266
3267
3268
3269
3270
3271 ForceSendFields []string `json:"-"`
3272
3273
3274
3275
3276 NullFields []string `json:"-"`
3277 }
3278
3279 func (s *QueryTarget) MarshalJSON() ([]byte, error) {
3280 type NoMethod QueryTarget
3281 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3282 }
3283
3284
3285 type ReadOnly struct {
3286
3287
3288
3289
3290 ReadTime string `json:"readTime,omitempty"`
3291
3292
3293
3294
3295
3296 ForceSendFields []string `json:"-"`
3297
3298
3299
3300
3301 NullFields []string `json:"-"`
3302 }
3303
3304 func (s *ReadOnly) MarshalJSON() ([]byte, error) {
3305 type NoMethod ReadOnly
3306 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3307 }
3308
3309
3310
3311
3312 type ReadWrite struct {
3313
3314 RetryTransaction string `json:"retryTransaction,omitempty"`
3315
3316
3317
3318
3319
3320 ForceSendFields []string `json:"-"`
3321
3322
3323
3324
3325 NullFields []string `json:"-"`
3326 }
3327
3328 func (s *ReadWrite) MarshalJSON() ([]byte, error) {
3329 type NoMethod ReadWrite
3330 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3331 }
3332
3333
3334 type RollbackRequest struct {
3335
3336 Transaction string `json:"transaction,omitempty"`
3337
3338
3339
3340
3341
3342 ForceSendFields []string `json:"-"`
3343
3344
3345
3346
3347 NullFields []string `json:"-"`
3348 }
3349
3350 func (s *RollbackRequest) MarshalJSON() ([]byte, error) {
3351 type NoMethod RollbackRequest
3352 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3353 }
3354
3355
3356 type RunAggregationQueryRequest struct {
3357
3358
3359
3360 ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"`
3361
3362
3363
3364 NewTransaction *TransactionOptions `json:"newTransaction,omitempty"`
3365
3366
3367
3368
3369 ReadTime string `json:"readTime,omitempty"`
3370
3371 StructuredAggregationQuery *StructuredAggregationQuery `json:"structuredAggregationQuery,omitempty"`
3372
3373
3374 Transaction string `json:"transaction,omitempty"`
3375
3376
3377
3378
3379
3380 ForceSendFields []string `json:"-"`
3381
3382
3383
3384
3385 NullFields []string `json:"-"`
3386 }
3387
3388 func (s *RunAggregationQueryRequest) MarshalJSON() ([]byte, error) {
3389 type NoMethod RunAggregationQueryRequest
3390 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3391 }
3392
3393
3394 type RunAggregationQueryResponse struct {
3395
3396
3397
3398 ExplainMetrics *ExplainMetrics `json:"explainMetrics,omitempty"`
3399
3400
3401
3402
3403
3404
3405 ReadTime string `json:"readTime,omitempty"`
3406
3407
3408 Result *AggregationResult `json:"result,omitempty"`
3409
3410
3411
3412 Transaction string `json:"transaction,omitempty"`
3413
3414
3415 googleapi.ServerResponse `json:"-"`
3416
3417
3418
3419
3420
3421 ForceSendFields []string `json:"-"`
3422
3423
3424
3425
3426 NullFields []string `json:"-"`
3427 }
3428
3429 func (s *RunAggregationQueryResponse) MarshalJSON() ([]byte, error) {
3430 type NoMethod RunAggregationQueryResponse
3431 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3432 }
3433
3434
3435 type RunQueryRequest struct {
3436
3437
3438
3439 ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"`
3440
3441
3442
3443 NewTransaction *TransactionOptions `json:"newTransaction,omitempty"`
3444
3445
3446
3447
3448 ReadTime string `json:"readTime,omitempty"`
3449
3450 StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"`
3451
3452
3453 Transaction string `json:"transaction,omitempty"`
3454
3455
3456
3457
3458
3459 ForceSendFields []string `json:"-"`
3460
3461
3462
3463
3464 NullFields []string `json:"-"`
3465 }
3466
3467 func (s *RunQueryRequest) MarshalJSON() ([]byte, error) {
3468 type NoMethod RunQueryRequest
3469 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3470 }
3471
3472
3473 type RunQueryResponse struct {
3474
3475 Document *Document `json:"document,omitempty"`
3476
3477
3478 Done bool `json:"done,omitempty"`
3479
3480
3481
3482 ExplainMetrics *ExplainMetrics `json:"explainMetrics,omitempty"`
3483
3484
3485
3486
3487
3488 ReadTime string `json:"readTime,omitempty"`
3489
3490
3491 SkippedResults int64 `json:"skippedResults,omitempty"`
3492
3493
3494
3495
3496 Transaction string `json:"transaction,omitempty"`
3497
3498
3499 googleapi.ServerResponse `json:"-"`
3500
3501
3502
3503
3504
3505 ForceSendFields []string `json:"-"`
3506
3507
3508
3509
3510 NullFields []string `json:"-"`
3511 }
3512
3513 func (s *RunQueryResponse) MarshalJSON() ([]byte, error) {
3514 type NoMethod RunQueryResponse
3515 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3516 }
3517
3518
3519
3520
3521
3522
3523
3524 type Status struct {
3525
3526 Code int64 `json:"code,omitempty"`
3527
3528
3529 Details []googleapi.RawMessage `json:"details,omitempty"`
3530
3531
3532
3533 Message string `json:"message,omitempty"`
3534
3535
3536
3537
3538
3539 ForceSendFields []string `json:"-"`
3540
3541
3542
3543
3544 NullFields []string `json:"-"`
3545 }
3546
3547 func (s *Status) MarshalJSON() ([]byte, error) {
3548 type NoMethod Status
3549 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3550 }
3551
3552
3553
3554 type StructuredAggregationQuery struct {
3555
3556
3557
3558 Aggregations []*Aggregation `json:"aggregations,omitempty"`
3559
3560 StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"`
3561
3562
3563
3564
3565
3566 ForceSendFields []string `json:"-"`
3567
3568
3569
3570
3571 NullFields []string `json:"-"`
3572 }
3573
3574 func (s *StructuredAggregationQuery) MarshalJSON() ([]byte, error) {
3575 type NoMethod StructuredAggregationQuery
3576 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3577 }
3578
3579
3580
3581
3582 type StructuredQuery struct {
3583
3584
3585
3586
3587 EndAt *Cursor `json:"endAt,omitempty"`
3588
3589
3590
3591 FindNearest *FindNearest `json:"findNearest,omitempty"`
3592
3593 From []*CollectionSelector `json:"from,omitempty"`
3594
3595
3596
3597 Limit int64 `json:"limit,omitempty"`
3598
3599
3600
3601
3602 Offset int64 `json:"offset,omitempty"`
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616 OrderBy []*Order `json:"orderBy,omitempty"`
3617
3618
3619
3620 Select *Projection `json:"select,omitempty"`
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637 StartAt *Cursor `json:"startAt,omitempty"`
3638
3639 Where *Filter `json:"where,omitempty"`
3640
3641
3642
3643
3644
3645 ForceSendFields []string `json:"-"`
3646
3647
3648
3649
3650 NullFields []string `json:"-"`
3651 }
3652
3653 func (s *StructuredQuery) MarshalJSON() ([]byte, error) {
3654 type NoMethod StructuredQuery
3655 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3656 }
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671 type Sum struct {
3672
3673 Field *FieldReference `json:"field,omitempty"`
3674
3675
3676
3677
3678
3679 ForceSendFields []string `json:"-"`
3680
3681
3682
3683
3684 NullFields []string `json:"-"`
3685 }
3686
3687 func (s *Sum) MarshalJSON() ([]byte, error) {
3688 type NoMethod Sum
3689 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3690 }
3691
3692
3693 type Target struct {
3694
3695 Documents *DocumentsTarget `json:"documents,omitempty"`
3696
3697
3698
3699
3700
3701 ExpectedCount int64 `json:"expectedCount,omitempty"`
3702
3703 Once bool `json:"once,omitempty"`
3704
3705 Query *QueryTarget `json:"query,omitempty"`
3706
3707
3708 ReadTime string `json:"readTime,omitempty"`
3709
3710
3711
3712 ResumeToken string `json:"resumeToken,omitempty"`
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726 TargetId int64 `json:"targetId,omitempty"`
3727
3728
3729
3730
3731
3732 ForceSendFields []string `json:"-"`
3733
3734
3735
3736
3737 NullFields []string `json:"-"`
3738 }
3739
3740 func (s *Target) MarshalJSON() ([]byte, error) {
3741 type NoMethod Target
3742 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3743 }
3744
3745
3746 type TargetChange struct {
3747
3748 Cause *Status `json:"cause,omitempty"`
3749
3750
3751
3752
3753
3754
3755
3756 ReadTime string `json:"readTime,omitempty"`
3757
3758
3759
3760 ResumeToken string `json:"resumeToken,omitempty"`
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777 TargetChangeType string `json:"targetChangeType,omitempty"`
3778
3779
3780 TargetIds []int64 `json:"targetIds,omitempty"`
3781
3782
3783
3784
3785
3786 ForceSendFields []string `json:"-"`
3787
3788
3789
3790
3791 NullFields []string `json:"-"`
3792 }
3793
3794 func (s *TargetChange) MarshalJSON() ([]byte, error) {
3795 type NoMethod TargetChange
3796 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3797 }
3798
3799
3800 type TransactionOptions struct {
3801
3802 ReadOnly *ReadOnly `json:"readOnly,omitempty"`
3803
3804 ReadWrite *ReadWrite `json:"readWrite,omitempty"`
3805
3806
3807
3808
3809
3810 ForceSendFields []string `json:"-"`
3811
3812
3813
3814
3815 NullFields []string `json:"-"`
3816 }
3817
3818 func (s *TransactionOptions) MarshalJSON() ([]byte, error) {
3819 type NoMethod TransactionOptions
3820 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3821 }
3822
3823
3824 type UnaryFilter struct {
3825
3826 Field *FieldReference `json:"field,omitempty"`
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839 Op string `json:"op,omitempty"`
3840
3841
3842
3843
3844
3845 ForceSendFields []string `json:"-"`
3846
3847
3848
3849
3850 NullFields []string `json:"-"`
3851 }
3852
3853 func (s *UnaryFilter) MarshalJSON() ([]byte, error) {
3854 type NoMethod UnaryFilter
3855 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3856 }
3857
3858
3859 type Value struct {
3860
3861
3862 ArrayValue *ArrayValue `json:"arrayValue,omitempty"`
3863
3864 BooleanValue bool `json:"booleanValue,omitempty"`
3865
3866
3867 BytesValue string `json:"bytesValue,omitempty"`
3868
3869 DoubleValue float64 `json:"doubleValue,omitempty"`
3870
3871
3872 GeoPointValue *LatLng `json:"geoPointValue,omitempty"`
3873
3874 IntegerValue int64 `json:"integerValue,omitempty,string"`
3875
3876 MapValue *MapValue `json:"mapValue,omitempty"`
3877
3878
3879
3880
3881 NullValue string `json:"nullValue,omitempty"`
3882
3883
3884 ReferenceValue string `json:"referenceValue,omitempty"`
3885
3886
3887
3888 StringValue string `json:"stringValue,omitempty"`
3889
3890
3891 TimestampValue string `json:"timestampValue,omitempty"`
3892
3893
3894
3895
3896
3897 ForceSendFields []string `json:"-"`
3898
3899
3900
3901
3902 NullFields []string `json:"-"`
3903 }
3904
3905 func (s *Value) MarshalJSON() ([]byte, error) {
3906 type NoMethod Value
3907 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3908 }
3909
3910 func (s *Value) UnmarshalJSON(data []byte) error {
3911 type NoMethod Value
3912 var s1 struct {
3913 DoubleValue gensupport.JSONFloat64 `json:"doubleValue"`
3914 *NoMethod
3915 }
3916 s1.NoMethod = (*NoMethod)(s)
3917 if err := json.Unmarshal(data, &s1); err != nil {
3918 return err
3919 }
3920 s.DoubleValue = float64(s1.DoubleValue)
3921 return nil
3922 }
3923
3924
3925 type Write struct {
3926
3927
3928 CurrentDocument *Precondition `json:"currentDocument,omitempty"`
3929
3930
3931 Delete string `json:"delete,omitempty"`
3932
3933 Transform *DocumentTransform `json:"transform,omitempty"`
3934
3935 Update *Document `json:"update,omitempty"`
3936
3937
3938
3939
3940
3941
3942
3943 UpdateMask *DocumentMask `json:"updateMask,omitempty"`
3944
3945
3946
3947
3948 UpdateTransforms []*FieldTransform `json:"updateTransforms,omitempty"`
3949
3950
3951
3952
3953
3954 ForceSendFields []string `json:"-"`
3955
3956
3957
3958
3959 NullFields []string `json:"-"`
3960 }
3961
3962 func (s *Write) MarshalJSON() ([]byte, error) {
3963 type NoMethod Write
3964 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3965 }
3966
3967
3968
3969
3970
3971
3972
3973 type WriteRequest struct {
3974
3975 Labels map[string]string `json:"labels,omitempty"`
3976
3977
3978 StreamId string `json:"streamId,omitempty"`
3979
3980
3981
3982
3983
3984
3985
3986
3987 StreamToken string `json:"streamToken,omitempty"`
3988
3989
3990
3991 Writes []*Write `json:"writes,omitempty"`
3992
3993
3994
3995
3996
3997 ForceSendFields []string `json:"-"`
3998
3999
4000
4001
4002 NullFields []string `json:"-"`
4003 }
4004
4005 func (s *WriteRequest) MarshalJSON() ([]byte, error) {
4006 type NoMethod WriteRequest
4007 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4008 }
4009
4010
4011 type WriteResponse struct {
4012
4013
4014 CommitTime string `json:"commitTime,omitempty"`
4015
4016
4017 StreamId string `json:"streamId,omitempty"`
4018
4019
4020
4021 StreamToken string `json:"streamToken,omitempty"`
4022
4023
4024 WriteResults []*WriteResult `json:"writeResults,omitempty"`
4025
4026
4027 googleapi.ServerResponse `json:"-"`
4028
4029
4030
4031
4032
4033 ForceSendFields []string `json:"-"`
4034
4035
4036
4037
4038 NullFields []string `json:"-"`
4039 }
4040
4041 func (s *WriteResponse) MarshalJSON() ([]byte, error) {
4042 type NoMethod WriteResponse
4043 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4044 }
4045
4046
4047 type WriteResult struct {
4048
4049
4050 TransformResults []*Value `json:"transformResults,omitempty"`
4051
4052
4053
4054 UpdateTime string `json:"updateTime,omitempty"`
4055
4056
4057
4058
4059
4060 ForceSendFields []string `json:"-"`
4061
4062
4063
4064
4065 NullFields []string `json:"-"`
4066 }
4067
4068 func (s *WriteResult) MarshalJSON() ([]byte, error) {
4069 type NoMethod WriteResult
4070 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4071 }
4072
4073 type ProjectsDatabasesCreateCall struct {
4074 s *Service
4075 parent string
4076 googlefirestoreadminv1database *GoogleFirestoreAdminV1Database
4077 urlParams_ gensupport.URLParams
4078 ctx_ context.Context
4079 header_ http.Header
4080 }
4081
4082
4083
4084
4085 func (r *ProjectsDatabasesService) Create(parent string, googlefirestoreadminv1database *GoogleFirestoreAdminV1Database) *ProjectsDatabasesCreateCall {
4086 c := &ProjectsDatabasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4087 c.parent = parent
4088 c.googlefirestoreadminv1database = googlefirestoreadminv1database
4089 return c
4090 }
4091
4092
4093
4094
4095
4096
4097
4098 func (c *ProjectsDatabasesCreateCall) DatabaseId(databaseId string) *ProjectsDatabasesCreateCall {
4099 c.urlParams_.Set("databaseId", databaseId)
4100 return c
4101 }
4102
4103
4104
4105
4106 func (c *ProjectsDatabasesCreateCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCreateCall {
4107 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4108 return c
4109 }
4110
4111
4112 func (c *ProjectsDatabasesCreateCall) Context(ctx context.Context) *ProjectsDatabasesCreateCall {
4113 c.ctx_ = ctx
4114 return c
4115 }
4116
4117
4118
4119 func (c *ProjectsDatabasesCreateCall) Header() http.Header {
4120 if c.header_ == nil {
4121 c.header_ = make(http.Header)
4122 }
4123 return c.header_
4124 }
4125
4126 func (c *ProjectsDatabasesCreateCall) doRequest(alt string) (*http.Response, error) {
4127 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4128 var body io.Reader = nil
4129 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1database)
4130 if err != nil {
4131 return nil, err
4132 }
4133 c.urlParams_.Set("alt", alt)
4134 c.urlParams_.Set("prettyPrint", "false")
4135 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases")
4136 urls += "?" + c.urlParams_.Encode()
4137 req, err := http.NewRequest("POST", urls, body)
4138 if err != nil {
4139 return nil, err
4140 }
4141 req.Header = reqHeaders
4142 googleapi.Expand(req.URL, map[string]string{
4143 "parent": c.parent,
4144 })
4145 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4146 }
4147
4148
4149
4150
4151
4152
4153
4154 func (c *ProjectsDatabasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4155 gensupport.SetOptions(c.urlParams_, opts...)
4156 res, err := c.doRequest("json")
4157 if res != nil && res.StatusCode == http.StatusNotModified {
4158 if res.Body != nil {
4159 res.Body.Close()
4160 }
4161 return nil, gensupport.WrapError(&googleapi.Error{
4162 Code: res.StatusCode,
4163 Header: res.Header,
4164 })
4165 }
4166 if err != nil {
4167 return nil, err
4168 }
4169 defer googleapi.CloseBody(res)
4170 if err := googleapi.CheckResponse(res); err != nil {
4171 return nil, gensupport.WrapError(err)
4172 }
4173 ret := &GoogleLongrunningOperation{
4174 ServerResponse: googleapi.ServerResponse{
4175 Header: res.Header,
4176 HTTPStatusCode: res.StatusCode,
4177 },
4178 }
4179 target := &ret
4180 if err := gensupport.DecodeResponse(target, res); err != nil {
4181 return nil, err
4182 }
4183 return ret, nil
4184 }
4185
4186 type ProjectsDatabasesDeleteCall struct {
4187 s *Service
4188 name string
4189 urlParams_ gensupport.URLParams
4190 ctx_ context.Context
4191 header_ http.Header
4192 }
4193
4194
4195
4196
4197 func (r *ProjectsDatabasesService) Delete(name string) *ProjectsDatabasesDeleteCall {
4198 c := &ProjectsDatabasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4199 c.name = name
4200 return c
4201 }
4202
4203
4204
4205
4206 func (c *ProjectsDatabasesDeleteCall) Etag(etag string) *ProjectsDatabasesDeleteCall {
4207 c.urlParams_.Set("etag", etag)
4208 return c
4209 }
4210
4211
4212
4213
4214 func (c *ProjectsDatabasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDeleteCall {
4215 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4216 return c
4217 }
4218
4219
4220 func (c *ProjectsDatabasesDeleteCall) Context(ctx context.Context) *ProjectsDatabasesDeleteCall {
4221 c.ctx_ = ctx
4222 return c
4223 }
4224
4225
4226
4227 func (c *ProjectsDatabasesDeleteCall) Header() http.Header {
4228 if c.header_ == nil {
4229 c.header_ = make(http.Header)
4230 }
4231 return c.header_
4232 }
4233
4234 func (c *ProjectsDatabasesDeleteCall) doRequest(alt string) (*http.Response, error) {
4235 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4236 var body io.Reader = nil
4237 c.urlParams_.Set("alt", alt)
4238 c.urlParams_.Set("prettyPrint", "false")
4239 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4240 urls += "?" + c.urlParams_.Encode()
4241 req, err := http.NewRequest("DELETE", urls, body)
4242 if err != nil {
4243 return nil, err
4244 }
4245 req.Header = reqHeaders
4246 googleapi.Expand(req.URL, map[string]string{
4247 "name": c.name,
4248 })
4249 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4250 }
4251
4252
4253
4254
4255
4256
4257
4258 func (c *ProjectsDatabasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4259 gensupport.SetOptions(c.urlParams_, opts...)
4260 res, err := c.doRequest("json")
4261 if res != nil && res.StatusCode == http.StatusNotModified {
4262 if res.Body != nil {
4263 res.Body.Close()
4264 }
4265 return nil, gensupport.WrapError(&googleapi.Error{
4266 Code: res.StatusCode,
4267 Header: res.Header,
4268 })
4269 }
4270 if err != nil {
4271 return nil, err
4272 }
4273 defer googleapi.CloseBody(res)
4274 if err := googleapi.CheckResponse(res); err != nil {
4275 return nil, gensupport.WrapError(err)
4276 }
4277 ret := &GoogleLongrunningOperation{
4278 ServerResponse: googleapi.ServerResponse{
4279 Header: res.Header,
4280 HTTPStatusCode: res.StatusCode,
4281 },
4282 }
4283 target := &ret
4284 if err := gensupport.DecodeResponse(target, res); err != nil {
4285 return nil, err
4286 }
4287 return ret, nil
4288 }
4289
4290 type ProjectsDatabasesExportDocumentsCall struct {
4291 s *Service
4292 name string
4293 googlefirestoreadminv1exportdocumentsrequest *GoogleFirestoreAdminV1ExportDocumentsRequest
4294 urlParams_ gensupport.URLParams
4295 ctx_ context.Context
4296 header_ http.Header
4297 }
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311 func (r *ProjectsDatabasesService) ExportDocuments(name string, googlefirestoreadminv1exportdocumentsrequest *GoogleFirestoreAdminV1ExportDocumentsRequest) *ProjectsDatabasesExportDocumentsCall {
4312 c := &ProjectsDatabasesExportDocumentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4313 c.name = name
4314 c.googlefirestoreadminv1exportdocumentsrequest = googlefirestoreadminv1exportdocumentsrequest
4315 return c
4316 }
4317
4318
4319
4320
4321 func (c *ProjectsDatabasesExportDocumentsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesExportDocumentsCall {
4322 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4323 return c
4324 }
4325
4326
4327 func (c *ProjectsDatabasesExportDocumentsCall) Context(ctx context.Context) *ProjectsDatabasesExportDocumentsCall {
4328 c.ctx_ = ctx
4329 return c
4330 }
4331
4332
4333
4334 func (c *ProjectsDatabasesExportDocumentsCall) Header() http.Header {
4335 if c.header_ == nil {
4336 c.header_ = make(http.Header)
4337 }
4338 return c.header_
4339 }
4340
4341 func (c *ProjectsDatabasesExportDocumentsCall) doRequest(alt string) (*http.Response, error) {
4342 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4343 var body io.Reader = nil
4344 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1exportdocumentsrequest)
4345 if err != nil {
4346 return nil, err
4347 }
4348 c.urlParams_.Set("alt", alt)
4349 c.urlParams_.Set("prettyPrint", "false")
4350 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:exportDocuments")
4351 urls += "?" + c.urlParams_.Encode()
4352 req, err := http.NewRequest("POST", urls, body)
4353 if err != nil {
4354 return nil, err
4355 }
4356 req.Header = reqHeaders
4357 googleapi.Expand(req.URL, map[string]string{
4358 "name": c.name,
4359 })
4360 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4361 }
4362
4363
4364
4365
4366
4367
4368
4369 func (c *ProjectsDatabasesExportDocumentsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4370 gensupport.SetOptions(c.urlParams_, opts...)
4371 res, err := c.doRequest("json")
4372 if res != nil && res.StatusCode == http.StatusNotModified {
4373 if res.Body != nil {
4374 res.Body.Close()
4375 }
4376 return nil, gensupport.WrapError(&googleapi.Error{
4377 Code: res.StatusCode,
4378 Header: res.Header,
4379 })
4380 }
4381 if err != nil {
4382 return nil, err
4383 }
4384 defer googleapi.CloseBody(res)
4385 if err := googleapi.CheckResponse(res); err != nil {
4386 return nil, gensupport.WrapError(err)
4387 }
4388 ret := &GoogleLongrunningOperation{
4389 ServerResponse: googleapi.ServerResponse{
4390 Header: res.Header,
4391 HTTPStatusCode: res.StatusCode,
4392 },
4393 }
4394 target := &ret
4395 if err := gensupport.DecodeResponse(target, res); err != nil {
4396 return nil, err
4397 }
4398 return ret, nil
4399 }
4400
4401 type ProjectsDatabasesGetCall struct {
4402 s *Service
4403 name string
4404 urlParams_ gensupport.URLParams
4405 ifNoneMatch_ string
4406 ctx_ context.Context
4407 header_ http.Header
4408 }
4409
4410
4411
4412
4413 func (r *ProjectsDatabasesService) Get(name string) *ProjectsDatabasesGetCall {
4414 c := &ProjectsDatabasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4415 c.name = name
4416 return c
4417 }
4418
4419
4420
4421
4422 func (c *ProjectsDatabasesGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesGetCall {
4423 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4424 return c
4425 }
4426
4427
4428
4429
4430 func (c *ProjectsDatabasesGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesGetCall {
4431 c.ifNoneMatch_ = entityTag
4432 return c
4433 }
4434
4435
4436 func (c *ProjectsDatabasesGetCall) Context(ctx context.Context) *ProjectsDatabasesGetCall {
4437 c.ctx_ = ctx
4438 return c
4439 }
4440
4441
4442
4443 func (c *ProjectsDatabasesGetCall) Header() http.Header {
4444 if c.header_ == nil {
4445 c.header_ = make(http.Header)
4446 }
4447 return c.header_
4448 }
4449
4450 func (c *ProjectsDatabasesGetCall) doRequest(alt string) (*http.Response, error) {
4451 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4452 if c.ifNoneMatch_ != "" {
4453 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4454 }
4455 var body io.Reader = nil
4456 c.urlParams_.Set("alt", alt)
4457 c.urlParams_.Set("prettyPrint", "false")
4458 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4459 urls += "?" + c.urlParams_.Encode()
4460 req, err := http.NewRequest("GET", urls, body)
4461 if err != nil {
4462 return nil, err
4463 }
4464 req.Header = reqHeaders
4465 googleapi.Expand(req.URL, map[string]string{
4466 "name": c.name,
4467 })
4468 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4469 }
4470
4471
4472
4473
4474
4475
4476
4477 func (c *ProjectsDatabasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Database, error) {
4478 gensupport.SetOptions(c.urlParams_, opts...)
4479 res, err := c.doRequest("json")
4480 if res != nil && res.StatusCode == http.StatusNotModified {
4481 if res.Body != nil {
4482 res.Body.Close()
4483 }
4484 return nil, gensupport.WrapError(&googleapi.Error{
4485 Code: res.StatusCode,
4486 Header: res.Header,
4487 })
4488 }
4489 if err != nil {
4490 return nil, err
4491 }
4492 defer googleapi.CloseBody(res)
4493 if err := googleapi.CheckResponse(res); err != nil {
4494 return nil, gensupport.WrapError(err)
4495 }
4496 ret := &GoogleFirestoreAdminV1Database{
4497 ServerResponse: googleapi.ServerResponse{
4498 Header: res.Header,
4499 HTTPStatusCode: res.StatusCode,
4500 },
4501 }
4502 target := &ret
4503 if err := gensupport.DecodeResponse(target, res); err != nil {
4504 return nil, err
4505 }
4506 return ret, nil
4507 }
4508
4509 type ProjectsDatabasesImportDocumentsCall struct {
4510 s *Service
4511 name string
4512 googlefirestoreadminv1importdocumentsrequest *GoogleFirestoreAdminV1ImportDocumentsRequest
4513 urlParams_ gensupport.URLParams
4514 ctx_ context.Context
4515 header_ http.Header
4516 }
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527 func (r *ProjectsDatabasesService) ImportDocuments(name string, googlefirestoreadminv1importdocumentsrequest *GoogleFirestoreAdminV1ImportDocumentsRequest) *ProjectsDatabasesImportDocumentsCall {
4528 c := &ProjectsDatabasesImportDocumentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4529 c.name = name
4530 c.googlefirestoreadminv1importdocumentsrequest = googlefirestoreadminv1importdocumentsrequest
4531 return c
4532 }
4533
4534
4535
4536
4537 func (c *ProjectsDatabasesImportDocumentsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesImportDocumentsCall {
4538 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4539 return c
4540 }
4541
4542
4543 func (c *ProjectsDatabasesImportDocumentsCall) Context(ctx context.Context) *ProjectsDatabasesImportDocumentsCall {
4544 c.ctx_ = ctx
4545 return c
4546 }
4547
4548
4549
4550 func (c *ProjectsDatabasesImportDocumentsCall) Header() http.Header {
4551 if c.header_ == nil {
4552 c.header_ = make(http.Header)
4553 }
4554 return c.header_
4555 }
4556
4557 func (c *ProjectsDatabasesImportDocumentsCall) doRequest(alt string) (*http.Response, error) {
4558 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4559 var body io.Reader = nil
4560 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1importdocumentsrequest)
4561 if err != nil {
4562 return nil, err
4563 }
4564 c.urlParams_.Set("alt", alt)
4565 c.urlParams_.Set("prettyPrint", "false")
4566 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:importDocuments")
4567 urls += "?" + c.urlParams_.Encode()
4568 req, err := http.NewRequest("POST", urls, body)
4569 if err != nil {
4570 return nil, err
4571 }
4572 req.Header = reqHeaders
4573 googleapi.Expand(req.URL, map[string]string{
4574 "name": c.name,
4575 })
4576 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4577 }
4578
4579
4580
4581
4582
4583
4584
4585 func (c *ProjectsDatabasesImportDocumentsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4586 gensupport.SetOptions(c.urlParams_, opts...)
4587 res, err := c.doRequest("json")
4588 if res != nil && res.StatusCode == http.StatusNotModified {
4589 if res.Body != nil {
4590 res.Body.Close()
4591 }
4592 return nil, gensupport.WrapError(&googleapi.Error{
4593 Code: res.StatusCode,
4594 Header: res.Header,
4595 })
4596 }
4597 if err != nil {
4598 return nil, err
4599 }
4600 defer googleapi.CloseBody(res)
4601 if err := googleapi.CheckResponse(res); err != nil {
4602 return nil, gensupport.WrapError(err)
4603 }
4604 ret := &GoogleLongrunningOperation{
4605 ServerResponse: googleapi.ServerResponse{
4606 Header: res.Header,
4607 HTTPStatusCode: res.StatusCode,
4608 },
4609 }
4610 target := &ret
4611 if err := gensupport.DecodeResponse(target, res); err != nil {
4612 return nil, err
4613 }
4614 return ret, nil
4615 }
4616
4617 type ProjectsDatabasesListCall struct {
4618 s *Service
4619 parent string
4620 urlParams_ gensupport.URLParams
4621 ifNoneMatch_ string
4622 ctx_ context.Context
4623 header_ http.Header
4624 }
4625
4626
4627
4628
4629 func (r *ProjectsDatabasesService) List(parent string) *ProjectsDatabasesListCall {
4630 c := &ProjectsDatabasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4631 c.parent = parent
4632 return c
4633 }
4634
4635
4636
4637 func (c *ProjectsDatabasesListCall) ShowDeleted(showDeleted bool) *ProjectsDatabasesListCall {
4638 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
4639 return c
4640 }
4641
4642
4643
4644
4645 func (c *ProjectsDatabasesListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesListCall {
4646 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4647 return c
4648 }
4649
4650
4651
4652
4653 func (c *ProjectsDatabasesListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesListCall {
4654 c.ifNoneMatch_ = entityTag
4655 return c
4656 }
4657
4658
4659 func (c *ProjectsDatabasesListCall) Context(ctx context.Context) *ProjectsDatabasesListCall {
4660 c.ctx_ = ctx
4661 return c
4662 }
4663
4664
4665
4666 func (c *ProjectsDatabasesListCall) Header() http.Header {
4667 if c.header_ == nil {
4668 c.header_ = make(http.Header)
4669 }
4670 return c.header_
4671 }
4672
4673 func (c *ProjectsDatabasesListCall) doRequest(alt string) (*http.Response, error) {
4674 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4675 if c.ifNoneMatch_ != "" {
4676 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4677 }
4678 var body io.Reader = nil
4679 c.urlParams_.Set("alt", alt)
4680 c.urlParams_.Set("prettyPrint", "false")
4681 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases")
4682 urls += "?" + c.urlParams_.Encode()
4683 req, err := http.NewRequest("GET", urls, body)
4684 if err != nil {
4685 return nil, err
4686 }
4687 req.Header = reqHeaders
4688 googleapi.Expand(req.URL, map[string]string{
4689 "parent": c.parent,
4690 })
4691 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4692 }
4693
4694
4695
4696
4697
4698
4699
4700 func (c *ProjectsDatabasesListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListDatabasesResponse, error) {
4701 gensupport.SetOptions(c.urlParams_, opts...)
4702 res, err := c.doRequest("json")
4703 if res != nil && res.StatusCode == http.StatusNotModified {
4704 if res.Body != nil {
4705 res.Body.Close()
4706 }
4707 return nil, gensupport.WrapError(&googleapi.Error{
4708 Code: res.StatusCode,
4709 Header: res.Header,
4710 })
4711 }
4712 if err != nil {
4713 return nil, err
4714 }
4715 defer googleapi.CloseBody(res)
4716 if err := googleapi.CheckResponse(res); err != nil {
4717 return nil, gensupport.WrapError(err)
4718 }
4719 ret := &GoogleFirestoreAdminV1ListDatabasesResponse{
4720 ServerResponse: googleapi.ServerResponse{
4721 Header: res.Header,
4722 HTTPStatusCode: res.StatusCode,
4723 },
4724 }
4725 target := &ret
4726 if err := gensupport.DecodeResponse(target, res); err != nil {
4727 return nil, err
4728 }
4729 return ret, nil
4730 }
4731
4732 type ProjectsDatabasesPatchCall struct {
4733 s *Service
4734 name string
4735 googlefirestoreadminv1database *GoogleFirestoreAdminV1Database
4736 urlParams_ gensupport.URLParams
4737 ctx_ context.Context
4738 header_ http.Header
4739 }
4740
4741
4742
4743
4744
4745 func (r *ProjectsDatabasesService) Patch(name string, googlefirestoreadminv1database *GoogleFirestoreAdminV1Database) *ProjectsDatabasesPatchCall {
4746 c := &ProjectsDatabasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4747 c.name = name
4748 c.googlefirestoreadminv1database = googlefirestoreadminv1database
4749 return c
4750 }
4751
4752
4753
4754 func (c *ProjectsDatabasesPatchCall) UpdateMask(updateMask string) *ProjectsDatabasesPatchCall {
4755 c.urlParams_.Set("updateMask", updateMask)
4756 return c
4757 }
4758
4759
4760
4761
4762 func (c *ProjectsDatabasesPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesPatchCall {
4763 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4764 return c
4765 }
4766
4767
4768 func (c *ProjectsDatabasesPatchCall) Context(ctx context.Context) *ProjectsDatabasesPatchCall {
4769 c.ctx_ = ctx
4770 return c
4771 }
4772
4773
4774
4775 func (c *ProjectsDatabasesPatchCall) Header() http.Header {
4776 if c.header_ == nil {
4777 c.header_ = make(http.Header)
4778 }
4779 return c.header_
4780 }
4781
4782 func (c *ProjectsDatabasesPatchCall) doRequest(alt string) (*http.Response, error) {
4783 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4784 var body io.Reader = nil
4785 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1database)
4786 if err != nil {
4787 return nil, err
4788 }
4789 c.urlParams_.Set("alt", alt)
4790 c.urlParams_.Set("prettyPrint", "false")
4791 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4792 urls += "?" + c.urlParams_.Encode()
4793 req, err := http.NewRequest("PATCH", urls, body)
4794 if err != nil {
4795 return nil, err
4796 }
4797 req.Header = reqHeaders
4798 googleapi.Expand(req.URL, map[string]string{
4799 "name": c.name,
4800 })
4801 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4802 }
4803
4804
4805
4806
4807
4808
4809
4810 func (c *ProjectsDatabasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4811 gensupport.SetOptions(c.urlParams_, opts...)
4812 res, err := c.doRequest("json")
4813 if res != nil && res.StatusCode == http.StatusNotModified {
4814 if res.Body != nil {
4815 res.Body.Close()
4816 }
4817 return nil, gensupport.WrapError(&googleapi.Error{
4818 Code: res.StatusCode,
4819 Header: res.Header,
4820 })
4821 }
4822 if err != nil {
4823 return nil, err
4824 }
4825 defer googleapi.CloseBody(res)
4826 if err := googleapi.CheckResponse(res); err != nil {
4827 return nil, gensupport.WrapError(err)
4828 }
4829 ret := &GoogleLongrunningOperation{
4830 ServerResponse: googleapi.ServerResponse{
4831 Header: res.Header,
4832 HTTPStatusCode: res.StatusCode,
4833 },
4834 }
4835 target := &ret
4836 if err := gensupport.DecodeResponse(target, res); err != nil {
4837 return nil, err
4838 }
4839 return ret, nil
4840 }
4841
4842 type ProjectsDatabasesRestoreCall struct {
4843 s *Service
4844 parent string
4845 googlefirestoreadminv1restoredatabaserequest *GoogleFirestoreAdminV1RestoreDatabaseRequest
4846 urlParams_ gensupport.URLParams
4847 ctx_ context.Context
4848 header_ http.Header
4849 }
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864 func (r *ProjectsDatabasesService) Restore(parent string, googlefirestoreadminv1restoredatabaserequest *GoogleFirestoreAdminV1RestoreDatabaseRequest) *ProjectsDatabasesRestoreCall {
4865 c := &ProjectsDatabasesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4866 c.parent = parent
4867 c.googlefirestoreadminv1restoredatabaserequest = googlefirestoreadminv1restoredatabaserequest
4868 return c
4869 }
4870
4871
4872
4873
4874 func (c *ProjectsDatabasesRestoreCall) Fields(s ...googleapi.Field) *ProjectsDatabasesRestoreCall {
4875 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4876 return c
4877 }
4878
4879
4880 func (c *ProjectsDatabasesRestoreCall) Context(ctx context.Context) *ProjectsDatabasesRestoreCall {
4881 c.ctx_ = ctx
4882 return c
4883 }
4884
4885
4886
4887 func (c *ProjectsDatabasesRestoreCall) Header() http.Header {
4888 if c.header_ == nil {
4889 c.header_ = make(http.Header)
4890 }
4891 return c.header_
4892 }
4893
4894 func (c *ProjectsDatabasesRestoreCall) doRequest(alt string) (*http.Response, error) {
4895 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4896 var body io.Reader = nil
4897 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1restoredatabaserequest)
4898 if err != nil {
4899 return nil, err
4900 }
4901 c.urlParams_.Set("alt", alt)
4902 c.urlParams_.Set("prettyPrint", "false")
4903 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases:restore")
4904 urls += "?" + c.urlParams_.Encode()
4905 req, err := http.NewRequest("POST", urls, body)
4906 if err != nil {
4907 return nil, err
4908 }
4909 req.Header = reqHeaders
4910 googleapi.Expand(req.URL, map[string]string{
4911 "parent": c.parent,
4912 })
4913 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4914 }
4915
4916
4917
4918
4919
4920
4921
4922 func (c *ProjectsDatabasesRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4923 gensupport.SetOptions(c.urlParams_, opts...)
4924 res, err := c.doRequest("json")
4925 if res != nil && res.StatusCode == http.StatusNotModified {
4926 if res.Body != nil {
4927 res.Body.Close()
4928 }
4929 return nil, gensupport.WrapError(&googleapi.Error{
4930 Code: res.StatusCode,
4931 Header: res.Header,
4932 })
4933 }
4934 if err != nil {
4935 return nil, err
4936 }
4937 defer googleapi.CloseBody(res)
4938 if err := googleapi.CheckResponse(res); err != nil {
4939 return nil, gensupport.WrapError(err)
4940 }
4941 ret := &GoogleLongrunningOperation{
4942 ServerResponse: googleapi.ServerResponse{
4943 Header: res.Header,
4944 HTTPStatusCode: res.StatusCode,
4945 },
4946 }
4947 target := &ret
4948 if err := gensupport.DecodeResponse(target, res); err != nil {
4949 return nil, err
4950 }
4951 return ret, nil
4952 }
4953
4954 type ProjectsDatabasesBackupSchedulesCreateCall struct {
4955 s *Service
4956 parent string
4957 googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule
4958 urlParams_ gensupport.URLParams
4959 ctx_ context.Context
4960 header_ http.Header
4961 }
4962
4963
4964
4965
4966
4967
4968
4969 func (r *ProjectsDatabasesBackupSchedulesService) Create(parent string, googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule) *ProjectsDatabasesBackupSchedulesCreateCall {
4970 c := &ProjectsDatabasesBackupSchedulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4971 c.parent = parent
4972 c.googlefirestoreadminv1backupschedule = googlefirestoreadminv1backupschedule
4973 return c
4974 }
4975
4976
4977
4978
4979 func (c *ProjectsDatabasesBackupSchedulesCreateCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesCreateCall {
4980 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4981 return c
4982 }
4983
4984
4985 func (c *ProjectsDatabasesBackupSchedulesCreateCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesCreateCall {
4986 c.ctx_ = ctx
4987 return c
4988 }
4989
4990
4991
4992 func (c *ProjectsDatabasesBackupSchedulesCreateCall) Header() http.Header {
4993 if c.header_ == nil {
4994 c.header_ = make(http.Header)
4995 }
4996 return c.header_
4997 }
4998
4999 func (c *ProjectsDatabasesBackupSchedulesCreateCall) doRequest(alt string) (*http.Response, error) {
5000 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5001 var body io.Reader = nil
5002 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1backupschedule)
5003 if err != nil {
5004 return nil, err
5005 }
5006 c.urlParams_.Set("alt", alt)
5007 c.urlParams_.Set("prettyPrint", "false")
5008 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupSchedules")
5009 urls += "?" + c.urlParams_.Encode()
5010 req, err := http.NewRequest("POST", urls, body)
5011 if err != nil {
5012 return nil, err
5013 }
5014 req.Header = reqHeaders
5015 googleapi.Expand(req.URL, map[string]string{
5016 "parent": c.parent,
5017 })
5018 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5019 }
5020
5021
5022
5023
5024
5025
5026
5027 func (c *ProjectsDatabasesBackupSchedulesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1BackupSchedule, error) {
5028 gensupport.SetOptions(c.urlParams_, opts...)
5029 res, err := c.doRequest("json")
5030 if res != nil && res.StatusCode == http.StatusNotModified {
5031 if res.Body != nil {
5032 res.Body.Close()
5033 }
5034 return nil, gensupport.WrapError(&googleapi.Error{
5035 Code: res.StatusCode,
5036 Header: res.Header,
5037 })
5038 }
5039 if err != nil {
5040 return nil, err
5041 }
5042 defer googleapi.CloseBody(res)
5043 if err := googleapi.CheckResponse(res); err != nil {
5044 return nil, gensupport.WrapError(err)
5045 }
5046 ret := &GoogleFirestoreAdminV1BackupSchedule{
5047 ServerResponse: googleapi.ServerResponse{
5048 Header: res.Header,
5049 HTTPStatusCode: res.StatusCode,
5050 },
5051 }
5052 target := &ret
5053 if err := gensupport.DecodeResponse(target, res); err != nil {
5054 return nil, err
5055 }
5056 return ret, nil
5057 }
5058
5059 type ProjectsDatabasesBackupSchedulesDeleteCall struct {
5060 s *Service
5061 name string
5062 urlParams_ gensupport.URLParams
5063 ctx_ context.Context
5064 header_ http.Header
5065 }
5066
5067
5068
5069
5070
5071 func (r *ProjectsDatabasesBackupSchedulesService) Delete(name string) *ProjectsDatabasesBackupSchedulesDeleteCall {
5072 c := &ProjectsDatabasesBackupSchedulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5073 c.name = name
5074 return c
5075 }
5076
5077
5078
5079
5080 func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesDeleteCall {
5081 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5082 return c
5083 }
5084
5085
5086 func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesDeleteCall {
5087 c.ctx_ = ctx
5088 return c
5089 }
5090
5091
5092
5093 func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Header() http.Header {
5094 if c.header_ == nil {
5095 c.header_ = make(http.Header)
5096 }
5097 return c.header_
5098 }
5099
5100 func (c *ProjectsDatabasesBackupSchedulesDeleteCall) doRequest(alt string) (*http.Response, error) {
5101 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5102 var body io.Reader = nil
5103 c.urlParams_.Set("alt", alt)
5104 c.urlParams_.Set("prettyPrint", "false")
5105 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5106 urls += "?" + c.urlParams_.Encode()
5107 req, err := http.NewRequest("DELETE", urls, body)
5108 if err != nil {
5109 return nil, err
5110 }
5111 req.Header = reqHeaders
5112 googleapi.Expand(req.URL, map[string]string{
5113 "name": c.name,
5114 })
5115 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5116 }
5117
5118
5119
5120
5121
5122
5123 func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5124 gensupport.SetOptions(c.urlParams_, opts...)
5125 res, err := c.doRequest("json")
5126 if res != nil && res.StatusCode == http.StatusNotModified {
5127 if res.Body != nil {
5128 res.Body.Close()
5129 }
5130 return nil, gensupport.WrapError(&googleapi.Error{
5131 Code: res.StatusCode,
5132 Header: res.Header,
5133 })
5134 }
5135 if err != nil {
5136 return nil, err
5137 }
5138 defer googleapi.CloseBody(res)
5139 if err := googleapi.CheckResponse(res); err != nil {
5140 return nil, gensupport.WrapError(err)
5141 }
5142 ret := &Empty{
5143 ServerResponse: googleapi.ServerResponse{
5144 Header: res.Header,
5145 HTTPStatusCode: res.StatusCode,
5146 },
5147 }
5148 target := &ret
5149 if err := gensupport.DecodeResponse(target, res); err != nil {
5150 return nil, err
5151 }
5152 return ret, nil
5153 }
5154
5155 type ProjectsDatabasesBackupSchedulesGetCall struct {
5156 s *Service
5157 name string
5158 urlParams_ gensupport.URLParams
5159 ifNoneMatch_ string
5160 ctx_ context.Context
5161 header_ http.Header
5162 }
5163
5164
5165
5166
5167
5168 func (r *ProjectsDatabasesBackupSchedulesService) Get(name string) *ProjectsDatabasesBackupSchedulesGetCall {
5169 c := &ProjectsDatabasesBackupSchedulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5170 c.name = name
5171 return c
5172 }
5173
5174
5175
5176
5177 func (c *ProjectsDatabasesBackupSchedulesGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesGetCall {
5178 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5179 return c
5180 }
5181
5182
5183
5184
5185 func (c *ProjectsDatabasesBackupSchedulesGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesBackupSchedulesGetCall {
5186 c.ifNoneMatch_ = entityTag
5187 return c
5188 }
5189
5190
5191 func (c *ProjectsDatabasesBackupSchedulesGetCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesGetCall {
5192 c.ctx_ = ctx
5193 return c
5194 }
5195
5196
5197
5198 func (c *ProjectsDatabasesBackupSchedulesGetCall) Header() http.Header {
5199 if c.header_ == nil {
5200 c.header_ = make(http.Header)
5201 }
5202 return c.header_
5203 }
5204
5205 func (c *ProjectsDatabasesBackupSchedulesGetCall) doRequest(alt string) (*http.Response, error) {
5206 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5207 if c.ifNoneMatch_ != "" {
5208 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5209 }
5210 var body io.Reader = nil
5211 c.urlParams_.Set("alt", alt)
5212 c.urlParams_.Set("prettyPrint", "false")
5213 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5214 urls += "?" + c.urlParams_.Encode()
5215 req, err := http.NewRequest("GET", urls, body)
5216 if err != nil {
5217 return nil, err
5218 }
5219 req.Header = reqHeaders
5220 googleapi.Expand(req.URL, map[string]string{
5221 "name": c.name,
5222 })
5223 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5224 }
5225
5226
5227
5228
5229
5230
5231
5232 func (c *ProjectsDatabasesBackupSchedulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1BackupSchedule, error) {
5233 gensupport.SetOptions(c.urlParams_, opts...)
5234 res, err := c.doRequest("json")
5235 if res != nil && res.StatusCode == http.StatusNotModified {
5236 if res.Body != nil {
5237 res.Body.Close()
5238 }
5239 return nil, gensupport.WrapError(&googleapi.Error{
5240 Code: res.StatusCode,
5241 Header: res.Header,
5242 })
5243 }
5244 if err != nil {
5245 return nil, err
5246 }
5247 defer googleapi.CloseBody(res)
5248 if err := googleapi.CheckResponse(res); err != nil {
5249 return nil, gensupport.WrapError(err)
5250 }
5251 ret := &GoogleFirestoreAdminV1BackupSchedule{
5252 ServerResponse: googleapi.ServerResponse{
5253 Header: res.Header,
5254 HTTPStatusCode: res.StatusCode,
5255 },
5256 }
5257 target := &ret
5258 if err := gensupport.DecodeResponse(target, res); err != nil {
5259 return nil, err
5260 }
5261 return ret, nil
5262 }
5263
5264 type ProjectsDatabasesBackupSchedulesListCall struct {
5265 s *Service
5266 parent string
5267 urlParams_ gensupport.URLParams
5268 ifNoneMatch_ string
5269 ctx_ context.Context
5270 header_ http.Header
5271 }
5272
5273
5274
5275
5276
5277 func (r *ProjectsDatabasesBackupSchedulesService) List(parent string) *ProjectsDatabasesBackupSchedulesListCall {
5278 c := &ProjectsDatabasesBackupSchedulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5279 c.parent = parent
5280 return c
5281 }
5282
5283
5284
5285
5286 func (c *ProjectsDatabasesBackupSchedulesListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesListCall {
5287 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5288 return c
5289 }
5290
5291
5292
5293
5294 func (c *ProjectsDatabasesBackupSchedulesListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesBackupSchedulesListCall {
5295 c.ifNoneMatch_ = entityTag
5296 return c
5297 }
5298
5299
5300 func (c *ProjectsDatabasesBackupSchedulesListCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesListCall {
5301 c.ctx_ = ctx
5302 return c
5303 }
5304
5305
5306
5307 func (c *ProjectsDatabasesBackupSchedulesListCall) Header() http.Header {
5308 if c.header_ == nil {
5309 c.header_ = make(http.Header)
5310 }
5311 return c.header_
5312 }
5313
5314 func (c *ProjectsDatabasesBackupSchedulesListCall) doRequest(alt string) (*http.Response, error) {
5315 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5316 if c.ifNoneMatch_ != "" {
5317 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5318 }
5319 var body io.Reader = nil
5320 c.urlParams_.Set("alt", alt)
5321 c.urlParams_.Set("prettyPrint", "false")
5322 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupSchedules")
5323 urls += "?" + c.urlParams_.Encode()
5324 req, err := http.NewRequest("GET", urls, body)
5325 if err != nil {
5326 return nil, err
5327 }
5328 req.Header = reqHeaders
5329 googleapi.Expand(req.URL, map[string]string{
5330 "parent": c.parent,
5331 })
5332 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5333 }
5334
5335
5336
5337
5338
5339
5340
5341 func (c *ProjectsDatabasesBackupSchedulesListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListBackupSchedulesResponse, error) {
5342 gensupport.SetOptions(c.urlParams_, opts...)
5343 res, err := c.doRequest("json")
5344 if res != nil && res.StatusCode == http.StatusNotModified {
5345 if res.Body != nil {
5346 res.Body.Close()
5347 }
5348 return nil, gensupport.WrapError(&googleapi.Error{
5349 Code: res.StatusCode,
5350 Header: res.Header,
5351 })
5352 }
5353 if err != nil {
5354 return nil, err
5355 }
5356 defer googleapi.CloseBody(res)
5357 if err := googleapi.CheckResponse(res); err != nil {
5358 return nil, gensupport.WrapError(err)
5359 }
5360 ret := &GoogleFirestoreAdminV1ListBackupSchedulesResponse{
5361 ServerResponse: googleapi.ServerResponse{
5362 Header: res.Header,
5363 HTTPStatusCode: res.StatusCode,
5364 },
5365 }
5366 target := &ret
5367 if err := gensupport.DecodeResponse(target, res); err != nil {
5368 return nil, err
5369 }
5370 return ret, nil
5371 }
5372
5373 type ProjectsDatabasesBackupSchedulesPatchCall struct {
5374 s *Service
5375 nameid string
5376 googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule
5377 urlParams_ gensupport.URLParams
5378 ctx_ context.Context
5379 header_ http.Header
5380 }
5381
5382
5383
5384
5385
5386
5387
5388 func (r *ProjectsDatabasesBackupSchedulesService) Patch(nameid string, googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule) *ProjectsDatabasesBackupSchedulesPatchCall {
5389 c := &ProjectsDatabasesBackupSchedulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5390 c.nameid = nameid
5391 c.googlefirestoreadminv1backupschedule = googlefirestoreadminv1backupschedule
5392 return c
5393 }
5394
5395
5396
5397 func (c *ProjectsDatabasesBackupSchedulesPatchCall) UpdateMask(updateMask string) *ProjectsDatabasesBackupSchedulesPatchCall {
5398 c.urlParams_.Set("updateMask", updateMask)
5399 return c
5400 }
5401
5402
5403
5404
5405 func (c *ProjectsDatabasesBackupSchedulesPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesPatchCall {
5406 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5407 return c
5408 }
5409
5410
5411 func (c *ProjectsDatabasesBackupSchedulesPatchCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesPatchCall {
5412 c.ctx_ = ctx
5413 return c
5414 }
5415
5416
5417
5418 func (c *ProjectsDatabasesBackupSchedulesPatchCall) Header() http.Header {
5419 if c.header_ == nil {
5420 c.header_ = make(http.Header)
5421 }
5422 return c.header_
5423 }
5424
5425 func (c *ProjectsDatabasesBackupSchedulesPatchCall) doRequest(alt string) (*http.Response, error) {
5426 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5427 var body io.Reader = nil
5428 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1backupschedule)
5429 if err != nil {
5430 return nil, err
5431 }
5432 c.urlParams_.Set("alt", alt)
5433 c.urlParams_.Set("prettyPrint", "false")
5434 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5435 urls += "?" + c.urlParams_.Encode()
5436 req, err := http.NewRequest("PATCH", urls, body)
5437 if err != nil {
5438 return nil, err
5439 }
5440 req.Header = reqHeaders
5441 googleapi.Expand(req.URL, map[string]string{
5442 "name": c.nameid,
5443 })
5444 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5445 }
5446
5447
5448
5449
5450
5451
5452
5453 func (c *ProjectsDatabasesBackupSchedulesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1BackupSchedule, error) {
5454 gensupport.SetOptions(c.urlParams_, opts...)
5455 res, err := c.doRequest("json")
5456 if res != nil && res.StatusCode == http.StatusNotModified {
5457 if res.Body != nil {
5458 res.Body.Close()
5459 }
5460 return nil, gensupport.WrapError(&googleapi.Error{
5461 Code: res.StatusCode,
5462 Header: res.Header,
5463 })
5464 }
5465 if err != nil {
5466 return nil, err
5467 }
5468 defer googleapi.CloseBody(res)
5469 if err := googleapi.CheckResponse(res); err != nil {
5470 return nil, gensupport.WrapError(err)
5471 }
5472 ret := &GoogleFirestoreAdminV1BackupSchedule{
5473 ServerResponse: googleapi.ServerResponse{
5474 Header: res.Header,
5475 HTTPStatusCode: res.StatusCode,
5476 },
5477 }
5478 target := &ret
5479 if err := gensupport.DecodeResponse(target, res); err != nil {
5480 return nil, err
5481 }
5482 return ret, nil
5483 }
5484
5485 type ProjectsDatabasesCollectionGroupsFieldsGetCall struct {
5486 s *Service
5487 name string
5488 urlParams_ gensupport.URLParams
5489 ifNoneMatch_ string
5490 ctx_ context.Context
5491 header_ http.Header
5492 }
5493
5494
5495
5496
5497
5498
5499 func (r *ProjectsDatabasesCollectionGroupsFieldsService) Get(name string) *ProjectsDatabasesCollectionGroupsFieldsGetCall {
5500 c := &ProjectsDatabasesCollectionGroupsFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5501 c.name = name
5502 return c
5503 }
5504
5505
5506
5507
5508 func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsGetCall {
5509 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5510 return c
5511 }
5512
5513
5514
5515
5516 func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsFieldsGetCall {
5517 c.ifNoneMatch_ = entityTag
5518 return c
5519 }
5520
5521
5522 func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsGetCall {
5523 c.ctx_ = ctx
5524 return c
5525 }
5526
5527
5528
5529 func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Header() http.Header {
5530 if c.header_ == nil {
5531 c.header_ = make(http.Header)
5532 }
5533 return c.header_
5534 }
5535
5536 func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) doRequest(alt string) (*http.Response, error) {
5537 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5538 if c.ifNoneMatch_ != "" {
5539 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5540 }
5541 var body io.Reader = nil
5542 c.urlParams_.Set("alt", alt)
5543 c.urlParams_.Set("prettyPrint", "false")
5544 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5545 urls += "?" + c.urlParams_.Encode()
5546 req, err := http.NewRequest("GET", urls, body)
5547 if err != nil {
5548 return nil, err
5549 }
5550 req.Header = reqHeaders
5551 googleapi.Expand(req.URL, map[string]string{
5552 "name": c.name,
5553 })
5554 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5555 }
5556
5557
5558
5559
5560
5561
5562
5563 func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Field, error) {
5564 gensupport.SetOptions(c.urlParams_, opts...)
5565 res, err := c.doRequest("json")
5566 if res != nil && res.StatusCode == http.StatusNotModified {
5567 if res.Body != nil {
5568 res.Body.Close()
5569 }
5570 return nil, gensupport.WrapError(&googleapi.Error{
5571 Code: res.StatusCode,
5572 Header: res.Header,
5573 })
5574 }
5575 if err != nil {
5576 return nil, err
5577 }
5578 defer googleapi.CloseBody(res)
5579 if err := googleapi.CheckResponse(res); err != nil {
5580 return nil, gensupport.WrapError(err)
5581 }
5582 ret := &GoogleFirestoreAdminV1Field{
5583 ServerResponse: googleapi.ServerResponse{
5584 Header: res.Header,
5585 HTTPStatusCode: res.StatusCode,
5586 },
5587 }
5588 target := &ret
5589 if err := gensupport.DecodeResponse(target, res); err != nil {
5590 return nil, err
5591 }
5592 return ret, nil
5593 }
5594
5595 type ProjectsDatabasesCollectionGroupsFieldsListCall struct {
5596 s *Service
5597 parent string
5598 urlParams_ gensupport.URLParams
5599 ifNoneMatch_ string
5600 ctx_ context.Context
5601 header_ http.Header
5602 }
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613 func (r *ProjectsDatabasesCollectionGroupsFieldsService) List(parent string) *ProjectsDatabasesCollectionGroupsFieldsListCall {
5614 c := &ProjectsDatabasesCollectionGroupsFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5615 c.parent = parent
5616 return c
5617 }
5618
5619
5620
5621
5622
5623
5624 func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Filter(filter string) *ProjectsDatabasesCollectionGroupsFieldsListCall {
5625 c.urlParams_.Set("filter", filter)
5626 return c
5627 }
5628
5629
5630
5631 func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) PageSize(pageSize int64) *ProjectsDatabasesCollectionGroupsFieldsListCall {
5632 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5633 return c
5634 }
5635
5636
5637
5638
5639 func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) PageToken(pageToken string) *ProjectsDatabasesCollectionGroupsFieldsListCall {
5640 c.urlParams_.Set("pageToken", pageToken)
5641 return c
5642 }
5643
5644
5645
5646
5647 func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsListCall {
5648 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5649 return c
5650 }
5651
5652
5653
5654
5655 func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsFieldsListCall {
5656 c.ifNoneMatch_ = entityTag
5657 return c
5658 }
5659
5660
5661 func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsListCall {
5662 c.ctx_ = ctx
5663 return c
5664 }
5665
5666
5667
5668 func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Header() http.Header {
5669 if c.header_ == nil {
5670 c.header_ = make(http.Header)
5671 }
5672 return c.header_
5673 }
5674
5675 func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) doRequest(alt string) (*http.Response, error) {
5676 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5677 if c.ifNoneMatch_ != "" {
5678 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5679 }
5680 var body io.Reader = nil
5681 c.urlParams_.Set("alt", alt)
5682 c.urlParams_.Set("prettyPrint", "false")
5683 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fields")
5684 urls += "?" + c.urlParams_.Encode()
5685 req, err := http.NewRequest("GET", urls, body)
5686 if err != nil {
5687 return nil, err
5688 }
5689 req.Header = reqHeaders
5690 googleapi.Expand(req.URL, map[string]string{
5691 "parent": c.parent,
5692 })
5693 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5694 }
5695
5696
5697
5698
5699
5700
5701
5702 func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListFieldsResponse, error) {
5703 gensupport.SetOptions(c.urlParams_, opts...)
5704 res, err := c.doRequest("json")
5705 if res != nil && res.StatusCode == http.StatusNotModified {
5706 if res.Body != nil {
5707 res.Body.Close()
5708 }
5709 return nil, gensupport.WrapError(&googleapi.Error{
5710 Code: res.StatusCode,
5711 Header: res.Header,
5712 })
5713 }
5714 if err != nil {
5715 return nil, err
5716 }
5717 defer googleapi.CloseBody(res)
5718 if err := googleapi.CheckResponse(res); err != nil {
5719 return nil, gensupport.WrapError(err)
5720 }
5721 ret := &GoogleFirestoreAdminV1ListFieldsResponse{
5722 ServerResponse: googleapi.ServerResponse{
5723 Header: res.Header,
5724 HTTPStatusCode: res.StatusCode,
5725 },
5726 }
5727 target := &ret
5728 if err := gensupport.DecodeResponse(target, res); err != nil {
5729 return nil, err
5730 }
5731 return ret, nil
5732 }
5733
5734
5735
5736
5737 func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Pages(ctx context.Context, f func(*GoogleFirestoreAdminV1ListFieldsResponse) error) error {
5738 c.ctx_ = ctx
5739 defer c.PageToken(c.urlParams_.Get("pageToken"))
5740 for {
5741 x, err := c.Do()
5742 if err != nil {
5743 return err
5744 }
5745 if err := f(x); err != nil {
5746 return err
5747 }
5748 if x.NextPageToken == "" {
5749 return nil
5750 }
5751 c.PageToken(x.NextPageToken)
5752 }
5753 }
5754
5755 type ProjectsDatabasesCollectionGroupsFieldsPatchCall struct {
5756 s *Service
5757 name string
5758 googlefirestoreadminv1field *GoogleFirestoreAdminV1Field
5759 urlParams_ gensupport.URLParams
5760 ctx_ context.Context
5761 header_ http.Header
5762 }
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795 func (r *ProjectsDatabasesCollectionGroupsFieldsService) Patch(name string, googlefirestoreadminv1field *GoogleFirestoreAdminV1Field) *ProjectsDatabasesCollectionGroupsFieldsPatchCall {
5796 c := &ProjectsDatabasesCollectionGroupsFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5797 c.name = name
5798 c.googlefirestoreadminv1field = googlefirestoreadminv1field
5799 return c
5800 }
5801
5802
5803
5804
5805 func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) UpdateMask(updateMask string) *ProjectsDatabasesCollectionGroupsFieldsPatchCall {
5806 c.urlParams_.Set("updateMask", updateMask)
5807 return c
5808 }
5809
5810
5811
5812
5813 func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsPatchCall {
5814 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5815 return c
5816 }
5817
5818
5819 func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsPatchCall {
5820 c.ctx_ = ctx
5821 return c
5822 }
5823
5824
5825
5826 func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Header() http.Header {
5827 if c.header_ == nil {
5828 c.header_ = make(http.Header)
5829 }
5830 return c.header_
5831 }
5832
5833 func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
5834 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5835 var body io.Reader = nil
5836 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1field)
5837 if err != nil {
5838 return nil, err
5839 }
5840 c.urlParams_.Set("alt", alt)
5841 c.urlParams_.Set("prettyPrint", "false")
5842 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5843 urls += "?" + c.urlParams_.Encode()
5844 req, err := http.NewRequest("PATCH", urls, body)
5845 if err != nil {
5846 return nil, err
5847 }
5848 req.Header = reqHeaders
5849 googleapi.Expand(req.URL, map[string]string{
5850 "name": c.name,
5851 })
5852 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5853 }
5854
5855
5856
5857
5858
5859
5860
5861 func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
5862 gensupport.SetOptions(c.urlParams_, opts...)
5863 res, err := c.doRequest("json")
5864 if res != nil && res.StatusCode == http.StatusNotModified {
5865 if res.Body != nil {
5866 res.Body.Close()
5867 }
5868 return nil, gensupport.WrapError(&googleapi.Error{
5869 Code: res.StatusCode,
5870 Header: res.Header,
5871 })
5872 }
5873 if err != nil {
5874 return nil, err
5875 }
5876 defer googleapi.CloseBody(res)
5877 if err := googleapi.CheckResponse(res); err != nil {
5878 return nil, gensupport.WrapError(err)
5879 }
5880 ret := &GoogleLongrunningOperation{
5881 ServerResponse: googleapi.ServerResponse{
5882 Header: res.Header,
5883 HTTPStatusCode: res.StatusCode,
5884 },
5885 }
5886 target := &ret
5887 if err := gensupport.DecodeResponse(target, res); err != nil {
5888 return nil, err
5889 }
5890 return ret, nil
5891 }
5892
5893 type ProjectsDatabasesCollectionGroupsIndexesCreateCall struct {
5894 s *Service
5895 parent string
5896 googlefirestoreadminv1index *GoogleFirestoreAdminV1Index
5897 urlParams_ gensupport.URLParams
5898 ctx_ context.Context
5899 header_ http.Header
5900 }
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910 func (r *ProjectsDatabasesCollectionGroupsIndexesService) Create(parent string, googlefirestoreadminv1index *GoogleFirestoreAdminV1Index) *ProjectsDatabasesCollectionGroupsIndexesCreateCall {
5911 c := &ProjectsDatabasesCollectionGroupsIndexesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5912 c.parent = parent
5913 c.googlefirestoreadminv1index = googlefirestoreadminv1index
5914 return c
5915 }
5916
5917
5918
5919
5920 func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesCreateCall {
5921 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5922 return c
5923 }
5924
5925
5926 func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesCreateCall {
5927 c.ctx_ = ctx
5928 return c
5929 }
5930
5931
5932
5933 func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Header() http.Header {
5934 if c.header_ == nil {
5935 c.header_ = make(http.Header)
5936 }
5937 return c.header_
5938 }
5939
5940 func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) doRequest(alt string) (*http.Response, error) {
5941 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5942 var body io.Reader = nil
5943 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1index)
5944 if err != nil {
5945 return nil, err
5946 }
5947 c.urlParams_.Set("alt", alt)
5948 c.urlParams_.Set("prettyPrint", "false")
5949 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes")
5950 urls += "?" + c.urlParams_.Encode()
5951 req, err := http.NewRequest("POST", urls, body)
5952 if err != nil {
5953 return nil, err
5954 }
5955 req.Header = reqHeaders
5956 googleapi.Expand(req.URL, map[string]string{
5957 "parent": c.parent,
5958 })
5959 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5960 }
5961
5962
5963
5964
5965
5966
5967
5968 func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
5969 gensupport.SetOptions(c.urlParams_, opts...)
5970 res, err := c.doRequest("json")
5971 if res != nil && res.StatusCode == http.StatusNotModified {
5972 if res.Body != nil {
5973 res.Body.Close()
5974 }
5975 return nil, gensupport.WrapError(&googleapi.Error{
5976 Code: res.StatusCode,
5977 Header: res.Header,
5978 })
5979 }
5980 if err != nil {
5981 return nil, err
5982 }
5983 defer googleapi.CloseBody(res)
5984 if err := googleapi.CheckResponse(res); err != nil {
5985 return nil, gensupport.WrapError(err)
5986 }
5987 ret := &GoogleLongrunningOperation{
5988 ServerResponse: googleapi.ServerResponse{
5989 Header: res.Header,
5990 HTTPStatusCode: res.StatusCode,
5991 },
5992 }
5993 target := &ret
5994 if err := gensupport.DecodeResponse(target, res); err != nil {
5995 return nil, err
5996 }
5997 return ret, nil
5998 }
5999
6000 type ProjectsDatabasesCollectionGroupsIndexesDeleteCall struct {
6001 s *Service
6002 name string
6003 urlParams_ gensupport.URLParams
6004 ctx_ context.Context
6005 header_ http.Header
6006 }
6007
6008
6009
6010
6011
6012
6013 func (r *ProjectsDatabasesCollectionGroupsIndexesService) Delete(name string) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall {
6014 c := &ProjectsDatabasesCollectionGroupsIndexesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6015 c.name = name
6016 return c
6017 }
6018
6019
6020
6021
6022 func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall {
6023 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6024 return c
6025 }
6026
6027
6028 func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall {
6029 c.ctx_ = ctx
6030 return c
6031 }
6032
6033
6034
6035 func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Header() http.Header {
6036 if c.header_ == nil {
6037 c.header_ = make(http.Header)
6038 }
6039 return c.header_
6040 }
6041
6042 func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) doRequest(alt string) (*http.Response, error) {
6043 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6044 var body io.Reader = nil
6045 c.urlParams_.Set("alt", alt)
6046 c.urlParams_.Set("prettyPrint", "false")
6047 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6048 urls += "?" + c.urlParams_.Encode()
6049 req, err := http.NewRequest("DELETE", urls, body)
6050 if err != nil {
6051 return nil, err
6052 }
6053 req.Header = reqHeaders
6054 googleapi.Expand(req.URL, map[string]string{
6055 "name": c.name,
6056 })
6057 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6058 }
6059
6060
6061
6062
6063
6064
6065 func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6066 gensupport.SetOptions(c.urlParams_, opts...)
6067 res, err := c.doRequest("json")
6068 if res != nil && res.StatusCode == http.StatusNotModified {
6069 if res.Body != nil {
6070 res.Body.Close()
6071 }
6072 return nil, gensupport.WrapError(&googleapi.Error{
6073 Code: res.StatusCode,
6074 Header: res.Header,
6075 })
6076 }
6077 if err != nil {
6078 return nil, err
6079 }
6080 defer googleapi.CloseBody(res)
6081 if err := googleapi.CheckResponse(res); err != nil {
6082 return nil, gensupport.WrapError(err)
6083 }
6084 ret := &Empty{
6085 ServerResponse: googleapi.ServerResponse{
6086 Header: res.Header,
6087 HTTPStatusCode: res.StatusCode,
6088 },
6089 }
6090 target := &ret
6091 if err := gensupport.DecodeResponse(target, res); err != nil {
6092 return nil, err
6093 }
6094 return ret, nil
6095 }
6096
6097 type ProjectsDatabasesCollectionGroupsIndexesGetCall struct {
6098 s *Service
6099 name string
6100 urlParams_ gensupport.URLParams
6101 ifNoneMatch_ string
6102 ctx_ context.Context
6103 header_ http.Header
6104 }
6105
6106
6107
6108
6109
6110
6111 func (r *ProjectsDatabasesCollectionGroupsIndexesService) Get(name string) *ProjectsDatabasesCollectionGroupsIndexesGetCall {
6112 c := &ProjectsDatabasesCollectionGroupsIndexesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6113 c.name = name
6114 return c
6115 }
6116
6117
6118
6119
6120 func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesGetCall {
6121 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6122 return c
6123 }
6124
6125
6126
6127
6128 func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsIndexesGetCall {
6129 c.ifNoneMatch_ = entityTag
6130 return c
6131 }
6132
6133
6134 func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesGetCall {
6135 c.ctx_ = ctx
6136 return c
6137 }
6138
6139
6140
6141 func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Header() http.Header {
6142 if c.header_ == nil {
6143 c.header_ = make(http.Header)
6144 }
6145 return c.header_
6146 }
6147
6148 func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) doRequest(alt string) (*http.Response, error) {
6149 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6150 if c.ifNoneMatch_ != "" {
6151 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6152 }
6153 var body io.Reader = nil
6154 c.urlParams_.Set("alt", alt)
6155 c.urlParams_.Set("prettyPrint", "false")
6156 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6157 urls += "?" + c.urlParams_.Encode()
6158 req, err := http.NewRequest("GET", urls, body)
6159 if err != nil {
6160 return nil, err
6161 }
6162 req.Header = reqHeaders
6163 googleapi.Expand(req.URL, map[string]string{
6164 "name": c.name,
6165 })
6166 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6167 }
6168
6169
6170
6171
6172
6173
6174
6175 func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Index, error) {
6176 gensupport.SetOptions(c.urlParams_, opts...)
6177 res, err := c.doRequest("json")
6178 if res != nil && res.StatusCode == http.StatusNotModified {
6179 if res.Body != nil {
6180 res.Body.Close()
6181 }
6182 return nil, gensupport.WrapError(&googleapi.Error{
6183 Code: res.StatusCode,
6184 Header: res.Header,
6185 })
6186 }
6187 if err != nil {
6188 return nil, err
6189 }
6190 defer googleapi.CloseBody(res)
6191 if err := googleapi.CheckResponse(res); err != nil {
6192 return nil, gensupport.WrapError(err)
6193 }
6194 ret := &GoogleFirestoreAdminV1Index{
6195 ServerResponse: googleapi.ServerResponse{
6196 Header: res.Header,
6197 HTTPStatusCode: res.StatusCode,
6198 },
6199 }
6200 target := &ret
6201 if err := gensupport.DecodeResponse(target, res); err != nil {
6202 return nil, err
6203 }
6204 return ret, nil
6205 }
6206
6207 type ProjectsDatabasesCollectionGroupsIndexesListCall struct {
6208 s *Service
6209 parent string
6210 urlParams_ gensupport.URLParams
6211 ifNoneMatch_ string
6212 ctx_ context.Context
6213 header_ http.Header
6214 }
6215
6216
6217
6218
6219
6220
6221 func (r *ProjectsDatabasesCollectionGroupsIndexesService) List(parent string) *ProjectsDatabasesCollectionGroupsIndexesListCall {
6222 c := &ProjectsDatabasesCollectionGroupsIndexesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6223 c.parent = parent
6224 return c
6225 }
6226
6227
6228
6229 func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Filter(filter string) *ProjectsDatabasesCollectionGroupsIndexesListCall {
6230 c.urlParams_.Set("filter", filter)
6231 return c
6232 }
6233
6234
6235
6236 func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) PageSize(pageSize int64) *ProjectsDatabasesCollectionGroupsIndexesListCall {
6237 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6238 return c
6239 }
6240
6241
6242
6243
6244 func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) PageToken(pageToken string) *ProjectsDatabasesCollectionGroupsIndexesListCall {
6245 c.urlParams_.Set("pageToken", pageToken)
6246 return c
6247 }
6248
6249
6250
6251
6252 func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesListCall {
6253 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6254 return c
6255 }
6256
6257
6258
6259
6260 func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsIndexesListCall {
6261 c.ifNoneMatch_ = entityTag
6262 return c
6263 }
6264
6265
6266 func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesListCall {
6267 c.ctx_ = ctx
6268 return c
6269 }
6270
6271
6272
6273 func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Header() http.Header {
6274 if c.header_ == nil {
6275 c.header_ = make(http.Header)
6276 }
6277 return c.header_
6278 }
6279
6280 func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) doRequest(alt string) (*http.Response, error) {
6281 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6282 if c.ifNoneMatch_ != "" {
6283 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6284 }
6285 var body io.Reader = nil
6286 c.urlParams_.Set("alt", alt)
6287 c.urlParams_.Set("prettyPrint", "false")
6288 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes")
6289 urls += "?" + c.urlParams_.Encode()
6290 req, err := http.NewRequest("GET", urls, body)
6291 if err != nil {
6292 return nil, err
6293 }
6294 req.Header = reqHeaders
6295 googleapi.Expand(req.URL, map[string]string{
6296 "parent": c.parent,
6297 })
6298 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6299 }
6300
6301
6302
6303
6304
6305
6306
6307 func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListIndexesResponse, error) {
6308 gensupport.SetOptions(c.urlParams_, opts...)
6309 res, err := c.doRequest("json")
6310 if res != nil && res.StatusCode == http.StatusNotModified {
6311 if res.Body != nil {
6312 res.Body.Close()
6313 }
6314 return nil, gensupport.WrapError(&googleapi.Error{
6315 Code: res.StatusCode,
6316 Header: res.Header,
6317 })
6318 }
6319 if err != nil {
6320 return nil, err
6321 }
6322 defer googleapi.CloseBody(res)
6323 if err := googleapi.CheckResponse(res); err != nil {
6324 return nil, gensupport.WrapError(err)
6325 }
6326 ret := &GoogleFirestoreAdminV1ListIndexesResponse{
6327 ServerResponse: googleapi.ServerResponse{
6328 Header: res.Header,
6329 HTTPStatusCode: res.StatusCode,
6330 },
6331 }
6332 target := &ret
6333 if err := gensupport.DecodeResponse(target, res); err != nil {
6334 return nil, err
6335 }
6336 return ret, nil
6337 }
6338
6339
6340
6341
6342 func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Pages(ctx context.Context, f func(*GoogleFirestoreAdminV1ListIndexesResponse) error) error {
6343 c.ctx_ = ctx
6344 defer c.PageToken(c.urlParams_.Get("pageToken"))
6345 for {
6346 x, err := c.Do()
6347 if err != nil {
6348 return err
6349 }
6350 if err := f(x); err != nil {
6351 return err
6352 }
6353 if x.NextPageToken == "" {
6354 return nil
6355 }
6356 c.PageToken(x.NextPageToken)
6357 }
6358 }
6359
6360 type ProjectsDatabasesDocumentsBatchGetCall struct {
6361 s *Service
6362 database string
6363 batchgetdocumentsrequest *BatchGetDocumentsRequest
6364 urlParams_ gensupport.URLParams
6365 ctx_ context.Context
6366 header_ http.Header
6367 }
6368
6369
6370
6371
6372
6373
6374 func (r *ProjectsDatabasesDocumentsService) BatchGet(database string, batchgetdocumentsrequest *BatchGetDocumentsRequest) *ProjectsDatabasesDocumentsBatchGetCall {
6375 c := &ProjectsDatabasesDocumentsBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6376 c.database = database
6377 c.batchgetdocumentsrequest = batchgetdocumentsrequest
6378 return c
6379 }
6380
6381
6382
6383
6384 func (c *ProjectsDatabasesDocumentsBatchGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBatchGetCall {
6385 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6386 return c
6387 }
6388
6389
6390 func (c *ProjectsDatabasesDocumentsBatchGetCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBatchGetCall {
6391 c.ctx_ = ctx
6392 return c
6393 }
6394
6395
6396
6397 func (c *ProjectsDatabasesDocumentsBatchGetCall) Header() http.Header {
6398 if c.header_ == nil {
6399 c.header_ = make(http.Header)
6400 }
6401 return c.header_
6402 }
6403
6404 func (c *ProjectsDatabasesDocumentsBatchGetCall) doRequest(alt string) (*http.Response, error) {
6405 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6406 var body io.Reader = nil
6407 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchgetdocumentsrequest)
6408 if err != nil {
6409 return nil, err
6410 }
6411 c.urlParams_.Set("alt", alt)
6412 c.urlParams_.Set("prettyPrint", "false")
6413 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:batchGet")
6414 urls += "?" + c.urlParams_.Encode()
6415 req, err := http.NewRequest("POST", urls, body)
6416 if err != nil {
6417 return nil, err
6418 }
6419 req.Header = reqHeaders
6420 googleapi.Expand(req.URL, map[string]string{
6421 "database": c.database,
6422 })
6423 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6424 }
6425
6426
6427
6428
6429
6430
6431
6432 func (c *ProjectsDatabasesDocumentsBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetDocumentsResponse, error) {
6433 gensupport.SetOptions(c.urlParams_, opts...)
6434 res, err := c.doRequest("json")
6435 if res != nil && res.StatusCode == http.StatusNotModified {
6436 if res.Body != nil {
6437 res.Body.Close()
6438 }
6439 return nil, gensupport.WrapError(&googleapi.Error{
6440 Code: res.StatusCode,
6441 Header: res.Header,
6442 })
6443 }
6444 if err != nil {
6445 return nil, err
6446 }
6447 defer googleapi.CloseBody(res)
6448 if err := googleapi.CheckResponse(res); err != nil {
6449 return nil, gensupport.WrapError(err)
6450 }
6451 ret := &BatchGetDocumentsResponse{
6452 ServerResponse: googleapi.ServerResponse{
6453 Header: res.Header,
6454 HTTPStatusCode: res.StatusCode,
6455 },
6456 }
6457 target := &ret
6458 if err := gensupport.DecodeResponse(target, res); err != nil {
6459 return nil, err
6460 }
6461 return ret, nil
6462 }
6463
6464 type ProjectsDatabasesDocumentsBatchWriteCall struct {
6465 s *Service
6466 database string
6467 batchwriterequest *BatchWriteRequest
6468 urlParams_ gensupport.URLParams
6469 ctx_ context.Context
6470 header_ http.Header
6471 }
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482 func (r *ProjectsDatabasesDocumentsService) BatchWrite(database string, batchwriterequest *BatchWriteRequest) *ProjectsDatabasesDocumentsBatchWriteCall {
6483 c := &ProjectsDatabasesDocumentsBatchWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6484 c.database = database
6485 c.batchwriterequest = batchwriterequest
6486 return c
6487 }
6488
6489
6490
6491
6492 func (c *ProjectsDatabasesDocumentsBatchWriteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBatchWriteCall {
6493 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6494 return c
6495 }
6496
6497
6498 func (c *ProjectsDatabasesDocumentsBatchWriteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBatchWriteCall {
6499 c.ctx_ = ctx
6500 return c
6501 }
6502
6503
6504
6505 func (c *ProjectsDatabasesDocumentsBatchWriteCall) Header() http.Header {
6506 if c.header_ == nil {
6507 c.header_ = make(http.Header)
6508 }
6509 return c.header_
6510 }
6511
6512 func (c *ProjectsDatabasesDocumentsBatchWriteCall) doRequest(alt string) (*http.Response, error) {
6513 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6514 var body io.Reader = nil
6515 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchwriterequest)
6516 if err != nil {
6517 return nil, err
6518 }
6519 c.urlParams_.Set("alt", alt)
6520 c.urlParams_.Set("prettyPrint", "false")
6521 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:batchWrite")
6522 urls += "?" + c.urlParams_.Encode()
6523 req, err := http.NewRequest("POST", urls, body)
6524 if err != nil {
6525 return nil, err
6526 }
6527 req.Header = reqHeaders
6528 googleapi.Expand(req.URL, map[string]string{
6529 "database": c.database,
6530 })
6531 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6532 }
6533
6534
6535
6536
6537
6538
6539
6540 func (c *ProjectsDatabasesDocumentsBatchWriteCall) Do(opts ...googleapi.CallOption) (*BatchWriteResponse, error) {
6541 gensupport.SetOptions(c.urlParams_, opts...)
6542 res, err := c.doRequest("json")
6543 if res != nil && res.StatusCode == http.StatusNotModified {
6544 if res.Body != nil {
6545 res.Body.Close()
6546 }
6547 return nil, gensupport.WrapError(&googleapi.Error{
6548 Code: res.StatusCode,
6549 Header: res.Header,
6550 })
6551 }
6552 if err != nil {
6553 return nil, err
6554 }
6555 defer googleapi.CloseBody(res)
6556 if err := googleapi.CheckResponse(res); err != nil {
6557 return nil, gensupport.WrapError(err)
6558 }
6559 ret := &BatchWriteResponse{
6560 ServerResponse: googleapi.ServerResponse{
6561 Header: res.Header,
6562 HTTPStatusCode: res.StatusCode,
6563 },
6564 }
6565 target := &ret
6566 if err := gensupport.DecodeResponse(target, res); err != nil {
6567 return nil, err
6568 }
6569 return ret, nil
6570 }
6571
6572 type ProjectsDatabasesDocumentsBeginTransactionCall struct {
6573 s *Service
6574 database string
6575 begintransactionrequest *BeginTransactionRequest
6576 urlParams_ gensupport.URLParams
6577 ctx_ context.Context
6578 header_ http.Header
6579 }
6580
6581
6582
6583
6584
6585 func (r *ProjectsDatabasesDocumentsService) BeginTransaction(database string, begintransactionrequest *BeginTransactionRequest) *ProjectsDatabasesDocumentsBeginTransactionCall {
6586 c := &ProjectsDatabasesDocumentsBeginTransactionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6587 c.database = database
6588 c.begintransactionrequest = begintransactionrequest
6589 return c
6590 }
6591
6592
6593
6594
6595 func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBeginTransactionCall {
6596 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6597 return c
6598 }
6599
6600
6601 func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBeginTransactionCall {
6602 c.ctx_ = ctx
6603 return c
6604 }
6605
6606
6607
6608 func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Header() http.Header {
6609 if c.header_ == nil {
6610 c.header_ = make(http.Header)
6611 }
6612 return c.header_
6613 }
6614
6615 func (c *ProjectsDatabasesDocumentsBeginTransactionCall) doRequest(alt string) (*http.Response, error) {
6616 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6617 var body io.Reader = nil
6618 body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest)
6619 if err != nil {
6620 return nil, err
6621 }
6622 c.urlParams_.Set("alt", alt)
6623 c.urlParams_.Set("prettyPrint", "false")
6624 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:beginTransaction")
6625 urls += "?" + c.urlParams_.Encode()
6626 req, err := http.NewRequest("POST", urls, body)
6627 if err != nil {
6628 return nil, err
6629 }
6630 req.Header = reqHeaders
6631 googleapi.Expand(req.URL, map[string]string{
6632 "database": c.database,
6633 })
6634 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6635 }
6636
6637
6638
6639
6640
6641
6642
6643 func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*BeginTransactionResponse, error) {
6644 gensupport.SetOptions(c.urlParams_, opts...)
6645 res, err := c.doRequest("json")
6646 if res != nil && res.StatusCode == http.StatusNotModified {
6647 if res.Body != nil {
6648 res.Body.Close()
6649 }
6650 return nil, gensupport.WrapError(&googleapi.Error{
6651 Code: res.StatusCode,
6652 Header: res.Header,
6653 })
6654 }
6655 if err != nil {
6656 return nil, err
6657 }
6658 defer googleapi.CloseBody(res)
6659 if err := googleapi.CheckResponse(res); err != nil {
6660 return nil, gensupport.WrapError(err)
6661 }
6662 ret := &BeginTransactionResponse{
6663 ServerResponse: googleapi.ServerResponse{
6664 Header: res.Header,
6665 HTTPStatusCode: res.StatusCode,
6666 },
6667 }
6668 target := &ret
6669 if err := gensupport.DecodeResponse(target, res); err != nil {
6670 return nil, err
6671 }
6672 return ret, nil
6673 }
6674
6675 type ProjectsDatabasesDocumentsCommitCall struct {
6676 s *Service
6677 database string
6678 commitrequest *CommitRequest
6679 urlParams_ gensupport.URLParams
6680 ctx_ context.Context
6681 header_ http.Header
6682 }
6683
6684
6685
6686
6687
6688 func (r *ProjectsDatabasesDocumentsService) Commit(database string, commitrequest *CommitRequest) *ProjectsDatabasesDocumentsCommitCall {
6689 c := &ProjectsDatabasesDocumentsCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6690 c.database = database
6691 c.commitrequest = commitrequest
6692 return c
6693 }
6694
6695
6696
6697
6698 func (c *ProjectsDatabasesDocumentsCommitCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsCommitCall {
6699 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6700 return c
6701 }
6702
6703
6704 func (c *ProjectsDatabasesDocumentsCommitCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsCommitCall {
6705 c.ctx_ = ctx
6706 return c
6707 }
6708
6709
6710
6711 func (c *ProjectsDatabasesDocumentsCommitCall) Header() http.Header {
6712 if c.header_ == nil {
6713 c.header_ = make(http.Header)
6714 }
6715 return c.header_
6716 }
6717
6718 func (c *ProjectsDatabasesDocumentsCommitCall) doRequest(alt string) (*http.Response, error) {
6719 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6720 var body io.Reader = nil
6721 body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest)
6722 if err != nil {
6723 return nil, err
6724 }
6725 c.urlParams_.Set("alt", alt)
6726 c.urlParams_.Set("prettyPrint", "false")
6727 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:commit")
6728 urls += "?" + c.urlParams_.Encode()
6729 req, err := http.NewRequest("POST", urls, body)
6730 if err != nil {
6731 return nil, err
6732 }
6733 req.Header = reqHeaders
6734 googleapi.Expand(req.URL, map[string]string{
6735 "database": c.database,
6736 })
6737 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6738 }
6739
6740
6741
6742
6743
6744
6745 func (c *ProjectsDatabasesDocumentsCommitCall) Do(opts ...googleapi.CallOption) (*CommitResponse, error) {
6746 gensupport.SetOptions(c.urlParams_, opts...)
6747 res, err := c.doRequest("json")
6748 if res != nil && res.StatusCode == http.StatusNotModified {
6749 if res.Body != nil {
6750 res.Body.Close()
6751 }
6752 return nil, gensupport.WrapError(&googleapi.Error{
6753 Code: res.StatusCode,
6754 Header: res.Header,
6755 })
6756 }
6757 if err != nil {
6758 return nil, err
6759 }
6760 defer googleapi.CloseBody(res)
6761 if err := googleapi.CheckResponse(res); err != nil {
6762 return nil, gensupport.WrapError(err)
6763 }
6764 ret := &CommitResponse{
6765 ServerResponse: googleapi.ServerResponse{
6766 Header: res.Header,
6767 HTTPStatusCode: res.StatusCode,
6768 },
6769 }
6770 target := &ret
6771 if err := gensupport.DecodeResponse(target, res); err != nil {
6772 return nil, err
6773 }
6774 return ret, nil
6775 }
6776
6777 type ProjectsDatabasesDocumentsCreateDocumentCall struct {
6778 s *Service
6779 parent string
6780 collectionId string
6781 document *Document
6782 urlParams_ gensupport.URLParams
6783 ctx_ context.Context
6784 header_ http.Header
6785 }
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795 func (r *ProjectsDatabasesDocumentsService) CreateDocument(parent string, collectionId string, document *Document) *ProjectsDatabasesDocumentsCreateDocumentCall {
6796 c := &ProjectsDatabasesDocumentsCreateDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6797 c.parent = parent
6798 c.collectionId = collectionId
6799 c.document = document
6800 return c
6801 }
6802
6803
6804
6805
6806 func (c *ProjectsDatabasesDocumentsCreateDocumentCall) DocumentId(documentId string) *ProjectsDatabasesDocumentsCreateDocumentCall {
6807 c.urlParams_.Set("documentId", documentId)
6808 return c
6809 }
6810
6811
6812
6813
6814 func (c *ProjectsDatabasesDocumentsCreateDocumentCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsCreateDocumentCall {
6815 c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
6816 return c
6817 }
6818
6819
6820
6821
6822 func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsCreateDocumentCall {
6823 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6824 return c
6825 }
6826
6827
6828 func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsCreateDocumentCall {
6829 c.ctx_ = ctx
6830 return c
6831 }
6832
6833
6834
6835 func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Header() http.Header {
6836 if c.header_ == nil {
6837 c.header_ = make(http.Header)
6838 }
6839 return c.header_
6840 }
6841
6842 func (c *ProjectsDatabasesDocumentsCreateDocumentCall) doRequest(alt string) (*http.Response, error) {
6843 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6844 var body io.Reader = nil
6845 body, err := googleapi.WithoutDataWrapper.JSONReader(c.document)
6846 if err != nil {
6847 return nil, err
6848 }
6849 c.urlParams_.Set("alt", alt)
6850 c.urlParams_.Set("prettyPrint", "false")
6851 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/{collectionId}")
6852 urls += "?" + c.urlParams_.Encode()
6853 req, err := http.NewRequest("POST", urls, body)
6854 if err != nil {
6855 return nil, err
6856 }
6857 req.Header = reqHeaders
6858 googleapi.Expand(req.URL, map[string]string{
6859 "parent": c.parent,
6860 "collectionId": c.collectionId,
6861 })
6862 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6863 }
6864
6865
6866
6867
6868
6869
6870 func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Do(opts ...googleapi.CallOption) (*Document, error) {
6871 gensupport.SetOptions(c.urlParams_, opts...)
6872 res, err := c.doRequest("json")
6873 if res != nil && res.StatusCode == http.StatusNotModified {
6874 if res.Body != nil {
6875 res.Body.Close()
6876 }
6877 return nil, gensupport.WrapError(&googleapi.Error{
6878 Code: res.StatusCode,
6879 Header: res.Header,
6880 })
6881 }
6882 if err != nil {
6883 return nil, err
6884 }
6885 defer googleapi.CloseBody(res)
6886 if err := googleapi.CheckResponse(res); err != nil {
6887 return nil, gensupport.WrapError(err)
6888 }
6889 ret := &Document{
6890 ServerResponse: googleapi.ServerResponse{
6891 Header: res.Header,
6892 HTTPStatusCode: res.StatusCode,
6893 },
6894 }
6895 target := &ret
6896 if err := gensupport.DecodeResponse(target, res); err != nil {
6897 return nil, err
6898 }
6899 return ret, nil
6900 }
6901
6902 type ProjectsDatabasesDocumentsDeleteCall struct {
6903 s *Service
6904 name string
6905 urlParams_ gensupport.URLParams
6906 ctx_ context.Context
6907 header_ http.Header
6908 }
6909
6910
6911
6912
6913
6914 func (r *ProjectsDatabasesDocumentsService) Delete(name string) *ProjectsDatabasesDocumentsDeleteCall {
6915 c := &ProjectsDatabasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6916 c.name = name
6917 return c
6918 }
6919
6920
6921
6922
6923 func (c *ProjectsDatabasesDocumentsDeleteCall) CurrentDocumentExists(currentDocumentExists bool) *ProjectsDatabasesDocumentsDeleteCall {
6924 c.urlParams_.Set("currentDocument.exists", fmt.Sprint(currentDocumentExists))
6925 return c
6926 }
6927
6928
6929
6930
6931 func (c *ProjectsDatabasesDocumentsDeleteCall) CurrentDocumentUpdateTime(currentDocumentUpdateTime string) *ProjectsDatabasesDocumentsDeleteCall {
6932 c.urlParams_.Set("currentDocument.updateTime", currentDocumentUpdateTime)
6933 return c
6934 }
6935
6936
6937
6938
6939 func (c *ProjectsDatabasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsDeleteCall {
6940 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6941 return c
6942 }
6943
6944
6945 func (c *ProjectsDatabasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsDeleteCall {
6946 c.ctx_ = ctx
6947 return c
6948 }
6949
6950
6951
6952 func (c *ProjectsDatabasesDocumentsDeleteCall) Header() http.Header {
6953 if c.header_ == nil {
6954 c.header_ = make(http.Header)
6955 }
6956 return c.header_
6957 }
6958
6959 func (c *ProjectsDatabasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) {
6960 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6961 var body io.Reader = nil
6962 c.urlParams_.Set("alt", alt)
6963 c.urlParams_.Set("prettyPrint", "false")
6964 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6965 urls += "?" + c.urlParams_.Encode()
6966 req, err := http.NewRequest("DELETE", urls, body)
6967 if err != nil {
6968 return nil, err
6969 }
6970 req.Header = reqHeaders
6971 googleapi.Expand(req.URL, map[string]string{
6972 "name": c.name,
6973 })
6974 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6975 }
6976
6977
6978
6979
6980
6981
6982 func (c *ProjectsDatabasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6983 gensupport.SetOptions(c.urlParams_, opts...)
6984 res, err := c.doRequest("json")
6985 if res != nil && res.StatusCode == http.StatusNotModified {
6986 if res.Body != nil {
6987 res.Body.Close()
6988 }
6989 return nil, gensupport.WrapError(&googleapi.Error{
6990 Code: res.StatusCode,
6991 Header: res.Header,
6992 })
6993 }
6994 if err != nil {
6995 return nil, err
6996 }
6997 defer googleapi.CloseBody(res)
6998 if err := googleapi.CheckResponse(res); err != nil {
6999 return nil, gensupport.WrapError(err)
7000 }
7001 ret := &Empty{
7002 ServerResponse: googleapi.ServerResponse{
7003 Header: res.Header,
7004 HTTPStatusCode: res.StatusCode,
7005 },
7006 }
7007 target := &ret
7008 if err := gensupport.DecodeResponse(target, res); err != nil {
7009 return nil, err
7010 }
7011 return ret, nil
7012 }
7013
7014 type ProjectsDatabasesDocumentsGetCall struct {
7015 s *Service
7016 name string
7017 urlParams_ gensupport.URLParams
7018 ifNoneMatch_ string
7019 ctx_ context.Context
7020 header_ http.Header
7021 }
7022
7023
7024
7025
7026
7027 func (r *ProjectsDatabasesDocumentsService) Get(name string) *ProjectsDatabasesDocumentsGetCall {
7028 c := &ProjectsDatabasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7029 c.name = name
7030 return c
7031 }
7032
7033
7034
7035
7036 func (c *ProjectsDatabasesDocumentsGetCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsGetCall {
7037 c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
7038 return c
7039 }
7040
7041
7042
7043
7044
7045 func (c *ProjectsDatabasesDocumentsGetCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsGetCall {
7046 c.urlParams_.Set("readTime", readTime)
7047 return c
7048 }
7049
7050
7051
7052 func (c *ProjectsDatabasesDocumentsGetCall) Transaction(transaction string) *ProjectsDatabasesDocumentsGetCall {
7053 c.urlParams_.Set("transaction", transaction)
7054 return c
7055 }
7056
7057
7058
7059
7060 func (c *ProjectsDatabasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsGetCall {
7061 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7062 return c
7063 }
7064
7065
7066
7067
7068 func (c *ProjectsDatabasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsGetCall {
7069 c.ifNoneMatch_ = entityTag
7070 return c
7071 }
7072
7073
7074 func (c *ProjectsDatabasesDocumentsGetCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsGetCall {
7075 c.ctx_ = ctx
7076 return c
7077 }
7078
7079
7080
7081 func (c *ProjectsDatabasesDocumentsGetCall) Header() http.Header {
7082 if c.header_ == nil {
7083 c.header_ = make(http.Header)
7084 }
7085 return c.header_
7086 }
7087
7088 func (c *ProjectsDatabasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
7089 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7090 if c.ifNoneMatch_ != "" {
7091 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7092 }
7093 var body io.Reader = nil
7094 c.urlParams_.Set("alt", alt)
7095 c.urlParams_.Set("prettyPrint", "false")
7096 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7097 urls += "?" + c.urlParams_.Encode()
7098 req, err := http.NewRequest("GET", urls, body)
7099 if err != nil {
7100 return nil, err
7101 }
7102 req.Header = reqHeaders
7103 googleapi.Expand(req.URL, map[string]string{
7104 "name": c.name,
7105 })
7106 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7107 }
7108
7109
7110
7111
7112
7113
7114 func (c *ProjectsDatabasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*Document, error) {
7115 gensupport.SetOptions(c.urlParams_, opts...)
7116 res, err := c.doRequest("json")
7117 if res != nil && res.StatusCode == http.StatusNotModified {
7118 if res.Body != nil {
7119 res.Body.Close()
7120 }
7121 return nil, gensupport.WrapError(&googleapi.Error{
7122 Code: res.StatusCode,
7123 Header: res.Header,
7124 })
7125 }
7126 if err != nil {
7127 return nil, err
7128 }
7129 defer googleapi.CloseBody(res)
7130 if err := googleapi.CheckResponse(res); err != nil {
7131 return nil, gensupport.WrapError(err)
7132 }
7133 ret := &Document{
7134 ServerResponse: googleapi.ServerResponse{
7135 Header: res.Header,
7136 HTTPStatusCode: res.StatusCode,
7137 },
7138 }
7139 target := &ret
7140 if err := gensupport.DecodeResponse(target, res); err != nil {
7141 return nil, err
7142 }
7143 return ret, nil
7144 }
7145
7146 type ProjectsDatabasesDocumentsListCall struct {
7147 s *Service
7148 parent string
7149 collectionId string
7150 urlParams_ gensupport.URLParams
7151 ifNoneMatch_ string
7152 ctx_ context.Context
7153 header_ http.Header
7154 }
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167 func (r *ProjectsDatabasesDocumentsService) List(parent string, collectionId string) *ProjectsDatabasesDocumentsListCall {
7168 c := &ProjectsDatabasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7169 c.parent = parent
7170 c.collectionId = collectionId
7171 return c
7172 }
7173
7174
7175
7176
7177 func (c *ProjectsDatabasesDocumentsListCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsListCall {
7178 c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
7179 return c
7180 }
7181
7182
7183
7184
7185
7186 func (c *ProjectsDatabasesDocumentsListCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListCall {
7187 c.urlParams_.Set("orderBy", orderBy)
7188 return c
7189 }
7190
7191
7192
7193
7194 func (c *ProjectsDatabasesDocumentsListCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListCall {
7195 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7196 return c
7197 }
7198
7199
7200
7201
7202
7203
7204 func (c *ProjectsDatabasesDocumentsListCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListCall {
7205 c.urlParams_.Set("pageToken", pageToken)
7206 return c
7207 }
7208
7209
7210
7211
7212
7213 func (c *ProjectsDatabasesDocumentsListCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListCall {
7214 c.urlParams_.Set("readTime", readTime)
7215 return c
7216 }
7217
7218
7219
7220
7221
7222
7223
7224 func (c *ProjectsDatabasesDocumentsListCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListCall {
7225 c.urlParams_.Set("showMissing", fmt.Sprint(showMissing))
7226 return c
7227 }
7228
7229
7230
7231 func (c *ProjectsDatabasesDocumentsListCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListCall {
7232 c.urlParams_.Set("transaction", transaction)
7233 return c
7234 }
7235
7236
7237
7238
7239 func (c *ProjectsDatabasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListCall {
7240 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7241 return c
7242 }
7243
7244
7245
7246
7247 func (c *ProjectsDatabasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsListCall {
7248 c.ifNoneMatch_ = entityTag
7249 return c
7250 }
7251
7252
7253 func (c *ProjectsDatabasesDocumentsListCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListCall {
7254 c.ctx_ = ctx
7255 return c
7256 }
7257
7258
7259
7260 func (c *ProjectsDatabasesDocumentsListCall) Header() http.Header {
7261 if c.header_ == nil {
7262 c.header_ = make(http.Header)
7263 }
7264 return c.header_
7265 }
7266
7267 func (c *ProjectsDatabasesDocumentsListCall) doRequest(alt string) (*http.Response, error) {
7268 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7269 if c.ifNoneMatch_ != "" {
7270 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7271 }
7272 var body io.Reader = nil
7273 c.urlParams_.Set("alt", alt)
7274 c.urlParams_.Set("prettyPrint", "false")
7275 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/{collectionId}")
7276 urls += "?" + c.urlParams_.Encode()
7277 req, err := http.NewRequest("GET", urls, body)
7278 if err != nil {
7279 return nil, err
7280 }
7281 req.Header = reqHeaders
7282 googleapi.Expand(req.URL, map[string]string{
7283 "parent": c.parent,
7284 "collectionId": c.collectionId,
7285 })
7286 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7287 }
7288
7289
7290
7291
7292
7293
7294
7295 func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*ListDocumentsResponse, error) {
7296 gensupport.SetOptions(c.urlParams_, opts...)
7297 res, err := c.doRequest("json")
7298 if res != nil && res.StatusCode == http.StatusNotModified {
7299 if res.Body != nil {
7300 res.Body.Close()
7301 }
7302 return nil, gensupport.WrapError(&googleapi.Error{
7303 Code: res.StatusCode,
7304 Header: res.Header,
7305 })
7306 }
7307 if err != nil {
7308 return nil, err
7309 }
7310 defer googleapi.CloseBody(res)
7311 if err := googleapi.CheckResponse(res); err != nil {
7312 return nil, gensupport.WrapError(err)
7313 }
7314 ret := &ListDocumentsResponse{
7315 ServerResponse: googleapi.ServerResponse{
7316 Header: res.Header,
7317 HTTPStatusCode: res.StatusCode,
7318 },
7319 }
7320 target := &ret
7321 if err := gensupport.DecodeResponse(target, res); err != nil {
7322 return nil, err
7323 }
7324 return ret, nil
7325 }
7326
7327
7328
7329
7330 func (c *ProjectsDatabasesDocumentsListCall) Pages(ctx context.Context, f func(*ListDocumentsResponse) error) error {
7331 c.ctx_ = ctx
7332 defer c.PageToken(c.urlParams_.Get("pageToken"))
7333 for {
7334 x, err := c.Do()
7335 if err != nil {
7336 return err
7337 }
7338 if err := f(x); err != nil {
7339 return err
7340 }
7341 if x.NextPageToken == "" {
7342 return nil
7343 }
7344 c.PageToken(x.NextPageToken)
7345 }
7346 }
7347
7348 type ProjectsDatabasesDocumentsListCollectionIdsCall struct {
7349 s *Service
7350 parent string
7351 listcollectionidsrequest *ListCollectionIdsRequest
7352 urlParams_ gensupport.URLParams
7353 ctx_ context.Context
7354 header_ http.Header
7355 }
7356
7357
7358
7359
7360
7361
7362
7363 func (r *ProjectsDatabasesDocumentsService) ListCollectionIds(parent string, listcollectionidsrequest *ListCollectionIdsRequest) *ProjectsDatabasesDocumentsListCollectionIdsCall {
7364 c := &ProjectsDatabasesDocumentsListCollectionIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7365 c.parent = parent
7366 c.listcollectionidsrequest = listcollectionidsrequest
7367 return c
7368 }
7369
7370
7371
7372
7373 func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListCollectionIdsCall {
7374 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7375 return c
7376 }
7377
7378
7379 func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListCollectionIdsCall {
7380 c.ctx_ = ctx
7381 return c
7382 }
7383
7384
7385
7386 func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Header() http.Header {
7387 if c.header_ == nil {
7388 c.header_ = make(http.Header)
7389 }
7390 return c.header_
7391 }
7392
7393 func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) doRequest(alt string) (*http.Response, error) {
7394 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7395 var body io.Reader = nil
7396 body, err := googleapi.WithoutDataWrapper.JSONReader(c.listcollectionidsrequest)
7397 if err != nil {
7398 return nil, err
7399 }
7400 c.urlParams_.Set("alt", alt)
7401 c.urlParams_.Set("prettyPrint", "false")
7402 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:listCollectionIds")
7403 urls += "?" + c.urlParams_.Encode()
7404 req, err := http.NewRequest("POST", urls, body)
7405 if err != nil {
7406 return nil, err
7407 }
7408 req.Header = reqHeaders
7409 googleapi.Expand(req.URL, map[string]string{
7410 "parent": c.parent,
7411 })
7412 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7413 }
7414
7415
7416
7417
7418
7419
7420
7421 func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Do(opts ...googleapi.CallOption) (*ListCollectionIdsResponse, error) {
7422 gensupport.SetOptions(c.urlParams_, opts...)
7423 res, err := c.doRequest("json")
7424 if res != nil && res.StatusCode == http.StatusNotModified {
7425 if res.Body != nil {
7426 res.Body.Close()
7427 }
7428 return nil, gensupport.WrapError(&googleapi.Error{
7429 Code: res.StatusCode,
7430 Header: res.Header,
7431 })
7432 }
7433 if err != nil {
7434 return nil, err
7435 }
7436 defer googleapi.CloseBody(res)
7437 if err := googleapi.CheckResponse(res); err != nil {
7438 return nil, gensupport.WrapError(err)
7439 }
7440 ret := &ListCollectionIdsResponse{
7441 ServerResponse: googleapi.ServerResponse{
7442 Header: res.Header,
7443 HTTPStatusCode: res.StatusCode,
7444 },
7445 }
7446 target := &ret
7447 if err := gensupport.DecodeResponse(target, res); err != nil {
7448 return nil, err
7449 }
7450 return ret, nil
7451 }
7452
7453
7454
7455
7456 func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Pages(ctx context.Context, f func(*ListCollectionIdsResponse) error) error {
7457 c.ctx_ = ctx
7458 defer func(pt string) { c.listcollectionidsrequest.PageToken = pt }(c.listcollectionidsrequest.PageToken)
7459 for {
7460 x, err := c.Do()
7461 if err != nil {
7462 return err
7463 }
7464 if err := f(x); err != nil {
7465 return err
7466 }
7467 if x.NextPageToken == "" {
7468 return nil
7469 }
7470 c.listcollectionidsrequest.PageToken = x.NextPageToken
7471 }
7472 }
7473
7474 type ProjectsDatabasesDocumentsListDocumentsCall struct {
7475 s *Service
7476 parent string
7477 collectionId string
7478 urlParams_ gensupport.URLParams
7479 ifNoneMatch_ string
7480 ctx_ context.Context
7481 header_ http.Header
7482 }
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495 func (r *ProjectsDatabasesDocumentsService) ListDocuments(parent string, collectionId string) *ProjectsDatabasesDocumentsListDocumentsCall {
7496 c := &ProjectsDatabasesDocumentsListDocumentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7497 c.parent = parent
7498 c.collectionId = collectionId
7499 return c
7500 }
7501
7502
7503
7504
7505 func (c *ProjectsDatabasesDocumentsListDocumentsCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsListDocumentsCall {
7506 c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
7507 return c
7508 }
7509
7510
7511
7512
7513
7514 func (c *ProjectsDatabasesDocumentsListDocumentsCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListDocumentsCall {
7515 c.urlParams_.Set("orderBy", orderBy)
7516 return c
7517 }
7518
7519
7520
7521
7522 func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListDocumentsCall {
7523 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7524 return c
7525 }
7526
7527
7528
7529
7530
7531
7532 func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListDocumentsCall {
7533 c.urlParams_.Set("pageToken", pageToken)
7534 return c
7535 }
7536
7537
7538
7539
7540
7541 func (c *ProjectsDatabasesDocumentsListDocumentsCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListDocumentsCall {
7542 c.urlParams_.Set("readTime", readTime)
7543 return c
7544 }
7545
7546
7547
7548
7549
7550
7551
7552 func (c *ProjectsDatabasesDocumentsListDocumentsCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListDocumentsCall {
7553 c.urlParams_.Set("showMissing", fmt.Sprint(showMissing))
7554 return c
7555 }
7556
7557
7558
7559 func (c *ProjectsDatabasesDocumentsListDocumentsCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListDocumentsCall {
7560 c.urlParams_.Set("transaction", transaction)
7561 return c
7562 }
7563
7564
7565
7566
7567 func (c *ProjectsDatabasesDocumentsListDocumentsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListDocumentsCall {
7568 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7569 return c
7570 }
7571
7572
7573
7574
7575 func (c *ProjectsDatabasesDocumentsListDocumentsCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsListDocumentsCall {
7576 c.ifNoneMatch_ = entityTag
7577 return c
7578 }
7579
7580
7581 func (c *ProjectsDatabasesDocumentsListDocumentsCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListDocumentsCall {
7582 c.ctx_ = ctx
7583 return c
7584 }
7585
7586
7587
7588 func (c *ProjectsDatabasesDocumentsListDocumentsCall) Header() http.Header {
7589 if c.header_ == nil {
7590 c.header_ = make(http.Header)
7591 }
7592 return c.header_
7593 }
7594
7595 func (c *ProjectsDatabasesDocumentsListDocumentsCall) doRequest(alt string) (*http.Response, error) {
7596 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7597 if c.ifNoneMatch_ != "" {
7598 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7599 }
7600 var body io.Reader = nil
7601 c.urlParams_.Set("alt", alt)
7602 c.urlParams_.Set("prettyPrint", "false")
7603 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/{collectionId}")
7604 urls += "?" + c.urlParams_.Encode()
7605 req, err := http.NewRequest("GET", urls, body)
7606 if err != nil {
7607 return nil, err
7608 }
7609 req.Header = reqHeaders
7610 googleapi.Expand(req.URL, map[string]string{
7611 "parent": c.parent,
7612 "collectionId": c.collectionId,
7613 })
7614 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7615 }
7616
7617
7618
7619
7620
7621
7622
7623 func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallOption) (*ListDocumentsResponse, error) {
7624 gensupport.SetOptions(c.urlParams_, opts...)
7625 res, err := c.doRequest("json")
7626 if res != nil && res.StatusCode == http.StatusNotModified {
7627 if res.Body != nil {
7628 res.Body.Close()
7629 }
7630 return nil, gensupport.WrapError(&googleapi.Error{
7631 Code: res.StatusCode,
7632 Header: res.Header,
7633 })
7634 }
7635 if err != nil {
7636 return nil, err
7637 }
7638 defer googleapi.CloseBody(res)
7639 if err := googleapi.CheckResponse(res); err != nil {
7640 return nil, gensupport.WrapError(err)
7641 }
7642 ret := &ListDocumentsResponse{
7643 ServerResponse: googleapi.ServerResponse{
7644 Header: res.Header,
7645 HTTPStatusCode: res.StatusCode,
7646 },
7647 }
7648 target := &ret
7649 if err := gensupport.DecodeResponse(target, res); err != nil {
7650 return nil, err
7651 }
7652 return ret, nil
7653 }
7654
7655
7656
7657
7658 func (c *ProjectsDatabasesDocumentsListDocumentsCall) Pages(ctx context.Context, f func(*ListDocumentsResponse) error) error {
7659 c.ctx_ = ctx
7660 defer c.PageToken(c.urlParams_.Get("pageToken"))
7661 for {
7662 x, err := c.Do()
7663 if err != nil {
7664 return err
7665 }
7666 if err := f(x); err != nil {
7667 return err
7668 }
7669 if x.NextPageToken == "" {
7670 return nil
7671 }
7672 c.PageToken(x.NextPageToken)
7673 }
7674 }
7675
7676 type ProjectsDatabasesDocumentsListenCall struct {
7677 s *Service
7678 database string
7679 listenrequest *ListenRequest
7680 urlParams_ gensupport.URLParams
7681 ctx_ context.Context
7682 header_ http.Header
7683 }
7684
7685
7686
7687
7688
7689
7690 func (r *ProjectsDatabasesDocumentsService) Listen(database string, listenrequest *ListenRequest) *ProjectsDatabasesDocumentsListenCall {
7691 c := &ProjectsDatabasesDocumentsListenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7692 c.database = database
7693 c.listenrequest = listenrequest
7694 return c
7695 }
7696
7697
7698
7699
7700 func (c *ProjectsDatabasesDocumentsListenCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListenCall {
7701 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7702 return c
7703 }
7704
7705
7706 func (c *ProjectsDatabasesDocumentsListenCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListenCall {
7707 c.ctx_ = ctx
7708 return c
7709 }
7710
7711
7712
7713 func (c *ProjectsDatabasesDocumentsListenCall) Header() http.Header {
7714 if c.header_ == nil {
7715 c.header_ = make(http.Header)
7716 }
7717 return c.header_
7718 }
7719
7720 func (c *ProjectsDatabasesDocumentsListenCall) doRequest(alt string) (*http.Response, error) {
7721 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7722 var body io.Reader = nil
7723 body, err := googleapi.WithoutDataWrapper.JSONReader(c.listenrequest)
7724 if err != nil {
7725 return nil, err
7726 }
7727 c.urlParams_.Set("alt", alt)
7728 c.urlParams_.Set("prettyPrint", "false")
7729 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:listen")
7730 urls += "?" + c.urlParams_.Encode()
7731 req, err := http.NewRequest("POST", urls, body)
7732 if err != nil {
7733 return nil, err
7734 }
7735 req.Header = reqHeaders
7736 googleapi.Expand(req.URL, map[string]string{
7737 "database": c.database,
7738 })
7739 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7740 }
7741
7742
7743
7744
7745
7746
7747 func (c *ProjectsDatabasesDocumentsListenCall) Do(opts ...googleapi.CallOption) (*ListenResponse, error) {
7748 gensupport.SetOptions(c.urlParams_, opts...)
7749 res, err := c.doRequest("json")
7750 if res != nil && res.StatusCode == http.StatusNotModified {
7751 if res.Body != nil {
7752 res.Body.Close()
7753 }
7754 return nil, gensupport.WrapError(&googleapi.Error{
7755 Code: res.StatusCode,
7756 Header: res.Header,
7757 })
7758 }
7759 if err != nil {
7760 return nil, err
7761 }
7762 defer googleapi.CloseBody(res)
7763 if err := googleapi.CheckResponse(res); err != nil {
7764 return nil, gensupport.WrapError(err)
7765 }
7766 ret := &ListenResponse{
7767 ServerResponse: googleapi.ServerResponse{
7768 Header: res.Header,
7769 HTTPStatusCode: res.StatusCode,
7770 },
7771 }
7772 target := &ret
7773 if err := gensupport.DecodeResponse(target, res); err != nil {
7774 return nil, err
7775 }
7776 return ret, nil
7777 }
7778
7779 type ProjectsDatabasesDocumentsPartitionQueryCall struct {
7780 s *Service
7781 parent string
7782 partitionqueryrequest *PartitionQueryRequest
7783 urlParams_ gensupport.URLParams
7784 ctx_ context.Context
7785 header_ http.Header
7786 }
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797 func (r *ProjectsDatabasesDocumentsService) PartitionQuery(parent string, partitionqueryrequest *PartitionQueryRequest) *ProjectsDatabasesDocumentsPartitionQueryCall {
7798 c := &ProjectsDatabasesDocumentsPartitionQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7799 c.parent = parent
7800 c.partitionqueryrequest = partitionqueryrequest
7801 return c
7802 }
7803
7804
7805
7806
7807 func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsPartitionQueryCall {
7808 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7809 return c
7810 }
7811
7812
7813 func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsPartitionQueryCall {
7814 c.ctx_ = ctx
7815 return c
7816 }
7817
7818
7819
7820 func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Header() http.Header {
7821 if c.header_ == nil {
7822 c.header_ = make(http.Header)
7823 }
7824 return c.header_
7825 }
7826
7827 func (c *ProjectsDatabasesDocumentsPartitionQueryCall) doRequest(alt string) (*http.Response, error) {
7828 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7829 var body io.Reader = nil
7830 body, err := googleapi.WithoutDataWrapper.JSONReader(c.partitionqueryrequest)
7831 if err != nil {
7832 return nil, err
7833 }
7834 c.urlParams_.Set("alt", alt)
7835 c.urlParams_.Set("prettyPrint", "false")
7836 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:partitionQuery")
7837 urls += "?" + c.urlParams_.Encode()
7838 req, err := http.NewRequest("POST", urls, body)
7839 if err != nil {
7840 return nil, err
7841 }
7842 req.Header = reqHeaders
7843 googleapi.Expand(req.URL, map[string]string{
7844 "parent": c.parent,
7845 })
7846 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7847 }
7848
7849
7850
7851
7852
7853
7854
7855 func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Do(opts ...googleapi.CallOption) (*PartitionQueryResponse, error) {
7856 gensupport.SetOptions(c.urlParams_, opts...)
7857 res, err := c.doRequest("json")
7858 if res != nil && res.StatusCode == http.StatusNotModified {
7859 if res.Body != nil {
7860 res.Body.Close()
7861 }
7862 return nil, gensupport.WrapError(&googleapi.Error{
7863 Code: res.StatusCode,
7864 Header: res.Header,
7865 })
7866 }
7867 if err != nil {
7868 return nil, err
7869 }
7870 defer googleapi.CloseBody(res)
7871 if err := googleapi.CheckResponse(res); err != nil {
7872 return nil, gensupport.WrapError(err)
7873 }
7874 ret := &PartitionQueryResponse{
7875 ServerResponse: googleapi.ServerResponse{
7876 Header: res.Header,
7877 HTTPStatusCode: res.StatusCode,
7878 },
7879 }
7880 target := &ret
7881 if err := gensupport.DecodeResponse(target, res); err != nil {
7882 return nil, err
7883 }
7884 return ret, nil
7885 }
7886
7887
7888
7889
7890 func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Pages(ctx context.Context, f func(*PartitionQueryResponse) error) error {
7891 c.ctx_ = ctx
7892 defer func(pt string) { c.partitionqueryrequest.PageToken = pt }(c.partitionqueryrequest.PageToken)
7893 for {
7894 x, err := c.Do()
7895 if err != nil {
7896 return err
7897 }
7898 if err := f(x); err != nil {
7899 return err
7900 }
7901 if x.NextPageToken == "" {
7902 return nil
7903 }
7904 c.partitionqueryrequest.PageToken = x.NextPageToken
7905 }
7906 }
7907
7908 type ProjectsDatabasesDocumentsPatchCall struct {
7909 s *Service
7910 name string
7911 document *Document
7912 urlParams_ gensupport.URLParams
7913 ctx_ context.Context
7914 header_ http.Header
7915 }
7916
7917
7918
7919
7920
7921 func (r *ProjectsDatabasesDocumentsService) Patch(name string, document *Document) *ProjectsDatabasesDocumentsPatchCall {
7922 c := &ProjectsDatabasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7923 c.name = name
7924 c.document = document
7925 return c
7926 }
7927
7928
7929
7930
7931 func (c *ProjectsDatabasesDocumentsPatchCall) CurrentDocumentExists(currentDocumentExists bool) *ProjectsDatabasesDocumentsPatchCall {
7932 c.urlParams_.Set("currentDocument.exists", fmt.Sprint(currentDocumentExists))
7933 return c
7934 }
7935
7936
7937
7938
7939 func (c *ProjectsDatabasesDocumentsPatchCall) CurrentDocumentUpdateTime(currentDocumentUpdateTime string) *ProjectsDatabasesDocumentsPatchCall {
7940 c.urlParams_.Set("currentDocument.updateTime", currentDocumentUpdateTime)
7941 return c
7942 }
7943
7944
7945
7946
7947 func (c *ProjectsDatabasesDocumentsPatchCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsPatchCall {
7948 c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...))
7949 return c
7950 }
7951
7952
7953
7954
7955 func (c *ProjectsDatabasesDocumentsPatchCall) UpdateMaskFieldPaths(updateMaskFieldPaths ...string) *ProjectsDatabasesDocumentsPatchCall {
7956 c.urlParams_.SetMulti("updateMask.fieldPaths", append([]string{}, updateMaskFieldPaths...))
7957 return c
7958 }
7959
7960
7961
7962
7963 func (c *ProjectsDatabasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsPatchCall {
7964 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7965 return c
7966 }
7967
7968
7969 func (c *ProjectsDatabasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsPatchCall {
7970 c.ctx_ = ctx
7971 return c
7972 }
7973
7974
7975
7976 func (c *ProjectsDatabasesDocumentsPatchCall) Header() http.Header {
7977 if c.header_ == nil {
7978 c.header_ = make(http.Header)
7979 }
7980 return c.header_
7981 }
7982
7983 func (c *ProjectsDatabasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) {
7984 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7985 var body io.Reader = nil
7986 body, err := googleapi.WithoutDataWrapper.JSONReader(c.document)
7987 if err != nil {
7988 return nil, err
7989 }
7990 c.urlParams_.Set("alt", alt)
7991 c.urlParams_.Set("prettyPrint", "false")
7992 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7993 urls += "?" + c.urlParams_.Encode()
7994 req, err := http.NewRequest("PATCH", urls, body)
7995 if err != nil {
7996 return nil, err
7997 }
7998 req.Header = reqHeaders
7999 googleapi.Expand(req.URL, map[string]string{
8000 "name": c.name,
8001 })
8002 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8003 }
8004
8005
8006
8007
8008
8009
8010 func (c *ProjectsDatabasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*Document, error) {
8011 gensupport.SetOptions(c.urlParams_, opts...)
8012 res, err := c.doRequest("json")
8013 if res != nil && res.StatusCode == http.StatusNotModified {
8014 if res.Body != nil {
8015 res.Body.Close()
8016 }
8017 return nil, gensupport.WrapError(&googleapi.Error{
8018 Code: res.StatusCode,
8019 Header: res.Header,
8020 })
8021 }
8022 if err != nil {
8023 return nil, err
8024 }
8025 defer googleapi.CloseBody(res)
8026 if err := googleapi.CheckResponse(res); err != nil {
8027 return nil, gensupport.WrapError(err)
8028 }
8029 ret := &Document{
8030 ServerResponse: googleapi.ServerResponse{
8031 Header: res.Header,
8032 HTTPStatusCode: res.StatusCode,
8033 },
8034 }
8035 target := &ret
8036 if err := gensupport.DecodeResponse(target, res); err != nil {
8037 return nil, err
8038 }
8039 return ret, nil
8040 }
8041
8042 type ProjectsDatabasesDocumentsRollbackCall struct {
8043 s *Service
8044 database string
8045 rollbackrequest *RollbackRequest
8046 urlParams_ gensupport.URLParams
8047 ctx_ context.Context
8048 header_ http.Header
8049 }
8050
8051
8052
8053
8054
8055 func (r *ProjectsDatabasesDocumentsService) Rollback(database string, rollbackrequest *RollbackRequest) *ProjectsDatabasesDocumentsRollbackCall {
8056 c := &ProjectsDatabasesDocumentsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8057 c.database = database
8058 c.rollbackrequest = rollbackrequest
8059 return c
8060 }
8061
8062
8063
8064
8065 func (c *ProjectsDatabasesDocumentsRollbackCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRollbackCall {
8066 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8067 return c
8068 }
8069
8070
8071 func (c *ProjectsDatabasesDocumentsRollbackCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRollbackCall {
8072 c.ctx_ = ctx
8073 return c
8074 }
8075
8076
8077
8078 func (c *ProjectsDatabasesDocumentsRollbackCall) Header() http.Header {
8079 if c.header_ == nil {
8080 c.header_ = make(http.Header)
8081 }
8082 return c.header_
8083 }
8084
8085 func (c *ProjectsDatabasesDocumentsRollbackCall) doRequest(alt string) (*http.Response, error) {
8086 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8087 var body io.Reader = nil
8088 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest)
8089 if err != nil {
8090 return nil, err
8091 }
8092 c.urlParams_.Set("alt", alt)
8093 c.urlParams_.Set("prettyPrint", "false")
8094 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:rollback")
8095 urls += "?" + c.urlParams_.Encode()
8096 req, err := http.NewRequest("POST", urls, body)
8097 if err != nil {
8098 return nil, err
8099 }
8100 req.Header = reqHeaders
8101 googleapi.Expand(req.URL, map[string]string{
8102 "database": c.database,
8103 })
8104 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8105 }
8106
8107
8108
8109
8110
8111
8112 func (c *ProjectsDatabasesDocumentsRollbackCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8113 gensupport.SetOptions(c.urlParams_, opts...)
8114 res, err := c.doRequest("json")
8115 if res != nil && res.StatusCode == http.StatusNotModified {
8116 if res.Body != nil {
8117 res.Body.Close()
8118 }
8119 return nil, gensupport.WrapError(&googleapi.Error{
8120 Code: res.StatusCode,
8121 Header: res.Header,
8122 })
8123 }
8124 if err != nil {
8125 return nil, err
8126 }
8127 defer googleapi.CloseBody(res)
8128 if err := googleapi.CheckResponse(res); err != nil {
8129 return nil, gensupport.WrapError(err)
8130 }
8131 ret := &Empty{
8132 ServerResponse: googleapi.ServerResponse{
8133 Header: res.Header,
8134 HTTPStatusCode: res.StatusCode,
8135 },
8136 }
8137 target := &ret
8138 if err := gensupport.DecodeResponse(target, res); err != nil {
8139 return nil, err
8140 }
8141 return ret, nil
8142 }
8143
8144 type ProjectsDatabasesDocumentsRunAggregationQueryCall struct {
8145 s *Service
8146 parent string
8147 runaggregationqueryrequest *RunAggregationQueryRequest
8148 urlParams_ gensupport.URLParams
8149 ctx_ context.Context
8150 header_ http.Header
8151 }
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164 func (r *ProjectsDatabasesDocumentsService) RunAggregationQuery(parent string, runaggregationqueryrequest *RunAggregationQueryRequest) *ProjectsDatabasesDocumentsRunAggregationQueryCall {
8165 c := &ProjectsDatabasesDocumentsRunAggregationQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8166 c.parent = parent
8167 c.runaggregationqueryrequest = runaggregationqueryrequest
8168 return c
8169 }
8170
8171
8172
8173
8174 func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRunAggregationQueryCall {
8175 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8176 return c
8177 }
8178
8179
8180 func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRunAggregationQueryCall {
8181 c.ctx_ = ctx
8182 return c
8183 }
8184
8185
8186
8187 func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Header() http.Header {
8188 if c.header_ == nil {
8189 c.header_ = make(http.Header)
8190 }
8191 return c.header_
8192 }
8193
8194 func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) doRequest(alt string) (*http.Response, error) {
8195 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8196 var body io.Reader = nil
8197 body, err := googleapi.WithoutDataWrapper.JSONReader(c.runaggregationqueryrequest)
8198 if err != nil {
8199 return nil, err
8200 }
8201 c.urlParams_.Set("alt", alt)
8202 c.urlParams_.Set("prettyPrint", "false")
8203 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:runAggregationQuery")
8204 urls += "?" + c.urlParams_.Encode()
8205 req, err := http.NewRequest("POST", urls, body)
8206 if err != nil {
8207 return nil, err
8208 }
8209 req.Header = reqHeaders
8210 googleapi.Expand(req.URL, map[string]string{
8211 "parent": c.parent,
8212 })
8213 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8214 }
8215
8216
8217
8218
8219
8220
8221
8222 func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Do(opts ...googleapi.CallOption) (*RunAggregationQueryResponse, error) {
8223 gensupport.SetOptions(c.urlParams_, opts...)
8224 res, err := c.doRequest("json")
8225 if res != nil && res.StatusCode == http.StatusNotModified {
8226 if res.Body != nil {
8227 res.Body.Close()
8228 }
8229 return nil, gensupport.WrapError(&googleapi.Error{
8230 Code: res.StatusCode,
8231 Header: res.Header,
8232 })
8233 }
8234 if err != nil {
8235 return nil, err
8236 }
8237 defer googleapi.CloseBody(res)
8238 if err := googleapi.CheckResponse(res); err != nil {
8239 return nil, gensupport.WrapError(err)
8240 }
8241 ret := &RunAggregationQueryResponse{
8242 ServerResponse: googleapi.ServerResponse{
8243 Header: res.Header,
8244 HTTPStatusCode: res.StatusCode,
8245 },
8246 }
8247 target := &ret
8248 if err := gensupport.DecodeResponse(target, res); err != nil {
8249 return nil, err
8250 }
8251 return ret, nil
8252 }
8253
8254 type ProjectsDatabasesDocumentsRunQueryCall struct {
8255 s *Service
8256 parent string
8257 runqueryrequest *RunQueryRequest
8258 urlParams_ gensupport.URLParams
8259 ctx_ context.Context
8260 header_ http.Header
8261 }
8262
8263
8264
8265
8266
8267
8268
8269
8270 func (r *ProjectsDatabasesDocumentsService) RunQuery(parent string, runqueryrequest *RunQueryRequest) *ProjectsDatabasesDocumentsRunQueryCall {
8271 c := &ProjectsDatabasesDocumentsRunQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8272 c.parent = parent
8273 c.runqueryrequest = runqueryrequest
8274 return c
8275 }
8276
8277
8278
8279
8280 func (c *ProjectsDatabasesDocumentsRunQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRunQueryCall {
8281 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8282 return c
8283 }
8284
8285
8286 func (c *ProjectsDatabasesDocumentsRunQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRunQueryCall {
8287 c.ctx_ = ctx
8288 return c
8289 }
8290
8291
8292
8293 func (c *ProjectsDatabasesDocumentsRunQueryCall) Header() http.Header {
8294 if c.header_ == nil {
8295 c.header_ = make(http.Header)
8296 }
8297 return c.header_
8298 }
8299
8300 func (c *ProjectsDatabasesDocumentsRunQueryCall) doRequest(alt string) (*http.Response, error) {
8301 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8302 var body io.Reader = nil
8303 body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
8304 if err != nil {
8305 return nil, err
8306 }
8307 c.urlParams_.Set("alt", alt)
8308 c.urlParams_.Set("prettyPrint", "false")
8309 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:runQuery")
8310 urls += "?" + c.urlParams_.Encode()
8311 req, err := http.NewRequest("POST", urls, body)
8312 if err != nil {
8313 return nil, err
8314 }
8315 req.Header = reqHeaders
8316 googleapi.Expand(req.URL, map[string]string{
8317 "parent": c.parent,
8318 })
8319 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8320 }
8321
8322
8323
8324
8325
8326
8327
8328 func (c *ProjectsDatabasesDocumentsRunQueryCall) Do(opts ...googleapi.CallOption) (*RunQueryResponse, error) {
8329 gensupport.SetOptions(c.urlParams_, opts...)
8330 res, err := c.doRequest("json")
8331 if res != nil && res.StatusCode == http.StatusNotModified {
8332 if res.Body != nil {
8333 res.Body.Close()
8334 }
8335 return nil, gensupport.WrapError(&googleapi.Error{
8336 Code: res.StatusCode,
8337 Header: res.Header,
8338 })
8339 }
8340 if err != nil {
8341 return nil, err
8342 }
8343 defer googleapi.CloseBody(res)
8344 if err := googleapi.CheckResponse(res); err != nil {
8345 return nil, gensupport.WrapError(err)
8346 }
8347 ret := &RunQueryResponse{
8348 ServerResponse: googleapi.ServerResponse{
8349 Header: res.Header,
8350 HTTPStatusCode: res.StatusCode,
8351 },
8352 }
8353 target := &ret
8354 if err := gensupport.DecodeResponse(target, res); err != nil {
8355 return nil, err
8356 }
8357 return ret, nil
8358 }
8359
8360 type ProjectsDatabasesDocumentsWriteCall struct {
8361 s *Service
8362 database string
8363 writerequest *WriteRequest
8364 urlParams_ gensupport.URLParams
8365 ctx_ context.Context
8366 header_ http.Header
8367 }
8368
8369
8370
8371
8372
8373
8374
8375 func (r *ProjectsDatabasesDocumentsService) Write(database string, writerequest *WriteRequest) *ProjectsDatabasesDocumentsWriteCall {
8376 c := &ProjectsDatabasesDocumentsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8377 c.database = database
8378 c.writerequest = writerequest
8379 return c
8380 }
8381
8382
8383
8384
8385 func (c *ProjectsDatabasesDocumentsWriteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsWriteCall {
8386 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8387 return c
8388 }
8389
8390
8391 func (c *ProjectsDatabasesDocumentsWriteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsWriteCall {
8392 c.ctx_ = ctx
8393 return c
8394 }
8395
8396
8397
8398 func (c *ProjectsDatabasesDocumentsWriteCall) Header() http.Header {
8399 if c.header_ == nil {
8400 c.header_ = make(http.Header)
8401 }
8402 return c.header_
8403 }
8404
8405 func (c *ProjectsDatabasesDocumentsWriteCall) doRequest(alt string) (*http.Response, error) {
8406 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8407 var body io.Reader = nil
8408 body, err := googleapi.WithoutDataWrapper.JSONReader(c.writerequest)
8409 if err != nil {
8410 return nil, err
8411 }
8412 c.urlParams_.Set("alt", alt)
8413 c.urlParams_.Set("prettyPrint", "false")
8414 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:write")
8415 urls += "?" + c.urlParams_.Encode()
8416 req, err := http.NewRequest("POST", urls, body)
8417 if err != nil {
8418 return nil, err
8419 }
8420 req.Header = reqHeaders
8421 googleapi.Expand(req.URL, map[string]string{
8422 "database": c.database,
8423 })
8424 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8425 }
8426
8427
8428
8429
8430
8431
8432 func (c *ProjectsDatabasesDocumentsWriteCall) Do(opts ...googleapi.CallOption) (*WriteResponse, error) {
8433 gensupport.SetOptions(c.urlParams_, opts...)
8434 res, err := c.doRequest("json")
8435 if res != nil && res.StatusCode == http.StatusNotModified {
8436 if res.Body != nil {
8437 res.Body.Close()
8438 }
8439 return nil, gensupport.WrapError(&googleapi.Error{
8440 Code: res.StatusCode,
8441 Header: res.Header,
8442 })
8443 }
8444 if err != nil {
8445 return nil, err
8446 }
8447 defer googleapi.CloseBody(res)
8448 if err := googleapi.CheckResponse(res); err != nil {
8449 return nil, gensupport.WrapError(err)
8450 }
8451 ret := &WriteResponse{
8452 ServerResponse: googleapi.ServerResponse{
8453 Header: res.Header,
8454 HTTPStatusCode: res.StatusCode,
8455 },
8456 }
8457 target := &ret
8458 if err := gensupport.DecodeResponse(target, res); err != nil {
8459 return nil, err
8460 }
8461 return ret, nil
8462 }
8463
8464 type ProjectsDatabasesOperationsCancelCall struct {
8465 s *Service
8466 name string
8467 googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest
8468 urlParams_ gensupport.URLParams
8469 ctx_ context.Context
8470 header_ http.Header
8471 }
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484 func (r *ProjectsDatabasesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsDatabasesOperationsCancelCall {
8485 c := &ProjectsDatabasesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8486 c.name = name
8487 c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest
8488 return c
8489 }
8490
8491
8492
8493
8494 func (c *ProjectsDatabasesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsCancelCall {
8495 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8496 return c
8497 }
8498
8499
8500 func (c *ProjectsDatabasesOperationsCancelCall) Context(ctx context.Context) *ProjectsDatabasesOperationsCancelCall {
8501 c.ctx_ = ctx
8502 return c
8503 }
8504
8505
8506
8507 func (c *ProjectsDatabasesOperationsCancelCall) Header() http.Header {
8508 if c.header_ == nil {
8509 c.header_ = make(http.Header)
8510 }
8511 return c.header_
8512 }
8513
8514 func (c *ProjectsDatabasesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
8515 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8516 var body io.Reader = nil
8517 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest)
8518 if err != nil {
8519 return nil, err
8520 }
8521 c.urlParams_.Set("alt", alt)
8522 c.urlParams_.Set("prettyPrint", "false")
8523 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
8524 urls += "?" + c.urlParams_.Encode()
8525 req, err := http.NewRequest("POST", urls, body)
8526 if err != nil {
8527 return nil, err
8528 }
8529 req.Header = reqHeaders
8530 googleapi.Expand(req.URL, map[string]string{
8531 "name": c.name,
8532 })
8533 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8534 }
8535
8536
8537
8538
8539
8540
8541 func (c *ProjectsDatabasesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8542 gensupport.SetOptions(c.urlParams_, opts...)
8543 res, err := c.doRequest("json")
8544 if res != nil && res.StatusCode == http.StatusNotModified {
8545 if res.Body != nil {
8546 res.Body.Close()
8547 }
8548 return nil, gensupport.WrapError(&googleapi.Error{
8549 Code: res.StatusCode,
8550 Header: res.Header,
8551 })
8552 }
8553 if err != nil {
8554 return nil, err
8555 }
8556 defer googleapi.CloseBody(res)
8557 if err := googleapi.CheckResponse(res); err != nil {
8558 return nil, gensupport.WrapError(err)
8559 }
8560 ret := &Empty{
8561 ServerResponse: googleapi.ServerResponse{
8562 Header: res.Header,
8563 HTTPStatusCode: res.StatusCode,
8564 },
8565 }
8566 target := &ret
8567 if err := gensupport.DecodeResponse(target, res); err != nil {
8568 return nil, err
8569 }
8570 return ret, nil
8571 }
8572
8573 type ProjectsDatabasesOperationsDeleteCall struct {
8574 s *Service
8575 name string
8576 urlParams_ gensupport.URLParams
8577 ctx_ context.Context
8578 header_ http.Header
8579 }
8580
8581
8582
8583
8584
8585
8586
8587 func (r *ProjectsDatabasesOperationsService) Delete(name string) *ProjectsDatabasesOperationsDeleteCall {
8588 c := &ProjectsDatabasesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8589 c.name = name
8590 return c
8591 }
8592
8593
8594
8595
8596 func (c *ProjectsDatabasesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsDeleteCall {
8597 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8598 return c
8599 }
8600
8601
8602 func (c *ProjectsDatabasesOperationsDeleteCall) Context(ctx context.Context) *ProjectsDatabasesOperationsDeleteCall {
8603 c.ctx_ = ctx
8604 return c
8605 }
8606
8607
8608
8609 func (c *ProjectsDatabasesOperationsDeleteCall) Header() http.Header {
8610 if c.header_ == nil {
8611 c.header_ = make(http.Header)
8612 }
8613 return c.header_
8614 }
8615
8616 func (c *ProjectsDatabasesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
8617 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8618 var body io.Reader = nil
8619 c.urlParams_.Set("alt", alt)
8620 c.urlParams_.Set("prettyPrint", "false")
8621 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8622 urls += "?" + c.urlParams_.Encode()
8623 req, err := http.NewRequest("DELETE", urls, body)
8624 if err != nil {
8625 return nil, err
8626 }
8627 req.Header = reqHeaders
8628 googleapi.Expand(req.URL, map[string]string{
8629 "name": c.name,
8630 })
8631 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8632 }
8633
8634
8635
8636
8637
8638
8639 func (c *ProjectsDatabasesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8640 gensupport.SetOptions(c.urlParams_, opts...)
8641 res, err := c.doRequest("json")
8642 if res != nil && res.StatusCode == http.StatusNotModified {
8643 if res.Body != nil {
8644 res.Body.Close()
8645 }
8646 return nil, gensupport.WrapError(&googleapi.Error{
8647 Code: res.StatusCode,
8648 Header: res.Header,
8649 })
8650 }
8651 if err != nil {
8652 return nil, err
8653 }
8654 defer googleapi.CloseBody(res)
8655 if err := googleapi.CheckResponse(res); err != nil {
8656 return nil, gensupport.WrapError(err)
8657 }
8658 ret := &Empty{
8659 ServerResponse: googleapi.ServerResponse{
8660 Header: res.Header,
8661 HTTPStatusCode: res.StatusCode,
8662 },
8663 }
8664 target := &ret
8665 if err := gensupport.DecodeResponse(target, res); err != nil {
8666 return nil, err
8667 }
8668 return ret, nil
8669 }
8670
8671 type ProjectsDatabasesOperationsGetCall struct {
8672 s *Service
8673 name string
8674 urlParams_ gensupport.URLParams
8675 ifNoneMatch_ string
8676 ctx_ context.Context
8677 header_ http.Header
8678 }
8679
8680
8681
8682
8683
8684
8685 func (r *ProjectsDatabasesOperationsService) Get(name string) *ProjectsDatabasesOperationsGetCall {
8686 c := &ProjectsDatabasesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8687 c.name = name
8688 return c
8689 }
8690
8691
8692
8693
8694 func (c *ProjectsDatabasesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsGetCall {
8695 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8696 return c
8697 }
8698
8699
8700
8701
8702 func (c *ProjectsDatabasesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesOperationsGetCall {
8703 c.ifNoneMatch_ = entityTag
8704 return c
8705 }
8706
8707
8708 func (c *ProjectsDatabasesOperationsGetCall) Context(ctx context.Context) *ProjectsDatabasesOperationsGetCall {
8709 c.ctx_ = ctx
8710 return c
8711 }
8712
8713
8714
8715 func (c *ProjectsDatabasesOperationsGetCall) Header() http.Header {
8716 if c.header_ == nil {
8717 c.header_ = make(http.Header)
8718 }
8719 return c.header_
8720 }
8721
8722 func (c *ProjectsDatabasesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
8723 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8724 if c.ifNoneMatch_ != "" {
8725 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8726 }
8727 var body io.Reader = nil
8728 c.urlParams_.Set("alt", alt)
8729 c.urlParams_.Set("prettyPrint", "false")
8730 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8731 urls += "?" + c.urlParams_.Encode()
8732 req, err := http.NewRequest("GET", urls, body)
8733 if err != nil {
8734 return nil, err
8735 }
8736 req.Header = reqHeaders
8737 googleapi.Expand(req.URL, map[string]string{
8738 "name": c.name,
8739 })
8740 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8741 }
8742
8743
8744
8745
8746
8747
8748
8749 func (c *ProjectsDatabasesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
8750 gensupport.SetOptions(c.urlParams_, opts...)
8751 res, err := c.doRequest("json")
8752 if res != nil && res.StatusCode == http.StatusNotModified {
8753 if res.Body != nil {
8754 res.Body.Close()
8755 }
8756 return nil, gensupport.WrapError(&googleapi.Error{
8757 Code: res.StatusCode,
8758 Header: res.Header,
8759 })
8760 }
8761 if err != nil {
8762 return nil, err
8763 }
8764 defer googleapi.CloseBody(res)
8765 if err := googleapi.CheckResponse(res); err != nil {
8766 return nil, gensupport.WrapError(err)
8767 }
8768 ret := &GoogleLongrunningOperation{
8769 ServerResponse: googleapi.ServerResponse{
8770 Header: res.Header,
8771 HTTPStatusCode: res.StatusCode,
8772 },
8773 }
8774 target := &ret
8775 if err := gensupport.DecodeResponse(target, res); err != nil {
8776 return nil, err
8777 }
8778 return ret, nil
8779 }
8780
8781 type ProjectsDatabasesOperationsListCall struct {
8782 s *Service
8783 name string
8784 urlParams_ gensupport.URLParams
8785 ifNoneMatch_ string
8786 ctx_ context.Context
8787 header_ http.Header
8788 }
8789
8790
8791
8792
8793
8794 func (r *ProjectsDatabasesOperationsService) List(name string) *ProjectsDatabasesOperationsListCall {
8795 c := &ProjectsDatabasesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8796 c.name = name
8797 return c
8798 }
8799
8800
8801 func (c *ProjectsDatabasesOperationsListCall) Filter(filter string) *ProjectsDatabasesOperationsListCall {
8802 c.urlParams_.Set("filter", filter)
8803 return c
8804 }
8805
8806
8807
8808 func (c *ProjectsDatabasesOperationsListCall) PageSize(pageSize int64) *ProjectsDatabasesOperationsListCall {
8809 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8810 return c
8811 }
8812
8813
8814
8815 func (c *ProjectsDatabasesOperationsListCall) PageToken(pageToken string) *ProjectsDatabasesOperationsListCall {
8816 c.urlParams_.Set("pageToken", pageToken)
8817 return c
8818 }
8819
8820
8821
8822
8823 func (c *ProjectsDatabasesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsListCall {
8824 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8825 return c
8826 }
8827
8828
8829
8830
8831 func (c *ProjectsDatabasesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesOperationsListCall {
8832 c.ifNoneMatch_ = entityTag
8833 return c
8834 }
8835
8836
8837 func (c *ProjectsDatabasesOperationsListCall) Context(ctx context.Context) *ProjectsDatabasesOperationsListCall {
8838 c.ctx_ = ctx
8839 return c
8840 }
8841
8842
8843
8844 func (c *ProjectsDatabasesOperationsListCall) Header() http.Header {
8845 if c.header_ == nil {
8846 c.header_ = make(http.Header)
8847 }
8848 return c.header_
8849 }
8850
8851 func (c *ProjectsDatabasesOperationsListCall) doRequest(alt string) (*http.Response, error) {
8852 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8853 if c.ifNoneMatch_ != "" {
8854 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8855 }
8856 var body io.Reader = nil
8857 c.urlParams_.Set("alt", alt)
8858 c.urlParams_.Set("prettyPrint", "false")
8859 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
8860 urls += "?" + c.urlParams_.Encode()
8861 req, err := http.NewRequest("GET", urls, body)
8862 if err != nil {
8863 return nil, err
8864 }
8865 req.Header = reqHeaders
8866 googleapi.Expand(req.URL, map[string]string{
8867 "name": c.name,
8868 })
8869 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8870 }
8871
8872
8873
8874
8875
8876
8877
8878 func (c *ProjectsDatabasesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
8879 gensupport.SetOptions(c.urlParams_, opts...)
8880 res, err := c.doRequest("json")
8881 if res != nil && res.StatusCode == http.StatusNotModified {
8882 if res.Body != nil {
8883 res.Body.Close()
8884 }
8885 return nil, gensupport.WrapError(&googleapi.Error{
8886 Code: res.StatusCode,
8887 Header: res.Header,
8888 })
8889 }
8890 if err != nil {
8891 return nil, err
8892 }
8893 defer googleapi.CloseBody(res)
8894 if err := googleapi.CheckResponse(res); err != nil {
8895 return nil, gensupport.WrapError(err)
8896 }
8897 ret := &GoogleLongrunningListOperationsResponse{
8898 ServerResponse: googleapi.ServerResponse{
8899 Header: res.Header,
8900 HTTPStatusCode: res.StatusCode,
8901 },
8902 }
8903 target := &ret
8904 if err := gensupport.DecodeResponse(target, res); err != nil {
8905 return nil, err
8906 }
8907 return ret, nil
8908 }
8909
8910
8911
8912
8913 func (c *ProjectsDatabasesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
8914 c.ctx_ = ctx
8915 defer c.PageToken(c.urlParams_.Get("pageToken"))
8916 for {
8917 x, err := c.Do()
8918 if err != nil {
8919 return err
8920 }
8921 if err := f(x); err != nil {
8922 return err
8923 }
8924 if x.NextPageToken == "" {
8925 return nil
8926 }
8927 c.PageToken(x.NextPageToken)
8928 }
8929 }
8930
8931 type ProjectsLocationsGetCall struct {
8932 s *Service
8933 name string
8934 urlParams_ gensupport.URLParams
8935 ifNoneMatch_ string
8936 ctx_ context.Context
8937 header_ http.Header
8938 }
8939
8940
8941
8942
8943 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
8944 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8945 c.name = name
8946 return c
8947 }
8948
8949
8950
8951
8952 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
8953 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8954 return c
8955 }
8956
8957
8958
8959
8960 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
8961 c.ifNoneMatch_ = entityTag
8962 return c
8963 }
8964
8965
8966 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
8967 c.ctx_ = ctx
8968 return c
8969 }
8970
8971
8972
8973 func (c *ProjectsLocationsGetCall) Header() http.Header {
8974 if c.header_ == nil {
8975 c.header_ = make(http.Header)
8976 }
8977 return c.header_
8978 }
8979
8980 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
8981 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8982 if c.ifNoneMatch_ != "" {
8983 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8984 }
8985 var body io.Reader = nil
8986 c.urlParams_.Set("alt", alt)
8987 c.urlParams_.Set("prettyPrint", "false")
8988 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8989 urls += "?" + c.urlParams_.Encode()
8990 req, err := http.NewRequest("GET", urls, body)
8991 if err != nil {
8992 return nil, err
8993 }
8994 req.Header = reqHeaders
8995 googleapi.Expand(req.URL, map[string]string{
8996 "name": c.name,
8997 })
8998 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8999 }
9000
9001
9002
9003
9004
9005
9006 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
9007 gensupport.SetOptions(c.urlParams_, opts...)
9008 res, err := c.doRequest("json")
9009 if res != nil && res.StatusCode == http.StatusNotModified {
9010 if res.Body != nil {
9011 res.Body.Close()
9012 }
9013 return nil, gensupport.WrapError(&googleapi.Error{
9014 Code: res.StatusCode,
9015 Header: res.Header,
9016 })
9017 }
9018 if err != nil {
9019 return nil, err
9020 }
9021 defer googleapi.CloseBody(res)
9022 if err := googleapi.CheckResponse(res); err != nil {
9023 return nil, gensupport.WrapError(err)
9024 }
9025 ret := &Location{
9026 ServerResponse: googleapi.ServerResponse{
9027 Header: res.Header,
9028 HTTPStatusCode: res.StatusCode,
9029 },
9030 }
9031 target := &ret
9032 if err := gensupport.DecodeResponse(target, res); err != nil {
9033 return nil, err
9034 }
9035 return ret, nil
9036 }
9037
9038 type ProjectsLocationsListCall struct {
9039 s *Service
9040 name string
9041 urlParams_ gensupport.URLParams
9042 ifNoneMatch_ string
9043 ctx_ context.Context
9044 header_ http.Header
9045 }
9046
9047
9048
9049
9050 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
9051 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9052 c.name = name
9053 return c
9054 }
9055
9056
9057
9058
9059
9060 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
9061 c.urlParams_.Set("filter", filter)
9062 return c
9063 }
9064
9065
9066
9067 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
9068 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9069 return c
9070 }
9071
9072
9073
9074
9075 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
9076 c.urlParams_.Set("pageToken", pageToken)
9077 return c
9078 }
9079
9080
9081
9082
9083 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
9084 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9085 return c
9086 }
9087
9088
9089
9090
9091 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
9092 c.ifNoneMatch_ = entityTag
9093 return c
9094 }
9095
9096
9097 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
9098 c.ctx_ = ctx
9099 return c
9100 }
9101
9102
9103
9104 func (c *ProjectsLocationsListCall) Header() http.Header {
9105 if c.header_ == nil {
9106 c.header_ = make(http.Header)
9107 }
9108 return c.header_
9109 }
9110
9111 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
9112 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9113 if c.ifNoneMatch_ != "" {
9114 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9115 }
9116 var body io.Reader = nil
9117 c.urlParams_.Set("alt", alt)
9118 c.urlParams_.Set("prettyPrint", "false")
9119 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
9120 urls += "?" + c.urlParams_.Encode()
9121 req, err := http.NewRequest("GET", urls, body)
9122 if err != nil {
9123 return nil, err
9124 }
9125 req.Header = reqHeaders
9126 googleapi.Expand(req.URL, map[string]string{
9127 "name": c.name,
9128 })
9129 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9130 }
9131
9132
9133
9134
9135
9136
9137
9138 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
9139 gensupport.SetOptions(c.urlParams_, opts...)
9140 res, err := c.doRequest("json")
9141 if res != nil && res.StatusCode == http.StatusNotModified {
9142 if res.Body != nil {
9143 res.Body.Close()
9144 }
9145 return nil, gensupport.WrapError(&googleapi.Error{
9146 Code: res.StatusCode,
9147 Header: res.Header,
9148 })
9149 }
9150 if err != nil {
9151 return nil, err
9152 }
9153 defer googleapi.CloseBody(res)
9154 if err := googleapi.CheckResponse(res); err != nil {
9155 return nil, gensupport.WrapError(err)
9156 }
9157 ret := &ListLocationsResponse{
9158 ServerResponse: googleapi.ServerResponse{
9159 Header: res.Header,
9160 HTTPStatusCode: res.StatusCode,
9161 },
9162 }
9163 target := &ret
9164 if err := gensupport.DecodeResponse(target, res); err != nil {
9165 return nil, err
9166 }
9167 return ret, nil
9168 }
9169
9170
9171
9172
9173 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
9174 c.ctx_ = ctx
9175 defer c.PageToken(c.urlParams_.Get("pageToken"))
9176 for {
9177 x, err := c.Do()
9178 if err != nil {
9179 return err
9180 }
9181 if err := f(x); err != nil {
9182 return err
9183 }
9184 if x.NextPageToken == "" {
9185 return nil
9186 }
9187 c.PageToken(x.NextPageToken)
9188 }
9189 }
9190
9191 type ProjectsLocationsBackupsDeleteCall struct {
9192 s *Service
9193 name string
9194 urlParams_ gensupport.URLParams
9195 ctx_ context.Context
9196 header_ http.Header
9197 }
9198
9199
9200
9201
9202
9203 func (r *ProjectsLocationsBackupsService) Delete(name string) *ProjectsLocationsBackupsDeleteCall {
9204 c := &ProjectsLocationsBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9205 c.name = name
9206 return c
9207 }
9208
9209
9210
9211
9212 func (c *ProjectsLocationsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsDeleteCall {
9213 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9214 return c
9215 }
9216
9217
9218 func (c *ProjectsLocationsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupsDeleteCall {
9219 c.ctx_ = ctx
9220 return c
9221 }
9222
9223
9224
9225 func (c *ProjectsLocationsBackupsDeleteCall) Header() http.Header {
9226 if c.header_ == nil {
9227 c.header_ = make(http.Header)
9228 }
9229 return c.header_
9230 }
9231
9232 func (c *ProjectsLocationsBackupsDeleteCall) doRequest(alt string) (*http.Response, error) {
9233 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9234 var body io.Reader = nil
9235 c.urlParams_.Set("alt", alt)
9236 c.urlParams_.Set("prettyPrint", "false")
9237 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9238 urls += "?" + c.urlParams_.Encode()
9239 req, err := http.NewRequest("DELETE", urls, body)
9240 if err != nil {
9241 return nil, err
9242 }
9243 req.Header = reqHeaders
9244 googleapi.Expand(req.URL, map[string]string{
9245 "name": c.name,
9246 })
9247 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9248 }
9249
9250
9251
9252
9253
9254
9255 func (c *ProjectsLocationsBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9256 gensupport.SetOptions(c.urlParams_, opts...)
9257 res, err := c.doRequest("json")
9258 if res != nil && res.StatusCode == http.StatusNotModified {
9259 if res.Body != nil {
9260 res.Body.Close()
9261 }
9262 return nil, gensupport.WrapError(&googleapi.Error{
9263 Code: res.StatusCode,
9264 Header: res.Header,
9265 })
9266 }
9267 if err != nil {
9268 return nil, err
9269 }
9270 defer googleapi.CloseBody(res)
9271 if err := googleapi.CheckResponse(res); err != nil {
9272 return nil, gensupport.WrapError(err)
9273 }
9274 ret := &Empty{
9275 ServerResponse: googleapi.ServerResponse{
9276 Header: res.Header,
9277 HTTPStatusCode: res.StatusCode,
9278 },
9279 }
9280 target := &ret
9281 if err := gensupport.DecodeResponse(target, res); err != nil {
9282 return nil, err
9283 }
9284 return ret, nil
9285 }
9286
9287 type ProjectsLocationsBackupsGetCall struct {
9288 s *Service
9289 name string
9290 urlParams_ gensupport.URLParams
9291 ifNoneMatch_ string
9292 ctx_ context.Context
9293 header_ http.Header
9294 }
9295
9296
9297
9298
9299
9300 func (r *ProjectsLocationsBackupsService) Get(name string) *ProjectsLocationsBackupsGetCall {
9301 c := &ProjectsLocationsBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9302 c.name = name
9303 return c
9304 }
9305
9306
9307
9308
9309 func (c *ProjectsLocationsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsGetCall {
9310 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9311 return c
9312 }
9313
9314
9315
9316
9317 func (c *ProjectsLocationsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsGetCall {
9318 c.ifNoneMatch_ = entityTag
9319 return c
9320 }
9321
9322
9323 func (c *ProjectsLocationsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupsGetCall {
9324 c.ctx_ = ctx
9325 return c
9326 }
9327
9328
9329
9330 func (c *ProjectsLocationsBackupsGetCall) Header() http.Header {
9331 if c.header_ == nil {
9332 c.header_ = make(http.Header)
9333 }
9334 return c.header_
9335 }
9336
9337 func (c *ProjectsLocationsBackupsGetCall) doRequest(alt string) (*http.Response, error) {
9338 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9339 if c.ifNoneMatch_ != "" {
9340 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9341 }
9342 var body io.Reader = nil
9343 c.urlParams_.Set("alt", alt)
9344 c.urlParams_.Set("prettyPrint", "false")
9345 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9346 urls += "?" + c.urlParams_.Encode()
9347 req, err := http.NewRequest("GET", urls, body)
9348 if err != nil {
9349 return nil, err
9350 }
9351 req.Header = reqHeaders
9352 googleapi.Expand(req.URL, map[string]string{
9353 "name": c.name,
9354 })
9355 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9356 }
9357
9358
9359
9360
9361
9362
9363
9364 func (c *ProjectsLocationsBackupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Backup, error) {
9365 gensupport.SetOptions(c.urlParams_, opts...)
9366 res, err := c.doRequest("json")
9367 if res != nil && res.StatusCode == http.StatusNotModified {
9368 if res.Body != nil {
9369 res.Body.Close()
9370 }
9371 return nil, gensupport.WrapError(&googleapi.Error{
9372 Code: res.StatusCode,
9373 Header: res.Header,
9374 })
9375 }
9376 if err != nil {
9377 return nil, err
9378 }
9379 defer googleapi.CloseBody(res)
9380 if err := googleapi.CheckResponse(res); err != nil {
9381 return nil, gensupport.WrapError(err)
9382 }
9383 ret := &GoogleFirestoreAdminV1Backup{
9384 ServerResponse: googleapi.ServerResponse{
9385 Header: res.Header,
9386 HTTPStatusCode: res.StatusCode,
9387 },
9388 }
9389 target := &ret
9390 if err := gensupport.DecodeResponse(target, res); err != nil {
9391 return nil, err
9392 }
9393 return ret, nil
9394 }
9395
9396 type ProjectsLocationsBackupsListCall struct {
9397 s *Service
9398 parent string
9399 urlParams_ gensupport.URLParams
9400 ifNoneMatch_ string
9401 ctx_ context.Context
9402 header_ http.Header
9403 }
9404
9405
9406
9407
9408
9409
9410
9411 func (r *ProjectsLocationsBackupsService) List(parent string) *ProjectsLocationsBackupsListCall {
9412 c := &ProjectsLocationsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9413 c.parent = parent
9414 return c
9415 }
9416
9417
9418
9419
9420 func (c *ProjectsLocationsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsListCall {
9421 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9422 return c
9423 }
9424
9425
9426
9427
9428 func (c *ProjectsLocationsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsListCall {
9429 c.ifNoneMatch_ = entityTag
9430 return c
9431 }
9432
9433
9434 func (c *ProjectsLocationsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupsListCall {
9435 c.ctx_ = ctx
9436 return c
9437 }
9438
9439
9440
9441 func (c *ProjectsLocationsBackupsListCall) Header() http.Header {
9442 if c.header_ == nil {
9443 c.header_ = make(http.Header)
9444 }
9445 return c.header_
9446 }
9447
9448 func (c *ProjectsLocationsBackupsListCall) doRequest(alt string) (*http.Response, error) {
9449 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9450 if c.ifNoneMatch_ != "" {
9451 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9452 }
9453 var body io.Reader = nil
9454 c.urlParams_.Set("alt", alt)
9455 c.urlParams_.Set("prettyPrint", "false")
9456 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
9457 urls += "?" + c.urlParams_.Encode()
9458 req, err := http.NewRequest("GET", urls, body)
9459 if err != nil {
9460 return nil, err
9461 }
9462 req.Header = reqHeaders
9463 googleapi.Expand(req.URL, map[string]string{
9464 "parent": c.parent,
9465 })
9466 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9467 }
9468
9469
9470
9471
9472
9473
9474
9475 func (c *ProjectsLocationsBackupsListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListBackupsResponse, error) {
9476 gensupport.SetOptions(c.urlParams_, opts...)
9477 res, err := c.doRequest("json")
9478 if res != nil && res.StatusCode == http.StatusNotModified {
9479 if res.Body != nil {
9480 res.Body.Close()
9481 }
9482 return nil, gensupport.WrapError(&googleapi.Error{
9483 Code: res.StatusCode,
9484 Header: res.Header,
9485 })
9486 }
9487 if err != nil {
9488 return nil, err
9489 }
9490 defer googleapi.CloseBody(res)
9491 if err := googleapi.CheckResponse(res); err != nil {
9492 return nil, gensupport.WrapError(err)
9493 }
9494 ret := &GoogleFirestoreAdminV1ListBackupsResponse{
9495 ServerResponse: googleapi.ServerResponse{
9496 Header: res.Header,
9497 HTTPStatusCode: res.StatusCode,
9498 },
9499 }
9500 target := &ret
9501 if err := gensupport.DecodeResponse(target, res); err != nil {
9502 return nil, err
9503 }
9504 return ret, nil
9505 }
9506
View as plain text