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 spanner
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 = "spanner:v1"
97 const apiName = "spanner"
98 const apiVersion = "v1"
99 const basePath = "https://spanner.googleapis.com/"
100 const basePathTemplate = "https://spanner.UNIVERSE_DOMAIN/"
101 const mtlsBasePath = "https://spanner.mtls.googleapis.com/"
102
103
104 const (
105
106
107 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
108
109
110 SpannerAdminScope = "https://www.googleapis.com/auth/spanner.admin"
111
112
113 SpannerDataScope = "https://www.googleapis.com/auth/spanner.data"
114 )
115
116
117 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
118 scopesOption := internaloption.WithDefaultScopes(
119 "https://www.googleapis.com/auth/cloud-platform",
120 "https://www.googleapis.com/auth/spanner.admin",
121 "https://www.googleapis.com/auth/spanner.data",
122 )
123
124 opts = append([]option.ClientOption{scopesOption}, opts...)
125 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
126 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
127 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
128 opts = append(opts, internaloption.EnableNewAuthLibrary())
129 client, endpoint, err := htransport.NewClient(ctx, opts...)
130 if err != nil {
131 return nil, err
132 }
133 s, err := New(client)
134 if err != nil {
135 return nil, err
136 }
137 if endpoint != "" {
138 s.BasePath = endpoint
139 }
140 return s, nil
141 }
142
143
144
145
146
147
148 func New(client *http.Client) (*Service, error) {
149 if client == nil {
150 return nil, errors.New("client is nil")
151 }
152 s := &Service{client: client, BasePath: basePath}
153 s.Projects = NewProjectsService(s)
154 s.Scans = NewScansService(s)
155 return s, nil
156 }
157
158 type Service struct {
159 client *http.Client
160 BasePath string
161 UserAgent string
162
163 Projects *ProjectsService
164
165 Scans *ScansService
166 }
167
168 func (s *Service) userAgent() string {
169 if s.UserAgent == "" {
170 return googleapi.UserAgent
171 }
172 return googleapi.UserAgent + " " + s.UserAgent
173 }
174
175 func NewProjectsService(s *Service) *ProjectsService {
176 rs := &ProjectsService{s: s}
177 rs.InstanceConfigOperations = NewProjectsInstanceConfigOperationsService(s)
178 rs.InstanceConfigs = NewProjectsInstanceConfigsService(s)
179 rs.Instances = NewProjectsInstancesService(s)
180 return rs
181 }
182
183 type ProjectsService struct {
184 s *Service
185
186 InstanceConfigOperations *ProjectsInstanceConfigOperationsService
187
188 InstanceConfigs *ProjectsInstanceConfigsService
189
190 Instances *ProjectsInstancesService
191 }
192
193 func NewProjectsInstanceConfigOperationsService(s *Service) *ProjectsInstanceConfigOperationsService {
194 rs := &ProjectsInstanceConfigOperationsService{s: s}
195 return rs
196 }
197
198 type ProjectsInstanceConfigOperationsService struct {
199 s *Service
200 }
201
202 func NewProjectsInstanceConfigsService(s *Service) *ProjectsInstanceConfigsService {
203 rs := &ProjectsInstanceConfigsService{s: s}
204 rs.Operations = NewProjectsInstanceConfigsOperationsService(s)
205 rs.SsdCaches = NewProjectsInstanceConfigsSsdCachesService(s)
206 return rs
207 }
208
209 type ProjectsInstanceConfigsService struct {
210 s *Service
211
212 Operations *ProjectsInstanceConfigsOperationsService
213
214 SsdCaches *ProjectsInstanceConfigsSsdCachesService
215 }
216
217 func NewProjectsInstanceConfigsOperationsService(s *Service) *ProjectsInstanceConfigsOperationsService {
218 rs := &ProjectsInstanceConfigsOperationsService{s: s}
219 return rs
220 }
221
222 type ProjectsInstanceConfigsOperationsService struct {
223 s *Service
224 }
225
226 func NewProjectsInstanceConfigsSsdCachesService(s *Service) *ProjectsInstanceConfigsSsdCachesService {
227 rs := &ProjectsInstanceConfigsSsdCachesService{s: s}
228 rs.Operations = NewProjectsInstanceConfigsSsdCachesOperationsService(s)
229 return rs
230 }
231
232 type ProjectsInstanceConfigsSsdCachesService struct {
233 s *Service
234
235 Operations *ProjectsInstanceConfigsSsdCachesOperationsService
236 }
237
238 func NewProjectsInstanceConfigsSsdCachesOperationsService(s *Service) *ProjectsInstanceConfigsSsdCachesOperationsService {
239 rs := &ProjectsInstanceConfigsSsdCachesOperationsService{s: s}
240 return rs
241 }
242
243 type ProjectsInstanceConfigsSsdCachesOperationsService struct {
244 s *Service
245 }
246
247 func NewProjectsInstancesService(s *Service) *ProjectsInstancesService {
248 rs := &ProjectsInstancesService{s: s}
249 rs.BackupOperations = NewProjectsInstancesBackupOperationsService(s)
250 rs.Backups = NewProjectsInstancesBackupsService(s)
251 rs.DatabaseOperations = NewProjectsInstancesDatabaseOperationsService(s)
252 rs.Databases = NewProjectsInstancesDatabasesService(s)
253 rs.InstancePartitionOperations = NewProjectsInstancesInstancePartitionOperationsService(s)
254 rs.InstancePartitions = NewProjectsInstancesInstancePartitionsService(s)
255 rs.Operations = NewProjectsInstancesOperationsService(s)
256 return rs
257 }
258
259 type ProjectsInstancesService struct {
260 s *Service
261
262 BackupOperations *ProjectsInstancesBackupOperationsService
263
264 Backups *ProjectsInstancesBackupsService
265
266 DatabaseOperations *ProjectsInstancesDatabaseOperationsService
267
268 Databases *ProjectsInstancesDatabasesService
269
270 InstancePartitionOperations *ProjectsInstancesInstancePartitionOperationsService
271
272 InstancePartitions *ProjectsInstancesInstancePartitionsService
273
274 Operations *ProjectsInstancesOperationsService
275 }
276
277 func NewProjectsInstancesBackupOperationsService(s *Service) *ProjectsInstancesBackupOperationsService {
278 rs := &ProjectsInstancesBackupOperationsService{s: s}
279 return rs
280 }
281
282 type ProjectsInstancesBackupOperationsService struct {
283 s *Service
284 }
285
286 func NewProjectsInstancesBackupsService(s *Service) *ProjectsInstancesBackupsService {
287 rs := &ProjectsInstancesBackupsService{s: s}
288 rs.Operations = NewProjectsInstancesBackupsOperationsService(s)
289 return rs
290 }
291
292 type ProjectsInstancesBackupsService struct {
293 s *Service
294
295 Operations *ProjectsInstancesBackupsOperationsService
296 }
297
298 func NewProjectsInstancesBackupsOperationsService(s *Service) *ProjectsInstancesBackupsOperationsService {
299 rs := &ProjectsInstancesBackupsOperationsService{s: s}
300 return rs
301 }
302
303 type ProjectsInstancesBackupsOperationsService struct {
304 s *Service
305 }
306
307 func NewProjectsInstancesDatabaseOperationsService(s *Service) *ProjectsInstancesDatabaseOperationsService {
308 rs := &ProjectsInstancesDatabaseOperationsService{s: s}
309 return rs
310 }
311
312 type ProjectsInstancesDatabaseOperationsService struct {
313 s *Service
314 }
315
316 func NewProjectsInstancesDatabasesService(s *Service) *ProjectsInstancesDatabasesService {
317 rs := &ProjectsInstancesDatabasesService{s: s}
318 rs.DatabaseRoles = NewProjectsInstancesDatabasesDatabaseRolesService(s)
319 rs.Operations = NewProjectsInstancesDatabasesOperationsService(s)
320 rs.Sessions = NewProjectsInstancesDatabasesSessionsService(s)
321 return rs
322 }
323
324 type ProjectsInstancesDatabasesService struct {
325 s *Service
326
327 DatabaseRoles *ProjectsInstancesDatabasesDatabaseRolesService
328
329 Operations *ProjectsInstancesDatabasesOperationsService
330
331 Sessions *ProjectsInstancesDatabasesSessionsService
332 }
333
334 func NewProjectsInstancesDatabasesDatabaseRolesService(s *Service) *ProjectsInstancesDatabasesDatabaseRolesService {
335 rs := &ProjectsInstancesDatabasesDatabaseRolesService{s: s}
336 return rs
337 }
338
339 type ProjectsInstancesDatabasesDatabaseRolesService struct {
340 s *Service
341 }
342
343 func NewProjectsInstancesDatabasesOperationsService(s *Service) *ProjectsInstancesDatabasesOperationsService {
344 rs := &ProjectsInstancesDatabasesOperationsService{s: s}
345 return rs
346 }
347
348 type ProjectsInstancesDatabasesOperationsService struct {
349 s *Service
350 }
351
352 func NewProjectsInstancesDatabasesSessionsService(s *Service) *ProjectsInstancesDatabasesSessionsService {
353 rs := &ProjectsInstancesDatabasesSessionsService{s: s}
354 return rs
355 }
356
357 type ProjectsInstancesDatabasesSessionsService struct {
358 s *Service
359 }
360
361 func NewProjectsInstancesInstancePartitionOperationsService(s *Service) *ProjectsInstancesInstancePartitionOperationsService {
362 rs := &ProjectsInstancesInstancePartitionOperationsService{s: s}
363 return rs
364 }
365
366 type ProjectsInstancesInstancePartitionOperationsService struct {
367 s *Service
368 }
369
370 func NewProjectsInstancesInstancePartitionsService(s *Service) *ProjectsInstancesInstancePartitionsService {
371 rs := &ProjectsInstancesInstancePartitionsService{s: s}
372 rs.Operations = NewProjectsInstancesInstancePartitionsOperationsService(s)
373 return rs
374 }
375
376 type ProjectsInstancesInstancePartitionsService struct {
377 s *Service
378
379 Operations *ProjectsInstancesInstancePartitionsOperationsService
380 }
381
382 func NewProjectsInstancesInstancePartitionsOperationsService(s *Service) *ProjectsInstancesInstancePartitionsOperationsService {
383 rs := &ProjectsInstancesInstancePartitionsOperationsService{s: s}
384 return rs
385 }
386
387 type ProjectsInstancesInstancePartitionsOperationsService struct {
388 s *Service
389 }
390
391 func NewProjectsInstancesOperationsService(s *Service) *ProjectsInstancesOperationsService {
392 rs := &ProjectsInstancesOperationsService{s: s}
393 return rs
394 }
395
396 type ProjectsInstancesOperationsService struct {
397 s *Service
398 }
399
400 func NewScansService(s *Service) *ScansService {
401 rs := &ScansService{s: s}
402 return rs
403 }
404
405 type ScansService struct {
406 s *Service
407 }
408
409
410 type AutoscalingConfig struct {
411
412 AutoscalingLimits *AutoscalingLimits `json:"autoscalingLimits,omitempty"`
413
414 AutoscalingTargets *AutoscalingTargets `json:"autoscalingTargets,omitempty"`
415
416
417
418
419
420 ForceSendFields []string `json:"-"`
421
422
423
424
425 NullFields []string `json:"-"`
426 }
427
428 func (s *AutoscalingConfig) MarshalJSON() ([]byte, error) {
429 type NoMethod AutoscalingConfig
430 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
431 }
432
433
434
435
436
437
438 type AutoscalingLimits struct {
439
440
441 MaxNodes int64 `json:"maxNodes,omitempty"`
442
443
444
445 MaxProcessingUnits int64 `json:"maxProcessingUnits,omitempty"`
446
447
448 MinNodes int64 `json:"minNodes,omitempty"`
449
450
451 MinProcessingUnits int64 `json:"minProcessingUnits,omitempty"`
452
453
454
455
456
457 ForceSendFields []string `json:"-"`
458
459
460
461
462 NullFields []string `json:"-"`
463 }
464
465 func (s *AutoscalingLimits) MarshalJSON() ([]byte, error) {
466 type NoMethod AutoscalingLimits
467 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
468 }
469
470
471 type AutoscalingTargets struct {
472
473
474
475
476 HighPriorityCpuUtilizationPercent int64 `json:"highPriorityCpuUtilizationPercent,omitempty"`
477
478
479
480
481 StorageUtilizationPercent int64 `json:"storageUtilizationPercent,omitempty"`
482
483
484
485
486
487
488 ForceSendFields []string `json:"-"`
489
490
491
492
493
494 NullFields []string `json:"-"`
495 }
496
497 func (s *AutoscalingTargets) MarshalJSON() ([]byte, error) {
498 type NoMethod AutoscalingTargets
499 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
500 }
501
502
503 type Backup struct {
504
505
506
507 CreateTime string `json:"createTime,omitempty"`
508
509
510
511 Database string `json:"database,omitempty"`
512
513
514
515
516
517
518
519
520 DatabaseDialect string `json:"databaseDialect,omitempty"`
521
522 EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
523
524
525
526
527
528
529
530 EncryptionInformation []*EncryptionInfo `json:"encryptionInformation,omitempty"`
531
532
533
534
535
536 ExpireTime string `json:"expireTime,omitempty"`
537
538
539
540
541
542 MaxExpireTime string `json:"maxExpireTime,omitempty"`
543
544
545
546
547
548
549
550
551 Name string `json:"name,omitempty"`
552
553
554
555
556
557
558
559 ReferencingBackups []string `json:"referencingBackups,omitempty"`
560
561
562
563
564
565
566 ReferencingDatabases []string `json:"referencingDatabases,omitempty"`
567
568 SizeBytes int64 `json:"sizeBytes,omitempty,string"`
569
570
571
572
573
574
575
576 State string `json:"state,omitempty"`
577
578
579
580
581 VersionTime string `json:"versionTime,omitempty"`
582
583
584 googleapi.ServerResponse `json:"-"`
585
586
587
588
589
590 ForceSendFields []string `json:"-"`
591
592
593
594
595 NullFields []string `json:"-"`
596 }
597
598 func (s *Backup) MarshalJSON() ([]byte, error) {
599 type NoMethod Backup
600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
601 }
602
603
604 type BackupInfo struct {
605
606 Backup string `json:"backup,omitempty"`
607
608 CreateTime string `json:"createTime,omitempty"`
609
610 SourceDatabase string `json:"sourceDatabase,omitempty"`
611
612
613
614
615 VersionTime string `json:"versionTime,omitempty"`
616
617
618
619
620
621 ForceSendFields []string `json:"-"`
622
623
624
625
626 NullFields []string `json:"-"`
627 }
628
629 func (s *BackupInfo) MarshalJSON() ([]byte, error) {
630 type NoMethod BackupInfo
631 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
632 }
633
634
635 type BatchCreateSessionsRequest struct {
636
637
638
639
640 SessionCount int64 `json:"sessionCount,omitempty"`
641
642 SessionTemplate *Session `json:"sessionTemplate,omitempty"`
643
644
645
646
647
648 ForceSendFields []string `json:"-"`
649
650
651
652
653 NullFields []string `json:"-"`
654 }
655
656 func (s *BatchCreateSessionsRequest) MarshalJSON() ([]byte, error) {
657 type NoMethod BatchCreateSessionsRequest
658 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
659 }
660
661
662 type BatchCreateSessionsResponse struct {
663
664 Session []*Session `json:"session,omitempty"`
665
666
667 googleapi.ServerResponse `json:"-"`
668
669
670
671
672
673 ForceSendFields []string `json:"-"`
674
675
676
677
678 NullFields []string `json:"-"`
679 }
680
681 func (s *BatchCreateSessionsResponse) MarshalJSON() ([]byte, error) {
682 type NoMethod BatchCreateSessionsResponse
683 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
684 }
685
686
687 type BatchWriteRequest struct {
688
689
690
691
692
693
694
695
696
697
698
699 ExcludeTxnFromChangeStreams bool `json:"excludeTxnFromChangeStreams,omitempty"`
700
701 MutationGroups []*MutationGroup `json:"mutationGroups,omitempty"`
702
703 RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
704
705
706
707
708
709 ForceSendFields []string `json:"-"`
710
711
712
713
714 NullFields []string `json:"-"`
715 }
716
717 func (s *BatchWriteRequest) MarshalJSON() ([]byte, error) {
718 type NoMethod BatchWriteRequest
719 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
720 }
721
722
723 type BatchWriteResponse struct {
724
725
726 CommitTimestamp string `json:"commitTimestamp,omitempty"`
727
728
729 Indexes []int64 `json:"indexes,omitempty"`
730
731
732 Status *Status `json:"status,omitempty"`
733
734
735 googleapi.ServerResponse `json:"-"`
736
737
738
739
740
741 ForceSendFields []string `json:"-"`
742
743
744
745
746 NullFields []string `json:"-"`
747 }
748
749 func (s *BatchWriteResponse) MarshalJSON() ([]byte, error) {
750 type NoMethod BatchWriteResponse
751 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
752 }
753
754
755 type BeginTransactionRequest struct {
756
757 Options *TransactionOptions `json:"options,omitempty"`
758
759
760
761
762 RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
763
764
765
766
767
768 ForceSendFields []string `json:"-"`
769
770
771
772
773 NullFields []string `json:"-"`
774 }
775
776 func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) {
777 type NoMethod BeginTransactionRequest
778 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
779 }
780
781
782 type Binding struct {
783
784
785
786
787
788
789
790
791 Condition *Expr `json:"condition,omitempty"`
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854 Members []string `json:"members,omitempty"`
855
856
857
858
859
860
861 Role string `json:"role,omitempty"`
862
863
864
865
866
867 ForceSendFields []string `json:"-"`
868
869
870
871
872 NullFields []string `json:"-"`
873 }
874
875 func (s *Binding) MarshalJSON() ([]byte, error) {
876 type NoMethod Binding
877 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
878 }
879
880
881
882 type ChildLink struct {
883
884 ChildIndex int64 `json:"childIndex,omitempty"`
885
886
887
888
889 Type string `json:"type,omitempty"`
890
891
892
893
894
895
896
897 Variable string `json:"variable,omitempty"`
898
899
900
901
902
903 ForceSendFields []string `json:"-"`
904
905
906
907
908 NullFields []string `json:"-"`
909 }
910
911 func (s *ChildLink) MarshalJSON() ([]byte, error) {
912 type NoMethod ChildLink
913 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
914 }
915
916
917 type CommitRequest struct {
918
919
920
921
922
923 MaxCommitDelay string `json:"maxCommitDelay,omitempty"`
924
925
926 Mutations []*Mutation `json:"mutations,omitempty"`
927
928 RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
929
930
931 ReturnCommitStats bool `json:"returnCommitStats,omitempty"`
932
933
934
935
936
937
938
939 SingleUseTransaction *TransactionOptions `json:"singleUseTransaction,omitempty"`
940
941 TransactionId string `json:"transactionId,omitempty"`
942
943
944
945
946
947 ForceSendFields []string `json:"-"`
948
949
950
951
952 NullFields []string `json:"-"`
953 }
954
955 func (s *CommitRequest) MarshalJSON() ([]byte, error) {
956 type NoMethod CommitRequest
957 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
958 }
959
960
961 type CommitResponse struct {
962
963
964 CommitStats *CommitStats `json:"commitStats,omitempty"`
965
966
967 CommitTimestamp string `json:"commitTimestamp,omitempty"`
968
969
970 googleapi.ServerResponse `json:"-"`
971
972
973
974
975
976 ForceSendFields []string `json:"-"`
977
978
979
980
981 NullFields []string `json:"-"`
982 }
983
984 func (s *CommitResponse) MarshalJSON() ([]byte, error) {
985 type NoMethod CommitResponse
986 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
987 }
988
989
990 type CommitStats struct {
991
992
993
994
995
996
997
998
999 MutationCount int64 `json:"mutationCount,omitempty,string"`
1000
1001
1002
1003
1004
1005 ForceSendFields []string `json:"-"`
1006
1007
1008
1009
1010 NullFields []string `json:"-"`
1011 }
1012
1013 func (s *CommitStats) MarshalJSON() ([]byte, error) {
1014 type NoMethod CommitStats
1015 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1016 }
1017
1018
1019
1020 type ContextValue struct {
1021
1022 Label *LocalizedString `json:"label,omitempty"`
1023
1024
1025
1026
1027
1028
1029
1030
1031 Severity string `json:"severity,omitempty"`
1032
1033 Unit string `json:"unit,omitempty"`
1034
1035 Value float64 `json:"value,omitempty"`
1036
1037
1038
1039
1040
1041 ForceSendFields []string `json:"-"`
1042
1043
1044
1045
1046 NullFields []string `json:"-"`
1047 }
1048
1049 func (s *ContextValue) MarshalJSON() ([]byte, error) {
1050 type NoMethod ContextValue
1051 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1052 }
1053
1054 func (s *ContextValue) UnmarshalJSON(data []byte) error {
1055 type NoMethod ContextValue
1056 var s1 struct {
1057 Value gensupport.JSONFloat64 `json:"value"`
1058 *NoMethod
1059 }
1060 s1.NoMethod = (*NoMethod)(s)
1061 if err := json.Unmarshal(data, &s1); err != nil {
1062 return err
1063 }
1064 s.Value = float64(s1.Value)
1065 return nil
1066 }
1067
1068
1069 type CopyBackupEncryptionConfig struct {
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082 EncryptionType string `json:"encryptionType,omitempty"`
1083
1084
1085
1086
1087 KmsKeyName string `json:"kmsKeyName,omitempty"`
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100 KmsKeyNames []string `json:"kmsKeyNames,omitempty"`
1101
1102
1103
1104
1105
1106 ForceSendFields []string `json:"-"`
1107
1108
1109
1110
1111 NullFields []string `json:"-"`
1112 }
1113
1114 func (s *CopyBackupEncryptionConfig) MarshalJSON() ([]byte, error) {
1115 type NoMethod CopyBackupEncryptionConfig
1116 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1117 }
1118
1119
1120 type CopyBackupMetadata struct {
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130 CancelTime string `json:"cancelTime,omitempty"`
1131
1132
1133 Name string `json:"name,omitempty"`
1134
1135 Progress *OperationProgress `json:"progress,omitempty"`
1136
1137
1138 SourceBackup string `json:"sourceBackup,omitempty"`
1139
1140
1141
1142
1143
1144 ForceSendFields []string `json:"-"`
1145
1146
1147
1148
1149 NullFields []string `json:"-"`
1150 }
1151
1152 func (s *CopyBackupMetadata) MarshalJSON() ([]byte, error) {
1153 type NoMethod CopyBackupMetadata
1154 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1155 }
1156
1157
1158 type CopyBackupRequest struct {
1159
1160
1161
1162 BackupId string `json:"backupId,omitempty"`
1163
1164
1165
1166
1167 EncryptionConfig *CopyBackupEncryptionConfig `json:"encryptionConfig,omitempty"`
1168
1169
1170
1171
1172
1173 ExpireTime string `json:"expireTime,omitempty"`
1174
1175
1176
1177
1178
1179 SourceBackup string `json:"sourceBackup,omitempty"`
1180
1181
1182
1183
1184
1185 ForceSendFields []string `json:"-"`
1186
1187
1188
1189
1190 NullFields []string `json:"-"`
1191 }
1192
1193 func (s *CopyBackupRequest) MarshalJSON() ([]byte, error) {
1194 type NoMethod CopyBackupRequest
1195 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1196 }
1197
1198
1199
1200 type CreateBackupMetadata struct {
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210 CancelTime string `json:"cancelTime,omitempty"`
1211
1212 Database string `json:"database,omitempty"`
1213
1214 Name string `json:"name,omitempty"`
1215
1216 Progress *OperationProgress `json:"progress,omitempty"`
1217
1218
1219
1220
1221
1222 ForceSendFields []string `json:"-"`
1223
1224
1225
1226
1227 NullFields []string `json:"-"`
1228 }
1229
1230 func (s *CreateBackupMetadata) MarshalJSON() ([]byte, error) {
1231 type NoMethod CreateBackupMetadata
1232 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1233 }
1234
1235
1236
1237 type CreateDatabaseMetadata struct {
1238
1239 Database string `json:"database,omitempty"`
1240
1241
1242
1243
1244
1245 ForceSendFields []string `json:"-"`
1246
1247
1248
1249
1250 NullFields []string `json:"-"`
1251 }
1252
1253 func (s *CreateDatabaseMetadata) MarshalJSON() ([]byte, error) {
1254 type NoMethod CreateDatabaseMetadata
1255 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1256 }
1257
1258
1259 type CreateDatabaseRequest struct {
1260
1261
1262
1263
1264
1265 CreateStatement string `json:"createStatement,omitempty"`
1266
1267
1268
1269
1270
1271
1272
1273 DatabaseDialect string `json:"databaseDialect,omitempty"`
1274
1275
1276
1277 EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
1278
1279
1280
1281
1282 ExtraStatements []string `json:"extraStatements,omitempty"`
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294 ProtoDescriptors string `json:"protoDescriptors,omitempty"`
1295
1296
1297
1298
1299
1300 ForceSendFields []string `json:"-"`
1301
1302
1303
1304
1305 NullFields []string `json:"-"`
1306 }
1307
1308 func (s *CreateDatabaseRequest) MarshalJSON() ([]byte, error) {
1309 type NoMethod CreateDatabaseRequest
1310 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1311 }
1312
1313
1314
1315 type CreateInstanceConfigMetadata struct {
1316
1317 CancelTime string `json:"cancelTime,omitempty"`
1318
1319 InstanceConfig *InstanceConfig `json:"instanceConfig,omitempty"`
1320
1321 Progress *InstanceOperationProgress `json:"progress,omitempty"`
1322
1323
1324
1325
1326
1327 ForceSendFields []string `json:"-"`
1328
1329
1330
1331
1332 NullFields []string `json:"-"`
1333 }
1334
1335 func (s *CreateInstanceConfigMetadata) MarshalJSON() ([]byte, error) {
1336 type NoMethod CreateInstanceConfigMetadata
1337 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1338 }
1339
1340
1341 type CreateInstanceConfigRequest struct {
1342
1343
1344
1345
1346 InstanceConfig *InstanceConfig `json:"instanceConfig,omitempty"`
1347
1348
1349
1350
1351 InstanceConfigId string `json:"instanceConfigId,omitempty"`
1352
1353
1354 ValidateOnly bool `json:"validateOnly,omitempty"`
1355
1356
1357
1358
1359
1360 ForceSendFields []string `json:"-"`
1361
1362
1363
1364
1365 NullFields []string `json:"-"`
1366 }
1367
1368 func (s *CreateInstanceConfigRequest) MarshalJSON() ([]byte, error) {
1369 type NoMethod CreateInstanceConfigRequest
1370 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1371 }
1372
1373
1374
1375 type CreateInstanceMetadata struct {
1376
1377
1378
1379 CancelTime string `json:"cancelTime,omitempty"`
1380
1381
1382 EndTime string `json:"endTime,omitempty"`
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392 ExpectedFulfillmentPeriod string `json:"expectedFulfillmentPeriod,omitempty"`
1393
1394 Instance *Instance `json:"instance,omitempty"`
1395
1396 StartTime string `json:"startTime,omitempty"`
1397
1398
1399
1400
1401
1402 ForceSendFields []string `json:"-"`
1403
1404
1405
1406
1407 NullFields []string `json:"-"`
1408 }
1409
1410 func (s *CreateInstanceMetadata) MarshalJSON() ([]byte, error) {
1411 type NoMethod CreateInstanceMetadata
1412 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1413 }
1414
1415
1416
1417 type CreateInstancePartitionMetadata struct {
1418
1419
1420
1421 CancelTime string `json:"cancelTime,omitempty"`
1422
1423
1424 EndTime string `json:"endTime,omitempty"`
1425
1426 InstancePartition *InstancePartition `json:"instancePartition,omitempty"`
1427
1428
1429 StartTime string `json:"startTime,omitempty"`
1430
1431
1432
1433
1434
1435 ForceSendFields []string `json:"-"`
1436
1437
1438
1439
1440 NullFields []string `json:"-"`
1441 }
1442
1443 func (s *CreateInstancePartitionMetadata) MarshalJSON() ([]byte, error) {
1444 type NoMethod CreateInstancePartitionMetadata
1445 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1446 }
1447
1448
1449 type CreateInstancePartitionRequest struct {
1450
1451
1452
1453 InstancePartition *InstancePartition `json:"instancePartition,omitempty"`
1454
1455
1456
1457 InstancePartitionId string `json:"instancePartitionId,omitempty"`
1458
1459
1460
1461
1462
1463 ForceSendFields []string `json:"-"`
1464
1465
1466
1467
1468 NullFields []string `json:"-"`
1469 }
1470
1471 func (s *CreateInstancePartitionRequest) MarshalJSON() ([]byte, error) {
1472 type NoMethod CreateInstancePartitionRequest
1473 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1474 }
1475
1476
1477 type CreateInstanceRequest struct {
1478
1479
1480 Instance *Instance `json:"instance,omitempty"`
1481
1482
1483
1484 InstanceId string `json:"instanceId,omitempty"`
1485
1486
1487
1488
1489
1490 ForceSendFields []string `json:"-"`
1491
1492
1493
1494
1495 NullFields []string `json:"-"`
1496 }
1497
1498 func (s *CreateInstanceRequest) MarshalJSON() ([]byte, error) {
1499 type NoMethod CreateInstanceRequest
1500 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1501 }
1502
1503
1504 type CreateSessionRequest struct {
1505
1506 Session *Session `json:"session,omitempty"`
1507
1508
1509
1510
1511
1512 ForceSendFields []string `json:"-"`
1513
1514
1515
1516
1517 NullFields []string `json:"-"`
1518 }
1519
1520 func (s *CreateSessionRequest) MarshalJSON() ([]byte, error) {
1521 type NoMethod CreateSessionRequest
1522 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1523 }
1524
1525
1526 type Database struct {
1527
1528
1529 CreateTime string `json:"createTime,omitempty"`
1530
1531
1532
1533
1534
1535
1536
1537 DatabaseDialect string `json:"databaseDialect,omitempty"`
1538
1539
1540
1541
1542 DefaultLeader string `json:"defaultLeader,omitempty"`
1543
1544
1545
1546
1547
1548 EarliestVersionTime string `json:"earliestVersionTime,omitempty"`
1549
1550
1551
1552
1553 EnableDropProtection bool `json:"enableDropProtection,omitempty"`
1554
1555
1556
1557
1558 EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
1559
1560
1561
1562
1563
1564
1565
1566 EncryptionInfo []*EncryptionInfo `json:"encryptionInfo,omitempty"`
1567
1568
1569
1570
1571 Name string `json:"name,omitempty"`
1572
1573
1574 Reconciling bool `json:"reconciling,omitempty"`
1575
1576
1577 RestoreInfo *RestoreInfo `json:"restoreInfo,omitempty"`
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591 State string `json:"state,omitempty"`
1592
1593
1594
1595
1596 VersionRetentionPeriod string `json:"versionRetentionPeriod,omitempty"`
1597
1598
1599 googleapi.ServerResponse `json:"-"`
1600
1601
1602
1603
1604
1605 ForceSendFields []string `json:"-"`
1606
1607
1608
1609
1610 NullFields []string `json:"-"`
1611 }
1612
1613 func (s *Database) MarshalJSON() ([]byte, error) {
1614 type NoMethod Database
1615 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1616 }
1617
1618
1619 type DatabaseRole struct {
1620
1621
1622
1623 Name string `json:"name,omitempty"`
1624
1625
1626
1627
1628
1629 ForceSendFields []string `json:"-"`
1630
1631
1632
1633
1634 NullFields []string `json:"-"`
1635 }
1636
1637 func (s *DatabaseRole) MarshalJSON() ([]byte, error) {
1638 type NoMethod DatabaseRole
1639 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1640 }
1641
1642
1643
1644
1645 type DdlStatementActionInfo struct {
1646
1647
1648 Action string `json:"action,omitempty"`
1649
1650
1651
1652
1653 EntityNames []string `json:"entityNames,omitempty"`
1654
1655
1656
1657 EntityType string `json:"entityType,omitempty"`
1658
1659
1660
1661
1662
1663 ForceSendFields []string `json:"-"`
1664
1665
1666
1667
1668 NullFields []string `json:"-"`
1669 }
1670
1671 func (s *DdlStatementActionInfo) MarshalJSON() ([]byte, error) {
1672 type NoMethod DdlStatementActionInfo
1673 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1674 }
1675
1676
1677 type Delete struct {
1678
1679
1680
1681
1682
1683 KeySet *KeySet `json:"keySet,omitempty"`
1684
1685 Table string `json:"table,omitempty"`
1686
1687
1688
1689
1690
1691 ForceSendFields []string `json:"-"`
1692
1693
1694
1695
1696 NullFields []string `json:"-"`
1697 }
1698
1699 func (s *Delete) MarshalJSON() ([]byte, error) {
1700 type NoMethod Delete
1701 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1702 }
1703
1704
1705 type DerivedMetric struct {
1706
1707 Denominator *LocalizedString `json:"denominator,omitempty"`
1708
1709 Numerator *LocalizedString `json:"numerator,omitempty"`
1710
1711
1712
1713
1714
1715 ForceSendFields []string `json:"-"`
1716
1717
1718
1719
1720 NullFields []string `json:"-"`
1721 }
1722
1723 func (s *DerivedMetric) MarshalJSON() ([]byte, error) {
1724 type NoMethod DerivedMetric
1725 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1726 }
1727
1728
1729
1730 type DiagnosticMessage struct {
1731
1732 Info *LocalizedString `json:"info,omitempty"`
1733
1734 Metric *LocalizedString `json:"metric,omitempty"`
1735
1736
1737
1738
1739
1740
1741
1742 MetricSpecific bool `json:"metricSpecific,omitempty"`
1743
1744
1745
1746
1747
1748
1749
1750
1751 Severity string `json:"severity,omitempty"`
1752
1753 ShortMessage *LocalizedString `json:"shortMessage,omitempty"`
1754
1755
1756
1757
1758
1759 ForceSendFields []string `json:"-"`
1760
1761
1762
1763
1764 NullFields []string `json:"-"`
1765 }
1766
1767 func (s *DiagnosticMessage) MarshalJSON() ([]byte, error) {
1768 type NoMethod DiagnosticMessage
1769 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1770 }
1771
1772
1773
1774
1775
1776 type DirectedReadOptions struct {
1777
1778
1779
1780 ExcludeReplicas *ExcludeReplicas `json:"excludeReplicas,omitempty"`
1781
1782
1783
1784
1785
1786 IncludeReplicas *IncludeReplicas `json:"includeReplicas,omitempty"`
1787
1788
1789
1790
1791
1792 ForceSendFields []string `json:"-"`
1793
1794
1795
1796
1797 NullFields []string `json:"-"`
1798 }
1799
1800 func (s *DirectedReadOptions) MarshalJSON() ([]byte, error) {
1801 type NoMethod DirectedReadOptions
1802 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1803 }
1804
1805
1806
1807
1808
1809 type Empty struct {
1810
1811 googleapi.ServerResponse `json:"-"`
1812 }
1813
1814
1815 type EncryptionConfig struct {
1816
1817
1818
1819 KmsKeyName string `json:"kmsKeyName,omitempty"`
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832 KmsKeyNames []string `json:"kmsKeyNames,omitempty"`
1833
1834
1835
1836
1837
1838 ForceSendFields []string `json:"-"`
1839
1840
1841
1842
1843 NullFields []string `json:"-"`
1844 }
1845
1846 func (s *EncryptionConfig) MarshalJSON() ([]byte, error) {
1847 type NoMethod EncryptionConfig
1848 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1849 }
1850
1851
1852
1853 type EncryptionInfo struct {
1854
1855
1856
1857 EncryptionStatus *Status `json:"encryptionStatus,omitempty"`
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870 EncryptionType string `json:"encryptionType,omitempty"`
1871
1872
1873 KmsKeyVersion string `json:"kmsKeyVersion,omitempty"`
1874
1875
1876
1877
1878
1879 ForceSendFields []string `json:"-"`
1880
1881
1882
1883
1884 NullFields []string `json:"-"`
1885 }
1886
1887 func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
1888 type NoMethod EncryptionInfo
1889 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1890 }
1891
1892
1893
1894 type ExcludeReplicas struct {
1895
1896 ReplicaSelections []*ReplicaSelection `json:"replicaSelections,omitempty"`
1897
1898
1899
1900
1901
1902 ForceSendFields []string `json:"-"`
1903
1904
1905
1906
1907 NullFields []string `json:"-"`
1908 }
1909
1910 func (s *ExcludeReplicas) MarshalJSON() ([]byte, error) {
1911 type NoMethod ExcludeReplicas
1912 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1913 }
1914
1915
1916 type ExecuteBatchDmlRequest struct {
1917
1918 RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
1919
1920
1921
1922
1923
1924
1925
1926 Seqno int64 `json:"seqno,omitempty,string"`
1927
1928
1929
1930
1931
1932 Statements []*Statement `json:"statements,omitempty"`
1933
1934
1935
1936
1937 Transaction *TransactionSelector `json:"transaction,omitempty"`
1938
1939
1940
1941
1942
1943 ForceSendFields []string `json:"-"`
1944
1945
1946
1947
1948 NullFields []string `json:"-"`
1949 }
1950
1951 func (s *ExecuteBatchDmlRequest) MarshalJSON() ([]byte, error) {
1952 type NoMethod ExecuteBatchDmlRequest
1953 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1954 }
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972 type ExecuteBatchDmlResponse struct {
1973
1974
1975
1976
1977
1978 ResultSets []*ResultSet `json:"resultSets,omitempty"`
1979
1980
1981 Status *Status `json:"status,omitempty"`
1982
1983
1984 googleapi.ServerResponse `json:"-"`
1985
1986
1987
1988
1989
1990 ForceSendFields []string `json:"-"`
1991
1992
1993
1994
1995 NullFields []string `json:"-"`
1996 }
1997
1998 func (s *ExecuteBatchDmlResponse) MarshalJSON() ([]byte, error) {
1999 type NoMethod ExecuteBatchDmlResponse
2000 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2001 }
2002
2003
2004 type ExecuteSqlRequest struct {
2005
2006
2007
2008
2009 DataBoostEnabled bool `json:"dataBoostEnabled,omitempty"`
2010
2011 DirectedReadOptions *DirectedReadOptions `json:"directedReadOptions,omitempty"`
2012
2013
2014
2015
2016
2017
2018 ParamTypes map[string]Type `json:"paramTypes,omitempty"`
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028 Params googleapi.RawMessage `json:"params,omitempty"`
2029
2030
2031
2032
2033 PartitionToken string `json:"partitionToken,omitempty"`
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044 QueryMode string `json:"queryMode,omitempty"`
2045
2046 QueryOptions *QueryOptions `json:"queryOptions,omitempty"`
2047
2048 RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
2049
2050
2051
2052
2053
2054
2055 ResumeToken string `json:"resumeToken,omitempty"`
2056
2057
2058
2059
2060
2061
2062
2063 Seqno int64 `json:"seqno,omitempty,string"`
2064
2065 Sql string `json:"sql,omitempty"`
2066
2067
2068
2069
2070
2071
2072 Transaction *TransactionSelector `json:"transaction,omitempty"`
2073
2074
2075
2076
2077
2078 ForceSendFields []string `json:"-"`
2079
2080
2081
2082
2083 NullFields []string `json:"-"`
2084 }
2085
2086 func (s *ExecuteSqlRequest) MarshalJSON() ([]byte, error) {
2087 type NoMethod ExecuteSqlRequest
2088 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2089 }
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107 type Expr struct {
2108
2109
2110 Description string `json:"description,omitempty"`
2111
2112
2113 Expression string `json:"expression,omitempty"`
2114
2115
2116 Location string `json:"location,omitempty"`
2117
2118
2119
2120 Title string `json:"title,omitempty"`
2121
2122
2123
2124
2125
2126 ForceSendFields []string `json:"-"`
2127
2128
2129
2130
2131 NullFields []string `json:"-"`
2132 }
2133
2134 func (s *Expr) MarshalJSON() ([]byte, error) {
2135 type NoMethod Expr
2136 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2137 }
2138
2139
2140 type Field struct {
2141
2142
2143
2144
2145
2146
2147 Name string `json:"name,omitempty"`
2148
2149 Type *Type `json:"type,omitempty"`
2150
2151
2152
2153
2154
2155 ForceSendFields []string `json:"-"`
2156
2157
2158
2159
2160 NullFields []string `json:"-"`
2161 }
2162
2163 func (s *Field) MarshalJSON() ([]byte, error) {
2164 type NoMethod Field
2165 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2166 }
2167
2168
2169
2170 type FreeInstanceMetadata struct {
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182 ExpireBehavior string `json:"expireBehavior,omitempty"`
2183
2184
2185
2186
2187 ExpireTime string `json:"expireTime,omitempty"`
2188
2189
2190 UpgradeTime string `json:"upgradeTime,omitempty"`
2191
2192
2193
2194
2195
2196 ForceSendFields []string `json:"-"`
2197
2198
2199
2200
2201 NullFields []string `json:"-"`
2202 }
2203
2204 func (s *FreeInstanceMetadata) MarshalJSON() ([]byte, error) {
2205 type NoMethod FreeInstanceMetadata
2206 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2207 }
2208
2209
2210 type GetDatabaseDdlResponse struct {
2211
2212
2213
2214
2215
2216 ProtoDescriptors string `json:"protoDescriptors,omitempty"`
2217
2218
2219 Statements []string `json:"statements,omitempty"`
2220
2221
2222 googleapi.ServerResponse `json:"-"`
2223
2224
2225
2226
2227
2228 ForceSendFields []string `json:"-"`
2229
2230
2231
2232
2233 NullFields []string `json:"-"`
2234 }
2235
2236 func (s *GetDatabaseDdlResponse) MarshalJSON() ([]byte, error) {
2237 type NoMethod GetDatabaseDdlResponse
2238 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2239 }
2240
2241
2242 type GetIamPolicyRequest struct {
2243
2244
2245 Options *GetPolicyOptions `json:"options,omitempty"`
2246
2247
2248
2249
2250
2251 ForceSendFields []string `json:"-"`
2252
2253
2254
2255
2256 NullFields []string `json:"-"`
2257 }
2258
2259 func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
2260 type NoMethod GetIamPolicyRequest
2261 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2262 }
2263
2264
2265 type GetPolicyOptions struct {
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
2278
2279
2280
2281
2282
2283 ForceSendFields []string `json:"-"`
2284
2285
2286
2287
2288 NullFields []string `json:"-"`
2289 }
2290
2291 func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
2292 type NoMethod GetPolicyOptions
2293 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2294 }
2295
2296
2297
2298
2299 type IncludeReplicas struct {
2300
2301
2302
2303 AutoFailoverDisabled bool `json:"autoFailoverDisabled,omitempty"`
2304
2305 ReplicaSelections []*ReplicaSelection `json:"replicaSelections,omitempty"`
2306
2307
2308
2309
2310
2311 ForceSendFields []string `json:"-"`
2312
2313
2314
2315
2316 NullFields []string `json:"-"`
2317 }
2318
2319 func (s *IncludeReplicas) MarshalJSON() ([]byte, error) {
2320 type NoMethod IncludeReplicas
2321 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2322 }
2323
2324
2325
2326 type IndexAdvice struct {
2327
2328
2329 Ddl []string `json:"ddl,omitempty"`
2330
2331
2332
2333 ImprovementFactor float64 `json:"improvementFactor,omitempty"`
2334
2335
2336
2337
2338
2339 ForceSendFields []string `json:"-"`
2340
2341
2342
2343
2344 NullFields []string `json:"-"`
2345 }
2346
2347 func (s *IndexAdvice) MarshalJSON() ([]byte, error) {
2348 type NoMethod IndexAdvice
2349 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2350 }
2351
2352 func (s *IndexAdvice) UnmarshalJSON(data []byte) error {
2353 type NoMethod IndexAdvice
2354 var s1 struct {
2355 ImprovementFactor gensupport.JSONFloat64 `json:"improvementFactor"`
2356 *NoMethod
2357 }
2358 s1.NoMethod = (*NoMethod)(s)
2359 if err := json.Unmarshal(data, &s1); err != nil {
2360 return err
2361 }
2362 s.ImprovementFactor = float64(s1.ImprovementFactor)
2363 return nil
2364 }
2365
2366
2367
2368 type IndexedHotKey struct {
2369
2370
2371
2372
2373 SparseHotKeys map[string]int64 `json:"sparseHotKeys,omitempty"`
2374
2375
2376
2377
2378
2379 ForceSendFields []string `json:"-"`
2380
2381
2382
2383
2384 NullFields []string `json:"-"`
2385 }
2386
2387 func (s *IndexedHotKey) MarshalJSON() ([]byte, error) {
2388 type NoMethod IndexedHotKey
2389 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2390 }
2391
2392
2393
2394 type IndexedKeyRangeInfos struct {
2395
2396
2397 KeyRangeInfos map[string]KeyRangeInfos `json:"keyRangeInfos,omitempty"`
2398
2399
2400
2401
2402
2403 ForceSendFields []string `json:"-"`
2404
2405
2406
2407
2408 NullFields []string `json:"-"`
2409 }
2410
2411 func (s *IndexedKeyRangeInfos) MarshalJSON() ([]byte, error) {
2412 type NoMethod IndexedKeyRangeInfos
2413 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2414 }
2415
2416
2417
2418 type Instance struct {
2419
2420
2421
2422
2423 AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"`
2424
2425
2426
2427 Config string `json:"config,omitempty"`
2428
2429 CreateTime string `json:"createTime,omitempty"`
2430
2431
2432
2433 DisplayName string `json:"displayName,omitempty"`
2434
2435 EndpointUris []string `json:"endpointUris,omitempty"`
2436
2437
2438 FreeInstanceMetadata *FreeInstanceMetadata `json:"freeInstanceMetadata,omitempty"`
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448 InstanceType string `json:"instanceType,omitempty"`
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465 Labels map[string]string `json:"labels,omitempty"`
2466
2467
2468
2469
2470 Name string `json:"name,omitempty"`
2471
2472
2473
2474
2475
2476
2477
2478 NodeCount int64 `json:"nodeCount,omitempty"`
2479
2480
2481
2482
2483
2484
2485
2486 ProcessingUnits int64 `json:"processingUnits,omitempty"`
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497 State string `json:"state,omitempty"`
2498
2499
2500 UpdateTime string `json:"updateTime,omitempty"`
2501
2502
2503 googleapi.ServerResponse `json:"-"`
2504
2505
2506
2507
2508
2509 ForceSendFields []string `json:"-"`
2510
2511
2512
2513
2514 NullFields []string `json:"-"`
2515 }
2516
2517 func (s *Instance) MarshalJSON() ([]byte, error) {
2518 type NoMethod Instance
2519 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2520 }
2521
2522
2523
2524
2525 type InstanceConfig struct {
2526
2527
2528
2529
2530 BaseConfig string `json:"baseConfig,omitempty"`
2531
2532
2533
2534
2535
2536
2537
2538 ConfigType string `json:"configType,omitempty"`
2539
2540 DisplayName string `json:"displayName,omitempty"`
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550 Etag string `json:"etag,omitempty"`
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565 FreeInstanceAvailability string `json:"freeInstanceAvailability,omitempty"`
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582 Labels map[string]string `json:"labels,omitempty"`
2583
2584
2585 LeaderOptions []string `json:"leaderOptions,omitempty"`
2586
2587
2588 Name string `json:"name,omitempty"`
2589
2590
2591
2592 OptionalReplicas []*ReplicaInfo `json:"optionalReplicas,omitempty"`
2593
2594
2595 Reconciling bool `json:"reconciling,omitempty"`
2596
2597
2598 Replicas []*ReplicaInfo `json:"replicas,omitempty"`
2599
2600
2601
2602
2603
2604
2605
2606
2607 State string `json:"state,omitempty"`
2608
2609
2610 StorageLimitPerProcessingUnit int64 `json:"storageLimitPerProcessingUnit,omitempty,string"`
2611
2612
2613 googleapi.ServerResponse `json:"-"`
2614
2615
2616
2617
2618
2619 ForceSendFields []string `json:"-"`
2620
2621
2622
2623
2624 NullFields []string `json:"-"`
2625 }
2626
2627 func (s *InstanceConfig) MarshalJSON() ([]byte, error) {
2628 type NoMethod InstanceConfig
2629 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2630 }
2631
2632
2633
2634 type InstanceOperationProgress struct {
2635
2636
2637 EndTime string `json:"endTime,omitempty"`
2638
2639
2640 ProgressPercent int64 `json:"progressPercent,omitempty"`
2641
2642 StartTime string `json:"startTime,omitempty"`
2643
2644
2645
2646
2647
2648 ForceSendFields []string `json:"-"`
2649
2650
2651
2652
2653 NullFields []string `json:"-"`
2654 }
2655
2656 func (s *InstanceOperationProgress) MarshalJSON() ([]byte, error) {
2657 type NoMethod InstanceOperationProgress
2658 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2659 }
2660
2661
2662
2663 type InstancePartition struct {
2664
2665
2666
2667 Config string `json:"config,omitempty"`
2668
2669
2670 CreateTime string `json:"createTime,omitempty"`
2671
2672
2673
2674 DisplayName string `json:"displayName,omitempty"`
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685 Etag string `json:"etag,omitempty"`
2686
2687
2688
2689
2690
2691 Name string `json:"name,omitempty"`
2692
2693
2694
2695
2696 NodeCount int64 `json:"nodeCount,omitempty"`
2697
2698
2699
2700
2701
2702 ProcessingUnits int64 `json:"processingUnits,omitempty"`
2703
2704
2705
2706
2707 ReferencingBackups []string `json:"referencingBackups,omitempty"`
2708
2709
2710
2711
2712 ReferencingDatabases []string `json:"referencingDatabases,omitempty"`
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722 State string `json:"state,omitempty"`
2723
2724
2725 UpdateTime string `json:"updateTime,omitempty"`
2726
2727
2728 googleapi.ServerResponse `json:"-"`
2729
2730
2731
2732
2733
2734 ForceSendFields []string `json:"-"`
2735
2736
2737
2738
2739 NullFields []string `json:"-"`
2740 }
2741
2742 func (s *InstancePartition) MarshalJSON() ([]byte, error) {
2743 type NoMethod InstancePartition
2744 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2745 }
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781 type KeyRange struct {
2782
2783
2784 EndClosed []interface{} `json:"endClosed,omitempty"`
2785
2786
2787 EndOpen []interface{} `json:"endOpen,omitempty"`
2788
2789
2790 StartClosed []interface{} `json:"startClosed,omitempty"`
2791
2792
2793 StartOpen []interface{} `json:"startOpen,omitempty"`
2794
2795
2796
2797
2798
2799 ForceSendFields []string `json:"-"`
2800
2801
2802
2803
2804 NullFields []string `json:"-"`
2805 }
2806
2807 func (s *KeyRange) MarshalJSON() ([]byte, error) {
2808 type NoMethod KeyRange
2809 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2810 }
2811
2812
2813
2814 type KeyRangeInfo struct {
2815
2816 ContextValues []*ContextValue `json:"contextValues,omitempty"`
2817
2818 EndKeyIndex int64 `json:"endKeyIndex,omitempty"`
2819
2820 Info *LocalizedString `json:"info,omitempty"`
2821
2822 KeysCount int64 `json:"keysCount,omitempty,string"`
2823
2824 Metric *LocalizedString `json:"metric,omitempty"`
2825
2826 StartKeyIndex int64 `json:"startKeyIndex,omitempty"`
2827
2828
2829 TimeOffset string `json:"timeOffset,omitempty"`
2830
2831
2832 Unit *LocalizedString `json:"unit,omitempty"`
2833
2834 Value float64 `json:"value,omitempty"`
2835
2836
2837
2838
2839
2840 ForceSendFields []string `json:"-"`
2841
2842
2843
2844
2845 NullFields []string `json:"-"`
2846 }
2847
2848 func (s *KeyRangeInfo) MarshalJSON() ([]byte, error) {
2849 type NoMethod KeyRangeInfo
2850 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2851 }
2852
2853 func (s *KeyRangeInfo) UnmarshalJSON(data []byte) error {
2854 type NoMethod KeyRangeInfo
2855 var s1 struct {
2856 Value gensupport.JSONFloat64 `json:"value"`
2857 *NoMethod
2858 }
2859 s1.NoMethod = (*NoMethod)(s)
2860 if err := json.Unmarshal(data, &s1); err != nil {
2861 return err
2862 }
2863 s.Value = float64(s1.Value)
2864 return nil
2865 }
2866
2867
2868
2869 type KeyRangeInfos struct {
2870
2871 Infos []*KeyRangeInfo `json:"infos,omitempty"`
2872
2873
2874
2875 TotalSize int64 `json:"totalSize,omitempty"`
2876
2877
2878
2879
2880
2881 ForceSendFields []string `json:"-"`
2882
2883
2884
2885
2886 NullFields []string `json:"-"`
2887 }
2888
2889 func (s *KeyRangeInfos) MarshalJSON() ([]byte, error) {
2890 type NoMethod KeyRangeInfos
2891 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2892 }
2893
2894
2895
2896
2897
2898
2899
2900 type KeySet struct {
2901
2902
2903
2904 All bool `json:"all,omitempty"`
2905
2906
2907
2908 Keys [][]interface{} `json:"keys,omitempty"`
2909
2910
2911 Ranges []*KeyRange `json:"ranges,omitempty"`
2912
2913
2914
2915
2916
2917 ForceSendFields []string `json:"-"`
2918
2919
2920
2921
2922 NullFields []string `json:"-"`
2923 }
2924
2925 func (s *KeySet) MarshalJSON() ([]byte, error) {
2926 type NoMethod KeySet
2927 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2928 }
2929
2930
2931 type ListBackupOperationsResponse struct {
2932
2933
2934 NextPageToken string `json:"nextPageToken,omitempty"`
2935
2936
2937
2938
2939
2940
2941
2942 Operations []*Operation `json:"operations,omitempty"`
2943
2944
2945 googleapi.ServerResponse `json:"-"`
2946
2947
2948
2949
2950
2951 ForceSendFields []string `json:"-"`
2952
2953
2954
2955
2956 NullFields []string `json:"-"`
2957 }
2958
2959 func (s *ListBackupOperationsResponse) MarshalJSON() ([]byte, error) {
2960 type NoMethod ListBackupOperationsResponse
2961 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2962 }
2963
2964
2965 type ListBackupsResponse struct {
2966
2967
2968
2969 Backups []*Backup `json:"backups,omitempty"`
2970
2971
2972 NextPageToken string `json:"nextPageToken,omitempty"`
2973
2974
2975 googleapi.ServerResponse `json:"-"`
2976
2977
2978
2979
2980
2981 ForceSendFields []string `json:"-"`
2982
2983
2984
2985
2986 NullFields []string `json:"-"`
2987 }
2988
2989 func (s *ListBackupsResponse) MarshalJSON() ([]byte, error) {
2990 type NoMethod ListBackupsResponse
2991 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2992 }
2993
2994
2995 type ListDatabaseOperationsResponse struct {
2996
2997
2998 NextPageToken string `json:"nextPageToken,omitempty"`
2999
3000
3001
3002 Operations []*Operation `json:"operations,omitempty"`
3003
3004
3005 googleapi.ServerResponse `json:"-"`
3006
3007
3008
3009
3010
3011 ForceSendFields []string `json:"-"`
3012
3013
3014
3015
3016 NullFields []string `json:"-"`
3017 }
3018
3019 func (s *ListDatabaseOperationsResponse) MarshalJSON() ([]byte, error) {
3020 type NoMethod ListDatabaseOperationsResponse
3021 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3022 }
3023
3024
3025 type ListDatabaseRolesResponse struct {
3026
3027 DatabaseRoles []*DatabaseRole `json:"databaseRoles,omitempty"`
3028
3029
3030 NextPageToken string `json:"nextPageToken,omitempty"`
3031
3032
3033 googleapi.ServerResponse `json:"-"`
3034
3035
3036
3037
3038
3039 ForceSendFields []string `json:"-"`
3040
3041
3042
3043
3044 NullFields []string `json:"-"`
3045 }
3046
3047 func (s *ListDatabaseRolesResponse) MarshalJSON() ([]byte, error) {
3048 type NoMethod ListDatabaseRolesResponse
3049 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3050 }
3051
3052
3053 type ListDatabasesResponse struct {
3054
3055 Databases []*Database `json:"databases,omitempty"`
3056
3057
3058 NextPageToken string `json:"nextPageToken,omitempty"`
3059
3060
3061 googleapi.ServerResponse `json:"-"`
3062
3063
3064
3065
3066
3067 ForceSendFields []string `json:"-"`
3068
3069
3070
3071
3072 NullFields []string `json:"-"`
3073 }
3074
3075 func (s *ListDatabasesResponse) MarshalJSON() ([]byte, error) {
3076 type NoMethod ListDatabasesResponse
3077 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3078 }
3079
3080
3081
3082 type ListInstanceConfigOperationsResponse struct {
3083
3084
3085 NextPageToken string `json:"nextPageToken,omitempty"`
3086
3087
3088
3089
3090 Operations []*Operation `json:"operations,omitempty"`
3091
3092
3093 googleapi.ServerResponse `json:"-"`
3094
3095
3096
3097
3098
3099 ForceSendFields []string `json:"-"`
3100
3101
3102
3103
3104 NullFields []string `json:"-"`
3105 }
3106
3107 func (s *ListInstanceConfigOperationsResponse) MarshalJSON() ([]byte, error) {
3108 type NoMethod ListInstanceConfigOperationsResponse
3109 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3110 }
3111
3112
3113 type ListInstanceConfigsResponse struct {
3114
3115 InstanceConfigs []*InstanceConfig `json:"instanceConfigs,omitempty"`
3116
3117
3118
3119 NextPageToken string `json:"nextPageToken,omitempty"`
3120
3121
3122 googleapi.ServerResponse `json:"-"`
3123
3124
3125
3126
3127
3128 ForceSendFields []string `json:"-"`
3129
3130
3131
3132
3133 NullFields []string `json:"-"`
3134 }
3135
3136 func (s *ListInstanceConfigsResponse) MarshalJSON() ([]byte, error) {
3137 type NoMethod ListInstanceConfigsResponse
3138 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3139 }
3140
3141
3142
3143 type ListInstancePartitionOperationsResponse struct {
3144
3145
3146 NextPageToken string `json:"nextPageToken,omitempty"`
3147
3148
3149
3150
3151 Operations []*Operation `json:"operations,omitempty"`
3152
3153
3154
3155 UnreachableInstancePartitions []string `json:"unreachableInstancePartitions,omitempty"`
3156
3157
3158 googleapi.ServerResponse `json:"-"`
3159
3160
3161
3162
3163
3164 ForceSendFields []string `json:"-"`
3165
3166
3167
3168
3169 NullFields []string `json:"-"`
3170 }
3171
3172 func (s *ListInstancePartitionOperationsResponse) MarshalJSON() ([]byte, error) {
3173 type NoMethod ListInstancePartitionOperationsResponse
3174 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3175 }
3176
3177
3178 type ListInstancePartitionsResponse struct {
3179
3180 InstancePartitions []*InstancePartition `json:"instancePartitions,omitempty"`
3181
3182
3183
3184 NextPageToken string `json:"nextPageToken,omitempty"`
3185
3186
3187
3188 Unreachable []string `json:"unreachable,omitempty"`
3189
3190
3191 googleapi.ServerResponse `json:"-"`
3192
3193
3194
3195
3196
3197 ForceSendFields []string `json:"-"`
3198
3199
3200
3201
3202 NullFields []string `json:"-"`
3203 }
3204
3205 func (s *ListInstancePartitionsResponse) MarshalJSON() ([]byte, error) {
3206 type NoMethod ListInstancePartitionsResponse
3207 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3208 }
3209
3210
3211 type ListInstancesResponse struct {
3212
3213 Instances []*Instance `json:"instances,omitempty"`
3214
3215
3216 NextPageToken string `json:"nextPageToken,omitempty"`
3217
3218
3219 Unreachable []string `json:"unreachable,omitempty"`
3220
3221
3222 googleapi.ServerResponse `json:"-"`
3223
3224
3225
3226
3227
3228 ForceSendFields []string `json:"-"`
3229
3230
3231
3232
3233 NullFields []string `json:"-"`
3234 }
3235
3236 func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
3237 type NoMethod ListInstancesResponse
3238 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3239 }
3240
3241
3242 type ListOperationsResponse struct {
3243
3244 NextPageToken string `json:"nextPageToken,omitempty"`
3245
3246
3247 Operations []*Operation `json:"operations,omitempty"`
3248
3249
3250 googleapi.ServerResponse `json:"-"`
3251
3252
3253
3254
3255
3256 ForceSendFields []string `json:"-"`
3257
3258
3259
3260
3261 NullFields []string `json:"-"`
3262 }
3263
3264 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
3265 type NoMethod ListOperationsResponse
3266 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3267 }
3268
3269
3270 type ListScansResponse struct {
3271
3272
3273 NextPageToken string `json:"nextPageToken,omitempty"`
3274
3275 Scans []*Scan `json:"scans,omitempty"`
3276
3277
3278 googleapi.ServerResponse `json:"-"`
3279
3280
3281
3282
3283
3284 ForceSendFields []string `json:"-"`
3285
3286
3287
3288
3289 NullFields []string `json:"-"`
3290 }
3291
3292 func (s *ListScansResponse) MarshalJSON() ([]byte, error) {
3293 type NoMethod ListScansResponse
3294 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3295 }
3296
3297
3298 type ListSessionsResponse struct {
3299
3300
3301 NextPageToken string `json:"nextPageToken,omitempty"`
3302
3303 Sessions []*Session `json:"sessions,omitempty"`
3304
3305
3306 googleapi.ServerResponse `json:"-"`
3307
3308
3309
3310
3311
3312 ForceSendFields []string `json:"-"`
3313
3314
3315
3316
3317 NullFields []string `json:"-"`
3318 }
3319
3320 func (s *ListSessionsResponse) MarshalJSON() ([]byte, error) {
3321 type NoMethod ListSessionsResponse
3322 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3323 }
3324
3325
3326
3327 type LocalizedString struct {
3328
3329
3330
3331 Args map[string]string `json:"args,omitempty"`
3332
3333
3334
3335 Message string `json:"message,omitempty"`
3336
3337
3338 Token string `json:"token,omitempty"`
3339
3340
3341
3342
3343
3344 ForceSendFields []string `json:"-"`
3345
3346
3347
3348
3349 NullFields []string `json:"-"`
3350 }
3351
3352 func (s *LocalizedString) MarshalJSON() ([]byte, error) {
3353 type NoMethod LocalizedString
3354 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3355 }
3356
3357
3358
3359 type Metric struct {
3360
3361
3362
3363
3364
3365
3366 Aggregation string `json:"aggregation,omitempty"`
3367
3368
3369 Category *LocalizedString `json:"category,omitempty"`
3370
3371
3372 Derived *DerivedMetric `json:"derived,omitempty"`
3373
3374 DisplayLabel *LocalizedString `json:"displayLabel,omitempty"`
3375
3376 HasNonzeroData bool `json:"hasNonzeroData,omitempty"`
3377
3378
3379
3380
3381 HotValue float64 `json:"hotValue,omitempty"`
3382
3383
3384 IndexedHotKeys map[string]IndexedHotKey `json:"indexedHotKeys,omitempty"`
3385
3386
3387
3388 IndexedKeyRangeInfos map[string]IndexedKeyRangeInfos `json:"indexedKeyRangeInfos,omitempty"`
3389
3390 Info *LocalizedString `json:"info,omitempty"`
3391
3392 Matrix *MetricMatrix `json:"matrix,omitempty"`
3393
3394 Unit *LocalizedString `json:"unit,omitempty"`
3395
3396 Visible bool `json:"visible,omitempty"`
3397
3398
3399
3400
3401
3402 ForceSendFields []string `json:"-"`
3403
3404
3405
3406
3407 NullFields []string `json:"-"`
3408 }
3409
3410 func (s *Metric) MarshalJSON() ([]byte, error) {
3411 type NoMethod Metric
3412 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3413 }
3414
3415 func (s *Metric) UnmarshalJSON(data []byte) error {
3416 type NoMethod Metric
3417 var s1 struct {
3418 HotValue gensupport.JSONFloat64 `json:"hotValue"`
3419 *NoMethod
3420 }
3421 s1.NoMethod = (*NoMethod)(s)
3422 if err := json.Unmarshal(data, &s1); err != nil {
3423 return err
3424 }
3425 s.HotValue = float64(s1.HotValue)
3426 return nil
3427 }
3428
3429
3430 type MetricMatrix struct {
3431
3432 Rows []*MetricMatrixRow `json:"rows,omitempty"`
3433
3434
3435
3436
3437
3438 ForceSendFields []string `json:"-"`
3439
3440
3441
3442
3443 NullFields []string `json:"-"`
3444 }
3445
3446 func (s *MetricMatrix) MarshalJSON() ([]byte, error) {
3447 type NoMethod MetricMatrix
3448 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3449 }
3450
3451
3452 type MetricMatrixRow struct {
3453
3454 Cols []float64 `json:"cols,omitempty"`
3455
3456
3457
3458
3459
3460 ForceSendFields []string `json:"-"`
3461
3462
3463
3464
3465 NullFields []string `json:"-"`
3466 }
3467
3468 func (s *MetricMatrixRow) MarshalJSON() ([]byte, error) {
3469 type NoMethod MetricMatrixRow
3470 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3471 }
3472
3473 func (s *MetricMatrixRow) UnmarshalJSON(data []byte) error {
3474 type NoMethod MetricMatrixRow
3475 var s1 struct {
3476 Cols []gensupport.JSONFloat64 `json:"cols"`
3477 *NoMethod
3478 }
3479 s1.NoMethod = (*NoMethod)(s)
3480 if err := json.Unmarshal(data, &s1); err != nil {
3481 return err
3482 }
3483 s.Cols = make([]float64, len(s1.Cols))
3484 for i := range s1.Cols {
3485 s.Cols[i] = float64(s1.Cols[i])
3486 }
3487 return nil
3488 }
3489
3490
3491 type MoveInstanceRequest struct {
3492
3493
3494 TargetConfig string `json:"targetConfig,omitempty"`
3495
3496
3497
3498
3499
3500 ForceSendFields []string `json:"-"`
3501
3502
3503
3504
3505 NullFields []string `json:"-"`
3506 }
3507
3508 func (s *MoveInstanceRequest) MarshalJSON() ([]byte, error) {
3509 type NoMethod MoveInstanceRequest
3510 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3511 }
3512
3513
3514
3515 type Mutation struct {
3516
3517
3518 Delete *Delete `json:"delete,omitempty"`
3519
3520
3521 Insert *Write `json:"insert,omitempty"`
3522
3523
3524
3525
3526
3527
3528 InsertOrUpdate *Write `json:"insertOrUpdate,omitempty"`
3529
3530
3531
3532
3533
3534
3535
3536 Replace *Write `json:"replace,omitempty"`
3537
3538
3539 Update *Write `json:"update,omitempty"`
3540
3541
3542
3543
3544
3545 ForceSendFields []string `json:"-"`
3546
3547
3548
3549
3550 NullFields []string `json:"-"`
3551 }
3552
3553 func (s *Mutation) MarshalJSON() ([]byte, error) {
3554 type NoMethod Mutation
3555 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3556 }
3557
3558
3559
3560
3561
3562 type MutationGroup struct {
3563
3564 Mutations []*Mutation `json:"mutations,omitempty"`
3565
3566
3567
3568
3569
3570 ForceSendFields []string `json:"-"`
3571
3572
3573
3574
3575 NullFields []string `json:"-"`
3576 }
3577
3578 func (s *MutationGroup) MarshalJSON() ([]byte, error) {
3579 type NoMethod MutationGroup
3580 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3581 }
3582
3583
3584
3585 type Operation struct {
3586
3587
3588
3589 Done bool `json:"done,omitempty"`
3590
3591 Error *Status `json:"error,omitempty"`
3592
3593
3594
3595
3596 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3597
3598
3599
3600 Name string `json:"name,omitempty"`
3601
3602
3603
3604
3605
3606
3607
3608 Response googleapi.RawMessage `json:"response,omitempty"`
3609
3610
3611 googleapi.ServerResponse `json:"-"`
3612
3613
3614
3615
3616
3617 ForceSendFields []string `json:"-"`
3618
3619
3620
3621
3622 NullFields []string `json:"-"`
3623 }
3624
3625 func (s *Operation) MarshalJSON() ([]byte, error) {
3626 type NoMethod Operation
3627 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3628 }
3629
3630
3631
3632 type OperationProgress struct {
3633
3634
3635 EndTime string `json:"endTime,omitempty"`
3636
3637
3638 ProgressPercent int64 `json:"progressPercent,omitempty"`
3639
3640 StartTime string `json:"startTime,omitempty"`
3641
3642
3643
3644
3645
3646 ForceSendFields []string `json:"-"`
3647
3648
3649
3650
3651 NullFields []string `json:"-"`
3652 }
3653
3654 func (s *OperationProgress) MarshalJSON() ([]byte, error) {
3655 type NoMethod OperationProgress
3656 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3657 }
3658
3659
3660
3661
3662
3663
3664 type OptimizeRestoredDatabaseMetadata struct {
3665
3666 Name string `json:"name,omitempty"`
3667
3668 Progress *OperationProgress `json:"progress,omitempty"`
3669
3670
3671
3672
3673
3674 ForceSendFields []string `json:"-"`
3675
3676
3677
3678
3679 NullFields []string `json:"-"`
3680 }
3681
3682 func (s *OptimizeRestoredDatabaseMetadata) MarshalJSON() ([]byte, error) {
3683 type NoMethod OptimizeRestoredDatabaseMetadata
3684 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3685 }
3686
3687
3688
3689
3690 type PartialResultSet struct {
3691
3692
3693
3694 ChunkedValue bool `json:"chunkedValue,omitempty"`
3695
3696
3697 Metadata *ResultSetMetadata `json:"metadata,omitempty"`
3698
3699
3700
3701
3702
3703 ResumeToken string `json:"resumeToken,omitempty"`
3704
3705
3706
3707
3708
3709 Stats *ResultSetStats `json:"stats,omitempty"`
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747 Values []interface{} `json:"values,omitempty"`
3748
3749
3750 googleapi.ServerResponse `json:"-"`
3751
3752
3753
3754
3755
3756 ForceSendFields []string `json:"-"`
3757
3758
3759
3760
3761 NullFields []string `json:"-"`
3762 }
3763
3764 func (s *PartialResultSet) MarshalJSON() ([]byte, error) {
3765 type NoMethod PartialResultSet
3766 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3767 }
3768
3769
3770
3771 type Partition struct {
3772
3773
3774
3775 PartitionToken string `json:"partitionToken,omitempty"`
3776
3777
3778
3779
3780
3781 ForceSendFields []string `json:"-"`
3782
3783
3784
3785
3786 NullFields []string `json:"-"`
3787 }
3788
3789 func (s *Partition) MarshalJSON() ([]byte, error) {
3790 type NoMethod Partition
3791 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3792 }
3793
3794
3795
3796 type PartitionOptions struct {
3797
3798
3799
3800
3801
3802
3803 MaxPartitions int64 `json:"maxPartitions,omitempty,string"`
3804
3805
3806
3807
3808
3809 PartitionSizeBytes int64 `json:"partitionSizeBytes,omitempty,string"`
3810
3811
3812
3813
3814
3815 ForceSendFields []string `json:"-"`
3816
3817
3818
3819
3820 NullFields []string `json:"-"`
3821 }
3822
3823 func (s *PartitionOptions) MarshalJSON() ([]byte, error) {
3824 type NoMethod PartitionOptions
3825 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3826 }
3827
3828
3829 type PartitionQueryRequest struct {
3830
3831
3832
3833
3834
3835
3836 ParamTypes map[string]Type `json:"paramTypes,omitempty"`
3837
3838
3839
3840
3841
3842
3843
3844 Params googleapi.RawMessage `json:"params,omitempty"`
3845
3846
3847 PartitionOptions *PartitionOptions `json:"partitionOptions,omitempty"`
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858 Sql string `json:"sql,omitempty"`
3859
3860
3861 Transaction *TransactionSelector `json:"transaction,omitempty"`
3862
3863
3864
3865
3866
3867 ForceSendFields []string `json:"-"`
3868
3869
3870
3871
3872 NullFields []string `json:"-"`
3873 }
3874
3875 func (s *PartitionQueryRequest) MarshalJSON() ([]byte, error) {
3876 type NoMethod PartitionQueryRequest
3877 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3878 }
3879
3880
3881 type PartitionReadRequest struct {
3882
3883
3884 Columns []string `json:"columns,omitempty"`
3885
3886
3887
3888 Index string `json:"index,omitempty"`
3889
3890
3891
3892
3893
3894 KeySet *KeySet `json:"keySet,omitempty"`
3895
3896
3897 PartitionOptions *PartitionOptions `json:"partitionOptions,omitempty"`
3898
3899 Table string `json:"table,omitempty"`
3900
3901
3902 Transaction *TransactionSelector `json:"transaction,omitempty"`
3903
3904
3905
3906
3907
3908 ForceSendFields []string `json:"-"`
3909
3910
3911
3912
3913 NullFields []string `json:"-"`
3914 }
3915
3916 func (s *PartitionReadRequest) MarshalJSON() ([]byte, error) {
3917 type NoMethod PartitionReadRequest
3918 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3919 }
3920
3921
3922 type PartitionResponse struct {
3923
3924 Partitions []*Partition `json:"partitions,omitempty"`
3925
3926 Transaction *Transaction `json:"transaction,omitempty"`
3927
3928
3929 googleapi.ServerResponse `json:"-"`
3930
3931
3932
3933
3934
3935 ForceSendFields []string `json:"-"`
3936
3937
3938
3939
3940 NullFields []string `json:"-"`
3941 }
3942
3943 func (s *PartitionResponse) MarshalJSON() ([]byte, error) {
3944 type NoMethod PartitionResponse
3945 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3946 }
3947
3948
3949 type PartitionedDml struct {
3950 }
3951
3952
3953 type PlanNode struct {
3954
3955
3956 ChildLinks []*ChildLink `json:"childLinks,omitempty"`
3957
3958 DisplayName string `json:"displayName,omitempty"`
3959
3960
3961
3962
3963 ExecutionStats googleapi.RawMessage `json:"executionStats,omitempty"`
3964
3965 Index int64 `json:"index,omitempty"`
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981 Kind string `json:"kind,omitempty"`
3982
3983
3984
3985
3986 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3987
3988 ShortRepresentation *ShortRepresentation `json:"shortRepresentation,omitempty"`
3989
3990
3991
3992
3993
3994 ForceSendFields []string `json:"-"`
3995
3996
3997
3998
3999 NullFields []string `json:"-"`
4000 }
4001
4002 func (s *PlanNode) MarshalJSON() ([]byte, error) {
4003 type NoMethod PlanNode
4004 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4005 }
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037 type Policy struct {
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047 Bindings []*Binding `json:"bindings,omitempty"`
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059 Etag string `json:"etag,omitempty"`
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075 Version int64 `json:"version,omitempty"`
4076
4077
4078 googleapi.ServerResponse `json:"-"`
4079
4080
4081
4082
4083
4084 ForceSendFields []string `json:"-"`
4085
4086
4087
4088
4089 NullFields []string `json:"-"`
4090 }
4091
4092 func (s *Policy) MarshalJSON() ([]byte, error) {
4093 type NoMethod Policy
4094 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4095 }
4096
4097
4098
4099
4100
4101
4102
4103 type PrefixNode struct {
4104
4105 DataSourceNode bool `json:"dataSourceNode,omitempty"`
4106
4107 Depth int64 `json:"depth,omitempty"`
4108
4109 EndIndex int64 `json:"endIndex,omitempty"`
4110
4111
4112 StartIndex int64 `json:"startIndex,omitempty"`
4113
4114 Word string `json:"word,omitempty"`
4115
4116
4117
4118
4119
4120 ForceSendFields []string `json:"-"`
4121
4122
4123
4124
4125 NullFields []string `json:"-"`
4126 }
4127
4128 func (s *PrefixNode) MarshalJSON() ([]byte, error) {
4129 type NoMethod PrefixNode
4130 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4131 }
4132
4133
4134 type QueryAdvisorResult struct {
4135
4136
4137
4138 IndexAdvice []*IndexAdvice `json:"indexAdvice,omitempty"`
4139
4140
4141
4142
4143
4144 ForceSendFields []string `json:"-"`
4145
4146
4147
4148
4149 NullFields []string `json:"-"`
4150 }
4151
4152 func (s *QueryAdvisorResult) MarshalJSON() ([]byte, error) {
4153 type NoMethod QueryAdvisorResult
4154 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4155 }
4156
4157
4158 type QueryOptions struct {
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172 OptimizerStatisticsPackage string `json:"optimizerStatisticsPackage,omitempty"`
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186 OptimizerVersion string `json:"optimizerVersion,omitempty"`
4187
4188
4189
4190
4191
4192 ForceSendFields []string `json:"-"`
4193
4194
4195
4196
4197 NullFields []string `json:"-"`
4198 }
4199
4200 func (s *QueryOptions) MarshalJSON() ([]byte, error) {
4201 type NoMethod QueryOptions
4202 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4203 }
4204
4205
4206 type QueryPlan struct {
4207
4208
4209
4210 PlanNodes []*PlanNode `json:"planNodes,omitempty"`
4211
4212
4213 QueryAdvice *QueryAdvisorResult `json:"queryAdvice,omitempty"`
4214
4215
4216
4217
4218
4219 ForceSendFields []string `json:"-"`
4220
4221
4222
4223
4224 NullFields []string `json:"-"`
4225 }
4226
4227 func (s *QueryPlan) MarshalJSON() ([]byte, error) {
4228 type NoMethod QueryPlan
4229 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4230 }
4231
4232
4233 type ReadOnly struct {
4234
4235
4236
4237
4238
4239
4240
4241 ExactStaleness string `json:"exactStaleness,omitempty"`
4242
4243
4244
4245
4246
4247
4248
4249
4250 MaxStaleness string `json:"maxStaleness,omitempty"`
4251
4252
4253
4254
4255
4256
4257 MinReadTimestamp string `json:"minReadTimestamp,omitempty"`
4258
4259
4260
4261
4262
4263
4264
4265
4266 ReadTimestamp string `json:"readTimestamp,omitempty"`
4267
4268
4269 ReturnReadTimestamp bool `json:"returnReadTimestamp,omitempty"`
4270
4271
4272 Strong bool `json:"strong,omitempty"`
4273
4274
4275
4276
4277
4278 ForceSendFields []string `json:"-"`
4279
4280
4281
4282
4283 NullFields []string `json:"-"`
4284 }
4285
4286 func (s *ReadOnly) MarshalJSON() ([]byte, error) {
4287 type NoMethod ReadOnly
4288 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4289 }
4290
4291
4292 type ReadRequest struct {
4293
4294
4295 Columns []string `json:"columns,omitempty"`
4296
4297
4298
4299
4300 DataBoostEnabled bool `json:"dataBoostEnabled,omitempty"`
4301
4302 DirectedReadOptions *DirectedReadOptions `json:"directedReadOptions,omitempty"`
4303
4304
4305
4306 Index string `json:"index,omitempty"`
4307
4308
4309
4310
4311
4312
4313
4314
4315 KeySet *KeySet `json:"keySet,omitempty"`
4316
4317
4318
4319 Limit int64 `json:"limit,omitempty,string"`
4320
4321
4322
4323
4324 PartitionToken string `json:"partitionToken,omitempty"`
4325
4326 RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
4327
4328
4329
4330
4331
4332 ResumeToken string `json:"resumeToken,omitempty"`
4333
4334 Table string `json:"table,omitempty"`
4335
4336
4337 Transaction *TransactionSelector `json:"transaction,omitempty"`
4338
4339
4340
4341
4342
4343 ForceSendFields []string `json:"-"`
4344
4345
4346
4347
4348 NullFields []string `json:"-"`
4349 }
4350
4351 func (s *ReadRequest) MarshalJSON() ([]byte, error) {
4352 type NoMethod ReadRequest
4353 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4354 }
4355
4356
4357
4358 type ReadWrite struct {
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370 ReadLockMode string `json:"readLockMode,omitempty"`
4371
4372
4373
4374
4375
4376 ForceSendFields []string `json:"-"`
4377
4378
4379
4380
4381 NullFields []string `json:"-"`
4382 }
4383
4384 func (s *ReadWrite) MarshalJSON() ([]byte, error) {
4385 type NoMethod ReadWrite
4386 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4387 }
4388
4389 type ReplicaInfo struct {
4390
4391
4392
4393
4394 DefaultLeaderLocation bool `json:"defaultLeaderLocation,omitempty"`
4395
4396 Location string `json:"location,omitempty"`
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413 Type string `json:"type,omitempty"`
4414
4415
4416
4417
4418
4419 ForceSendFields []string `json:"-"`
4420
4421
4422
4423
4424 NullFields []string `json:"-"`
4425 }
4426
4427 func (s *ReplicaInfo) MarshalJSON() ([]byte, error) {
4428 type NoMethod ReplicaInfo
4429 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4430 }
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442 type ReplicaSelection struct {
4443
4444 Location string `json:"location,omitempty"`
4445
4446
4447
4448
4449
4450
4451 Type string `json:"type,omitempty"`
4452
4453
4454
4455
4456
4457 ForceSendFields []string `json:"-"`
4458
4459
4460
4461
4462 NullFields []string `json:"-"`
4463 }
4464
4465 func (s *ReplicaSelection) MarshalJSON() ([]byte, error) {
4466 type NoMethod ReplicaSelection
4467 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4468 }
4469
4470
4471 type RequestOptions struct {
4472
4473
4474
4475
4476
4477
4478
4479
4480 Priority string `json:"priority,omitempty"`
4481
4482
4483
4484
4485
4486
4487
4488
4489 RequestTag string `json:"requestTag,omitempty"`
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499 TransactionTag string `json:"transactionTag,omitempty"`
4500
4501
4502
4503
4504
4505 ForceSendFields []string `json:"-"`
4506
4507
4508
4509
4510 NullFields []string `json:"-"`
4511 }
4512
4513 func (s *RequestOptions) MarshalJSON() ([]byte, error) {
4514 type NoMethod RequestOptions
4515 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4516 }
4517
4518
4519
4520 type RestoreDatabaseEncryptionConfig struct {
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530 EncryptionType string `json:"encryptionType,omitempty"`
4531
4532
4533
4534
4535 KmsKeyName string `json:"kmsKeyName,omitempty"`
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548 KmsKeyNames []string `json:"kmsKeyNames,omitempty"`
4549
4550
4551
4552
4553
4554 ForceSendFields []string `json:"-"`
4555
4556
4557
4558
4559 NullFields []string `json:"-"`
4560 }
4561
4562 func (s *RestoreDatabaseEncryptionConfig) MarshalJSON() ([]byte, error) {
4563 type NoMethod RestoreDatabaseEncryptionConfig
4564 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4565 }
4566
4567
4568
4569 type RestoreDatabaseMetadata struct {
4570
4571 BackupInfo *BackupInfo `json:"backupInfo,omitempty"`
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581 CancelTime string `json:"cancelTime,omitempty"`
4582
4583 Name string `json:"name,omitempty"`
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594 OptimizeDatabaseOperationName string `json:"optimizeDatabaseOperationName,omitempty"`
4595
4596 Progress *OperationProgress `json:"progress,omitempty"`
4597
4598
4599
4600
4601
4602 SourceType string `json:"sourceType,omitempty"`
4603
4604
4605
4606
4607
4608 ForceSendFields []string `json:"-"`
4609
4610
4611
4612
4613 NullFields []string `json:"-"`
4614 }
4615
4616 func (s *RestoreDatabaseMetadata) MarshalJSON() ([]byte, error) {
4617 type NoMethod RestoreDatabaseMetadata
4618 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4619 }
4620
4621
4622 type RestoreDatabaseRequest struct {
4623
4624
4625 Backup string `json:"backup,omitempty"`
4626
4627
4628
4629 DatabaseId string `json:"databaseId,omitempty"`
4630
4631
4632
4633
4634
4635 EncryptionConfig *RestoreDatabaseEncryptionConfig `json:"encryptionConfig,omitempty"`
4636
4637
4638
4639
4640
4641 ForceSendFields []string `json:"-"`
4642
4643
4644
4645
4646 NullFields []string `json:"-"`
4647 }
4648
4649 func (s *RestoreDatabaseRequest) MarshalJSON() ([]byte, error) {
4650 type NoMethod RestoreDatabaseRequest
4651 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4652 }
4653
4654
4655 type RestoreInfo struct {
4656
4657
4658 BackupInfo *BackupInfo `json:"backupInfo,omitempty"`
4659
4660
4661
4662
4663
4664 SourceType string `json:"sourceType,omitempty"`
4665
4666
4667
4668
4669
4670 ForceSendFields []string `json:"-"`
4671
4672
4673
4674
4675 NullFields []string `json:"-"`
4676 }
4677
4678 func (s *RestoreInfo) MarshalJSON() ([]byte, error) {
4679 type NoMethod RestoreInfo
4680 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4681 }
4682
4683
4684 type ResultSet struct {
4685
4686 Metadata *ResultSetMetadata `json:"metadata,omitempty"`
4687
4688
4689
4690 Rows [][]interface{} `json:"rows,omitempty"`
4691
4692
4693
4694
4695
4696
4697 Stats *ResultSetStats `json:"stats,omitempty"`
4698
4699
4700 googleapi.ServerResponse `json:"-"`
4701
4702
4703
4704
4705
4706 ForceSendFields []string `json:"-"`
4707
4708
4709
4710
4711 NullFields []string `json:"-"`
4712 }
4713
4714 func (s *ResultSet) MarshalJSON() ([]byte, error) {
4715 type NoMethod ResultSet
4716 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4717 }
4718
4719
4720 type ResultSetMetadata struct {
4721
4722
4723
4724
4725 RowType *StructType `json:"rowType,omitempty"`
4726
4727
4728 Transaction *Transaction `json:"transaction,omitempty"`
4729
4730
4731
4732
4733
4734
4735
4736 UndeclaredParameters *StructType `json:"undeclaredParameters,omitempty"`
4737
4738
4739
4740
4741
4742 ForceSendFields []string `json:"-"`
4743
4744
4745
4746
4747 NullFields []string `json:"-"`
4748 }
4749
4750 func (s *ResultSetMetadata) MarshalJSON() ([]byte, error) {
4751 type NoMethod ResultSetMetadata
4752 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4753 }
4754
4755
4756 type ResultSetStats struct {
4757
4758 QueryPlan *QueryPlan `json:"queryPlan,omitempty"`
4759
4760
4761
4762
4763 QueryStats googleapi.RawMessage `json:"queryStats,omitempty"`
4764
4765
4766 RowCountExact int64 `json:"rowCountExact,omitempty,string"`
4767
4768
4769 RowCountLowerBound int64 `json:"rowCountLowerBound,omitempty,string"`
4770
4771
4772
4773
4774
4775 ForceSendFields []string `json:"-"`
4776
4777
4778
4779
4780 NullFields []string `json:"-"`
4781 }
4782
4783 func (s *ResultSetStats) MarshalJSON() ([]byte, error) {
4784 type NoMethod ResultSetStats
4785 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4786 }
4787
4788
4789 type RollbackRequest struct {
4790
4791 TransactionId string `json:"transactionId,omitempty"`
4792
4793
4794
4795
4796
4797 ForceSendFields []string `json:"-"`
4798
4799
4800
4801
4802 NullFields []string `json:"-"`
4803 }
4804
4805 func (s *RollbackRequest) MarshalJSON() ([]byte, error) {
4806 type NoMethod RollbackRequest
4807 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4808 }
4809
4810
4811
4812 type Scan struct {
4813
4814 Details googleapi.RawMessage `json:"details,omitempty"`
4815
4816 EndTime string `json:"endTime,omitempty"`
4817
4818
4819 Name string `json:"name,omitempty"`
4820
4821
4822 ScanData *ScanData `json:"scanData,omitempty"`
4823
4824
4825 StartTime string `json:"startTime,omitempty"`
4826
4827
4828 googleapi.ServerResponse `json:"-"`
4829
4830
4831
4832
4833
4834 ForceSendFields []string `json:"-"`
4835
4836
4837
4838
4839 NullFields []string `json:"-"`
4840 }
4841
4842 func (s *Scan) MarshalJSON() ([]byte, error) {
4843 type NoMethod Scan
4844 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4845 }
4846
4847
4848
4849 type ScanData struct {
4850
4851
4852
4853 Data *VisualizationData `json:"data,omitempty"`
4854
4855 EndTime string `json:"endTime,omitempty"`
4856
4857
4858 StartTime string `json:"startTime,omitempty"`
4859
4860
4861
4862
4863
4864 ForceSendFields []string `json:"-"`
4865
4866
4867
4868
4869 NullFields []string `json:"-"`
4870 }
4871
4872 func (s *ScanData) MarshalJSON() ([]byte, error) {
4873 type NoMethod ScanData
4874 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4875 }
4876
4877
4878 type Session struct {
4879
4880
4881 ApproximateLastUseTime string `json:"approximateLastUseTime,omitempty"`
4882
4883 CreateTime string `json:"createTime,omitempty"`
4884
4885 CreatorRole string `json:"creatorRole,omitempty"`
4886
4887
4888
4889
4890
4891
4892
4893 Labels map[string]string `json:"labels,omitempty"`
4894
4895
4896
4897
4898
4899
4900 Multiplexed bool `json:"multiplexed,omitempty"`
4901
4902 Name string `json:"name,omitempty"`
4903
4904
4905 googleapi.ServerResponse `json:"-"`
4906
4907
4908
4909
4910
4911 ForceSendFields []string `json:"-"`
4912
4913
4914
4915
4916 NullFields []string `json:"-"`
4917 }
4918
4919 func (s *Session) MarshalJSON() ([]byte, error) {
4920 type NoMethod Session
4921 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4922 }
4923
4924
4925 type SetIamPolicyRequest struct {
4926
4927
4928
4929
4930 Policy *Policy `json:"policy,omitempty"`
4931
4932
4933
4934
4935
4936 ForceSendFields []string `json:"-"`
4937
4938
4939
4940
4941 NullFields []string `json:"-"`
4942 }
4943
4944 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
4945 type NoMethod SetIamPolicyRequest
4946 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4947 }
4948
4949
4950
4951 type ShortRepresentation struct {
4952
4953
4954 Description string `json:"description,omitempty"`
4955
4956
4957
4958
4959
4960 Subqueries map[string]int64 `json:"subqueries,omitempty"`
4961
4962
4963
4964
4965
4966 ForceSendFields []string `json:"-"`
4967
4968
4969
4970
4971 NullFields []string `json:"-"`
4972 }
4973
4974 func (s *ShortRepresentation) MarshalJSON() ([]byte, error) {
4975 type NoMethod ShortRepresentation
4976 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4977 }
4978
4979
4980 type Statement struct {
4981
4982
4983
4984
4985
4986
4987 ParamTypes map[string]Type `json:"paramTypes,omitempty"`
4988
4989
4990
4991
4992
4993
4994
4995 Params googleapi.RawMessage `json:"params,omitempty"`
4996
4997 Sql string `json:"sql,omitempty"`
4998
4999
5000
5001
5002
5003 ForceSendFields []string `json:"-"`
5004
5005
5006
5007
5008 NullFields []string `json:"-"`
5009 }
5010
5011 func (s *Statement) MarshalJSON() ([]byte, error) {
5012 type NoMethod Statement
5013 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5014 }
5015
5016
5017
5018
5019
5020
5021
5022 type Status struct {
5023
5024 Code int64 `json:"code,omitempty"`
5025
5026
5027 Details []googleapi.RawMessage `json:"details,omitempty"`
5028
5029
5030
5031 Message string `json:"message,omitempty"`
5032
5033
5034
5035
5036
5037 ForceSendFields []string `json:"-"`
5038
5039
5040
5041
5042 NullFields []string `json:"-"`
5043 }
5044
5045 func (s *Status) MarshalJSON() ([]byte, error) {
5046 type NoMethod Status
5047 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5048 }
5049
5050
5051 type StructType struct {
5052
5053
5054
5055
5056
5057 Fields []*Field `json:"fields,omitempty"`
5058
5059
5060
5061
5062
5063 ForceSendFields []string `json:"-"`
5064
5065
5066
5067
5068 NullFields []string `json:"-"`
5069 }
5070
5071 func (s *StructType) MarshalJSON() ([]byte, error) {
5072 type NoMethod StructType
5073 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5074 }
5075
5076
5077 type TestIamPermissionsRequest struct {
5078
5079
5080
5081 Permissions []string `json:"permissions,omitempty"`
5082
5083
5084
5085
5086
5087 ForceSendFields []string `json:"-"`
5088
5089
5090
5091
5092 NullFields []string `json:"-"`
5093 }
5094
5095 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
5096 type NoMethod TestIamPermissionsRequest
5097 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5098 }
5099
5100
5101
5102 type TestIamPermissionsResponse struct {
5103
5104
5105 Permissions []string `json:"permissions,omitempty"`
5106
5107
5108 googleapi.ServerResponse `json:"-"`
5109
5110
5111
5112
5113
5114 ForceSendFields []string `json:"-"`
5115
5116
5117
5118
5119 NullFields []string `json:"-"`
5120 }
5121
5122 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
5123 type NoMethod TestIamPermissionsResponse
5124 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5125 }
5126
5127
5128 type Transaction struct {
5129
5130
5131
5132
5133 Id string `json:"id,omitempty"`
5134
5135
5136
5137
5138
5139 ReadTimestamp string `json:"readTimestamp,omitempty"`
5140
5141
5142 googleapi.ServerResponse `json:"-"`
5143
5144
5145
5146
5147
5148 ForceSendFields []string `json:"-"`
5149
5150
5151
5152
5153 NullFields []string `json:"-"`
5154 }
5155
5156 func (s *Transaction) MarshalJSON() ([]byte, error) {
5157 type NoMethod Transaction
5158 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5159 }
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360 type TransactionOptions struct {
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373 ExcludeTxnFromChangeStreams bool `json:"excludeTxnFromChangeStreams,omitempty"`
5374
5375
5376
5377
5378 PartitionedDml *PartitionedDml `json:"partitionedDml,omitempty"`
5379
5380
5381
5382 ReadOnly *ReadOnly `json:"readOnly,omitempty"`
5383
5384
5385
5386 ReadWrite *ReadWrite `json:"readWrite,omitempty"`
5387
5388
5389
5390
5391
5392 ForceSendFields []string `json:"-"`
5393
5394
5395
5396
5397 NullFields []string `json:"-"`
5398 }
5399
5400 func (s *TransactionOptions) MarshalJSON() ([]byte, error) {
5401 type NoMethod TransactionOptions
5402 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5403 }
5404
5405
5406
5407
5408 type TransactionSelector struct {
5409
5410
5411
5412 Begin *TransactionOptions `json:"begin,omitempty"`
5413
5414 Id string `json:"id,omitempty"`
5415
5416
5417
5418 SingleUse *TransactionOptions `json:"singleUse,omitempty"`
5419
5420
5421
5422
5423
5424 ForceSendFields []string `json:"-"`
5425
5426
5427
5428
5429 NullFields []string `json:"-"`
5430 }
5431
5432 func (s *TransactionSelector) MarshalJSON() ([]byte, error) {
5433 type NoMethod TransactionSelector
5434 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5435 }
5436
5437
5438
5439 type Type struct {
5440
5441
5442 ArrayElementType *Type `json:"arrayElementType,omitempty"`
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480 Code string `json:"code,omitempty"`
5481
5482
5483
5484 ProtoTypeFqn string `json:"protoTypeFqn,omitempty"`
5485
5486
5487 StructType *StructType `json:"structType,omitempty"`
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507 TypeAnnotation string `json:"typeAnnotation,omitempty"`
5508
5509
5510
5511
5512
5513 ForceSendFields []string `json:"-"`
5514
5515
5516
5517
5518 NullFields []string `json:"-"`
5519 }
5520
5521 func (s *Type) MarshalJSON() ([]byte, error) {
5522 type NoMethod Type
5523 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5524 }
5525
5526
5527
5528 type UpdateDatabaseDdlMetadata struct {
5529
5530
5531 Actions []*DdlStatementActionInfo `json:"actions,omitempty"`
5532
5533
5534
5535 CommitTimestamps []string `json:"commitTimestamps,omitempty"`
5536
5537 Database string `json:"database,omitempty"`
5538
5539
5540
5541
5542
5543 Progress []*OperationProgress `json:"progress,omitempty"`
5544
5545
5546 Statements []string `json:"statements,omitempty"`
5547
5548
5549
5550 Throttled bool `json:"throttled,omitempty"`
5551
5552
5553
5554
5555
5556 ForceSendFields []string `json:"-"`
5557
5558
5559
5560
5561 NullFields []string `json:"-"`
5562 }
5563
5564 func (s *UpdateDatabaseDdlMetadata) MarshalJSON() ([]byte, error) {
5565 type NoMethod UpdateDatabaseDdlMetadata
5566 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5567 }
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580 type UpdateDatabaseDdlRequest struct {
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592 OperationId string `json:"operationId,omitempty"`
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604 ProtoDescriptors string `json:"protoDescriptors,omitempty"`
5605
5606 Statements []string `json:"statements,omitempty"`
5607
5608
5609
5610
5611
5612 ForceSendFields []string `json:"-"`
5613
5614
5615
5616
5617 NullFields []string `json:"-"`
5618 }
5619
5620 func (s *UpdateDatabaseDdlRequest) MarshalJSON() ([]byte, error) {
5621 type NoMethod UpdateDatabaseDdlRequest
5622 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5623 }
5624
5625
5626
5627 type UpdateDatabaseMetadata struct {
5628
5629
5630 CancelTime string `json:"cancelTime,omitempty"`
5631
5632 Progress *OperationProgress `json:"progress,omitempty"`
5633
5634 Request *UpdateDatabaseRequest `json:"request,omitempty"`
5635
5636
5637
5638
5639
5640 ForceSendFields []string `json:"-"`
5641
5642
5643
5644
5645 NullFields []string `json:"-"`
5646 }
5647
5648 func (s *UpdateDatabaseMetadata) MarshalJSON() ([]byte, error) {
5649 type NoMethod UpdateDatabaseMetadata
5650 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5651 }
5652
5653
5654 type UpdateDatabaseRequest struct {
5655
5656
5657 Database *Database `json:"database,omitempty"`
5658
5659
5660 UpdateMask string `json:"updateMask,omitempty"`
5661
5662
5663
5664
5665
5666 ForceSendFields []string `json:"-"`
5667
5668
5669
5670
5671 NullFields []string `json:"-"`
5672 }
5673
5674 func (s *UpdateDatabaseRequest) MarshalJSON() ([]byte, error) {
5675 type NoMethod UpdateDatabaseRequest
5676 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5677 }
5678
5679
5680
5681 type UpdateInstanceConfigMetadata struct {
5682
5683 CancelTime string `json:"cancelTime,omitempty"`
5684
5685 InstanceConfig *InstanceConfig `json:"instanceConfig,omitempty"`
5686
5687 Progress *InstanceOperationProgress `json:"progress,omitempty"`
5688
5689
5690
5691
5692
5693 ForceSendFields []string `json:"-"`
5694
5695
5696
5697
5698 NullFields []string `json:"-"`
5699 }
5700
5701 func (s *UpdateInstanceConfigMetadata) MarshalJSON() ([]byte, error) {
5702 type NoMethod UpdateInstanceConfigMetadata
5703 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5704 }
5705
5706
5707 type UpdateInstanceConfigRequest struct {
5708
5709
5710
5711
5712 InstanceConfig *InstanceConfig `json:"instanceConfig,omitempty"`
5713
5714
5715
5716
5717
5718 UpdateMask string `json:"updateMask,omitempty"`
5719
5720
5721 ValidateOnly bool `json:"validateOnly,omitempty"`
5722
5723
5724
5725
5726
5727 ForceSendFields []string `json:"-"`
5728
5729
5730
5731
5732 NullFields []string `json:"-"`
5733 }
5734
5735 func (s *UpdateInstanceConfigRequest) MarshalJSON() ([]byte, error) {
5736 type NoMethod UpdateInstanceConfigRequest
5737 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5738 }
5739
5740
5741
5742 type UpdateInstanceMetadata struct {
5743
5744
5745
5746 CancelTime string `json:"cancelTime,omitempty"`
5747
5748
5749 EndTime string `json:"endTime,omitempty"`
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759 ExpectedFulfillmentPeriod string `json:"expectedFulfillmentPeriod,omitempty"`
5760
5761 Instance *Instance `json:"instance,omitempty"`
5762
5763 StartTime string `json:"startTime,omitempty"`
5764
5765
5766
5767
5768
5769 ForceSendFields []string `json:"-"`
5770
5771
5772
5773
5774 NullFields []string `json:"-"`
5775 }
5776
5777 func (s *UpdateInstanceMetadata) MarshalJSON() ([]byte, error) {
5778 type NoMethod UpdateInstanceMetadata
5779 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5780 }
5781
5782
5783
5784 type UpdateInstancePartitionMetadata struct {
5785
5786
5787
5788 CancelTime string `json:"cancelTime,omitempty"`
5789
5790
5791 EndTime string `json:"endTime,omitempty"`
5792
5793 InstancePartition *InstancePartition `json:"instancePartition,omitempty"`
5794
5795 StartTime string `json:"startTime,omitempty"`
5796
5797
5798
5799
5800
5801 ForceSendFields []string `json:"-"`
5802
5803
5804
5805
5806 NullFields []string `json:"-"`
5807 }
5808
5809 func (s *UpdateInstancePartitionMetadata) MarshalJSON() ([]byte, error) {
5810 type NoMethod UpdateInstancePartitionMetadata
5811 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5812 }
5813
5814
5815 type UpdateInstancePartitionRequest struct {
5816
5817
5818
5819
5820 FieldMask string `json:"fieldMask,omitempty"`
5821
5822
5823
5824 InstancePartition *InstancePartition `json:"instancePartition,omitempty"`
5825
5826
5827
5828
5829
5830 ForceSendFields []string `json:"-"`
5831
5832
5833
5834
5835 NullFields []string `json:"-"`
5836 }
5837
5838 func (s *UpdateInstancePartitionRequest) MarshalJSON() ([]byte, error) {
5839 type NoMethod UpdateInstancePartitionRequest
5840 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5841 }
5842
5843
5844 type UpdateInstanceRequest struct {
5845
5846
5847
5848
5849 FieldMask string `json:"fieldMask,omitempty"`
5850
5851
5852
5853 Instance *Instance `json:"instance,omitempty"`
5854
5855
5856
5857
5858
5859 ForceSendFields []string `json:"-"`
5860
5861
5862
5863
5864 NullFields []string `json:"-"`
5865 }
5866
5867 func (s *UpdateInstanceRequest) MarshalJSON() ([]byte, error) {
5868 type NoMethod UpdateInstanceRequest
5869 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5870 }
5871
5872 type VisualizationData struct {
5873
5874 DataSourceEndToken string `json:"dataSourceEndToken,omitempty"`
5875
5876
5877 DataSourceSeparatorToken string `json:"dataSourceSeparatorToken,omitempty"`
5878
5879 DiagnosticMessages []*DiagnosticMessage `json:"diagnosticMessages,omitempty"`
5880
5881
5882
5883
5884 EndKeyStrings []string `json:"endKeyStrings,omitempty"`
5885
5886 HasPii bool `json:"hasPii,omitempty"`
5887
5888
5889 IndexedKeys []string `json:"indexedKeys,omitempty"`
5890
5891 KeySeparator string `json:"keySeparator,omitempty"`
5892
5893
5894
5895
5896
5897
5898 KeyUnit string `json:"keyUnit,omitempty"`
5899
5900 Metrics []*Metric `json:"metrics,omitempty"`
5901
5902
5903 PrefixNodes []*PrefixNode `json:"prefixNodes,omitempty"`
5904
5905
5906
5907
5908
5909 ForceSendFields []string `json:"-"`
5910
5911
5912
5913
5914 NullFields []string `json:"-"`
5915 }
5916
5917 func (s *VisualizationData) MarshalJSON() ([]byte, error) {
5918 type NoMethod VisualizationData
5919 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5920 }
5921
5922
5923
5924 type Write struct {
5925
5926
5927
5928 Columns []string `json:"columns,omitempty"`
5929
5930 Table string `json:"table,omitempty"`
5931
5932
5933
5934
5935
5936
5937
5938 Values [][]interface{} `json:"values,omitempty"`
5939
5940
5941
5942
5943
5944 ForceSendFields []string `json:"-"`
5945
5946
5947
5948
5949 NullFields []string `json:"-"`
5950 }
5951
5952 func (s *Write) MarshalJSON() ([]byte, error) {
5953 type NoMethod Write
5954 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5955 }
5956
5957 type ProjectsInstanceConfigOperationsListCall struct {
5958 s *Service
5959 parent string
5960 urlParams_ gensupport.URLParams
5961 ifNoneMatch_ string
5962 ctx_ context.Context
5963 header_ http.Header
5964 }
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977 func (r *ProjectsInstanceConfigOperationsService) List(parent string) *ProjectsInstanceConfigOperationsListCall {
5978 c := &ProjectsInstanceConfigOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5979 c.parent = parent
5980 return c
5981 }
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009 func (c *ProjectsInstanceConfigOperationsListCall) Filter(filter string) *ProjectsInstanceConfigOperationsListCall {
6010 c.urlParams_.Set("filter", filter)
6011 return c
6012 }
6013
6014
6015
6016
6017 func (c *ProjectsInstanceConfigOperationsListCall) PageSize(pageSize int64) *ProjectsInstanceConfigOperationsListCall {
6018 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6019 return c
6020 }
6021
6022
6023
6024
6025
6026 func (c *ProjectsInstanceConfigOperationsListCall) PageToken(pageToken string) *ProjectsInstanceConfigOperationsListCall {
6027 c.urlParams_.Set("pageToken", pageToken)
6028 return c
6029 }
6030
6031
6032
6033
6034 func (c *ProjectsInstanceConfigOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigOperationsListCall {
6035 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6036 return c
6037 }
6038
6039
6040
6041
6042 func (c *ProjectsInstanceConfigOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigOperationsListCall {
6043 c.ifNoneMatch_ = entityTag
6044 return c
6045 }
6046
6047
6048 func (c *ProjectsInstanceConfigOperationsListCall) Context(ctx context.Context) *ProjectsInstanceConfigOperationsListCall {
6049 c.ctx_ = ctx
6050 return c
6051 }
6052
6053
6054
6055 func (c *ProjectsInstanceConfigOperationsListCall) Header() http.Header {
6056 if c.header_ == nil {
6057 c.header_ = make(http.Header)
6058 }
6059 return c.header_
6060 }
6061
6062 func (c *ProjectsInstanceConfigOperationsListCall) doRequest(alt string) (*http.Response, error) {
6063 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6064 if c.ifNoneMatch_ != "" {
6065 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6066 }
6067 var body io.Reader = nil
6068 c.urlParams_.Set("alt", alt)
6069 c.urlParams_.Set("prettyPrint", "false")
6070 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instanceConfigOperations")
6071 urls += "?" + c.urlParams_.Encode()
6072 req, err := http.NewRequest("GET", urls, body)
6073 if err != nil {
6074 return nil, err
6075 }
6076 req.Header = reqHeaders
6077 googleapi.Expand(req.URL, map[string]string{
6078 "parent": c.parent,
6079 })
6080 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6081 }
6082
6083
6084
6085
6086
6087
6088
6089 func (c *ProjectsInstanceConfigOperationsListCall) Do(opts ...googleapi.CallOption) (*ListInstanceConfigOperationsResponse, error) {
6090 gensupport.SetOptions(c.urlParams_, opts...)
6091 res, err := c.doRequest("json")
6092 if res != nil && res.StatusCode == http.StatusNotModified {
6093 if res.Body != nil {
6094 res.Body.Close()
6095 }
6096 return nil, gensupport.WrapError(&googleapi.Error{
6097 Code: res.StatusCode,
6098 Header: res.Header,
6099 })
6100 }
6101 if err != nil {
6102 return nil, err
6103 }
6104 defer googleapi.CloseBody(res)
6105 if err := googleapi.CheckResponse(res); err != nil {
6106 return nil, gensupport.WrapError(err)
6107 }
6108 ret := &ListInstanceConfigOperationsResponse{
6109 ServerResponse: googleapi.ServerResponse{
6110 Header: res.Header,
6111 HTTPStatusCode: res.StatusCode,
6112 },
6113 }
6114 target := &ret
6115 if err := gensupport.DecodeResponse(target, res); err != nil {
6116 return nil, err
6117 }
6118 return ret, nil
6119 }
6120
6121
6122
6123
6124 func (c *ProjectsInstanceConfigOperationsListCall) Pages(ctx context.Context, f func(*ListInstanceConfigOperationsResponse) error) error {
6125 c.ctx_ = ctx
6126 defer c.PageToken(c.urlParams_.Get("pageToken"))
6127 for {
6128 x, err := c.Do()
6129 if err != nil {
6130 return err
6131 }
6132 if err := f(x); err != nil {
6133 return err
6134 }
6135 if x.NextPageToken == "" {
6136 return nil
6137 }
6138 c.PageToken(x.NextPageToken)
6139 }
6140 }
6141
6142 type ProjectsInstanceConfigsCreateCall struct {
6143 s *Service
6144 parent string
6145 createinstanceconfigrequest *CreateInstanceConfigRequest
6146 urlParams_ gensupport.URLParams
6147 ctx_ context.Context
6148 header_ http.Header
6149 }
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172 func (r *ProjectsInstanceConfigsService) Create(parent string, createinstanceconfigrequest *CreateInstanceConfigRequest) *ProjectsInstanceConfigsCreateCall {
6173 c := &ProjectsInstanceConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6174 c.parent = parent
6175 c.createinstanceconfigrequest = createinstanceconfigrequest
6176 return c
6177 }
6178
6179
6180
6181
6182 func (c *ProjectsInstanceConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsCreateCall {
6183 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6184 return c
6185 }
6186
6187
6188 func (c *ProjectsInstanceConfigsCreateCall) Context(ctx context.Context) *ProjectsInstanceConfigsCreateCall {
6189 c.ctx_ = ctx
6190 return c
6191 }
6192
6193
6194
6195 func (c *ProjectsInstanceConfigsCreateCall) Header() http.Header {
6196 if c.header_ == nil {
6197 c.header_ = make(http.Header)
6198 }
6199 return c.header_
6200 }
6201
6202 func (c *ProjectsInstanceConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
6203 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6204 var body io.Reader = nil
6205 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createinstanceconfigrequest)
6206 if err != nil {
6207 return nil, err
6208 }
6209 c.urlParams_.Set("alt", alt)
6210 c.urlParams_.Set("prettyPrint", "false")
6211 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instanceConfigs")
6212 urls += "?" + c.urlParams_.Encode()
6213 req, err := http.NewRequest("POST", urls, body)
6214 if err != nil {
6215 return nil, err
6216 }
6217 req.Header = reqHeaders
6218 googleapi.Expand(req.URL, map[string]string{
6219 "parent": c.parent,
6220 })
6221 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6222 }
6223
6224
6225
6226
6227
6228
6229 func (c *ProjectsInstanceConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6230 gensupport.SetOptions(c.urlParams_, opts...)
6231 res, err := c.doRequest("json")
6232 if res != nil && res.StatusCode == http.StatusNotModified {
6233 if res.Body != nil {
6234 res.Body.Close()
6235 }
6236 return nil, gensupport.WrapError(&googleapi.Error{
6237 Code: res.StatusCode,
6238 Header: res.Header,
6239 })
6240 }
6241 if err != nil {
6242 return nil, err
6243 }
6244 defer googleapi.CloseBody(res)
6245 if err := googleapi.CheckResponse(res); err != nil {
6246 return nil, gensupport.WrapError(err)
6247 }
6248 ret := &Operation{
6249 ServerResponse: googleapi.ServerResponse{
6250 Header: res.Header,
6251 HTTPStatusCode: res.StatusCode,
6252 },
6253 }
6254 target := &ret
6255 if err := gensupport.DecodeResponse(target, res); err != nil {
6256 return nil, err
6257 }
6258 return ret, nil
6259 }
6260
6261 type ProjectsInstanceConfigsDeleteCall struct {
6262 s *Service
6263 name string
6264 urlParams_ gensupport.URLParams
6265 ctx_ context.Context
6266 header_ http.Header
6267 }
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277 func (r *ProjectsInstanceConfigsService) Delete(name string) *ProjectsInstanceConfigsDeleteCall {
6278 c := &ProjectsInstanceConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6279 c.name = name
6280 return c
6281 }
6282
6283
6284
6285
6286
6287
6288
6289 func (c *ProjectsInstanceConfigsDeleteCall) Etag(etag string) *ProjectsInstanceConfigsDeleteCall {
6290 c.urlParams_.Set("etag", etag)
6291 return c
6292 }
6293
6294
6295
6296
6297 func (c *ProjectsInstanceConfigsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsInstanceConfigsDeleteCall {
6298 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
6299 return c
6300 }
6301
6302
6303
6304
6305 func (c *ProjectsInstanceConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsDeleteCall {
6306 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6307 return c
6308 }
6309
6310
6311 func (c *ProjectsInstanceConfigsDeleteCall) Context(ctx context.Context) *ProjectsInstanceConfigsDeleteCall {
6312 c.ctx_ = ctx
6313 return c
6314 }
6315
6316
6317
6318 func (c *ProjectsInstanceConfigsDeleteCall) Header() http.Header {
6319 if c.header_ == nil {
6320 c.header_ = make(http.Header)
6321 }
6322 return c.header_
6323 }
6324
6325 func (c *ProjectsInstanceConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
6326 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6327 var body io.Reader = nil
6328 c.urlParams_.Set("alt", alt)
6329 c.urlParams_.Set("prettyPrint", "false")
6330 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6331 urls += "?" + c.urlParams_.Encode()
6332 req, err := http.NewRequest("DELETE", urls, body)
6333 if err != nil {
6334 return nil, err
6335 }
6336 req.Header = reqHeaders
6337 googleapi.Expand(req.URL, map[string]string{
6338 "name": c.name,
6339 })
6340 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6341 }
6342
6343
6344
6345
6346
6347
6348 func (c *ProjectsInstanceConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6349 gensupport.SetOptions(c.urlParams_, opts...)
6350 res, err := c.doRequest("json")
6351 if res != nil && res.StatusCode == http.StatusNotModified {
6352 if res.Body != nil {
6353 res.Body.Close()
6354 }
6355 return nil, gensupport.WrapError(&googleapi.Error{
6356 Code: res.StatusCode,
6357 Header: res.Header,
6358 })
6359 }
6360 if err != nil {
6361 return nil, err
6362 }
6363 defer googleapi.CloseBody(res)
6364 if err := googleapi.CheckResponse(res); err != nil {
6365 return nil, gensupport.WrapError(err)
6366 }
6367 ret := &Empty{
6368 ServerResponse: googleapi.ServerResponse{
6369 Header: res.Header,
6370 HTTPStatusCode: res.StatusCode,
6371 },
6372 }
6373 target := &ret
6374 if err := gensupport.DecodeResponse(target, res); err != nil {
6375 return nil, err
6376 }
6377 return ret, nil
6378 }
6379
6380 type ProjectsInstanceConfigsGetCall struct {
6381 s *Service
6382 name string
6383 urlParams_ gensupport.URLParams
6384 ifNoneMatch_ string
6385 ctx_ context.Context
6386 header_ http.Header
6387 }
6388
6389
6390
6391
6392
6393 func (r *ProjectsInstanceConfigsService) Get(name string) *ProjectsInstanceConfigsGetCall {
6394 c := &ProjectsInstanceConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6395 c.name = name
6396 return c
6397 }
6398
6399
6400
6401
6402 func (c *ProjectsInstanceConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsGetCall {
6403 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6404 return c
6405 }
6406
6407
6408
6409
6410 func (c *ProjectsInstanceConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsGetCall {
6411 c.ifNoneMatch_ = entityTag
6412 return c
6413 }
6414
6415
6416 func (c *ProjectsInstanceConfigsGetCall) Context(ctx context.Context) *ProjectsInstanceConfigsGetCall {
6417 c.ctx_ = ctx
6418 return c
6419 }
6420
6421
6422
6423 func (c *ProjectsInstanceConfigsGetCall) Header() http.Header {
6424 if c.header_ == nil {
6425 c.header_ = make(http.Header)
6426 }
6427 return c.header_
6428 }
6429
6430 func (c *ProjectsInstanceConfigsGetCall) doRequest(alt string) (*http.Response, error) {
6431 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6432 if c.ifNoneMatch_ != "" {
6433 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6434 }
6435 var body io.Reader = nil
6436 c.urlParams_.Set("alt", alt)
6437 c.urlParams_.Set("prettyPrint", "false")
6438 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6439 urls += "?" + c.urlParams_.Encode()
6440 req, err := http.NewRequest("GET", urls, body)
6441 if err != nil {
6442 return nil, err
6443 }
6444 req.Header = reqHeaders
6445 googleapi.Expand(req.URL, map[string]string{
6446 "name": c.name,
6447 })
6448 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6449 }
6450
6451
6452
6453
6454
6455
6456 func (c *ProjectsInstanceConfigsGetCall) Do(opts ...googleapi.CallOption) (*InstanceConfig, error) {
6457 gensupport.SetOptions(c.urlParams_, opts...)
6458 res, err := c.doRequest("json")
6459 if res != nil && res.StatusCode == http.StatusNotModified {
6460 if res.Body != nil {
6461 res.Body.Close()
6462 }
6463 return nil, gensupport.WrapError(&googleapi.Error{
6464 Code: res.StatusCode,
6465 Header: res.Header,
6466 })
6467 }
6468 if err != nil {
6469 return nil, err
6470 }
6471 defer googleapi.CloseBody(res)
6472 if err := googleapi.CheckResponse(res); err != nil {
6473 return nil, gensupport.WrapError(err)
6474 }
6475 ret := &InstanceConfig{
6476 ServerResponse: googleapi.ServerResponse{
6477 Header: res.Header,
6478 HTTPStatusCode: res.StatusCode,
6479 },
6480 }
6481 target := &ret
6482 if err := gensupport.DecodeResponse(target, res); err != nil {
6483 return nil, err
6484 }
6485 return ret, nil
6486 }
6487
6488 type ProjectsInstanceConfigsListCall struct {
6489 s *Service
6490 parent string
6491 urlParams_ gensupport.URLParams
6492 ifNoneMatch_ string
6493 ctx_ context.Context
6494 header_ http.Header
6495 }
6496
6497
6498
6499
6500
6501 func (r *ProjectsInstanceConfigsService) List(parent string) *ProjectsInstanceConfigsListCall {
6502 c := &ProjectsInstanceConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6503 c.parent = parent
6504 return c
6505 }
6506
6507
6508
6509
6510 func (c *ProjectsInstanceConfigsListCall) PageSize(pageSize int64) *ProjectsInstanceConfigsListCall {
6511 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6512 return c
6513 }
6514
6515
6516
6517
6518 func (c *ProjectsInstanceConfigsListCall) PageToken(pageToken string) *ProjectsInstanceConfigsListCall {
6519 c.urlParams_.Set("pageToken", pageToken)
6520 return c
6521 }
6522
6523
6524
6525
6526 func (c *ProjectsInstanceConfigsListCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsListCall {
6527 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6528 return c
6529 }
6530
6531
6532
6533
6534 func (c *ProjectsInstanceConfigsListCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsListCall {
6535 c.ifNoneMatch_ = entityTag
6536 return c
6537 }
6538
6539
6540 func (c *ProjectsInstanceConfigsListCall) Context(ctx context.Context) *ProjectsInstanceConfigsListCall {
6541 c.ctx_ = ctx
6542 return c
6543 }
6544
6545
6546
6547 func (c *ProjectsInstanceConfigsListCall) Header() http.Header {
6548 if c.header_ == nil {
6549 c.header_ = make(http.Header)
6550 }
6551 return c.header_
6552 }
6553
6554 func (c *ProjectsInstanceConfigsListCall) doRequest(alt string) (*http.Response, error) {
6555 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6556 if c.ifNoneMatch_ != "" {
6557 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6558 }
6559 var body io.Reader = nil
6560 c.urlParams_.Set("alt", alt)
6561 c.urlParams_.Set("prettyPrint", "false")
6562 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instanceConfigs")
6563 urls += "?" + c.urlParams_.Encode()
6564 req, err := http.NewRequest("GET", urls, body)
6565 if err != nil {
6566 return nil, err
6567 }
6568 req.Header = reqHeaders
6569 googleapi.Expand(req.URL, map[string]string{
6570 "parent": c.parent,
6571 })
6572 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6573 }
6574
6575
6576
6577
6578
6579
6580
6581 func (c *ProjectsInstanceConfigsListCall) Do(opts ...googleapi.CallOption) (*ListInstanceConfigsResponse, error) {
6582 gensupport.SetOptions(c.urlParams_, opts...)
6583 res, err := c.doRequest("json")
6584 if res != nil && res.StatusCode == http.StatusNotModified {
6585 if res.Body != nil {
6586 res.Body.Close()
6587 }
6588 return nil, gensupport.WrapError(&googleapi.Error{
6589 Code: res.StatusCode,
6590 Header: res.Header,
6591 })
6592 }
6593 if err != nil {
6594 return nil, err
6595 }
6596 defer googleapi.CloseBody(res)
6597 if err := googleapi.CheckResponse(res); err != nil {
6598 return nil, gensupport.WrapError(err)
6599 }
6600 ret := &ListInstanceConfigsResponse{
6601 ServerResponse: googleapi.ServerResponse{
6602 Header: res.Header,
6603 HTTPStatusCode: res.StatusCode,
6604 },
6605 }
6606 target := &ret
6607 if err := gensupport.DecodeResponse(target, res); err != nil {
6608 return nil, err
6609 }
6610 return ret, nil
6611 }
6612
6613
6614
6615
6616 func (c *ProjectsInstanceConfigsListCall) Pages(ctx context.Context, f func(*ListInstanceConfigsResponse) error) error {
6617 c.ctx_ = ctx
6618 defer c.PageToken(c.urlParams_.Get("pageToken"))
6619 for {
6620 x, err := c.Do()
6621 if err != nil {
6622 return err
6623 }
6624 if err := f(x); err != nil {
6625 return err
6626 }
6627 if x.NextPageToken == "" {
6628 return nil
6629 }
6630 c.PageToken(x.NextPageToken)
6631 }
6632 }
6633
6634 type ProjectsInstanceConfigsPatchCall struct {
6635 s *Service
6636 nameid string
6637 updateinstanceconfigrequest *UpdateInstanceConfigRequest
6638 urlParams_ gensupport.URLParams
6639 ctx_ context.Context
6640 header_ http.Header
6641 }
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664 func (r *ProjectsInstanceConfigsService) Patch(nameid string, updateinstanceconfigrequest *UpdateInstanceConfigRequest) *ProjectsInstanceConfigsPatchCall {
6665 c := &ProjectsInstanceConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6666 c.nameid = nameid
6667 c.updateinstanceconfigrequest = updateinstanceconfigrequest
6668 return c
6669 }
6670
6671
6672
6673
6674 func (c *ProjectsInstanceConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsPatchCall {
6675 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6676 return c
6677 }
6678
6679
6680 func (c *ProjectsInstanceConfigsPatchCall) Context(ctx context.Context) *ProjectsInstanceConfigsPatchCall {
6681 c.ctx_ = ctx
6682 return c
6683 }
6684
6685
6686
6687 func (c *ProjectsInstanceConfigsPatchCall) Header() http.Header {
6688 if c.header_ == nil {
6689 c.header_ = make(http.Header)
6690 }
6691 return c.header_
6692 }
6693
6694 func (c *ProjectsInstanceConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
6695 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6696 var body io.Reader = nil
6697 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateinstanceconfigrequest)
6698 if err != nil {
6699 return nil, err
6700 }
6701 c.urlParams_.Set("alt", alt)
6702 c.urlParams_.Set("prettyPrint", "false")
6703 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6704 urls += "?" + c.urlParams_.Encode()
6705 req, err := http.NewRequest("PATCH", urls, body)
6706 if err != nil {
6707 return nil, err
6708 }
6709 req.Header = reqHeaders
6710 googleapi.Expand(req.URL, map[string]string{
6711 "name": c.nameid,
6712 })
6713 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6714 }
6715
6716
6717
6718
6719
6720
6721 func (c *ProjectsInstanceConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6722 gensupport.SetOptions(c.urlParams_, opts...)
6723 res, err := c.doRequest("json")
6724 if res != nil && res.StatusCode == http.StatusNotModified {
6725 if res.Body != nil {
6726 res.Body.Close()
6727 }
6728 return nil, gensupport.WrapError(&googleapi.Error{
6729 Code: res.StatusCode,
6730 Header: res.Header,
6731 })
6732 }
6733 if err != nil {
6734 return nil, err
6735 }
6736 defer googleapi.CloseBody(res)
6737 if err := googleapi.CheckResponse(res); err != nil {
6738 return nil, gensupport.WrapError(err)
6739 }
6740 ret := &Operation{
6741 ServerResponse: googleapi.ServerResponse{
6742 Header: res.Header,
6743 HTTPStatusCode: res.StatusCode,
6744 },
6745 }
6746 target := &ret
6747 if err := gensupport.DecodeResponse(target, res); err != nil {
6748 return nil, err
6749 }
6750 return ret, nil
6751 }
6752
6753 type ProjectsInstanceConfigsOperationsCancelCall struct {
6754 s *Service
6755 name string
6756 urlParams_ gensupport.URLParams
6757 ctx_ context.Context
6758 header_ http.Header
6759 }
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772 func (r *ProjectsInstanceConfigsOperationsService) Cancel(name string) *ProjectsInstanceConfigsOperationsCancelCall {
6773 c := &ProjectsInstanceConfigsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6774 c.name = name
6775 return c
6776 }
6777
6778
6779
6780
6781 func (c *ProjectsInstanceConfigsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsOperationsCancelCall {
6782 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6783 return c
6784 }
6785
6786
6787 func (c *ProjectsInstanceConfigsOperationsCancelCall) Context(ctx context.Context) *ProjectsInstanceConfigsOperationsCancelCall {
6788 c.ctx_ = ctx
6789 return c
6790 }
6791
6792
6793
6794 func (c *ProjectsInstanceConfigsOperationsCancelCall) Header() http.Header {
6795 if c.header_ == nil {
6796 c.header_ = make(http.Header)
6797 }
6798 return c.header_
6799 }
6800
6801 func (c *ProjectsInstanceConfigsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
6802 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6803 var body io.Reader = nil
6804 c.urlParams_.Set("alt", alt)
6805 c.urlParams_.Set("prettyPrint", "false")
6806 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
6807 urls += "?" + c.urlParams_.Encode()
6808 req, err := http.NewRequest("POST", urls, body)
6809 if err != nil {
6810 return nil, err
6811 }
6812 req.Header = reqHeaders
6813 googleapi.Expand(req.URL, map[string]string{
6814 "name": c.name,
6815 })
6816 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6817 }
6818
6819
6820
6821
6822
6823
6824 func (c *ProjectsInstanceConfigsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6825 gensupport.SetOptions(c.urlParams_, opts...)
6826 res, err := c.doRequest("json")
6827 if res != nil && res.StatusCode == http.StatusNotModified {
6828 if res.Body != nil {
6829 res.Body.Close()
6830 }
6831 return nil, gensupport.WrapError(&googleapi.Error{
6832 Code: res.StatusCode,
6833 Header: res.Header,
6834 })
6835 }
6836 if err != nil {
6837 return nil, err
6838 }
6839 defer googleapi.CloseBody(res)
6840 if err := googleapi.CheckResponse(res); err != nil {
6841 return nil, gensupport.WrapError(err)
6842 }
6843 ret := &Empty{
6844 ServerResponse: googleapi.ServerResponse{
6845 Header: res.Header,
6846 HTTPStatusCode: res.StatusCode,
6847 },
6848 }
6849 target := &ret
6850 if err := gensupport.DecodeResponse(target, res); err != nil {
6851 return nil, err
6852 }
6853 return ret, nil
6854 }
6855
6856 type ProjectsInstanceConfigsOperationsDeleteCall struct {
6857 s *Service
6858 name string
6859 urlParams_ gensupport.URLParams
6860 ctx_ context.Context
6861 header_ http.Header
6862 }
6863
6864
6865
6866
6867
6868
6869
6870 func (r *ProjectsInstanceConfigsOperationsService) Delete(name string) *ProjectsInstanceConfigsOperationsDeleteCall {
6871 c := &ProjectsInstanceConfigsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6872 c.name = name
6873 return c
6874 }
6875
6876
6877
6878
6879 func (c *ProjectsInstanceConfigsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsOperationsDeleteCall {
6880 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6881 return c
6882 }
6883
6884
6885 func (c *ProjectsInstanceConfigsOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstanceConfigsOperationsDeleteCall {
6886 c.ctx_ = ctx
6887 return c
6888 }
6889
6890
6891
6892 func (c *ProjectsInstanceConfigsOperationsDeleteCall) Header() http.Header {
6893 if c.header_ == nil {
6894 c.header_ = make(http.Header)
6895 }
6896 return c.header_
6897 }
6898
6899 func (c *ProjectsInstanceConfigsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
6900 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6901 var body io.Reader = nil
6902 c.urlParams_.Set("alt", alt)
6903 c.urlParams_.Set("prettyPrint", "false")
6904 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6905 urls += "?" + c.urlParams_.Encode()
6906 req, err := http.NewRequest("DELETE", urls, body)
6907 if err != nil {
6908 return nil, err
6909 }
6910 req.Header = reqHeaders
6911 googleapi.Expand(req.URL, map[string]string{
6912 "name": c.name,
6913 })
6914 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6915 }
6916
6917
6918
6919
6920
6921
6922 func (c *ProjectsInstanceConfigsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6923 gensupport.SetOptions(c.urlParams_, opts...)
6924 res, err := c.doRequest("json")
6925 if res != nil && res.StatusCode == http.StatusNotModified {
6926 if res.Body != nil {
6927 res.Body.Close()
6928 }
6929 return nil, gensupport.WrapError(&googleapi.Error{
6930 Code: res.StatusCode,
6931 Header: res.Header,
6932 })
6933 }
6934 if err != nil {
6935 return nil, err
6936 }
6937 defer googleapi.CloseBody(res)
6938 if err := googleapi.CheckResponse(res); err != nil {
6939 return nil, gensupport.WrapError(err)
6940 }
6941 ret := &Empty{
6942 ServerResponse: googleapi.ServerResponse{
6943 Header: res.Header,
6944 HTTPStatusCode: res.StatusCode,
6945 },
6946 }
6947 target := &ret
6948 if err := gensupport.DecodeResponse(target, res); err != nil {
6949 return nil, err
6950 }
6951 return ret, nil
6952 }
6953
6954 type ProjectsInstanceConfigsOperationsGetCall struct {
6955 s *Service
6956 name string
6957 urlParams_ gensupport.URLParams
6958 ifNoneMatch_ string
6959 ctx_ context.Context
6960 header_ http.Header
6961 }
6962
6963
6964
6965
6966
6967
6968 func (r *ProjectsInstanceConfigsOperationsService) Get(name string) *ProjectsInstanceConfigsOperationsGetCall {
6969 c := &ProjectsInstanceConfigsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6970 c.name = name
6971 return c
6972 }
6973
6974
6975
6976
6977 func (c *ProjectsInstanceConfigsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsOperationsGetCall {
6978 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6979 return c
6980 }
6981
6982
6983
6984
6985 func (c *ProjectsInstanceConfigsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsOperationsGetCall {
6986 c.ifNoneMatch_ = entityTag
6987 return c
6988 }
6989
6990
6991 func (c *ProjectsInstanceConfigsOperationsGetCall) Context(ctx context.Context) *ProjectsInstanceConfigsOperationsGetCall {
6992 c.ctx_ = ctx
6993 return c
6994 }
6995
6996
6997
6998 func (c *ProjectsInstanceConfigsOperationsGetCall) Header() http.Header {
6999 if c.header_ == nil {
7000 c.header_ = make(http.Header)
7001 }
7002 return c.header_
7003 }
7004
7005 func (c *ProjectsInstanceConfigsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
7006 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7007 if c.ifNoneMatch_ != "" {
7008 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7009 }
7010 var body io.Reader = nil
7011 c.urlParams_.Set("alt", alt)
7012 c.urlParams_.Set("prettyPrint", "false")
7013 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7014 urls += "?" + c.urlParams_.Encode()
7015 req, err := http.NewRequest("GET", urls, body)
7016 if err != nil {
7017 return nil, err
7018 }
7019 req.Header = reqHeaders
7020 googleapi.Expand(req.URL, map[string]string{
7021 "name": c.name,
7022 })
7023 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7024 }
7025
7026
7027
7028
7029
7030
7031 func (c *ProjectsInstanceConfigsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7032 gensupport.SetOptions(c.urlParams_, opts...)
7033 res, err := c.doRequest("json")
7034 if res != nil && res.StatusCode == http.StatusNotModified {
7035 if res.Body != nil {
7036 res.Body.Close()
7037 }
7038 return nil, gensupport.WrapError(&googleapi.Error{
7039 Code: res.StatusCode,
7040 Header: res.Header,
7041 })
7042 }
7043 if err != nil {
7044 return nil, err
7045 }
7046 defer googleapi.CloseBody(res)
7047 if err := googleapi.CheckResponse(res); err != nil {
7048 return nil, gensupport.WrapError(err)
7049 }
7050 ret := &Operation{
7051 ServerResponse: googleapi.ServerResponse{
7052 Header: res.Header,
7053 HTTPStatusCode: res.StatusCode,
7054 },
7055 }
7056 target := &ret
7057 if err := gensupport.DecodeResponse(target, res); err != nil {
7058 return nil, err
7059 }
7060 return ret, nil
7061 }
7062
7063 type ProjectsInstanceConfigsOperationsListCall struct {
7064 s *Service
7065 name string
7066 urlParams_ gensupport.URLParams
7067 ifNoneMatch_ string
7068 ctx_ context.Context
7069 header_ http.Header
7070 }
7071
7072
7073
7074
7075
7076 func (r *ProjectsInstanceConfigsOperationsService) List(name string) *ProjectsInstanceConfigsOperationsListCall {
7077 c := &ProjectsInstanceConfigsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7078 c.name = name
7079 return c
7080 }
7081
7082
7083 func (c *ProjectsInstanceConfigsOperationsListCall) Filter(filter string) *ProjectsInstanceConfigsOperationsListCall {
7084 c.urlParams_.Set("filter", filter)
7085 return c
7086 }
7087
7088
7089
7090 func (c *ProjectsInstanceConfigsOperationsListCall) PageSize(pageSize int64) *ProjectsInstanceConfigsOperationsListCall {
7091 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7092 return c
7093 }
7094
7095
7096
7097 func (c *ProjectsInstanceConfigsOperationsListCall) PageToken(pageToken string) *ProjectsInstanceConfigsOperationsListCall {
7098 c.urlParams_.Set("pageToken", pageToken)
7099 return c
7100 }
7101
7102
7103
7104
7105 func (c *ProjectsInstanceConfigsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsOperationsListCall {
7106 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7107 return c
7108 }
7109
7110
7111
7112
7113 func (c *ProjectsInstanceConfigsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsOperationsListCall {
7114 c.ifNoneMatch_ = entityTag
7115 return c
7116 }
7117
7118
7119 func (c *ProjectsInstanceConfigsOperationsListCall) Context(ctx context.Context) *ProjectsInstanceConfigsOperationsListCall {
7120 c.ctx_ = ctx
7121 return c
7122 }
7123
7124
7125
7126 func (c *ProjectsInstanceConfigsOperationsListCall) Header() http.Header {
7127 if c.header_ == nil {
7128 c.header_ = make(http.Header)
7129 }
7130 return c.header_
7131 }
7132
7133 func (c *ProjectsInstanceConfigsOperationsListCall) doRequest(alt string) (*http.Response, error) {
7134 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7135 if c.ifNoneMatch_ != "" {
7136 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7137 }
7138 var body io.Reader = nil
7139 c.urlParams_.Set("alt", alt)
7140 c.urlParams_.Set("prettyPrint", "false")
7141 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7142 urls += "?" + c.urlParams_.Encode()
7143 req, err := http.NewRequest("GET", urls, body)
7144 if err != nil {
7145 return nil, err
7146 }
7147 req.Header = reqHeaders
7148 googleapi.Expand(req.URL, map[string]string{
7149 "name": c.name,
7150 })
7151 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7152 }
7153
7154
7155
7156
7157
7158
7159
7160 func (c *ProjectsInstanceConfigsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
7161 gensupport.SetOptions(c.urlParams_, opts...)
7162 res, err := c.doRequest("json")
7163 if res != nil && res.StatusCode == http.StatusNotModified {
7164 if res.Body != nil {
7165 res.Body.Close()
7166 }
7167 return nil, gensupport.WrapError(&googleapi.Error{
7168 Code: res.StatusCode,
7169 Header: res.Header,
7170 })
7171 }
7172 if err != nil {
7173 return nil, err
7174 }
7175 defer googleapi.CloseBody(res)
7176 if err := googleapi.CheckResponse(res); err != nil {
7177 return nil, gensupport.WrapError(err)
7178 }
7179 ret := &ListOperationsResponse{
7180 ServerResponse: googleapi.ServerResponse{
7181 Header: res.Header,
7182 HTTPStatusCode: res.StatusCode,
7183 },
7184 }
7185 target := &ret
7186 if err := gensupport.DecodeResponse(target, res); err != nil {
7187 return nil, err
7188 }
7189 return ret, nil
7190 }
7191
7192
7193
7194
7195 func (c *ProjectsInstanceConfigsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
7196 c.ctx_ = ctx
7197 defer c.PageToken(c.urlParams_.Get("pageToken"))
7198 for {
7199 x, err := c.Do()
7200 if err != nil {
7201 return err
7202 }
7203 if err := f(x); err != nil {
7204 return err
7205 }
7206 if x.NextPageToken == "" {
7207 return nil
7208 }
7209 c.PageToken(x.NextPageToken)
7210 }
7211 }
7212
7213 type ProjectsInstanceConfigsSsdCachesOperationsCancelCall struct {
7214 s *Service
7215 name string
7216 urlParams_ gensupport.URLParams
7217 ctx_ context.Context
7218 header_ http.Header
7219 }
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232 func (r *ProjectsInstanceConfigsSsdCachesOperationsService) Cancel(name string) *ProjectsInstanceConfigsSsdCachesOperationsCancelCall {
7233 c := &ProjectsInstanceConfigsSsdCachesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7234 c.name = name
7235 return c
7236 }
7237
7238
7239
7240
7241 func (c *ProjectsInstanceConfigsSsdCachesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsSsdCachesOperationsCancelCall {
7242 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7243 return c
7244 }
7245
7246
7247 func (c *ProjectsInstanceConfigsSsdCachesOperationsCancelCall) Context(ctx context.Context) *ProjectsInstanceConfigsSsdCachesOperationsCancelCall {
7248 c.ctx_ = ctx
7249 return c
7250 }
7251
7252
7253
7254 func (c *ProjectsInstanceConfigsSsdCachesOperationsCancelCall) Header() http.Header {
7255 if c.header_ == nil {
7256 c.header_ = make(http.Header)
7257 }
7258 return c.header_
7259 }
7260
7261 func (c *ProjectsInstanceConfigsSsdCachesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
7262 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7263 var body io.Reader = nil
7264 c.urlParams_.Set("alt", alt)
7265 c.urlParams_.Set("prettyPrint", "false")
7266 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
7267 urls += "?" + c.urlParams_.Encode()
7268 req, err := http.NewRequest("POST", urls, body)
7269 if err != nil {
7270 return nil, err
7271 }
7272 req.Header = reqHeaders
7273 googleapi.Expand(req.URL, map[string]string{
7274 "name": c.name,
7275 })
7276 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7277 }
7278
7279
7280
7281
7282
7283
7284 func (c *ProjectsInstanceConfigsSsdCachesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7285 gensupport.SetOptions(c.urlParams_, opts...)
7286 res, err := c.doRequest("json")
7287 if res != nil && res.StatusCode == http.StatusNotModified {
7288 if res.Body != nil {
7289 res.Body.Close()
7290 }
7291 return nil, gensupport.WrapError(&googleapi.Error{
7292 Code: res.StatusCode,
7293 Header: res.Header,
7294 })
7295 }
7296 if err != nil {
7297 return nil, err
7298 }
7299 defer googleapi.CloseBody(res)
7300 if err := googleapi.CheckResponse(res); err != nil {
7301 return nil, gensupport.WrapError(err)
7302 }
7303 ret := &Empty{
7304 ServerResponse: googleapi.ServerResponse{
7305 Header: res.Header,
7306 HTTPStatusCode: res.StatusCode,
7307 },
7308 }
7309 target := &ret
7310 if err := gensupport.DecodeResponse(target, res); err != nil {
7311 return nil, err
7312 }
7313 return ret, nil
7314 }
7315
7316 type ProjectsInstanceConfigsSsdCachesOperationsDeleteCall struct {
7317 s *Service
7318 name string
7319 urlParams_ gensupport.URLParams
7320 ctx_ context.Context
7321 header_ http.Header
7322 }
7323
7324
7325
7326
7327
7328
7329
7330 func (r *ProjectsInstanceConfigsSsdCachesOperationsService) Delete(name string) *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall {
7331 c := &ProjectsInstanceConfigsSsdCachesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7332 c.name = name
7333 return c
7334 }
7335
7336
7337
7338
7339 func (c *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall {
7340 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7341 return c
7342 }
7343
7344
7345 func (c *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall {
7346 c.ctx_ = ctx
7347 return c
7348 }
7349
7350
7351
7352 func (c *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall) Header() http.Header {
7353 if c.header_ == nil {
7354 c.header_ = make(http.Header)
7355 }
7356 return c.header_
7357 }
7358
7359 func (c *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
7360 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7361 var body io.Reader = nil
7362 c.urlParams_.Set("alt", alt)
7363 c.urlParams_.Set("prettyPrint", "false")
7364 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7365 urls += "?" + c.urlParams_.Encode()
7366 req, err := http.NewRequest("DELETE", urls, body)
7367 if err != nil {
7368 return nil, err
7369 }
7370 req.Header = reqHeaders
7371 googleapi.Expand(req.URL, map[string]string{
7372 "name": c.name,
7373 })
7374 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7375 }
7376
7377
7378
7379
7380
7381
7382 func (c *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7383 gensupport.SetOptions(c.urlParams_, opts...)
7384 res, err := c.doRequest("json")
7385 if res != nil && res.StatusCode == http.StatusNotModified {
7386 if res.Body != nil {
7387 res.Body.Close()
7388 }
7389 return nil, gensupport.WrapError(&googleapi.Error{
7390 Code: res.StatusCode,
7391 Header: res.Header,
7392 })
7393 }
7394 if err != nil {
7395 return nil, err
7396 }
7397 defer googleapi.CloseBody(res)
7398 if err := googleapi.CheckResponse(res); err != nil {
7399 return nil, gensupport.WrapError(err)
7400 }
7401 ret := &Empty{
7402 ServerResponse: googleapi.ServerResponse{
7403 Header: res.Header,
7404 HTTPStatusCode: res.StatusCode,
7405 },
7406 }
7407 target := &ret
7408 if err := gensupport.DecodeResponse(target, res); err != nil {
7409 return nil, err
7410 }
7411 return ret, nil
7412 }
7413
7414 type ProjectsInstanceConfigsSsdCachesOperationsGetCall struct {
7415 s *Service
7416 name string
7417 urlParams_ gensupport.URLParams
7418 ifNoneMatch_ string
7419 ctx_ context.Context
7420 header_ http.Header
7421 }
7422
7423
7424
7425
7426
7427
7428 func (r *ProjectsInstanceConfigsSsdCachesOperationsService) Get(name string) *ProjectsInstanceConfigsSsdCachesOperationsGetCall {
7429 c := &ProjectsInstanceConfigsSsdCachesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7430 c.name = name
7431 return c
7432 }
7433
7434
7435
7436
7437 func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsSsdCachesOperationsGetCall {
7438 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7439 return c
7440 }
7441
7442
7443
7444
7445 func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsSsdCachesOperationsGetCall {
7446 c.ifNoneMatch_ = entityTag
7447 return c
7448 }
7449
7450
7451 func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) Context(ctx context.Context) *ProjectsInstanceConfigsSsdCachesOperationsGetCall {
7452 c.ctx_ = ctx
7453 return c
7454 }
7455
7456
7457
7458 func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) Header() http.Header {
7459 if c.header_ == nil {
7460 c.header_ = make(http.Header)
7461 }
7462 return c.header_
7463 }
7464
7465 func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
7466 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7467 if c.ifNoneMatch_ != "" {
7468 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7469 }
7470 var body io.Reader = nil
7471 c.urlParams_.Set("alt", alt)
7472 c.urlParams_.Set("prettyPrint", "false")
7473 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7474 urls += "?" + c.urlParams_.Encode()
7475 req, err := http.NewRequest("GET", urls, body)
7476 if err != nil {
7477 return nil, err
7478 }
7479 req.Header = reqHeaders
7480 googleapi.Expand(req.URL, map[string]string{
7481 "name": c.name,
7482 })
7483 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7484 }
7485
7486
7487
7488
7489
7490
7491 func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7492 gensupport.SetOptions(c.urlParams_, opts...)
7493 res, err := c.doRequest("json")
7494 if res != nil && res.StatusCode == http.StatusNotModified {
7495 if res.Body != nil {
7496 res.Body.Close()
7497 }
7498 return nil, gensupport.WrapError(&googleapi.Error{
7499 Code: res.StatusCode,
7500 Header: res.Header,
7501 })
7502 }
7503 if err != nil {
7504 return nil, err
7505 }
7506 defer googleapi.CloseBody(res)
7507 if err := googleapi.CheckResponse(res); err != nil {
7508 return nil, gensupport.WrapError(err)
7509 }
7510 ret := &Operation{
7511 ServerResponse: googleapi.ServerResponse{
7512 Header: res.Header,
7513 HTTPStatusCode: res.StatusCode,
7514 },
7515 }
7516 target := &ret
7517 if err := gensupport.DecodeResponse(target, res); err != nil {
7518 return nil, err
7519 }
7520 return ret, nil
7521 }
7522
7523 type ProjectsInstanceConfigsSsdCachesOperationsListCall struct {
7524 s *Service
7525 name string
7526 urlParams_ gensupport.URLParams
7527 ifNoneMatch_ string
7528 ctx_ context.Context
7529 header_ http.Header
7530 }
7531
7532
7533
7534
7535
7536 func (r *ProjectsInstanceConfigsSsdCachesOperationsService) List(name string) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
7537 c := &ProjectsInstanceConfigsSsdCachesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7538 c.name = name
7539 return c
7540 }
7541
7542
7543 func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Filter(filter string) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
7544 c.urlParams_.Set("filter", filter)
7545 return c
7546 }
7547
7548
7549
7550 func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) PageSize(pageSize int64) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
7551 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7552 return c
7553 }
7554
7555
7556
7557 func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) PageToken(pageToken string) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
7558 c.urlParams_.Set("pageToken", pageToken)
7559 return c
7560 }
7561
7562
7563
7564
7565 func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
7566 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7567 return c
7568 }
7569
7570
7571
7572
7573 func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
7574 c.ifNoneMatch_ = entityTag
7575 return c
7576 }
7577
7578
7579 func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Context(ctx context.Context) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
7580 c.ctx_ = ctx
7581 return c
7582 }
7583
7584
7585
7586 func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Header() http.Header {
7587 if c.header_ == nil {
7588 c.header_ = make(http.Header)
7589 }
7590 return c.header_
7591 }
7592
7593 func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) doRequest(alt string) (*http.Response, error) {
7594 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7595 if c.ifNoneMatch_ != "" {
7596 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7597 }
7598 var body io.Reader = nil
7599 c.urlParams_.Set("alt", alt)
7600 c.urlParams_.Set("prettyPrint", "false")
7601 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7602 urls += "?" + c.urlParams_.Encode()
7603 req, err := http.NewRequest("GET", urls, body)
7604 if err != nil {
7605 return nil, err
7606 }
7607 req.Header = reqHeaders
7608 googleapi.Expand(req.URL, map[string]string{
7609 "name": c.name,
7610 })
7611 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7612 }
7613
7614
7615
7616
7617
7618
7619
7620 func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
7621 gensupport.SetOptions(c.urlParams_, opts...)
7622 res, err := c.doRequest("json")
7623 if res != nil && res.StatusCode == http.StatusNotModified {
7624 if res.Body != nil {
7625 res.Body.Close()
7626 }
7627 return nil, gensupport.WrapError(&googleapi.Error{
7628 Code: res.StatusCode,
7629 Header: res.Header,
7630 })
7631 }
7632 if err != nil {
7633 return nil, err
7634 }
7635 defer googleapi.CloseBody(res)
7636 if err := googleapi.CheckResponse(res); err != nil {
7637 return nil, gensupport.WrapError(err)
7638 }
7639 ret := &ListOperationsResponse{
7640 ServerResponse: googleapi.ServerResponse{
7641 Header: res.Header,
7642 HTTPStatusCode: res.StatusCode,
7643 },
7644 }
7645 target := &ret
7646 if err := gensupport.DecodeResponse(target, res); err != nil {
7647 return nil, err
7648 }
7649 return ret, nil
7650 }
7651
7652
7653
7654
7655 func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
7656 c.ctx_ = ctx
7657 defer c.PageToken(c.urlParams_.Get("pageToken"))
7658 for {
7659 x, err := c.Do()
7660 if err != nil {
7661 return err
7662 }
7663 if err := f(x); err != nil {
7664 return err
7665 }
7666 if x.NextPageToken == "" {
7667 return nil
7668 }
7669 c.PageToken(x.NextPageToken)
7670 }
7671 }
7672
7673 type ProjectsInstancesCreateCall struct {
7674 s *Service
7675 parent string
7676 createinstancerequest *CreateInstanceRequest
7677 urlParams_ gensupport.URLParams
7678 ctx_ context.Context
7679 header_ http.Header
7680 }
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703 func (r *ProjectsInstancesService) Create(parent string, createinstancerequest *CreateInstanceRequest) *ProjectsInstancesCreateCall {
7704 c := &ProjectsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7705 c.parent = parent
7706 c.createinstancerequest = createinstancerequest
7707 return c
7708 }
7709
7710
7711
7712
7713 func (c *ProjectsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesCreateCall {
7714 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7715 return c
7716 }
7717
7718
7719 func (c *ProjectsInstancesCreateCall) Context(ctx context.Context) *ProjectsInstancesCreateCall {
7720 c.ctx_ = ctx
7721 return c
7722 }
7723
7724
7725
7726 func (c *ProjectsInstancesCreateCall) Header() http.Header {
7727 if c.header_ == nil {
7728 c.header_ = make(http.Header)
7729 }
7730 return c.header_
7731 }
7732
7733 func (c *ProjectsInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
7734 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7735 var body io.Reader = nil
7736 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createinstancerequest)
7737 if err != nil {
7738 return nil, err
7739 }
7740 c.urlParams_.Set("alt", alt)
7741 c.urlParams_.Set("prettyPrint", "false")
7742 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
7743 urls += "?" + c.urlParams_.Encode()
7744 req, err := http.NewRequest("POST", urls, body)
7745 if err != nil {
7746 return nil, err
7747 }
7748 req.Header = reqHeaders
7749 googleapi.Expand(req.URL, map[string]string{
7750 "parent": c.parent,
7751 })
7752 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7753 }
7754
7755
7756
7757
7758
7759
7760 func (c *ProjectsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7761 gensupport.SetOptions(c.urlParams_, opts...)
7762 res, err := c.doRequest("json")
7763 if res != nil && res.StatusCode == http.StatusNotModified {
7764 if res.Body != nil {
7765 res.Body.Close()
7766 }
7767 return nil, gensupport.WrapError(&googleapi.Error{
7768 Code: res.StatusCode,
7769 Header: res.Header,
7770 })
7771 }
7772 if err != nil {
7773 return nil, err
7774 }
7775 defer googleapi.CloseBody(res)
7776 if err := googleapi.CheckResponse(res); err != nil {
7777 return nil, gensupport.WrapError(err)
7778 }
7779 ret := &Operation{
7780 ServerResponse: googleapi.ServerResponse{
7781 Header: res.Header,
7782 HTTPStatusCode: res.StatusCode,
7783 },
7784 }
7785 target := &ret
7786 if err := gensupport.DecodeResponse(target, res); err != nil {
7787 return nil, err
7788 }
7789 return ret, nil
7790 }
7791
7792 type ProjectsInstancesDeleteCall struct {
7793 s *Service
7794 name string
7795 urlParams_ gensupport.URLParams
7796 ctx_ context.Context
7797 header_ http.Header
7798 }
7799
7800
7801
7802
7803
7804
7805
7806
7807 func (r *ProjectsInstancesService) Delete(name string) *ProjectsInstancesDeleteCall {
7808 c := &ProjectsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7809 c.name = name
7810 return c
7811 }
7812
7813
7814
7815
7816 func (c *ProjectsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDeleteCall {
7817 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7818 return c
7819 }
7820
7821
7822 func (c *ProjectsInstancesDeleteCall) Context(ctx context.Context) *ProjectsInstancesDeleteCall {
7823 c.ctx_ = ctx
7824 return c
7825 }
7826
7827
7828
7829 func (c *ProjectsInstancesDeleteCall) Header() http.Header {
7830 if c.header_ == nil {
7831 c.header_ = make(http.Header)
7832 }
7833 return c.header_
7834 }
7835
7836 func (c *ProjectsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
7837 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7838 var body io.Reader = nil
7839 c.urlParams_.Set("alt", alt)
7840 c.urlParams_.Set("prettyPrint", "false")
7841 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7842 urls += "?" + c.urlParams_.Encode()
7843 req, err := http.NewRequest("DELETE", urls, body)
7844 if err != nil {
7845 return nil, err
7846 }
7847 req.Header = reqHeaders
7848 googleapi.Expand(req.URL, map[string]string{
7849 "name": c.name,
7850 })
7851 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7852 }
7853
7854
7855
7856
7857
7858
7859 func (c *ProjectsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7860 gensupport.SetOptions(c.urlParams_, opts...)
7861 res, err := c.doRequest("json")
7862 if res != nil && res.StatusCode == http.StatusNotModified {
7863 if res.Body != nil {
7864 res.Body.Close()
7865 }
7866 return nil, gensupport.WrapError(&googleapi.Error{
7867 Code: res.StatusCode,
7868 Header: res.Header,
7869 })
7870 }
7871 if err != nil {
7872 return nil, err
7873 }
7874 defer googleapi.CloseBody(res)
7875 if err := googleapi.CheckResponse(res); err != nil {
7876 return nil, gensupport.WrapError(err)
7877 }
7878 ret := &Empty{
7879 ServerResponse: googleapi.ServerResponse{
7880 Header: res.Header,
7881 HTTPStatusCode: res.StatusCode,
7882 },
7883 }
7884 target := &ret
7885 if err := gensupport.DecodeResponse(target, res); err != nil {
7886 return nil, err
7887 }
7888 return ret, nil
7889 }
7890
7891 type ProjectsInstancesGetCall struct {
7892 s *Service
7893 name string
7894 urlParams_ gensupport.URLParams
7895 ifNoneMatch_ string
7896 ctx_ context.Context
7897 header_ http.Header
7898 }
7899
7900
7901
7902
7903
7904 func (r *ProjectsInstancesService) Get(name string) *ProjectsInstancesGetCall {
7905 c := &ProjectsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7906 c.name = name
7907 return c
7908 }
7909
7910
7911
7912
7913 func (c *ProjectsInstancesGetCall) FieldMask(fieldMask string) *ProjectsInstancesGetCall {
7914 c.urlParams_.Set("fieldMask", fieldMask)
7915 return c
7916 }
7917
7918
7919
7920
7921 func (c *ProjectsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetCall {
7922 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7923 return c
7924 }
7925
7926
7927
7928
7929 func (c *ProjectsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesGetCall {
7930 c.ifNoneMatch_ = entityTag
7931 return c
7932 }
7933
7934
7935 func (c *ProjectsInstancesGetCall) Context(ctx context.Context) *ProjectsInstancesGetCall {
7936 c.ctx_ = ctx
7937 return c
7938 }
7939
7940
7941
7942 func (c *ProjectsInstancesGetCall) Header() http.Header {
7943 if c.header_ == nil {
7944 c.header_ = make(http.Header)
7945 }
7946 return c.header_
7947 }
7948
7949 func (c *ProjectsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
7950 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7951 if c.ifNoneMatch_ != "" {
7952 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7953 }
7954 var body io.Reader = nil
7955 c.urlParams_.Set("alt", alt)
7956 c.urlParams_.Set("prettyPrint", "false")
7957 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7958 urls += "?" + c.urlParams_.Encode()
7959 req, err := http.NewRequest("GET", urls, body)
7960 if err != nil {
7961 return nil, err
7962 }
7963 req.Header = reqHeaders
7964 googleapi.Expand(req.URL, map[string]string{
7965 "name": c.name,
7966 })
7967 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7968 }
7969
7970
7971
7972
7973
7974
7975 func (c *ProjectsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
7976 gensupport.SetOptions(c.urlParams_, opts...)
7977 res, err := c.doRequest("json")
7978 if res != nil && res.StatusCode == http.StatusNotModified {
7979 if res.Body != nil {
7980 res.Body.Close()
7981 }
7982 return nil, gensupport.WrapError(&googleapi.Error{
7983 Code: res.StatusCode,
7984 Header: res.Header,
7985 })
7986 }
7987 if err != nil {
7988 return nil, err
7989 }
7990 defer googleapi.CloseBody(res)
7991 if err := googleapi.CheckResponse(res); err != nil {
7992 return nil, gensupport.WrapError(err)
7993 }
7994 ret := &Instance{
7995 ServerResponse: googleapi.ServerResponse{
7996 Header: res.Header,
7997 HTTPStatusCode: res.StatusCode,
7998 },
7999 }
8000 target := &ret
8001 if err := gensupport.DecodeResponse(target, res); err != nil {
8002 return nil, err
8003 }
8004 return ret, nil
8005 }
8006
8007 type ProjectsInstancesGetIamPolicyCall struct {
8008 s *Service
8009 resource string
8010 getiampolicyrequest *GetIamPolicyRequest
8011 urlParams_ gensupport.URLParams
8012 ctx_ context.Context
8013 header_ http.Header
8014 }
8015
8016
8017
8018
8019
8020
8021
8022
8023 func (r *ProjectsInstancesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesGetIamPolicyCall {
8024 c := &ProjectsInstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8025 c.resource = resource
8026 c.getiampolicyrequest = getiampolicyrequest
8027 return c
8028 }
8029
8030
8031
8032
8033 func (c *ProjectsInstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetIamPolicyCall {
8034 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8035 return c
8036 }
8037
8038
8039 func (c *ProjectsInstancesGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesGetIamPolicyCall {
8040 c.ctx_ = ctx
8041 return c
8042 }
8043
8044
8045
8046 func (c *ProjectsInstancesGetIamPolicyCall) Header() http.Header {
8047 if c.header_ == nil {
8048 c.header_ = make(http.Header)
8049 }
8050 return c.header_
8051 }
8052
8053 func (c *ProjectsInstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8054 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8055 var body io.Reader = nil
8056 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
8057 if err != nil {
8058 return nil, err
8059 }
8060 c.urlParams_.Set("alt", alt)
8061 c.urlParams_.Set("prettyPrint", "false")
8062 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
8063 urls += "?" + c.urlParams_.Encode()
8064 req, err := http.NewRequest("POST", urls, body)
8065 if err != nil {
8066 return nil, err
8067 }
8068 req.Header = reqHeaders
8069 googleapi.Expand(req.URL, map[string]string{
8070 "resource": c.resource,
8071 })
8072 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8073 }
8074
8075
8076
8077
8078
8079
8080 func (c *ProjectsInstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8081 gensupport.SetOptions(c.urlParams_, opts...)
8082 res, err := c.doRequest("json")
8083 if res != nil && res.StatusCode == http.StatusNotModified {
8084 if res.Body != nil {
8085 res.Body.Close()
8086 }
8087 return nil, gensupport.WrapError(&googleapi.Error{
8088 Code: res.StatusCode,
8089 Header: res.Header,
8090 })
8091 }
8092 if err != nil {
8093 return nil, err
8094 }
8095 defer googleapi.CloseBody(res)
8096 if err := googleapi.CheckResponse(res); err != nil {
8097 return nil, gensupport.WrapError(err)
8098 }
8099 ret := &Policy{
8100 ServerResponse: googleapi.ServerResponse{
8101 Header: res.Header,
8102 HTTPStatusCode: res.StatusCode,
8103 },
8104 }
8105 target := &ret
8106 if err := gensupport.DecodeResponse(target, res); err != nil {
8107 return nil, err
8108 }
8109 return ret, nil
8110 }
8111
8112 type ProjectsInstancesListCall struct {
8113 s *Service
8114 parent string
8115 urlParams_ gensupport.URLParams
8116 ifNoneMatch_ string
8117 ctx_ context.Context
8118 header_ http.Header
8119 }
8120
8121
8122
8123
8124
8125 func (r *ProjectsInstancesService) List(parent string) *ProjectsInstancesListCall {
8126 c := &ProjectsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8127 c.parent = parent
8128 return c
8129 }
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142 func (c *ProjectsInstancesListCall) Filter(filter string) *ProjectsInstancesListCall {
8143 c.urlParams_.Set("filter", filter)
8144 return c
8145 }
8146
8147
8148
8149
8150
8151 func (c *ProjectsInstancesListCall) InstanceDeadline(instanceDeadline string) *ProjectsInstancesListCall {
8152 c.urlParams_.Set("instanceDeadline", instanceDeadline)
8153 return c
8154 }
8155
8156
8157
8158
8159 func (c *ProjectsInstancesListCall) PageSize(pageSize int64) *ProjectsInstancesListCall {
8160 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8161 return c
8162 }
8163
8164
8165
8166
8167 func (c *ProjectsInstancesListCall) PageToken(pageToken string) *ProjectsInstancesListCall {
8168 c.urlParams_.Set("pageToken", pageToken)
8169 return c
8170 }
8171
8172
8173
8174
8175 func (c *ProjectsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesListCall {
8176 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8177 return c
8178 }
8179
8180
8181
8182
8183 func (c *ProjectsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesListCall {
8184 c.ifNoneMatch_ = entityTag
8185 return c
8186 }
8187
8188
8189 func (c *ProjectsInstancesListCall) Context(ctx context.Context) *ProjectsInstancesListCall {
8190 c.ctx_ = ctx
8191 return c
8192 }
8193
8194
8195
8196 func (c *ProjectsInstancesListCall) Header() http.Header {
8197 if c.header_ == nil {
8198 c.header_ = make(http.Header)
8199 }
8200 return c.header_
8201 }
8202
8203 func (c *ProjectsInstancesListCall) doRequest(alt string) (*http.Response, error) {
8204 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8205 if c.ifNoneMatch_ != "" {
8206 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8207 }
8208 var body io.Reader = nil
8209 c.urlParams_.Set("alt", alt)
8210 c.urlParams_.Set("prettyPrint", "false")
8211 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
8212 urls += "?" + c.urlParams_.Encode()
8213 req, err := http.NewRequest("GET", urls, body)
8214 if err != nil {
8215 return nil, err
8216 }
8217 req.Header = reqHeaders
8218 googleapi.Expand(req.URL, map[string]string{
8219 "parent": c.parent,
8220 })
8221 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8222 }
8223
8224
8225
8226
8227
8228
8229
8230 func (c *ProjectsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
8231 gensupport.SetOptions(c.urlParams_, opts...)
8232 res, err := c.doRequest("json")
8233 if res != nil && res.StatusCode == http.StatusNotModified {
8234 if res.Body != nil {
8235 res.Body.Close()
8236 }
8237 return nil, gensupport.WrapError(&googleapi.Error{
8238 Code: res.StatusCode,
8239 Header: res.Header,
8240 })
8241 }
8242 if err != nil {
8243 return nil, err
8244 }
8245 defer googleapi.CloseBody(res)
8246 if err := googleapi.CheckResponse(res); err != nil {
8247 return nil, gensupport.WrapError(err)
8248 }
8249 ret := &ListInstancesResponse{
8250 ServerResponse: googleapi.ServerResponse{
8251 Header: res.Header,
8252 HTTPStatusCode: res.StatusCode,
8253 },
8254 }
8255 target := &ret
8256 if err := gensupport.DecodeResponse(target, res); err != nil {
8257 return nil, err
8258 }
8259 return ret, nil
8260 }
8261
8262
8263
8264
8265 func (c *ProjectsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
8266 c.ctx_ = ctx
8267 defer c.PageToken(c.urlParams_.Get("pageToken"))
8268 for {
8269 x, err := c.Do()
8270 if err != nil {
8271 return err
8272 }
8273 if err := f(x); err != nil {
8274 return err
8275 }
8276 if x.NextPageToken == "" {
8277 return nil
8278 }
8279 c.PageToken(x.NextPageToken)
8280 }
8281 }
8282
8283 type ProjectsInstancesMoveCall struct {
8284 s *Service
8285 name string
8286 moveinstancerequest *MoveInstanceRequest
8287 urlParams_ gensupport.URLParams
8288 ctx_ context.Context
8289 header_ http.Header
8290 }
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323 func (r *ProjectsInstancesService) Move(name string, moveinstancerequest *MoveInstanceRequest) *ProjectsInstancesMoveCall {
8324 c := &ProjectsInstancesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8325 c.name = name
8326 c.moveinstancerequest = moveinstancerequest
8327 return c
8328 }
8329
8330
8331
8332
8333 func (c *ProjectsInstancesMoveCall) Fields(s ...googleapi.Field) *ProjectsInstancesMoveCall {
8334 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8335 return c
8336 }
8337
8338
8339 func (c *ProjectsInstancesMoveCall) Context(ctx context.Context) *ProjectsInstancesMoveCall {
8340 c.ctx_ = ctx
8341 return c
8342 }
8343
8344
8345
8346 func (c *ProjectsInstancesMoveCall) Header() http.Header {
8347 if c.header_ == nil {
8348 c.header_ = make(http.Header)
8349 }
8350 return c.header_
8351 }
8352
8353 func (c *ProjectsInstancesMoveCall) doRequest(alt string) (*http.Response, error) {
8354 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8355 var body io.Reader = nil
8356 body, err := googleapi.WithoutDataWrapper.JSONReader(c.moveinstancerequest)
8357 if err != nil {
8358 return nil, err
8359 }
8360 c.urlParams_.Set("alt", alt)
8361 c.urlParams_.Set("prettyPrint", "false")
8362 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:move")
8363 urls += "?" + c.urlParams_.Encode()
8364 req, err := http.NewRequest("POST", urls, body)
8365 if err != nil {
8366 return nil, err
8367 }
8368 req.Header = reqHeaders
8369 googleapi.Expand(req.URL, map[string]string{
8370 "name": c.name,
8371 })
8372 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8373 }
8374
8375
8376
8377
8378
8379
8380 func (c *ProjectsInstancesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8381 gensupport.SetOptions(c.urlParams_, opts...)
8382 res, err := c.doRequest("json")
8383 if res != nil && res.StatusCode == http.StatusNotModified {
8384 if res.Body != nil {
8385 res.Body.Close()
8386 }
8387 return nil, gensupport.WrapError(&googleapi.Error{
8388 Code: res.StatusCode,
8389 Header: res.Header,
8390 })
8391 }
8392 if err != nil {
8393 return nil, err
8394 }
8395 defer googleapi.CloseBody(res)
8396 if err := googleapi.CheckResponse(res); err != nil {
8397 return nil, gensupport.WrapError(err)
8398 }
8399 ret := &Operation{
8400 ServerResponse: googleapi.ServerResponse{
8401 Header: res.Header,
8402 HTTPStatusCode: res.StatusCode,
8403 },
8404 }
8405 target := &ret
8406 if err := gensupport.DecodeResponse(target, res); err != nil {
8407 return nil, err
8408 }
8409 return ret, nil
8410 }
8411
8412 type ProjectsInstancesPatchCall struct {
8413 s *Service
8414 nameid string
8415 updateinstancerequest *UpdateInstanceRequest
8416 urlParams_ gensupport.URLParams
8417 ctx_ context.Context
8418 header_ http.Header
8419 }
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447 func (r *ProjectsInstancesService) Patch(nameid string, updateinstancerequest *UpdateInstanceRequest) *ProjectsInstancesPatchCall {
8448 c := &ProjectsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8449 c.nameid = nameid
8450 c.updateinstancerequest = updateinstancerequest
8451 return c
8452 }
8453
8454
8455
8456
8457 func (c *ProjectsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesPatchCall {
8458 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8459 return c
8460 }
8461
8462
8463 func (c *ProjectsInstancesPatchCall) Context(ctx context.Context) *ProjectsInstancesPatchCall {
8464 c.ctx_ = ctx
8465 return c
8466 }
8467
8468
8469
8470 func (c *ProjectsInstancesPatchCall) Header() http.Header {
8471 if c.header_ == nil {
8472 c.header_ = make(http.Header)
8473 }
8474 return c.header_
8475 }
8476
8477 func (c *ProjectsInstancesPatchCall) doRequest(alt string) (*http.Response, error) {
8478 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8479 var body io.Reader = nil
8480 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateinstancerequest)
8481 if err != nil {
8482 return nil, err
8483 }
8484 c.urlParams_.Set("alt", alt)
8485 c.urlParams_.Set("prettyPrint", "false")
8486 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8487 urls += "?" + c.urlParams_.Encode()
8488 req, err := http.NewRequest("PATCH", urls, body)
8489 if err != nil {
8490 return nil, err
8491 }
8492 req.Header = reqHeaders
8493 googleapi.Expand(req.URL, map[string]string{
8494 "name": c.nameid,
8495 })
8496 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8497 }
8498
8499
8500
8501
8502
8503
8504 func (c *ProjectsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8505 gensupport.SetOptions(c.urlParams_, opts...)
8506 res, err := c.doRequest("json")
8507 if res != nil && res.StatusCode == http.StatusNotModified {
8508 if res.Body != nil {
8509 res.Body.Close()
8510 }
8511 return nil, gensupport.WrapError(&googleapi.Error{
8512 Code: res.StatusCode,
8513 Header: res.Header,
8514 })
8515 }
8516 if err != nil {
8517 return nil, err
8518 }
8519 defer googleapi.CloseBody(res)
8520 if err := googleapi.CheckResponse(res); err != nil {
8521 return nil, gensupport.WrapError(err)
8522 }
8523 ret := &Operation{
8524 ServerResponse: googleapi.ServerResponse{
8525 Header: res.Header,
8526 HTTPStatusCode: res.StatusCode,
8527 },
8528 }
8529 target := &ret
8530 if err := gensupport.DecodeResponse(target, res); err != nil {
8531 return nil, err
8532 }
8533 return ret, nil
8534 }
8535
8536 type ProjectsInstancesSetIamPolicyCall struct {
8537 s *Service
8538 resource string
8539 setiampolicyrequest *SetIamPolicyRequest
8540 urlParams_ gensupport.URLParams
8541 ctx_ context.Context
8542 header_ http.Header
8543 }
8544
8545
8546
8547
8548
8549
8550
8551
8552 func (r *ProjectsInstancesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesSetIamPolicyCall {
8553 c := &ProjectsInstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8554 c.resource = resource
8555 c.setiampolicyrequest = setiampolicyrequest
8556 return c
8557 }
8558
8559
8560
8561
8562 func (c *ProjectsInstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesSetIamPolicyCall {
8563 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8564 return c
8565 }
8566
8567
8568 func (c *ProjectsInstancesSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesSetIamPolicyCall {
8569 c.ctx_ = ctx
8570 return c
8571 }
8572
8573
8574
8575 func (c *ProjectsInstancesSetIamPolicyCall) Header() http.Header {
8576 if c.header_ == nil {
8577 c.header_ = make(http.Header)
8578 }
8579 return c.header_
8580 }
8581
8582 func (c *ProjectsInstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8583 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8584 var body io.Reader = nil
8585 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
8586 if err != nil {
8587 return nil, err
8588 }
8589 c.urlParams_.Set("alt", alt)
8590 c.urlParams_.Set("prettyPrint", "false")
8591 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
8592 urls += "?" + c.urlParams_.Encode()
8593 req, err := http.NewRequest("POST", urls, body)
8594 if err != nil {
8595 return nil, err
8596 }
8597 req.Header = reqHeaders
8598 googleapi.Expand(req.URL, map[string]string{
8599 "resource": c.resource,
8600 })
8601 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8602 }
8603
8604
8605
8606
8607
8608
8609 func (c *ProjectsInstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8610 gensupport.SetOptions(c.urlParams_, opts...)
8611 res, err := c.doRequest("json")
8612 if res != nil && res.StatusCode == http.StatusNotModified {
8613 if res.Body != nil {
8614 res.Body.Close()
8615 }
8616 return nil, gensupport.WrapError(&googleapi.Error{
8617 Code: res.StatusCode,
8618 Header: res.Header,
8619 })
8620 }
8621 if err != nil {
8622 return nil, err
8623 }
8624 defer googleapi.CloseBody(res)
8625 if err := googleapi.CheckResponse(res); err != nil {
8626 return nil, gensupport.WrapError(err)
8627 }
8628 ret := &Policy{
8629 ServerResponse: googleapi.ServerResponse{
8630 Header: res.Header,
8631 HTTPStatusCode: res.StatusCode,
8632 },
8633 }
8634 target := &ret
8635 if err := gensupport.DecodeResponse(target, res); err != nil {
8636 return nil, err
8637 }
8638 return ret, nil
8639 }
8640
8641 type ProjectsInstancesTestIamPermissionsCall struct {
8642 s *Service
8643 resource string
8644 testiampermissionsrequest *TestIamPermissionsRequest
8645 urlParams_ gensupport.URLParams
8646 ctx_ context.Context
8647 header_ http.Header
8648 }
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659 func (r *ProjectsInstancesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesTestIamPermissionsCall {
8660 c := &ProjectsInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8661 c.resource = resource
8662 c.testiampermissionsrequest = testiampermissionsrequest
8663 return c
8664 }
8665
8666
8667
8668
8669 func (c *ProjectsInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesTestIamPermissionsCall {
8670 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8671 return c
8672 }
8673
8674
8675 func (c *ProjectsInstancesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesTestIamPermissionsCall {
8676 c.ctx_ = ctx
8677 return c
8678 }
8679
8680
8681
8682 func (c *ProjectsInstancesTestIamPermissionsCall) Header() http.Header {
8683 if c.header_ == nil {
8684 c.header_ = make(http.Header)
8685 }
8686 return c.header_
8687 }
8688
8689 func (c *ProjectsInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8690 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8691 var body io.Reader = nil
8692 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
8693 if err != nil {
8694 return nil, err
8695 }
8696 c.urlParams_.Set("alt", alt)
8697 c.urlParams_.Set("prettyPrint", "false")
8698 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
8699 urls += "?" + c.urlParams_.Encode()
8700 req, err := http.NewRequest("POST", urls, body)
8701 if err != nil {
8702 return nil, err
8703 }
8704 req.Header = reqHeaders
8705 googleapi.Expand(req.URL, map[string]string{
8706 "resource": c.resource,
8707 })
8708 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8709 }
8710
8711
8712
8713
8714
8715
8716
8717 func (c *ProjectsInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
8718 gensupport.SetOptions(c.urlParams_, opts...)
8719 res, err := c.doRequest("json")
8720 if res != nil && res.StatusCode == http.StatusNotModified {
8721 if res.Body != nil {
8722 res.Body.Close()
8723 }
8724 return nil, gensupport.WrapError(&googleapi.Error{
8725 Code: res.StatusCode,
8726 Header: res.Header,
8727 })
8728 }
8729 if err != nil {
8730 return nil, err
8731 }
8732 defer googleapi.CloseBody(res)
8733 if err := googleapi.CheckResponse(res); err != nil {
8734 return nil, gensupport.WrapError(err)
8735 }
8736 ret := &TestIamPermissionsResponse{
8737 ServerResponse: googleapi.ServerResponse{
8738 Header: res.Header,
8739 HTTPStatusCode: res.StatusCode,
8740 },
8741 }
8742 target := &ret
8743 if err := gensupport.DecodeResponse(target, res); err != nil {
8744 return nil, err
8745 }
8746 return ret, nil
8747 }
8748
8749 type ProjectsInstancesBackupOperationsListCall struct {
8750 s *Service
8751 parent string
8752 urlParams_ gensupport.URLParams
8753 ifNoneMatch_ string
8754 ctx_ context.Context
8755 header_ http.Header
8756 }
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769 func (r *ProjectsInstancesBackupOperationsService) List(parent string) *ProjectsInstancesBackupOperationsListCall {
8770 c := &ProjectsInstancesBackupOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8771 c.parent = parent
8772 return c
8773 }
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821 func (c *ProjectsInstancesBackupOperationsListCall) Filter(filter string) *ProjectsInstancesBackupOperationsListCall {
8822 c.urlParams_.Set("filter", filter)
8823 return c
8824 }
8825
8826
8827
8828
8829 func (c *ProjectsInstancesBackupOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesBackupOperationsListCall {
8830 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8831 return c
8832 }
8833
8834
8835
8836
8837
8838 func (c *ProjectsInstancesBackupOperationsListCall) PageToken(pageToken string) *ProjectsInstancesBackupOperationsListCall {
8839 c.urlParams_.Set("pageToken", pageToken)
8840 return c
8841 }
8842
8843
8844
8845
8846 func (c *ProjectsInstancesBackupOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupOperationsListCall {
8847 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8848 return c
8849 }
8850
8851
8852
8853
8854 func (c *ProjectsInstancesBackupOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesBackupOperationsListCall {
8855 c.ifNoneMatch_ = entityTag
8856 return c
8857 }
8858
8859
8860 func (c *ProjectsInstancesBackupOperationsListCall) Context(ctx context.Context) *ProjectsInstancesBackupOperationsListCall {
8861 c.ctx_ = ctx
8862 return c
8863 }
8864
8865
8866
8867 func (c *ProjectsInstancesBackupOperationsListCall) Header() http.Header {
8868 if c.header_ == nil {
8869 c.header_ = make(http.Header)
8870 }
8871 return c.header_
8872 }
8873
8874 func (c *ProjectsInstancesBackupOperationsListCall) doRequest(alt string) (*http.Response, error) {
8875 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8876 if c.ifNoneMatch_ != "" {
8877 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8878 }
8879 var body io.Reader = nil
8880 c.urlParams_.Set("alt", alt)
8881 c.urlParams_.Set("prettyPrint", "false")
8882 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupOperations")
8883 urls += "?" + c.urlParams_.Encode()
8884 req, err := http.NewRequest("GET", urls, body)
8885 if err != nil {
8886 return nil, err
8887 }
8888 req.Header = reqHeaders
8889 googleapi.Expand(req.URL, map[string]string{
8890 "parent": c.parent,
8891 })
8892 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8893 }
8894
8895
8896
8897
8898
8899
8900
8901 func (c *ProjectsInstancesBackupOperationsListCall) Do(opts ...googleapi.CallOption) (*ListBackupOperationsResponse, error) {
8902 gensupport.SetOptions(c.urlParams_, opts...)
8903 res, err := c.doRequest("json")
8904 if res != nil && res.StatusCode == http.StatusNotModified {
8905 if res.Body != nil {
8906 res.Body.Close()
8907 }
8908 return nil, gensupport.WrapError(&googleapi.Error{
8909 Code: res.StatusCode,
8910 Header: res.Header,
8911 })
8912 }
8913 if err != nil {
8914 return nil, err
8915 }
8916 defer googleapi.CloseBody(res)
8917 if err := googleapi.CheckResponse(res); err != nil {
8918 return nil, gensupport.WrapError(err)
8919 }
8920 ret := &ListBackupOperationsResponse{
8921 ServerResponse: googleapi.ServerResponse{
8922 Header: res.Header,
8923 HTTPStatusCode: res.StatusCode,
8924 },
8925 }
8926 target := &ret
8927 if err := gensupport.DecodeResponse(target, res); err != nil {
8928 return nil, err
8929 }
8930 return ret, nil
8931 }
8932
8933
8934
8935
8936 func (c *ProjectsInstancesBackupOperationsListCall) Pages(ctx context.Context, f func(*ListBackupOperationsResponse) error) error {
8937 c.ctx_ = ctx
8938 defer c.PageToken(c.urlParams_.Get("pageToken"))
8939 for {
8940 x, err := c.Do()
8941 if err != nil {
8942 return err
8943 }
8944 if err := f(x); err != nil {
8945 return err
8946 }
8947 if x.NextPageToken == "" {
8948 return nil
8949 }
8950 c.PageToken(x.NextPageToken)
8951 }
8952 }
8953
8954 type ProjectsInstancesBackupsCopyCall struct {
8955 s *Service
8956 parent string
8957 copybackuprequest *CopyBackupRequest
8958 urlParams_ gensupport.URLParams
8959 ctx_ context.Context
8960 header_ http.Header
8961 }
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974 func (r *ProjectsInstancesBackupsService) Copy(parent string, copybackuprequest *CopyBackupRequest) *ProjectsInstancesBackupsCopyCall {
8975 c := &ProjectsInstancesBackupsCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8976 c.parent = parent
8977 c.copybackuprequest = copybackuprequest
8978 return c
8979 }
8980
8981
8982
8983
8984 func (c *ProjectsInstancesBackupsCopyCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsCopyCall {
8985 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8986 return c
8987 }
8988
8989
8990 func (c *ProjectsInstancesBackupsCopyCall) Context(ctx context.Context) *ProjectsInstancesBackupsCopyCall {
8991 c.ctx_ = ctx
8992 return c
8993 }
8994
8995
8996
8997 func (c *ProjectsInstancesBackupsCopyCall) Header() http.Header {
8998 if c.header_ == nil {
8999 c.header_ = make(http.Header)
9000 }
9001 return c.header_
9002 }
9003
9004 func (c *ProjectsInstancesBackupsCopyCall) doRequest(alt string) (*http.Response, error) {
9005 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9006 var body io.Reader = nil
9007 body, err := googleapi.WithoutDataWrapper.JSONReader(c.copybackuprequest)
9008 if err != nil {
9009 return nil, err
9010 }
9011 c.urlParams_.Set("alt", alt)
9012 c.urlParams_.Set("prettyPrint", "false")
9013 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups:copy")
9014 urls += "?" + c.urlParams_.Encode()
9015 req, err := http.NewRequest("POST", urls, body)
9016 if err != nil {
9017 return nil, err
9018 }
9019 req.Header = reqHeaders
9020 googleapi.Expand(req.URL, map[string]string{
9021 "parent": c.parent,
9022 })
9023 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9024 }
9025
9026
9027
9028
9029
9030
9031 func (c *ProjectsInstancesBackupsCopyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9032 gensupport.SetOptions(c.urlParams_, opts...)
9033 res, err := c.doRequest("json")
9034 if res != nil && res.StatusCode == http.StatusNotModified {
9035 if res.Body != nil {
9036 res.Body.Close()
9037 }
9038 return nil, gensupport.WrapError(&googleapi.Error{
9039 Code: res.StatusCode,
9040 Header: res.Header,
9041 })
9042 }
9043 if err != nil {
9044 return nil, err
9045 }
9046 defer googleapi.CloseBody(res)
9047 if err := googleapi.CheckResponse(res); err != nil {
9048 return nil, gensupport.WrapError(err)
9049 }
9050 ret := &Operation{
9051 ServerResponse: googleapi.ServerResponse{
9052 Header: res.Header,
9053 HTTPStatusCode: res.StatusCode,
9054 },
9055 }
9056 target := &ret
9057 if err := gensupport.DecodeResponse(target, res); err != nil {
9058 return nil, err
9059 }
9060 return ret, nil
9061 }
9062
9063 type ProjectsInstancesBackupsCreateCall struct {
9064 s *Service
9065 parent string
9066 backup *Backup
9067 urlParams_ gensupport.URLParams
9068 ctx_ context.Context
9069 header_ http.Header
9070 }
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086 func (r *ProjectsInstancesBackupsService) Create(parent string, backup *Backup) *ProjectsInstancesBackupsCreateCall {
9087 c := &ProjectsInstancesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9088 c.parent = parent
9089 c.backup = backup
9090 return c
9091 }
9092
9093
9094
9095
9096 func (c *ProjectsInstancesBackupsCreateCall) BackupId(backupId string) *ProjectsInstancesBackupsCreateCall {
9097 c.urlParams_.Set("backupId", backupId)
9098 return c
9099 }
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118 func (c *ProjectsInstancesBackupsCreateCall) EncryptionConfigEncryptionType(encryptionConfigEncryptionType string) *ProjectsInstancesBackupsCreateCall {
9119 c.urlParams_.Set("encryptionConfig.encryptionType", encryptionConfigEncryptionType)
9120 return c
9121 }
9122
9123
9124
9125
9126
9127
9128 func (c *ProjectsInstancesBackupsCreateCall) EncryptionConfigKmsKeyName(encryptionConfigKmsKeyName string) *ProjectsInstancesBackupsCreateCall {
9129 c.urlParams_.Set("encryptionConfig.kmsKeyName", encryptionConfigKmsKeyName)
9130 return c
9131 }
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146 func (c *ProjectsInstancesBackupsCreateCall) EncryptionConfigKmsKeyNames(encryptionConfigKmsKeyNames ...string) *ProjectsInstancesBackupsCreateCall {
9147 c.urlParams_.SetMulti("encryptionConfig.kmsKeyNames", append([]string{}, encryptionConfigKmsKeyNames...))
9148 return c
9149 }
9150
9151
9152
9153
9154 func (c *ProjectsInstancesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsCreateCall {
9155 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9156 return c
9157 }
9158
9159
9160 func (c *ProjectsInstancesBackupsCreateCall) Context(ctx context.Context) *ProjectsInstancesBackupsCreateCall {
9161 c.ctx_ = ctx
9162 return c
9163 }
9164
9165
9166
9167 func (c *ProjectsInstancesBackupsCreateCall) Header() http.Header {
9168 if c.header_ == nil {
9169 c.header_ = make(http.Header)
9170 }
9171 return c.header_
9172 }
9173
9174 func (c *ProjectsInstancesBackupsCreateCall) doRequest(alt string) (*http.Response, error) {
9175 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9176 var body io.Reader = nil
9177 body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
9178 if err != nil {
9179 return nil, err
9180 }
9181 c.urlParams_.Set("alt", alt)
9182 c.urlParams_.Set("prettyPrint", "false")
9183 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
9184 urls += "?" + c.urlParams_.Encode()
9185 req, err := http.NewRequest("POST", urls, body)
9186 if err != nil {
9187 return nil, err
9188 }
9189 req.Header = reqHeaders
9190 googleapi.Expand(req.URL, map[string]string{
9191 "parent": c.parent,
9192 })
9193 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9194 }
9195
9196
9197
9198
9199
9200
9201 func (c *ProjectsInstancesBackupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9202 gensupport.SetOptions(c.urlParams_, opts...)
9203 res, err := c.doRequest("json")
9204 if res != nil && res.StatusCode == http.StatusNotModified {
9205 if res.Body != nil {
9206 res.Body.Close()
9207 }
9208 return nil, gensupport.WrapError(&googleapi.Error{
9209 Code: res.StatusCode,
9210 Header: res.Header,
9211 })
9212 }
9213 if err != nil {
9214 return nil, err
9215 }
9216 defer googleapi.CloseBody(res)
9217 if err := googleapi.CheckResponse(res); err != nil {
9218 return nil, gensupport.WrapError(err)
9219 }
9220 ret := &Operation{
9221 ServerResponse: googleapi.ServerResponse{
9222 Header: res.Header,
9223 HTTPStatusCode: res.StatusCode,
9224 },
9225 }
9226 target := &ret
9227 if err := gensupport.DecodeResponse(target, res); err != nil {
9228 return nil, err
9229 }
9230 return ret, nil
9231 }
9232
9233 type ProjectsInstancesBackupsDeleteCall struct {
9234 s *Service
9235 name string
9236 urlParams_ gensupport.URLParams
9237 ctx_ context.Context
9238 header_ http.Header
9239 }
9240
9241
9242
9243
9244
9245 func (r *ProjectsInstancesBackupsService) Delete(name string) *ProjectsInstancesBackupsDeleteCall {
9246 c := &ProjectsInstancesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9247 c.name = name
9248 return c
9249 }
9250
9251
9252
9253
9254 func (c *ProjectsInstancesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsDeleteCall {
9255 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9256 return c
9257 }
9258
9259
9260 func (c *ProjectsInstancesBackupsDeleteCall) Context(ctx context.Context) *ProjectsInstancesBackupsDeleteCall {
9261 c.ctx_ = ctx
9262 return c
9263 }
9264
9265
9266
9267 func (c *ProjectsInstancesBackupsDeleteCall) Header() http.Header {
9268 if c.header_ == nil {
9269 c.header_ = make(http.Header)
9270 }
9271 return c.header_
9272 }
9273
9274 func (c *ProjectsInstancesBackupsDeleteCall) doRequest(alt string) (*http.Response, error) {
9275 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9276 var body io.Reader = nil
9277 c.urlParams_.Set("alt", alt)
9278 c.urlParams_.Set("prettyPrint", "false")
9279 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9280 urls += "?" + c.urlParams_.Encode()
9281 req, err := http.NewRequest("DELETE", urls, body)
9282 if err != nil {
9283 return nil, err
9284 }
9285 req.Header = reqHeaders
9286 googleapi.Expand(req.URL, map[string]string{
9287 "name": c.name,
9288 })
9289 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9290 }
9291
9292
9293
9294
9295
9296
9297 func (c *ProjectsInstancesBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9298 gensupport.SetOptions(c.urlParams_, opts...)
9299 res, err := c.doRequest("json")
9300 if res != nil && res.StatusCode == http.StatusNotModified {
9301 if res.Body != nil {
9302 res.Body.Close()
9303 }
9304 return nil, gensupport.WrapError(&googleapi.Error{
9305 Code: res.StatusCode,
9306 Header: res.Header,
9307 })
9308 }
9309 if err != nil {
9310 return nil, err
9311 }
9312 defer googleapi.CloseBody(res)
9313 if err := googleapi.CheckResponse(res); err != nil {
9314 return nil, gensupport.WrapError(err)
9315 }
9316 ret := &Empty{
9317 ServerResponse: googleapi.ServerResponse{
9318 Header: res.Header,
9319 HTTPStatusCode: res.StatusCode,
9320 },
9321 }
9322 target := &ret
9323 if err := gensupport.DecodeResponse(target, res); err != nil {
9324 return nil, err
9325 }
9326 return ret, nil
9327 }
9328
9329 type ProjectsInstancesBackupsGetCall struct {
9330 s *Service
9331 name string
9332 urlParams_ gensupport.URLParams
9333 ifNoneMatch_ string
9334 ctx_ context.Context
9335 header_ http.Header
9336 }
9337
9338
9339
9340
9341
9342 func (r *ProjectsInstancesBackupsService) Get(name string) *ProjectsInstancesBackupsGetCall {
9343 c := &ProjectsInstancesBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9344 c.name = name
9345 return c
9346 }
9347
9348
9349
9350
9351 func (c *ProjectsInstancesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsGetCall {
9352 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9353 return c
9354 }
9355
9356
9357
9358
9359 func (c *ProjectsInstancesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesBackupsGetCall {
9360 c.ifNoneMatch_ = entityTag
9361 return c
9362 }
9363
9364
9365 func (c *ProjectsInstancesBackupsGetCall) Context(ctx context.Context) *ProjectsInstancesBackupsGetCall {
9366 c.ctx_ = ctx
9367 return c
9368 }
9369
9370
9371
9372 func (c *ProjectsInstancesBackupsGetCall) Header() http.Header {
9373 if c.header_ == nil {
9374 c.header_ = make(http.Header)
9375 }
9376 return c.header_
9377 }
9378
9379 func (c *ProjectsInstancesBackupsGetCall) doRequest(alt string) (*http.Response, error) {
9380 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9381 if c.ifNoneMatch_ != "" {
9382 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9383 }
9384 var body io.Reader = nil
9385 c.urlParams_.Set("alt", alt)
9386 c.urlParams_.Set("prettyPrint", "false")
9387 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9388 urls += "?" + c.urlParams_.Encode()
9389 req, err := http.NewRequest("GET", urls, body)
9390 if err != nil {
9391 return nil, err
9392 }
9393 req.Header = reqHeaders
9394 googleapi.Expand(req.URL, map[string]string{
9395 "name": c.name,
9396 })
9397 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9398 }
9399
9400
9401
9402
9403
9404
9405 func (c *ProjectsInstancesBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) {
9406 gensupport.SetOptions(c.urlParams_, opts...)
9407 res, err := c.doRequest("json")
9408 if res != nil && res.StatusCode == http.StatusNotModified {
9409 if res.Body != nil {
9410 res.Body.Close()
9411 }
9412 return nil, gensupport.WrapError(&googleapi.Error{
9413 Code: res.StatusCode,
9414 Header: res.Header,
9415 })
9416 }
9417 if err != nil {
9418 return nil, err
9419 }
9420 defer googleapi.CloseBody(res)
9421 if err := googleapi.CheckResponse(res); err != nil {
9422 return nil, gensupport.WrapError(err)
9423 }
9424 ret := &Backup{
9425 ServerResponse: googleapi.ServerResponse{
9426 Header: res.Header,
9427 HTTPStatusCode: res.StatusCode,
9428 },
9429 }
9430 target := &ret
9431 if err := gensupport.DecodeResponse(target, res); err != nil {
9432 return nil, err
9433 }
9434 return ret, nil
9435 }
9436
9437 type ProjectsInstancesBackupsGetIamPolicyCall struct {
9438 s *Service
9439 resource string
9440 getiampolicyrequest *GetIamPolicyRequest
9441 urlParams_ gensupport.URLParams
9442 ctx_ context.Context
9443 header_ http.Header
9444 }
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456 func (r *ProjectsInstancesBackupsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesBackupsGetIamPolicyCall {
9457 c := &ProjectsInstancesBackupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9458 c.resource = resource
9459 c.getiampolicyrequest = getiampolicyrequest
9460 return c
9461 }
9462
9463
9464
9465
9466 func (c *ProjectsInstancesBackupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsGetIamPolicyCall {
9467 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9468 return c
9469 }
9470
9471
9472 func (c *ProjectsInstancesBackupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesBackupsGetIamPolicyCall {
9473 c.ctx_ = ctx
9474 return c
9475 }
9476
9477
9478
9479 func (c *ProjectsInstancesBackupsGetIamPolicyCall) Header() http.Header {
9480 if c.header_ == nil {
9481 c.header_ = make(http.Header)
9482 }
9483 return c.header_
9484 }
9485
9486 func (c *ProjectsInstancesBackupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9487 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9488 var body io.Reader = nil
9489 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
9490 if err != nil {
9491 return nil, err
9492 }
9493 c.urlParams_.Set("alt", alt)
9494 c.urlParams_.Set("prettyPrint", "false")
9495 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
9496 urls += "?" + c.urlParams_.Encode()
9497 req, err := http.NewRequest("POST", urls, body)
9498 if err != nil {
9499 return nil, err
9500 }
9501 req.Header = reqHeaders
9502 googleapi.Expand(req.URL, map[string]string{
9503 "resource": c.resource,
9504 })
9505 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9506 }
9507
9508
9509
9510
9511
9512
9513 func (c *ProjectsInstancesBackupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9514 gensupport.SetOptions(c.urlParams_, opts...)
9515 res, err := c.doRequest("json")
9516 if res != nil && res.StatusCode == http.StatusNotModified {
9517 if res.Body != nil {
9518 res.Body.Close()
9519 }
9520 return nil, gensupport.WrapError(&googleapi.Error{
9521 Code: res.StatusCode,
9522 Header: res.Header,
9523 })
9524 }
9525 if err != nil {
9526 return nil, err
9527 }
9528 defer googleapi.CloseBody(res)
9529 if err := googleapi.CheckResponse(res); err != nil {
9530 return nil, gensupport.WrapError(err)
9531 }
9532 ret := &Policy{
9533 ServerResponse: googleapi.ServerResponse{
9534 Header: res.Header,
9535 HTTPStatusCode: res.StatusCode,
9536 },
9537 }
9538 target := &ret
9539 if err := gensupport.DecodeResponse(target, res); err != nil {
9540 return nil, err
9541 }
9542 return ret, nil
9543 }
9544
9545 type ProjectsInstancesBackupsListCall struct {
9546 s *Service
9547 parent string
9548 urlParams_ gensupport.URLParams
9549 ifNoneMatch_ string
9550 ctx_ context.Context
9551 header_ http.Header
9552 }
9553
9554
9555
9556
9557
9558
9559
9560 func (r *ProjectsInstancesBackupsService) List(parent string) *ProjectsInstancesBackupsListCall {
9561 c := &ProjectsInstancesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9562 c.parent = parent
9563 return c
9564 }
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587 func (c *ProjectsInstancesBackupsListCall) Filter(filter string) *ProjectsInstancesBackupsListCall {
9588 c.urlParams_.Set("filter", filter)
9589 return c
9590 }
9591
9592
9593
9594
9595 func (c *ProjectsInstancesBackupsListCall) PageSize(pageSize int64) *ProjectsInstancesBackupsListCall {
9596 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9597 return c
9598 }
9599
9600
9601
9602
9603 func (c *ProjectsInstancesBackupsListCall) PageToken(pageToken string) *ProjectsInstancesBackupsListCall {
9604 c.urlParams_.Set("pageToken", pageToken)
9605 return c
9606 }
9607
9608
9609
9610
9611 func (c *ProjectsInstancesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsListCall {
9612 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9613 return c
9614 }
9615
9616
9617
9618
9619 func (c *ProjectsInstancesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesBackupsListCall {
9620 c.ifNoneMatch_ = entityTag
9621 return c
9622 }
9623
9624
9625 func (c *ProjectsInstancesBackupsListCall) Context(ctx context.Context) *ProjectsInstancesBackupsListCall {
9626 c.ctx_ = ctx
9627 return c
9628 }
9629
9630
9631
9632 func (c *ProjectsInstancesBackupsListCall) Header() http.Header {
9633 if c.header_ == nil {
9634 c.header_ = make(http.Header)
9635 }
9636 return c.header_
9637 }
9638
9639 func (c *ProjectsInstancesBackupsListCall) doRequest(alt string) (*http.Response, error) {
9640 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9641 if c.ifNoneMatch_ != "" {
9642 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9643 }
9644 var body io.Reader = nil
9645 c.urlParams_.Set("alt", alt)
9646 c.urlParams_.Set("prettyPrint", "false")
9647 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
9648 urls += "?" + c.urlParams_.Encode()
9649 req, err := http.NewRequest("GET", urls, body)
9650 if err != nil {
9651 return nil, err
9652 }
9653 req.Header = reqHeaders
9654 googleapi.Expand(req.URL, map[string]string{
9655 "parent": c.parent,
9656 })
9657 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9658 }
9659
9660
9661
9662
9663
9664
9665
9666 func (c *ProjectsInstancesBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) {
9667 gensupport.SetOptions(c.urlParams_, opts...)
9668 res, err := c.doRequest("json")
9669 if res != nil && res.StatusCode == http.StatusNotModified {
9670 if res.Body != nil {
9671 res.Body.Close()
9672 }
9673 return nil, gensupport.WrapError(&googleapi.Error{
9674 Code: res.StatusCode,
9675 Header: res.Header,
9676 })
9677 }
9678 if err != nil {
9679 return nil, err
9680 }
9681 defer googleapi.CloseBody(res)
9682 if err := googleapi.CheckResponse(res); err != nil {
9683 return nil, gensupport.WrapError(err)
9684 }
9685 ret := &ListBackupsResponse{
9686 ServerResponse: googleapi.ServerResponse{
9687 Header: res.Header,
9688 HTTPStatusCode: res.StatusCode,
9689 },
9690 }
9691 target := &ret
9692 if err := gensupport.DecodeResponse(target, res); err != nil {
9693 return nil, err
9694 }
9695 return ret, nil
9696 }
9697
9698
9699
9700
9701 func (c *ProjectsInstancesBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error {
9702 c.ctx_ = ctx
9703 defer c.PageToken(c.urlParams_.Get("pageToken"))
9704 for {
9705 x, err := c.Do()
9706 if err != nil {
9707 return err
9708 }
9709 if err := f(x); err != nil {
9710 return err
9711 }
9712 if x.NextPageToken == "" {
9713 return nil
9714 }
9715 c.PageToken(x.NextPageToken)
9716 }
9717 }
9718
9719 type ProjectsInstancesBackupsPatchCall struct {
9720 s *Service
9721 nameid string
9722 backup *Backup
9723 urlParams_ gensupport.URLParams
9724 ctx_ context.Context
9725 header_ http.Header
9726 }
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738 func (r *ProjectsInstancesBackupsService) Patch(nameid string, backup *Backup) *ProjectsInstancesBackupsPatchCall {
9739 c := &ProjectsInstancesBackupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9740 c.nameid = nameid
9741 c.backup = backup
9742 return c
9743 }
9744
9745
9746
9747
9748
9749
9750
9751 func (c *ProjectsInstancesBackupsPatchCall) UpdateMask(updateMask string) *ProjectsInstancesBackupsPatchCall {
9752 c.urlParams_.Set("updateMask", updateMask)
9753 return c
9754 }
9755
9756
9757
9758
9759 func (c *ProjectsInstancesBackupsPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsPatchCall {
9760 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9761 return c
9762 }
9763
9764
9765 func (c *ProjectsInstancesBackupsPatchCall) Context(ctx context.Context) *ProjectsInstancesBackupsPatchCall {
9766 c.ctx_ = ctx
9767 return c
9768 }
9769
9770
9771
9772 func (c *ProjectsInstancesBackupsPatchCall) Header() http.Header {
9773 if c.header_ == nil {
9774 c.header_ = make(http.Header)
9775 }
9776 return c.header_
9777 }
9778
9779 func (c *ProjectsInstancesBackupsPatchCall) doRequest(alt string) (*http.Response, error) {
9780 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9781 var body io.Reader = nil
9782 body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
9783 if err != nil {
9784 return nil, err
9785 }
9786 c.urlParams_.Set("alt", alt)
9787 c.urlParams_.Set("prettyPrint", "false")
9788 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9789 urls += "?" + c.urlParams_.Encode()
9790 req, err := http.NewRequest("PATCH", urls, body)
9791 if err != nil {
9792 return nil, err
9793 }
9794 req.Header = reqHeaders
9795 googleapi.Expand(req.URL, map[string]string{
9796 "name": c.nameid,
9797 })
9798 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9799 }
9800
9801
9802
9803
9804
9805
9806 func (c *ProjectsInstancesBackupsPatchCall) Do(opts ...googleapi.CallOption) (*Backup, error) {
9807 gensupport.SetOptions(c.urlParams_, opts...)
9808 res, err := c.doRequest("json")
9809 if res != nil && res.StatusCode == http.StatusNotModified {
9810 if res.Body != nil {
9811 res.Body.Close()
9812 }
9813 return nil, gensupport.WrapError(&googleapi.Error{
9814 Code: res.StatusCode,
9815 Header: res.Header,
9816 })
9817 }
9818 if err != nil {
9819 return nil, err
9820 }
9821 defer googleapi.CloseBody(res)
9822 if err := googleapi.CheckResponse(res); err != nil {
9823 return nil, gensupport.WrapError(err)
9824 }
9825 ret := &Backup{
9826 ServerResponse: googleapi.ServerResponse{
9827 Header: res.Header,
9828 HTTPStatusCode: res.StatusCode,
9829 },
9830 }
9831 target := &ret
9832 if err := gensupport.DecodeResponse(target, res); err != nil {
9833 return nil, err
9834 }
9835 return ret, nil
9836 }
9837
9838 type ProjectsInstancesBackupsSetIamPolicyCall struct {
9839 s *Service
9840 resource string
9841 setiampolicyrequest *SetIamPolicyRequest
9842 urlParams_ gensupport.URLParams
9843 ctx_ context.Context
9844 header_ http.Header
9845 }
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856 func (r *ProjectsInstancesBackupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesBackupsSetIamPolicyCall {
9857 c := &ProjectsInstancesBackupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9858 c.resource = resource
9859 c.setiampolicyrequest = setiampolicyrequest
9860 return c
9861 }
9862
9863
9864
9865
9866 func (c *ProjectsInstancesBackupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsSetIamPolicyCall {
9867 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9868 return c
9869 }
9870
9871
9872 func (c *ProjectsInstancesBackupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesBackupsSetIamPolicyCall {
9873 c.ctx_ = ctx
9874 return c
9875 }
9876
9877
9878
9879 func (c *ProjectsInstancesBackupsSetIamPolicyCall) Header() http.Header {
9880 if c.header_ == nil {
9881 c.header_ = make(http.Header)
9882 }
9883 return c.header_
9884 }
9885
9886 func (c *ProjectsInstancesBackupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9887 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9888 var body io.Reader = nil
9889 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
9890 if err != nil {
9891 return nil, err
9892 }
9893 c.urlParams_.Set("alt", alt)
9894 c.urlParams_.Set("prettyPrint", "false")
9895 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
9896 urls += "?" + c.urlParams_.Encode()
9897 req, err := http.NewRequest("POST", urls, body)
9898 if err != nil {
9899 return nil, err
9900 }
9901 req.Header = reqHeaders
9902 googleapi.Expand(req.URL, map[string]string{
9903 "resource": c.resource,
9904 })
9905 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9906 }
9907
9908
9909
9910
9911
9912
9913 func (c *ProjectsInstancesBackupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9914 gensupport.SetOptions(c.urlParams_, opts...)
9915 res, err := c.doRequest("json")
9916 if res != nil && res.StatusCode == http.StatusNotModified {
9917 if res.Body != nil {
9918 res.Body.Close()
9919 }
9920 return nil, gensupport.WrapError(&googleapi.Error{
9921 Code: res.StatusCode,
9922 Header: res.Header,
9923 })
9924 }
9925 if err != nil {
9926 return nil, err
9927 }
9928 defer googleapi.CloseBody(res)
9929 if err := googleapi.CheckResponse(res); err != nil {
9930 return nil, gensupport.WrapError(err)
9931 }
9932 ret := &Policy{
9933 ServerResponse: googleapi.ServerResponse{
9934 Header: res.Header,
9935 HTTPStatusCode: res.StatusCode,
9936 },
9937 }
9938 target := &ret
9939 if err := gensupport.DecodeResponse(target, res); err != nil {
9940 return nil, err
9941 }
9942 return ret, nil
9943 }
9944
9945 type ProjectsInstancesBackupsTestIamPermissionsCall struct {
9946 s *Service
9947 resource string
9948 testiampermissionsrequest *TestIamPermissionsRequest
9949 urlParams_ gensupport.URLParams
9950 ctx_ context.Context
9951 header_ http.Header
9952 }
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965 func (r *ProjectsInstancesBackupsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesBackupsTestIamPermissionsCall {
9966 c := &ProjectsInstancesBackupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9967 c.resource = resource
9968 c.testiampermissionsrequest = testiampermissionsrequest
9969 return c
9970 }
9971
9972
9973
9974
9975 func (c *ProjectsInstancesBackupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsTestIamPermissionsCall {
9976 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9977 return c
9978 }
9979
9980
9981 func (c *ProjectsInstancesBackupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesBackupsTestIamPermissionsCall {
9982 c.ctx_ = ctx
9983 return c
9984 }
9985
9986
9987
9988 func (c *ProjectsInstancesBackupsTestIamPermissionsCall) Header() http.Header {
9989 if c.header_ == nil {
9990 c.header_ = make(http.Header)
9991 }
9992 return c.header_
9993 }
9994
9995 func (c *ProjectsInstancesBackupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
9996 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9997 var body io.Reader = nil
9998 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
9999 if err != nil {
10000 return nil, err
10001 }
10002 c.urlParams_.Set("alt", alt)
10003 c.urlParams_.Set("prettyPrint", "false")
10004 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
10005 urls += "?" + c.urlParams_.Encode()
10006 req, err := http.NewRequest("POST", urls, body)
10007 if err != nil {
10008 return nil, err
10009 }
10010 req.Header = reqHeaders
10011 googleapi.Expand(req.URL, map[string]string{
10012 "resource": c.resource,
10013 })
10014 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10015 }
10016
10017
10018
10019
10020
10021
10022
10023 func (c *ProjectsInstancesBackupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
10024 gensupport.SetOptions(c.urlParams_, opts...)
10025 res, err := c.doRequest("json")
10026 if res != nil && res.StatusCode == http.StatusNotModified {
10027 if res.Body != nil {
10028 res.Body.Close()
10029 }
10030 return nil, gensupport.WrapError(&googleapi.Error{
10031 Code: res.StatusCode,
10032 Header: res.Header,
10033 })
10034 }
10035 if err != nil {
10036 return nil, err
10037 }
10038 defer googleapi.CloseBody(res)
10039 if err := googleapi.CheckResponse(res); err != nil {
10040 return nil, gensupport.WrapError(err)
10041 }
10042 ret := &TestIamPermissionsResponse{
10043 ServerResponse: googleapi.ServerResponse{
10044 Header: res.Header,
10045 HTTPStatusCode: res.StatusCode,
10046 },
10047 }
10048 target := &ret
10049 if err := gensupport.DecodeResponse(target, res); err != nil {
10050 return nil, err
10051 }
10052 return ret, nil
10053 }
10054
10055 type ProjectsInstancesBackupsOperationsCancelCall struct {
10056 s *Service
10057 name string
10058 urlParams_ gensupport.URLParams
10059 ctx_ context.Context
10060 header_ http.Header
10061 }
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074 func (r *ProjectsInstancesBackupsOperationsService) Cancel(name string) *ProjectsInstancesBackupsOperationsCancelCall {
10075 c := &ProjectsInstancesBackupsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10076 c.name = name
10077 return c
10078 }
10079
10080
10081
10082
10083 func (c *ProjectsInstancesBackupsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsOperationsCancelCall {
10084 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10085 return c
10086 }
10087
10088
10089 func (c *ProjectsInstancesBackupsOperationsCancelCall) Context(ctx context.Context) *ProjectsInstancesBackupsOperationsCancelCall {
10090 c.ctx_ = ctx
10091 return c
10092 }
10093
10094
10095
10096 func (c *ProjectsInstancesBackupsOperationsCancelCall) Header() http.Header {
10097 if c.header_ == nil {
10098 c.header_ = make(http.Header)
10099 }
10100 return c.header_
10101 }
10102
10103 func (c *ProjectsInstancesBackupsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
10104 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10105 var body io.Reader = nil
10106 c.urlParams_.Set("alt", alt)
10107 c.urlParams_.Set("prettyPrint", "false")
10108 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
10109 urls += "?" + c.urlParams_.Encode()
10110 req, err := http.NewRequest("POST", urls, body)
10111 if err != nil {
10112 return nil, err
10113 }
10114 req.Header = reqHeaders
10115 googleapi.Expand(req.URL, map[string]string{
10116 "name": c.name,
10117 })
10118 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10119 }
10120
10121
10122
10123
10124
10125
10126 func (c *ProjectsInstancesBackupsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10127 gensupport.SetOptions(c.urlParams_, opts...)
10128 res, err := c.doRequest("json")
10129 if res != nil && res.StatusCode == http.StatusNotModified {
10130 if res.Body != nil {
10131 res.Body.Close()
10132 }
10133 return nil, gensupport.WrapError(&googleapi.Error{
10134 Code: res.StatusCode,
10135 Header: res.Header,
10136 })
10137 }
10138 if err != nil {
10139 return nil, err
10140 }
10141 defer googleapi.CloseBody(res)
10142 if err := googleapi.CheckResponse(res); err != nil {
10143 return nil, gensupport.WrapError(err)
10144 }
10145 ret := &Empty{
10146 ServerResponse: googleapi.ServerResponse{
10147 Header: res.Header,
10148 HTTPStatusCode: res.StatusCode,
10149 },
10150 }
10151 target := &ret
10152 if err := gensupport.DecodeResponse(target, res); err != nil {
10153 return nil, err
10154 }
10155 return ret, nil
10156 }
10157
10158 type ProjectsInstancesBackupsOperationsDeleteCall struct {
10159 s *Service
10160 name string
10161 urlParams_ gensupport.URLParams
10162 ctx_ context.Context
10163 header_ http.Header
10164 }
10165
10166
10167
10168
10169
10170
10171
10172 func (r *ProjectsInstancesBackupsOperationsService) Delete(name string) *ProjectsInstancesBackupsOperationsDeleteCall {
10173 c := &ProjectsInstancesBackupsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10174 c.name = name
10175 return c
10176 }
10177
10178
10179
10180
10181 func (c *ProjectsInstancesBackupsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsOperationsDeleteCall {
10182 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10183 return c
10184 }
10185
10186
10187 func (c *ProjectsInstancesBackupsOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstancesBackupsOperationsDeleteCall {
10188 c.ctx_ = ctx
10189 return c
10190 }
10191
10192
10193
10194 func (c *ProjectsInstancesBackupsOperationsDeleteCall) Header() http.Header {
10195 if c.header_ == nil {
10196 c.header_ = make(http.Header)
10197 }
10198 return c.header_
10199 }
10200
10201 func (c *ProjectsInstancesBackupsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
10202 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10203 var body io.Reader = nil
10204 c.urlParams_.Set("alt", alt)
10205 c.urlParams_.Set("prettyPrint", "false")
10206 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10207 urls += "?" + c.urlParams_.Encode()
10208 req, err := http.NewRequest("DELETE", urls, body)
10209 if err != nil {
10210 return nil, err
10211 }
10212 req.Header = reqHeaders
10213 googleapi.Expand(req.URL, map[string]string{
10214 "name": c.name,
10215 })
10216 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10217 }
10218
10219
10220
10221
10222
10223
10224 func (c *ProjectsInstancesBackupsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10225 gensupport.SetOptions(c.urlParams_, opts...)
10226 res, err := c.doRequest("json")
10227 if res != nil && res.StatusCode == http.StatusNotModified {
10228 if res.Body != nil {
10229 res.Body.Close()
10230 }
10231 return nil, gensupport.WrapError(&googleapi.Error{
10232 Code: res.StatusCode,
10233 Header: res.Header,
10234 })
10235 }
10236 if err != nil {
10237 return nil, err
10238 }
10239 defer googleapi.CloseBody(res)
10240 if err := googleapi.CheckResponse(res); err != nil {
10241 return nil, gensupport.WrapError(err)
10242 }
10243 ret := &Empty{
10244 ServerResponse: googleapi.ServerResponse{
10245 Header: res.Header,
10246 HTTPStatusCode: res.StatusCode,
10247 },
10248 }
10249 target := &ret
10250 if err := gensupport.DecodeResponse(target, res); err != nil {
10251 return nil, err
10252 }
10253 return ret, nil
10254 }
10255
10256 type ProjectsInstancesBackupsOperationsGetCall struct {
10257 s *Service
10258 name string
10259 urlParams_ gensupport.URLParams
10260 ifNoneMatch_ string
10261 ctx_ context.Context
10262 header_ http.Header
10263 }
10264
10265
10266
10267
10268
10269
10270 func (r *ProjectsInstancesBackupsOperationsService) Get(name string) *ProjectsInstancesBackupsOperationsGetCall {
10271 c := &ProjectsInstancesBackupsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10272 c.name = name
10273 return c
10274 }
10275
10276
10277
10278
10279 func (c *ProjectsInstancesBackupsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsOperationsGetCall {
10280 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10281 return c
10282 }
10283
10284
10285
10286
10287 func (c *ProjectsInstancesBackupsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesBackupsOperationsGetCall {
10288 c.ifNoneMatch_ = entityTag
10289 return c
10290 }
10291
10292
10293 func (c *ProjectsInstancesBackupsOperationsGetCall) Context(ctx context.Context) *ProjectsInstancesBackupsOperationsGetCall {
10294 c.ctx_ = ctx
10295 return c
10296 }
10297
10298
10299
10300 func (c *ProjectsInstancesBackupsOperationsGetCall) Header() http.Header {
10301 if c.header_ == nil {
10302 c.header_ = make(http.Header)
10303 }
10304 return c.header_
10305 }
10306
10307 func (c *ProjectsInstancesBackupsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
10308 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10309 if c.ifNoneMatch_ != "" {
10310 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10311 }
10312 var body io.Reader = nil
10313 c.urlParams_.Set("alt", alt)
10314 c.urlParams_.Set("prettyPrint", "false")
10315 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10316 urls += "?" + c.urlParams_.Encode()
10317 req, err := http.NewRequest("GET", urls, body)
10318 if err != nil {
10319 return nil, err
10320 }
10321 req.Header = reqHeaders
10322 googleapi.Expand(req.URL, map[string]string{
10323 "name": c.name,
10324 })
10325 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10326 }
10327
10328
10329
10330
10331
10332
10333 func (c *ProjectsInstancesBackupsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10334 gensupport.SetOptions(c.urlParams_, opts...)
10335 res, err := c.doRequest("json")
10336 if res != nil && res.StatusCode == http.StatusNotModified {
10337 if res.Body != nil {
10338 res.Body.Close()
10339 }
10340 return nil, gensupport.WrapError(&googleapi.Error{
10341 Code: res.StatusCode,
10342 Header: res.Header,
10343 })
10344 }
10345 if err != nil {
10346 return nil, err
10347 }
10348 defer googleapi.CloseBody(res)
10349 if err := googleapi.CheckResponse(res); err != nil {
10350 return nil, gensupport.WrapError(err)
10351 }
10352 ret := &Operation{
10353 ServerResponse: googleapi.ServerResponse{
10354 Header: res.Header,
10355 HTTPStatusCode: res.StatusCode,
10356 },
10357 }
10358 target := &ret
10359 if err := gensupport.DecodeResponse(target, res); err != nil {
10360 return nil, err
10361 }
10362 return ret, nil
10363 }
10364
10365 type ProjectsInstancesBackupsOperationsListCall struct {
10366 s *Service
10367 name string
10368 urlParams_ gensupport.URLParams
10369 ifNoneMatch_ string
10370 ctx_ context.Context
10371 header_ http.Header
10372 }
10373
10374
10375
10376
10377
10378 func (r *ProjectsInstancesBackupsOperationsService) List(name string) *ProjectsInstancesBackupsOperationsListCall {
10379 c := &ProjectsInstancesBackupsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10380 c.name = name
10381 return c
10382 }
10383
10384
10385 func (c *ProjectsInstancesBackupsOperationsListCall) Filter(filter string) *ProjectsInstancesBackupsOperationsListCall {
10386 c.urlParams_.Set("filter", filter)
10387 return c
10388 }
10389
10390
10391
10392 func (c *ProjectsInstancesBackupsOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesBackupsOperationsListCall {
10393 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10394 return c
10395 }
10396
10397
10398
10399 func (c *ProjectsInstancesBackupsOperationsListCall) PageToken(pageToken string) *ProjectsInstancesBackupsOperationsListCall {
10400 c.urlParams_.Set("pageToken", pageToken)
10401 return c
10402 }
10403
10404
10405
10406
10407 func (c *ProjectsInstancesBackupsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsOperationsListCall {
10408 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10409 return c
10410 }
10411
10412
10413
10414
10415 func (c *ProjectsInstancesBackupsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesBackupsOperationsListCall {
10416 c.ifNoneMatch_ = entityTag
10417 return c
10418 }
10419
10420
10421 func (c *ProjectsInstancesBackupsOperationsListCall) Context(ctx context.Context) *ProjectsInstancesBackupsOperationsListCall {
10422 c.ctx_ = ctx
10423 return c
10424 }
10425
10426
10427
10428 func (c *ProjectsInstancesBackupsOperationsListCall) Header() http.Header {
10429 if c.header_ == nil {
10430 c.header_ = make(http.Header)
10431 }
10432 return c.header_
10433 }
10434
10435 func (c *ProjectsInstancesBackupsOperationsListCall) doRequest(alt string) (*http.Response, error) {
10436 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10437 if c.ifNoneMatch_ != "" {
10438 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10439 }
10440 var body io.Reader = nil
10441 c.urlParams_.Set("alt", alt)
10442 c.urlParams_.Set("prettyPrint", "false")
10443 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10444 urls += "?" + c.urlParams_.Encode()
10445 req, err := http.NewRequest("GET", urls, body)
10446 if err != nil {
10447 return nil, err
10448 }
10449 req.Header = reqHeaders
10450 googleapi.Expand(req.URL, map[string]string{
10451 "name": c.name,
10452 })
10453 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10454 }
10455
10456
10457
10458
10459
10460
10461
10462 func (c *ProjectsInstancesBackupsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
10463 gensupport.SetOptions(c.urlParams_, opts...)
10464 res, err := c.doRequest("json")
10465 if res != nil && res.StatusCode == http.StatusNotModified {
10466 if res.Body != nil {
10467 res.Body.Close()
10468 }
10469 return nil, gensupport.WrapError(&googleapi.Error{
10470 Code: res.StatusCode,
10471 Header: res.Header,
10472 })
10473 }
10474 if err != nil {
10475 return nil, err
10476 }
10477 defer googleapi.CloseBody(res)
10478 if err := googleapi.CheckResponse(res); err != nil {
10479 return nil, gensupport.WrapError(err)
10480 }
10481 ret := &ListOperationsResponse{
10482 ServerResponse: googleapi.ServerResponse{
10483 Header: res.Header,
10484 HTTPStatusCode: res.StatusCode,
10485 },
10486 }
10487 target := &ret
10488 if err := gensupport.DecodeResponse(target, res); err != nil {
10489 return nil, err
10490 }
10491 return ret, nil
10492 }
10493
10494
10495
10496
10497 func (c *ProjectsInstancesBackupsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
10498 c.ctx_ = ctx
10499 defer c.PageToken(c.urlParams_.Get("pageToken"))
10500 for {
10501 x, err := c.Do()
10502 if err != nil {
10503 return err
10504 }
10505 if err := f(x); err != nil {
10506 return err
10507 }
10508 if x.NextPageToken == "" {
10509 return nil
10510 }
10511 c.PageToken(x.NextPageToken)
10512 }
10513 }
10514
10515 type ProjectsInstancesDatabaseOperationsListCall struct {
10516 s *Service
10517 parent string
10518 urlParams_ gensupport.URLParams
10519 ifNoneMatch_ string
10520 ctx_ context.Context
10521 header_ http.Header
10522 }
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532 func (r *ProjectsInstancesDatabaseOperationsService) List(parent string) *ProjectsInstancesDatabaseOperationsListCall {
10533 c := &ProjectsInstancesDatabaseOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10534 c.parent = parent
10535 return c
10536 }
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566 func (c *ProjectsInstancesDatabaseOperationsListCall) Filter(filter string) *ProjectsInstancesDatabaseOperationsListCall {
10567 c.urlParams_.Set("filter", filter)
10568 return c
10569 }
10570
10571
10572
10573
10574 func (c *ProjectsInstancesDatabaseOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesDatabaseOperationsListCall {
10575 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10576 return c
10577 }
10578
10579
10580
10581
10582
10583 func (c *ProjectsInstancesDatabaseOperationsListCall) PageToken(pageToken string) *ProjectsInstancesDatabaseOperationsListCall {
10584 c.urlParams_.Set("pageToken", pageToken)
10585 return c
10586 }
10587
10588
10589
10590
10591 func (c *ProjectsInstancesDatabaseOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabaseOperationsListCall {
10592 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10593 return c
10594 }
10595
10596
10597
10598
10599 func (c *ProjectsInstancesDatabaseOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabaseOperationsListCall {
10600 c.ifNoneMatch_ = entityTag
10601 return c
10602 }
10603
10604
10605 func (c *ProjectsInstancesDatabaseOperationsListCall) Context(ctx context.Context) *ProjectsInstancesDatabaseOperationsListCall {
10606 c.ctx_ = ctx
10607 return c
10608 }
10609
10610
10611
10612 func (c *ProjectsInstancesDatabaseOperationsListCall) Header() http.Header {
10613 if c.header_ == nil {
10614 c.header_ = make(http.Header)
10615 }
10616 return c.header_
10617 }
10618
10619 func (c *ProjectsInstancesDatabaseOperationsListCall) doRequest(alt string) (*http.Response, error) {
10620 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10621 if c.ifNoneMatch_ != "" {
10622 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10623 }
10624 var body io.Reader = nil
10625 c.urlParams_.Set("alt", alt)
10626 c.urlParams_.Set("prettyPrint", "false")
10627 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databaseOperations")
10628 urls += "?" + c.urlParams_.Encode()
10629 req, err := http.NewRequest("GET", urls, body)
10630 if err != nil {
10631 return nil, err
10632 }
10633 req.Header = reqHeaders
10634 googleapi.Expand(req.URL, map[string]string{
10635 "parent": c.parent,
10636 })
10637 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10638 }
10639
10640
10641
10642
10643
10644
10645
10646 func (c *ProjectsInstancesDatabaseOperationsListCall) Do(opts ...googleapi.CallOption) (*ListDatabaseOperationsResponse, error) {
10647 gensupport.SetOptions(c.urlParams_, opts...)
10648 res, err := c.doRequest("json")
10649 if res != nil && res.StatusCode == http.StatusNotModified {
10650 if res.Body != nil {
10651 res.Body.Close()
10652 }
10653 return nil, gensupport.WrapError(&googleapi.Error{
10654 Code: res.StatusCode,
10655 Header: res.Header,
10656 })
10657 }
10658 if err != nil {
10659 return nil, err
10660 }
10661 defer googleapi.CloseBody(res)
10662 if err := googleapi.CheckResponse(res); err != nil {
10663 return nil, gensupport.WrapError(err)
10664 }
10665 ret := &ListDatabaseOperationsResponse{
10666 ServerResponse: googleapi.ServerResponse{
10667 Header: res.Header,
10668 HTTPStatusCode: res.StatusCode,
10669 },
10670 }
10671 target := &ret
10672 if err := gensupport.DecodeResponse(target, res); err != nil {
10673 return nil, err
10674 }
10675 return ret, nil
10676 }
10677
10678
10679
10680
10681 func (c *ProjectsInstancesDatabaseOperationsListCall) Pages(ctx context.Context, f func(*ListDatabaseOperationsResponse) error) error {
10682 c.ctx_ = ctx
10683 defer c.PageToken(c.urlParams_.Get("pageToken"))
10684 for {
10685 x, err := c.Do()
10686 if err != nil {
10687 return err
10688 }
10689 if err := f(x); err != nil {
10690 return err
10691 }
10692 if x.NextPageToken == "" {
10693 return nil
10694 }
10695 c.PageToken(x.NextPageToken)
10696 }
10697 }
10698
10699 type ProjectsInstancesDatabasesCreateCall struct {
10700 s *Service
10701 parent string
10702 createdatabaserequest *CreateDatabaseRequest
10703 urlParams_ gensupport.URLParams
10704 ctx_ context.Context
10705 header_ http.Header
10706 }
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716 func (r *ProjectsInstancesDatabasesService) Create(parent string, createdatabaserequest *CreateDatabaseRequest) *ProjectsInstancesDatabasesCreateCall {
10717 c := &ProjectsInstancesDatabasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10718 c.parent = parent
10719 c.createdatabaserequest = createdatabaserequest
10720 return c
10721 }
10722
10723
10724
10725
10726 func (c *ProjectsInstancesDatabasesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesCreateCall {
10727 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10728 return c
10729 }
10730
10731
10732 func (c *ProjectsInstancesDatabasesCreateCall) Context(ctx context.Context) *ProjectsInstancesDatabasesCreateCall {
10733 c.ctx_ = ctx
10734 return c
10735 }
10736
10737
10738
10739 func (c *ProjectsInstancesDatabasesCreateCall) Header() http.Header {
10740 if c.header_ == nil {
10741 c.header_ = make(http.Header)
10742 }
10743 return c.header_
10744 }
10745
10746 func (c *ProjectsInstancesDatabasesCreateCall) doRequest(alt string) (*http.Response, error) {
10747 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10748 var body io.Reader = nil
10749 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createdatabaserequest)
10750 if err != nil {
10751 return nil, err
10752 }
10753 c.urlParams_.Set("alt", alt)
10754 c.urlParams_.Set("prettyPrint", "false")
10755 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases")
10756 urls += "?" + c.urlParams_.Encode()
10757 req, err := http.NewRequest("POST", urls, body)
10758 if err != nil {
10759 return nil, err
10760 }
10761 req.Header = reqHeaders
10762 googleapi.Expand(req.URL, map[string]string{
10763 "parent": c.parent,
10764 })
10765 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10766 }
10767
10768
10769
10770
10771
10772
10773 func (c *ProjectsInstancesDatabasesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10774 gensupport.SetOptions(c.urlParams_, opts...)
10775 res, err := c.doRequest("json")
10776 if res != nil && res.StatusCode == http.StatusNotModified {
10777 if res.Body != nil {
10778 res.Body.Close()
10779 }
10780 return nil, gensupport.WrapError(&googleapi.Error{
10781 Code: res.StatusCode,
10782 Header: res.Header,
10783 })
10784 }
10785 if err != nil {
10786 return nil, err
10787 }
10788 defer googleapi.CloseBody(res)
10789 if err := googleapi.CheckResponse(res); err != nil {
10790 return nil, gensupport.WrapError(err)
10791 }
10792 ret := &Operation{
10793 ServerResponse: googleapi.ServerResponse{
10794 Header: res.Header,
10795 HTTPStatusCode: res.StatusCode,
10796 },
10797 }
10798 target := &ret
10799 if err := gensupport.DecodeResponse(target, res); err != nil {
10800 return nil, err
10801 }
10802 return ret, nil
10803 }
10804
10805 type ProjectsInstancesDatabasesDropDatabaseCall struct {
10806 s *Service
10807 database string
10808 urlParams_ gensupport.URLParams
10809 ctx_ context.Context
10810 header_ http.Header
10811 }
10812
10813
10814
10815
10816
10817
10818
10819 func (r *ProjectsInstancesDatabasesService) DropDatabase(database string) *ProjectsInstancesDatabasesDropDatabaseCall {
10820 c := &ProjectsInstancesDatabasesDropDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10821 c.database = database
10822 return c
10823 }
10824
10825
10826
10827
10828 func (c *ProjectsInstancesDatabasesDropDatabaseCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesDropDatabaseCall {
10829 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10830 return c
10831 }
10832
10833
10834 func (c *ProjectsInstancesDatabasesDropDatabaseCall) Context(ctx context.Context) *ProjectsInstancesDatabasesDropDatabaseCall {
10835 c.ctx_ = ctx
10836 return c
10837 }
10838
10839
10840
10841 func (c *ProjectsInstancesDatabasesDropDatabaseCall) Header() http.Header {
10842 if c.header_ == nil {
10843 c.header_ = make(http.Header)
10844 }
10845 return c.header_
10846 }
10847
10848 func (c *ProjectsInstancesDatabasesDropDatabaseCall) doRequest(alt string) (*http.Response, error) {
10849 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10850 var body io.Reader = nil
10851 c.urlParams_.Set("alt", alt)
10852 c.urlParams_.Set("prettyPrint", "false")
10853 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}")
10854 urls += "?" + c.urlParams_.Encode()
10855 req, err := http.NewRequest("DELETE", urls, body)
10856 if err != nil {
10857 return nil, err
10858 }
10859 req.Header = reqHeaders
10860 googleapi.Expand(req.URL, map[string]string{
10861 "database": c.database,
10862 })
10863 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10864 }
10865
10866
10867
10868
10869
10870
10871 func (c *ProjectsInstancesDatabasesDropDatabaseCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10872 gensupport.SetOptions(c.urlParams_, opts...)
10873 res, err := c.doRequest("json")
10874 if res != nil && res.StatusCode == http.StatusNotModified {
10875 if res.Body != nil {
10876 res.Body.Close()
10877 }
10878 return nil, gensupport.WrapError(&googleapi.Error{
10879 Code: res.StatusCode,
10880 Header: res.Header,
10881 })
10882 }
10883 if err != nil {
10884 return nil, err
10885 }
10886 defer googleapi.CloseBody(res)
10887 if err := googleapi.CheckResponse(res); err != nil {
10888 return nil, gensupport.WrapError(err)
10889 }
10890 ret := &Empty{
10891 ServerResponse: googleapi.ServerResponse{
10892 Header: res.Header,
10893 HTTPStatusCode: res.StatusCode,
10894 },
10895 }
10896 target := &ret
10897 if err := gensupport.DecodeResponse(target, res); err != nil {
10898 return nil, err
10899 }
10900 return ret, nil
10901 }
10902
10903 type ProjectsInstancesDatabasesGetCall struct {
10904 s *Service
10905 name string
10906 urlParams_ gensupport.URLParams
10907 ifNoneMatch_ string
10908 ctx_ context.Context
10909 header_ http.Header
10910 }
10911
10912
10913
10914
10915
10916 func (r *ProjectsInstancesDatabasesService) Get(name string) *ProjectsInstancesDatabasesGetCall {
10917 c := &ProjectsInstancesDatabasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10918 c.name = name
10919 return c
10920 }
10921
10922
10923
10924
10925 func (c *ProjectsInstancesDatabasesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesGetCall {
10926 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10927 return c
10928 }
10929
10930
10931
10932
10933 func (c *ProjectsInstancesDatabasesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesGetCall {
10934 c.ifNoneMatch_ = entityTag
10935 return c
10936 }
10937
10938
10939 func (c *ProjectsInstancesDatabasesGetCall) Context(ctx context.Context) *ProjectsInstancesDatabasesGetCall {
10940 c.ctx_ = ctx
10941 return c
10942 }
10943
10944
10945
10946 func (c *ProjectsInstancesDatabasesGetCall) Header() http.Header {
10947 if c.header_ == nil {
10948 c.header_ = make(http.Header)
10949 }
10950 return c.header_
10951 }
10952
10953 func (c *ProjectsInstancesDatabasesGetCall) doRequest(alt string) (*http.Response, error) {
10954 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10955 if c.ifNoneMatch_ != "" {
10956 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10957 }
10958 var body io.Reader = nil
10959 c.urlParams_.Set("alt", alt)
10960 c.urlParams_.Set("prettyPrint", "false")
10961 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10962 urls += "?" + c.urlParams_.Encode()
10963 req, err := http.NewRequest("GET", urls, body)
10964 if err != nil {
10965 return nil, err
10966 }
10967 req.Header = reqHeaders
10968 googleapi.Expand(req.URL, map[string]string{
10969 "name": c.name,
10970 })
10971 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10972 }
10973
10974
10975
10976
10977
10978
10979 func (c *ProjectsInstancesDatabasesGetCall) Do(opts ...googleapi.CallOption) (*Database, error) {
10980 gensupport.SetOptions(c.urlParams_, opts...)
10981 res, err := c.doRequest("json")
10982 if res != nil && res.StatusCode == http.StatusNotModified {
10983 if res.Body != nil {
10984 res.Body.Close()
10985 }
10986 return nil, gensupport.WrapError(&googleapi.Error{
10987 Code: res.StatusCode,
10988 Header: res.Header,
10989 })
10990 }
10991 if err != nil {
10992 return nil, err
10993 }
10994 defer googleapi.CloseBody(res)
10995 if err := googleapi.CheckResponse(res); err != nil {
10996 return nil, gensupport.WrapError(err)
10997 }
10998 ret := &Database{
10999 ServerResponse: googleapi.ServerResponse{
11000 Header: res.Header,
11001 HTTPStatusCode: res.StatusCode,
11002 },
11003 }
11004 target := &ret
11005 if err := gensupport.DecodeResponse(target, res); err != nil {
11006 return nil, err
11007 }
11008 return ret, nil
11009 }
11010
11011 type ProjectsInstancesDatabasesGetDdlCall struct {
11012 s *Service
11013 database string
11014 urlParams_ gensupport.URLParams
11015 ifNoneMatch_ string
11016 ctx_ context.Context
11017 header_ http.Header
11018 }
11019
11020
11021
11022
11023
11024
11025
11026 func (r *ProjectsInstancesDatabasesService) GetDdl(database string) *ProjectsInstancesDatabasesGetDdlCall {
11027 c := &ProjectsInstancesDatabasesGetDdlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11028 c.database = database
11029 return c
11030 }
11031
11032
11033
11034
11035 func (c *ProjectsInstancesDatabasesGetDdlCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesGetDdlCall {
11036 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11037 return c
11038 }
11039
11040
11041
11042
11043 func (c *ProjectsInstancesDatabasesGetDdlCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesGetDdlCall {
11044 c.ifNoneMatch_ = entityTag
11045 return c
11046 }
11047
11048
11049 func (c *ProjectsInstancesDatabasesGetDdlCall) Context(ctx context.Context) *ProjectsInstancesDatabasesGetDdlCall {
11050 c.ctx_ = ctx
11051 return c
11052 }
11053
11054
11055
11056 func (c *ProjectsInstancesDatabasesGetDdlCall) Header() http.Header {
11057 if c.header_ == nil {
11058 c.header_ = make(http.Header)
11059 }
11060 return c.header_
11061 }
11062
11063 func (c *ProjectsInstancesDatabasesGetDdlCall) doRequest(alt string) (*http.Response, error) {
11064 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11065 if c.ifNoneMatch_ != "" {
11066 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11067 }
11068 var body io.Reader = nil
11069 c.urlParams_.Set("alt", alt)
11070 c.urlParams_.Set("prettyPrint", "false")
11071 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/ddl")
11072 urls += "?" + c.urlParams_.Encode()
11073 req, err := http.NewRequest("GET", urls, body)
11074 if err != nil {
11075 return nil, err
11076 }
11077 req.Header = reqHeaders
11078 googleapi.Expand(req.URL, map[string]string{
11079 "database": c.database,
11080 })
11081 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11082 }
11083
11084
11085
11086
11087
11088
11089
11090 func (c *ProjectsInstancesDatabasesGetDdlCall) Do(opts ...googleapi.CallOption) (*GetDatabaseDdlResponse, error) {
11091 gensupport.SetOptions(c.urlParams_, opts...)
11092 res, err := c.doRequest("json")
11093 if res != nil && res.StatusCode == http.StatusNotModified {
11094 if res.Body != nil {
11095 res.Body.Close()
11096 }
11097 return nil, gensupport.WrapError(&googleapi.Error{
11098 Code: res.StatusCode,
11099 Header: res.Header,
11100 })
11101 }
11102 if err != nil {
11103 return nil, err
11104 }
11105 defer googleapi.CloseBody(res)
11106 if err := googleapi.CheckResponse(res); err != nil {
11107 return nil, gensupport.WrapError(err)
11108 }
11109 ret := &GetDatabaseDdlResponse{
11110 ServerResponse: googleapi.ServerResponse{
11111 Header: res.Header,
11112 HTTPStatusCode: res.StatusCode,
11113 },
11114 }
11115 target := &ret
11116 if err := gensupport.DecodeResponse(target, res); err != nil {
11117 return nil, err
11118 }
11119 return ret, nil
11120 }
11121
11122 type ProjectsInstancesDatabasesGetIamPolicyCall struct {
11123 s *Service
11124 resource string
11125 getiampolicyrequest *GetIamPolicyRequest
11126 urlParams_ gensupport.URLParams
11127 ctx_ context.Context
11128 header_ http.Header
11129 }
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141 func (r *ProjectsInstancesDatabasesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesDatabasesGetIamPolicyCall {
11142 c := &ProjectsInstancesDatabasesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11143 c.resource = resource
11144 c.getiampolicyrequest = getiampolicyrequest
11145 return c
11146 }
11147
11148
11149
11150
11151 func (c *ProjectsInstancesDatabasesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesGetIamPolicyCall {
11152 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11153 return c
11154 }
11155
11156
11157 func (c *ProjectsInstancesDatabasesGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesDatabasesGetIamPolicyCall {
11158 c.ctx_ = ctx
11159 return c
11160 }
11161
11162
11163
11164 func (c *ProjectsInstancesDatabasesGetIamPolicyCall) Header() http.Header {
11165 if c.header_ == nil {
11166 c.header_ = make(http.Header)
11167 }
11168 return c.header_
11169 }
11170
11171 func (c *ProjectsInstancesDatabasesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
11172 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11173 var body io.Reader = nil
11174 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
11175 if err != nil {
11176 return nil, err
11177 }
11178 c.urlParams_.Set("alt", alt)
11179 c.urlParams_.Set("prettyPrint", "false")
11180 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
11181 urls += "?" + c.urlParams_.Encode()
11182 req, err := http.NewRequest("POST", urls, body)
11183 if err != nil {
11184 return nil, err
11185 }
11186 req.Header = reqHeaders
11187 googleapi.Expand(req.URL, map[string]string{
11188 "resource": c.resource,
11189 })
11190 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11191 }
11192
11193
11194
11195
11196
11197
11198 func (c *ProjectsInstancesDatabasesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
11199 gensupport.SetOptions(c.urlParams_, opts...)
11200 res, err := c.doRequest("json")
11201 if res != nil && res.StatusCode == http.StatusNotModified {
11202 if res.Body != nil {
11203 res.Body.Close()
11204 }
11205 return nil, gensupport.WrapError(&googleapi.Error{
11206 Code: res.StatusCode,
11207 Header: res.Header,
11208 })
11209 }
11210 if err != nil {
11211 return nil, err
11212 }
11213 defer googleapi.CloseBody(res)
11214 if err := googleapi.CheckResponse(res); err != nil {
11215 return nil, gensupport.WrapError(err)
11216 }
11217 ret := &Policy{
11218 ServerResponse: googleapi.ServerResponse{
11219 Header: res.Header,
11220 HTTPStatusCode: res.StatusCode,
11221 },
11222 }
11223 target := &ret
11224 if err := gensupport.DecodeResponse(target, res); err != nil {
11225 return nil, err
11226 }
11227 return ret, nil
11228 }
11229
11230 type ProjectsInstancesDatabasesGetScansCall struct {
11231 s *Service
11232 name string
11233 urlParams_ gensupport.URLParams
11234 ifNoneMatch_ string
11235 ctx_ context.Context
11236 header_ http.Header
11237 }
11238
11239
11240
11241
11242
11243
11244 func (r *ProjectsInstancesDatabasesService) GetScans(name string) *ProjectsInstancesDatabasesGetScansCall {
11245 c := &ProjectsInstancesDatabasesGetScansCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11246 c.name = name
11247 return c
11248 }
11249
11250
11251
11252 func (c *ProjectsInstancesDatabasesGetScansCall) EndTime(endTime string) *ProjectsInstancesDatabasesGetScansCall {
11253 c.urlParams_.Set("endTime", endTime)
11254 return c
11255 }
11256
11257
11258
11259
11260
11261
11262
11263 func (c *ProjectsInstancesDatabasesGetScansCall) StartTime(startTime string) *ProjectsInstancesDatabasesGetScansCall {
11264 c.urlParams_.Set("startTime", startTime)
11265 return c
11266 }
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283 func (c *ProjectsInstancesDatabasesGetScansCall) View(view string) *ProjectsInstancesDatabasesGetScansCall {
11284 c.urlParams_.Set("view", view)
11285 return c
11286 }
11287
11288
11289
11290
11291 func (c *ProjectsInstancesDatabasesGetScansCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesGetScansCall {
11292 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11293 return c
11294 }
11295
11296
11297
11298
11299 func (c *ProjectsInstancesDatabasesGetScansCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesGetScansCall {
11300 c.ifNoneMatch_ = entityTag
11301 return c
11302 }
11303
11304
11305 func (c *ProjectsInstancesDatabasesGetScansCall) Context(ctx context.Context) *ProjectsInstancesDatabasesGetScansCall {
11306 c.ctx_ = ctx
11307 return c
11308 }
11309
11310
11311
11312 func (c *ProjectsInstancesDatabasesGetScansCall) Header() http.Header {
11313 if c.header_ == nil {
11314 c.header_ = make(http.Header)
11315 }
11316 return c.header_
11317 }
11318
11319 func (c *ProjectsInstancesDatabasesGetScansCall) doRequest(alt string) (*http.Response, error) {
11320 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11321 if c.ifNoneMatch_ != "" {
11322 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11323 }
11324 var body io.Reader = nil
11325 c.urlParams_.Set("alt", alt)
11326 c.urlParams_.Set("prettyPrint", "false")
11327 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/scans")
11328 urls += "?" + c.urlParams_.Encode()
11329 req, err := http.NewRequest("GET", urls, body)
11330 if err != nil {
11331 return nil, err
11332 }
11333 req.Header = reqHeaders
11334 googleapi.Expand(req.URL, map[string]string{
11335 "name": c.name,
11336 })
11337 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11338 }
11339
11340
11341
11342
11343
11344
11345 func (c *ProjectsInstancesDatabasesGetScansCall) Do(opts ...googleapi.CallOption) (*Scan, error) {
11346 gensupport.SetOptions(c.urlParams_, opts...)
11347 res, err := c.doRequest("json")
11348 if res != nil && res.StatusCode == http.StatusNotModified {
11349 if res.Body != nil {
11350 res.Body.Close()
11351 }
11352 return nil, gensupport.WrapError(&googleapi.Error{
11353 Code: res.StatusCode,
11354 Header: res.Header,
11355 })
11356 }
11357 if err != nil {
11358 return nil, err
11359 }
11360 defer googleapi.CloseBody(res)
11361 if err := googleapi.CheckResponse(res); err != nil {
11362 return nil, gensupport.WrapError(err)
11363 }
11364 ret := &Scan{
11365 ServerResponse: googleapi.ServerResponse{
11366 Header: res.Header,
11367 HTTPStatusCode: res.StatusCode,
11368 },
11369 }
11370 target := &ret
11371 if err := gensupport.DecodeResponse(target, res); err != nil {
11372 return nil, err
11373 }
11374 return ret, nil
11375 }
11376
11377 type ProjectsInstancesDatabasesListCall struct {
11378 s *Service
11379 parent string
11380 urlParams_ gensupport.URLParams
11381 ifNoneMatch_ string
11382 ctx_ context.Context
11383 header_ http.Header
11384 }
11385
11386
11387
11388
11389
11390 func (r *ProjectsInstancesDatabasesService) List(parent string) *ProjectsInstancesDatabasesListCall {
11391 c := &ProjectsInstancesDatabasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11392 c.parent = parent
11393 return c
11394 }
11395
11396
11397
11398
11399 func (c *ProjectsInstancesDatabasesListCall) PageSize(pageSize int64) *ProjectsInstancesDatabasesListCall {
11400 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11401 return c
11402 }
11403
11404
11405
11406
11407 func (c *ProjectsInstancesDatabasesListCall) PageToken(pageToken string) *ProjectsInstancesDatabasesListCall {
11408 c.urlParams_.Set("pageToken", pageToken)
11409 return c
11410 }
11411
11412
11413
11414
11415 func (c *ProjectsInstancesDatabasesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesListCall {
11416 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11417 return c
11418 }
11419
11420
11421
11422
11423 func (c *ProjectsInstancesDatabasesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesListCall {
11424 c.ifNoneMatch_ = entityTag
11425 return c
11426 }
11427
11428
11429 func (c *ProjectsInstancesDatabasesListCall) Context(ctx context.Context) *ProjectsInstancesDatabasesListCall {
11430 c.ctx_ = ctx
11431 return c
11432 }
11433
11434
11435
11436 func (c *ProjectsInstancesDatabasesListCall) Header() http.Header {
11437 if c.header_ == nil {
11438 c.header_ = make(http.Header)
11439 }
11440 return c.header_
11441 }
11442
11443 func (c *ProjectsInstancesDatabasesListCall) doRequest(alt string) (*http.Response, error) {
11444 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11445 if c.ifNoneMatch_ != "" {
11446 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11447 }
11448 var body io.Reader = nil
11449 c.urlParams_.Set("alt", alt)
11450 c.urlParams_.Set("prettyPrint", "false")
11451 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases")
11452 urls += "?" + c.urlParams_.Encode()
11453 req, err := http.NewRequest("GET", urls, body)
11454 if err != nil {
11455 return nil, err
11456 }
11457 req.Header = reqHeaders
11458 googleapi.Expand(req.URL, map[string]string{
11459 "parent": c.parent,
11460 })
11461 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11462 }
11463
11464
11465
11466
11467
11468
11469
11470 func (c *ProjectsInstancesDatabasesListCall) Do(opts ...googleapi.CallOption) (*ListDatabasesResponse, error) {
11471 gensupport.SetOptions(c.urlParams_, opts...)
11472 res, err := c.doRequest("json")
11473 if res != nil && res.StatusCode == http.StatusNotModified {
11474 if res.Body != nil {
11475 res.Body.Close()
11476 }
11477 return nil, gensupport.WrapError(&googleapi.Error{
11478 Code: res.StatusCode,
11479 Header: res.Header,
11480 })
11481 }
11482 if err != nil {
11483 return nil, err
11484 }
11485 defer googleapi.CloseBody(res)
11486 if err := googleapi.CheckResponse(res); err != nil {
11487 return nil, gensupport.WrapError(err)
11488 }
11489 ret := &ListDatabasesResponse{
11490 ServerResponse: googleapi.ServerResponse{
11491 Header: res.Header,
11492 HTTPStatusCode: res.StatusCode,
11493 },
11494 }
11495 target := &ret
11496 if err := gensupport.DecodeResponse(target, res); err != nil {
11497 return nil, err
11498 }
11499 return ret, nil
11500 }
11501
11502
11503
11504
11505 func (c *ProjectsInstancesDatabasesListCall) Pages(ctx context.Context, f func(*ListDatabasesResponse) error) error {
11506 c.ctx_ = ctx
11507 defer c.PageToken(c.urlParams_.Get("pageToken"))
11508 for {
11509 x, err := c.Do()
11510 if err != nil {
11511 return err
11512 }
11513 if err := f(x); err != nil {
11514 return err
11515 }
11516 if x.NextPageToken == "" {
11517 return nil
11518 }
11519 c.PageToken(x.NextPageToken)
11520 }
11521 }
11522
11523 type ProjectsInstancesDatabasesPatchCall struct {
11524 s *Service
11525 name string
11526 database *Database
11527 urlParams_ gensupport.URLParams
11528 ctx_ context.Context
11529 header_ http.Header
11530 }
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553 func (r *ProjectsInstancesDatabasesService) Patch(name string, database *Database) *ProjectsInstancesDatabasesPatchCall {
11554 c := &ProjectsInstancesDatabasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11555 c.name = name
11556 c.database = database
11557 return c
11558 }
11559
11560
11561
11562
11563 func (c *ProjectsInstancesDatabasesPatchCall) UpdateMask(updateMask string) *ProjectsInstancesDatabasesPatchCall {
11564 c.urlParams_.Set("updateMask", updateMask)
11565 return c
11566 }
11567
11568
11569
11570
11571 func (c *ProjectsInstancesDatabasesPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesPatchCall {
11572 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11573 return c
11574 }
11575
11576
11577 func (c *ProjectsInstancesDatabasesPatchCall) Context(ctx context.Context) *ProjectsInstancesDatabasesPatchCall {
11578 c.ctx_ = ctx
11579 return c
11580 }
11581
11582
11583
11584 func (c *ProjectsInstancesDatabasesPatchCall) Header() http.Header {
11585 if c.header_ == nil {
11586 c.header_ = make(http.Header)
11587 }
11588 return c.header_
11589 }
11590
11591 func (c *ProjectsInstancesDatabasesPatchCall) doRequest(alt string) (*http.Response, error) {
11592 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11593 var body io.Reader = nil
11594 body, err := googleapi.WithoutDataWrapper.JSONReader(c.database)
11595 if err != nil {
11596 return nil, err
11597 }
11598 c.urlParams_.Set("alt", alt)
11599 c.urlParams_.Set("prettyPrint", "false")
11600 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11601 urls += "?" + c.urlParams_.Encode()
11602 req, err := http.NewRequest("PATCH", urls, body)
11603 if err != nil {
11604 return nil, err
11605 }
11606 req.Header = reqHeaders
11607 googleapi.Expand(req.URL, map[string]string{
11608 "name": c.name,
11609 })
11610 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11611 }
11612
11613
11614
11615
11616
11617
11618 func (c *ProjectsInstancesDatabasesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11619 gensupport.SetOptions(c.urlParams_, opts...)
11620 res, err := c.doRequest("json")
11621 if res != nil && res.StatusCode == http.StatusNotModified {
11622 if res.Body != nil {
11623 res.Body.Close()
11624 }
11625 return nil, gensupport.WrapError(&googleapi.Error{
11626 Code: res.StatusCode,
11627 Header: res.Header,
11628 })
11629 }
11630 if err != nil {
11631 return nil, err
11632 }
11633 defer googleapi.CloseBody(res)
11634 if err := googleapi.CheckResponse(res); err != nil {
11635 return nil, gensupport.WrapError(err)
11636 }
11637 ret := &Operation{
11638 ServerResponse: googleapi.ServerResponse{
11639 Header: res.Header,
11640 HTTPStatusCode: res.StatusCode,
11641 },
11642 }
11643 target := &ret
11644 if err := gensupport.DecodeResponse(target, res); err != nil {
11645 return nil, err
11646 }
11647 return ret, nil
11648 }
11649
11650 type ProjectsInstancesDatabasesRestoreCall struct {
11651 s *Service
11652 parent string
11653 restoredatabaserequest *RestoreDatabaseRequest
11654 urlParams_ gensupport.URLParams
11655 ctx_ context.Context
11656 header_ http.Header
11657 }
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676 func (r *ProjectsInstancesDatabasesService) Restore(parent string, restoredatabaserequest *RestoreDatabaseRequest) *ProjectsInstancesDatabasesRestoreCall {
11677 c := &ProjectsInstancesDatabasesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11678 c.parent = parent
11679 c.restoredatabaserequest = restoredatabaserequest
11680 return c
11681 }
11682
11683
11684
11685
11686 func (c *ProjectsInstancesDatabasesRestoreCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesRestoreCall {
11687 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11688 return c
11689 }
11690
11691
11692 func (c *ProjectsInstancesDatabasesRestoreCall) Context(ctx context.Context) *ProjectsInstancesDatabasesRestoreCall {
11693 c.ctx_ = ctx
11694 return c
11695 }
11696
11697
11698
11699 func (c *ProjectsInstancesDatabasesRestoreCall) Header() http.Header {
11700 if c.header_ == nil {
11701 c.header_ = make(http.Header)
11702 }
11703 return c.header_
11704 }
11705
11706 func (c *ProjectsInstancesDatabasesRestoreCall) doRequest(alt string) (*http.Response, error) {
11707 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11708 var body io.Reader = nil
11709 body, err := googleapi.WithoutDataWrapper.JSONReader(c.restoredatabaserequest)
11710 if err != nil {
11711 return nil, err
11712 }
11713 c.urlParams_.Set("alt", alt)
11714 c.urlParams_.Set("prettyPrint", "false")
11715 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases:restore")
11716 urls += "?" + c.urlParams_.Encode()
11717 req, err := http.NewRequest("POST", urls, body)
11718 if err != nil {
11719 return nil, err
11720 }
11721 req.Header = reqHeaders
11722 googleapi.Expand(req.URL, map[string]string{
11723 "parent": c.parent,
11724 })
11725 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11726 }
11727
11728
11729
11730
11731
11732
11733 func (c *ProjectsInstancesDatabasesRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11734 gensupport.SetOptions(c.urlParams_, opts...)
11735 res, err := c.doRequest("json")
11736 if res != nil && res.StatusCode == http.StatusNotModified {
11737 if res.Body != nil {
11738 res.Body.Close()
11739 }
11740 return nil, gensupport.WrapError(&googleapi.Error{
11741 Code: res.StatusCode,
11742 Header: res.Header,
11743 })
11744 }
11745 if err != nil {
11746 return nil, err
11747 }
11748 defer googleapi.CloseBody(res)
11749 if err := googleapi.CheckResponse(res); err != nil {
11750 return nil, gensupport.WrapError(err)
11751 }
11752 ret := &Operation{
11753 ServerResponse: googleapi.ServerResponse{
11754 Header: res.Header,
11755 HTTPStatusCode: res.StatusCode,
11756 },
11757 }
11758 target := &ret
11759 if err := gensupport.DecodeResponse(target, res); err != nil {
11760 return nil, err
11761 }
11762 return ret, nil
11763 }
11764
11765 type ProjectsInstancesDatabasesSetIamPolicyCall struct {
11766 s *Service
11767 resource string
11768 setiampolicyrequest *SetIamPolicyRequest
11769 urlParams_ gensupport.URLParams
11770 ctx_ context.Context
11771 header_ http.Header
11772 }
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783 func (r *ProjectsInstancesDatabasesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesDatabasesSetIamPolicyCall {
11784 c := &ProjectsInstancesDatabasesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11785 c.resource = resource
11786 c.setiampolicyrequest = setiampolicyrequest
11787 return c
11788 }
11789
11790
11791
11792
11793 func (c *ProjectsInstancesDatabasesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSetIamPolicyCall {
11794 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11795 return c
11796 }
11797
11798
11799 func (c *ProjectsInstancesDatabasesSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSetIamPolicyCall {
11800 c.ctx_ = ctx
11801 return c
11802 }
11803
11804
11805
11806 func (c *ProjectsInstancesDatabasesSetIamPolicyCall) Header() http.Header {
11807 if c.header_ == nil {
11808 c.header_ = make(http.Header)
11809 }
11810 return c.header_
11811 }
11812
11813 func (c *ProjectsInstancesDatabasesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
11814 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11815 var body io.Reader = nil
11816 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
11817 if err != nil {
11818 return nil, err
11819 }
11820 c.urlParams_.Set("alt", alt)
11821 c.urlParams_.Set("prettyPrint", "false")
11822 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
11823 urls += "?" + c.urlParams_.Encode()
11824 req, err := http.NewRequest("POST", urls, body)
11825 if err != nil {
11826 return nil, err
11827 }
11828 req.Header = reqHeaders
11829 googleapi.Expand(req.URL, map[string]string{
11830 "resource": c.resource,
11831 })
11832 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11833 }
11834
11835
11836
11837
11838
11839
11840 func (c *ProjectsInstancesDatabasesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
11841 gensupport.SetOptions(c.urlParams_, opts...)
11842 res, err := c.doRequest("json")
11843 if res != nil && res.StatusCode == http.StatusNotModified {
11844 if res.Body != nil {
11845 res.Body.Close()
11846 }
11847 return nil, gensupport.WrapError(&googleapi.Error{
11848 Code: res.StatusCode,
11849 Header: res.Header,
11850 })
11851 }
11852 if err != nil {
11853 return nil, err
11854 }
11855 defer googleapi.CloseBody(res)
11856 if err := googleapi.CheckResponse(res); err != nil {
11857 return nil, gensupport.WrapError(err)
11858 }
11859 ret := &Policy{
11860 ServerResponse: googleapi.ServerResponse{
11861 Header: res.Header,
11862 HTTPStatusCode: res.StatusCode,
11863 },
11864 }
11865 target := &ret
11866 if err := gensupport.DecodeResponse(target, res); err != nil {
11867 return nil, err
11868 }
11869 return ret, nil
11870 }
11871
11872 type ProjectsInstancesDatabasesTestIamPermissionsCall struct {
11873 s *Service
11874 resource string
11875 testiampermissionsrequest *TestIamPermissionsRequest
11876 urlParams_ gensupport.URLParams
11877 ctx_ context.Context
11878 header_ http.Header
11879 }
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892 func (r *ProjectsInstancesDatabasesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesDatabasesTestIamPermissionsCall {
11893 c := &ProjectsInstancesDatabasesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11894 c.resource = resource
11895 c.testiampermissionsrequest = testiampermissionsrequest
11896 return c
11897 }
11898
11899
11900
11901
11902 func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesTestIamPermissionsCall {
11903 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11904 return c
11905 }
11906
11907
11908 func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesDatabasesTestIamPermissionsCall {
11909 c.ctx_ = ctx
11910 return c
11911 }
11912
11913
11914
11915 func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) Header() http.Header {
11916 if c.header_ == nil {
11917 c.header_ = make(http.Header)
11918 }
11919 return c.header_
11920 }
11921
11922 func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
11923 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11924 var body io.Reader = nil
11925 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
11926 if err != nil {
11927 return nil, err
11928 }
11929 c.urlParams_.Set("alt", alt)
11930 c.urlParams_.Set("prettyPrint", "false")
11931 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
11932 urls += "?" + c.urlParams_.Encode()
11933 req, err := http.NewRequest("POST", urls, body)
11934 if err != nil {
11935 return nil, err
11936 }
11937 req.Header = reqHeaders
11938 googleapi.Expand(req.URL, map[string]string{
11939 "resource": c.resource,
11940 })
11941 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11942 }
11943
11944
11945
11946
11947
11948
11949
11950 func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
11951 gensupport.SetOptions(c.urlParams_, opts...)
11952 res, err := c.doRequest("json")
11953 if res != nil && res.StatusCode == http.StatusNotModified {
11954 if res.Body != nil {
11955 res.Body.Close()
11956 }
11957 return nil, gensupport.WrapError(&googleapi.Error{
11958 Code: res.StatusCode,
11959 Header: res.Header,
11960 })
11961 }
11962 if err != nil {
11963 return nil, err
11964 }
11965 defer googleapi.CloseBody(res)
11966 if err := googleapi.CheckResponse(res); err != nil {
11967 return nil, gensupport.WrapError(err)
11968 }
11969 ret := &TestIamPermissionsResponse{
11970 ServerResponse: googleapi.ServerResponse{
11971 Header: res.Header,
11972 HTTPStatusCode: res.StatusCode,
11973 },
11974 }
11975 target := &ret
11976 if err := gensupport.DecodeResponse(target, res); err != nil {
11977 return nil, err
11978 }
11979 return ret, nil
11980 }
11981
11982 type ProjectsInstancesDatabasesUpdateDdlCall struct {
11983 s *Service
11984 database string
11985 updatedatabaseddlrequest *UpdateDatabaseDdlRequest
11986 urlParams_ gensupport.URLParams
11987 ctx_ context.Context
11988 header_ http.Header
11989 }
11990
11991
11992
11993
11994
11995
11996
11997
11998 func (r *ProjectsInstancesDatabasesService) UpdateDdl(database string, updatedatabaseddlrequest *UpdateDatabaseDdlRequest) *ProjectsInstancesDatabasesUpdateDdlCall {
11999 c := &ProjectsInstancesDatabasesUpdateDdlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12000 c.database = database
12001 c.updatedatabaseddlrequest = updatedatabaseddlrequest
12002 return c
12003 }
12004
12005
12006
12007
12008 func (c *ProjectsInstancesDatabasesUpdateDdlCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesUpdateDdlCall {
12009 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12010 return c
12011 }
12012
12013
12014 func (c *ProjectsInstancesDatabasesUpdateDdlCall) Context(ctx context.Context) *ProjectsInstancesDatabasesUpdateDdlCall {
12015 c.ctx_ = ctx
12016 return c
12017 }
12018
12019
12020
12021 func (c *ProjectsInstancesDatabasesUpdateDdlCall) Header() http.Header {
12022 if c.header_ == nil {
12023 c.header_ = make(http.Header)
12024 }
12025 return c.header_
12026 }
12027
12028 func (c *ProjectsInstancesDatabasesUpdateDdlCall) doRequest(alt string) (*http.Response, error) {
12029 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12030 var body io.Reader = nil
12031 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatedatabaseddlrequest)
12032 if err != nil {
12033 return nil, err
12034 }
12035 c.urlParams_.Set("alt", alt)
12036 c.urlParams_.Set("prettyPrint", "false")
12037 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/ddl")
12038 urls += "?" + c.urlParams_.Encode()
12039 req, err := http.NewRequest("PATCH", urls, body)
12040 if err != nil {
12041 return nil, err
12042 }
12043 req.Header = reqHeaders
12044 googleapi.Expand(req.URL, map[string]string{
12045 "database": c.database,
12046 })
12047 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12048 }
12049
12050
12051
12052
12053
12054
12055 func (c *ProjectsInstancesDatabasesUpdateDdlCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12056 gensupport.SetOptions(c.urlParams_, opts...)
12057 res, err := c.doRequest("json")
12058 if res != nil && res.StatusCode == http.StatusNotModified {
12059 if res.Body != nil {
12060 res.Body.Close()
12061 }
12062 return nil, gensupport.WrapError(&googleapi.Error{
12063 Code: res.StatusCode,
12064 Header: res.Header,
12065 })
12066 }
12067 if err != nil {
12068 return nil, err
12069 }
12070 defer googleapi.CloseBody(res)
12071 if err := googleapi.CheckResponse(res); err != nil {
12072 return nil, gensupport.WrapError(err)
12073 }
12074 ret := &Operation{
12075 ServerResponse: googleapi.ServerResponse{
12076 Header: res.Header,
12077 HTTPStatusCode: res.StatusCode,
12078 },
12079 }
12080 target := &ret
12081 if err := gensupport.DecodeResponse(target, res); err != nil {
12082 return nil, err
12083 }
12084 return ret, nil
12085 }
12086
12087 type ProjectsInstancesDatabasesDatabaseRolesListCall struct {
12088 s *Service
12089 parent string
12090 urlParams_ gensupport.URLParams
12091 ifNoneMatch_ string
12092 ctx_ context.Context
12093 header_ http.Header
12094 }
12095
12096
12097
12098
12099
12100 func (r *ProjectsInstancesDatabasesDatabaseRolesService) List(parent string) *ProjectsInstancesDatabasesDatabaseRolesListCall {
12101 c := &ProjectsInstancesDatabasesDatabaseRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12102 c.parent = parent
12103 return c
12104 }
12105
12106
12107
12108
12109 func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) PageSize(pageSize int64) *ProjectsInstancesDatabasesDatabaseRolesListCall {
12110 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12111 return c
12112 }
12113
12114
12115
12116
12117 func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) PageToken(pageToken string) *ProjectsInstancesDatabasesDatabaseRolesListCall {
12118 c.urlParams_.Set("pageToken", pageToken)
12119 return c
12120 }
12121
12122
12123
12124
12125 func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesDatabaseRolesListCall {
12126 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12127 return c
12128 }
12129
12130
12131
12132
12133 func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesDatabaseRolesListCall {
12134 c.ifNoneMatch_ = entityTag
12135 return c
12136 }
12137
12138
12139 func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) Context(ctx context.Context) *ProjectsInstancesDatabasesDatabaseRolesListCall {
12140 c.ctx_ = ctx
12141 return c
12142 }
12143
12144
12145
12146 func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) Header() http.Header {
12147 if c.header_ == nil {
12148 c.header_ = make(http.Header)
12149 }
12150 return c.header_
12151 }
12152
12153 func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) doRequest(alt string) (*http.Response, error) {
12154 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12155 if c.ifNoneMatch_ != "" {
12156 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12157 }
12158 var body io.Reader = nil
12159 c.urlParams_.Set("alt", alt)
12160 c.urlParams_.Set("prettyPrint", "false")
12161 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databaseRoles")
12162 urls += "?" + c.urlParams_.Encode()
12163 req, err := http.NewRequest("GET", urls, body)
12164 if err != nil {
12165 return nil, err
12166 }
12167 req.Header = reqHeaders
12168 googleapi.Expand(req.URL, map[string]string{
12169 "parent": c.parent,
12170 })
12171 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12172 }
12173
12174
12175
12176
12177
12178
12179
12180 func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) Do(opts ...googleapi.CallOption) (*ListDatabaseRolesResponse, error) {
12181 gensupport.SetOptions(c.urlParams_, opts...)
12182 res, err := c.doRequest("json")
12183 if res != nil && res.StatusCode == http.StatusNotModified {
12184 if res.Body != nil {
12185 res.Body.Close()
12186 }
12187 return nil, gensupport.WrapError(&googleapi.Error{
12188 Code: res.StatusCode,
12189 Header: res.Header,
12190 })
12191 }
12192 if err != nil {
12193 return nil, err
12194 }
12195 defer googleapi.CloseBody(res)
12196 if err := googleapi.CheckResponse(res); err != nil {
12197 return nil, gensupport.WrapError(err)
12198 }
12199 ret := &ListDatabaseRolesResponse{
12200 ServerResponse: googleapi.ServerResponse{
12201 Header: res.Header,
12202 HTTPStatusCode: res.StatusCode,
12203 },
12204 }
12205 target := &ret
12206 if err := gensupport.DecodeResponse(target, res); err != nil {
12207 return nil, err
12208 }
12209 return ret, nil
12210 }
12211
12212
12213
12214
12215 func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) Pages(ctx context.Context, f func(*ListDatabaseRolesResponse) error) error {
12216 c.ctx_ = ctx
12217 defer c.PageToken(c.urlParams_.Get("pageToken"))
12218 for {
12219 x, err := c.Do()
12220 if err != nil {
12221 return err
12222 }
12223 if err := f(x); err != nil {
12224 return err
12225 }
12226 if x.NextPageToken == "" {
12227 return nil
12228 }
12229 c.PageToken(x.NextPageToken)
12230 }
12231 }
12232
12233 type ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall struct {
12234 s *Service
12235 resource string
12236 testiampermissionsrequest *TestIamPermissionsRequest
12237 urlParams_ gensupport.URLParams
12238 ctx_ context.Context
12239 header_ http.Header
12240 }
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253 func (r *ProjectsInstancesDatabasesDatabaseRolesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall {
12254 c := &ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12255 c.resource = resource
12256 c.testiampermissionsrequest = testiampermissionsrequest
12257 return c
12258 }
12259
12260
12261
12262
12263 func (c *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall {
12264 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12265 return c
12266 }
12267
12268
12269 func (c *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall {
12270 c.ctx_ = ctx
12271 return c
12272 }
12273
12274
12275
12276 func (c *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Header() http.Header {
12277 if c.header_ == nil {
12278 c.header_ = make(http.Header)
12279 }
12280 return c.header_
12281 }
12282
12283 func (c *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
12284 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12285 var body io.Reader = nil
12286 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
12287 if err != nil {
12288 return nil, err
12289 }
12290 c.urlParams_.Set("alt", alt)
12291 c.urlParams_.Set("prettyPrint", "false")
12292 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
12293 urls += "?" + c.urlParams_.Encode()
12294 req, err := http.NewRequest("POST", urls, body)
12295 if err != nil {
12296 return nil, err
12297 }
12298 req.Header = reqHeaders
12299 googleapi.Expand(req.URL, map[string]string{
12300 "resource": c.resource,
12301 })
12302 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12303 }
12304
12305
12306
12307
12308
12309
12310
12311 func (c *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
12312 gensupport.SetOptions(c.urlParams_, opts...)
12313 res, err := c.doRequest("json")
12314 if res != nil && res.StatusCode == http.StatusNotModified {
12315 if res.Body != nil {
12316 res.Body.Close()
12317 }
12318 return nil, gensupport.WrapError(&googleapi.Error{
12319 Code: res.StatusCode,
12320 Header: res.Header,
12321 })
12322 }
12323 if err != nil {
12324 return nil, err
12325 }
12326 defer googleapi.CloseBody(res)
12327 if err := googleapi.CheckResponse(res); err != nil {
12328 return nil, gensupport.WrapError(err)
12329 }
12330 ret := &TestIamPermissionsResponse{
12331 ServerResponse: googleapi.ServerResponse{
12332 Header: res.Header,
12333 HTTPStatusCode: res.StatusCode,
12334 },
12335 }
12336 target := &ret
12337 if err := gensupport.DecodeResponse(target, res); err != nil {
12338 return nil, err
12339 }
12340 return ret, nil
12341 }
12342
12343 type ProjectsInstancesDatabasesOperationsCancelCall struct {
12344 s *Service
12345 name string
12346 urlParams_ gensupport.URLParams
12347 ctx_ context.Context
12348 header_ http.Header
12349 }
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362 func (r *ProjectsInstancesDatabasesOperationsService) Cancel(name string) *ProjectsInstancesDatabasesOperationsCancelCall {
12363 c := &ProjectsInstancesDatabasesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12364 c.name = name
12365 return c
12366 }
12367
12368
12369
12370
12371 func (c *ProjectsInstancesDatabasesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesOperationsCancelCall {
12372 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12373 return c
12374 }
12375
12376
12377 func (c *ProjectsInstancesDatabasesOperationsCancelCall) Context(ctx context.Context) *ProjectsInstancesDatabasesOperationsCancelCall {
12378 c.ctx_ = ctx
12379 return c
12380 }
12381
12382
12383
12384 func (c *ProjectsInstancesDatabasesOperationsCancelCall) Header() http.Header {
12385 if c.header_ == nil {
12386 c.header_ = make(http.Header)
12387 }
12388 return c.header_
12389 }
12390
12391 func (c *ProjectsInstancesDatabasesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
12392 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12393 var body io.Reader = nil
12394 c.urlParams_.Set("alt", alt)
12395 c.urlParams_.Set("prettyPrint", "false")
12396 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
12397 urls += "?" + c.urlParams_.Encode()
12398 req, err := http.NewRequest("POST", urls, body)
12399 if err != nil {
12400 return nil, err
12401 }
12402 req.Header = reqHeaders
12403 googleapi.Expand(req.URL, map[string]string{
12404 "name": c.name,
12405 })
12406 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12407 }
12408
12409
12410
12411
12412
12413
12414 func (c *ProjectsInstancesDatabasesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12415 gensupport.SetOptions(c.urlParams_, opts...)
12416 res, err := c.doRequest("json")
12417 if res != nil && res.StatusCode == http.StatusNotModified {
12418 if res.Body != nil {
12419 res.Body.Close()
12420 }
12421 return nil, gensupport.WrapError(&googleapi.Error{
12422 Code: res.StatusCode,
12423 Header: res.Header,
12424 })
12425 }
12426 if err != nil {
12427 return nil, err
12428 }
12429 defer googleapi.CloseBody(res)
12430 if err := googleapi.CheckResponse(res); err != nil {
12431 return nil, gensupport.WrapError(err)
12432 }
12433 ret := &Empty{
12434 ServerResponse: googleapi.ServerResponse{
12435 Header: res.Header,
12436 HTTPStatusCode: res.StatusCode,
12437 },
12438 }
12439 target := &ret
12440 if err := gensupport.DecodeResponse(target, res); err != nil {
12441 return nil, err
12442 }
12443 return ret, nil
12444 }
12445
12446 type ProjectsInstancesDatabasesOperationsDeleteCall struct {
12447 s *Service
12448 name string
12449 urlParams_ gensupport.URLParams
12450 ctx_ context.Context
12451 header_ http.Header
12452 }
12453
12454
12455
12456
12457
12458
12459
12460 func (r *ProjectsInstancesDatabasesOperationsService) Delete(name string) *ProjectsInstancesDatabasesOperationsDeleteCall {
12461 c := &ProjectsInstancesDatabasesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12462 c.name = name
12463 return c
12464 }
12465
12466
12467
12468
12469 func (c *ProjectsInstancesDatabasesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesOperationsDeleteCall {
12470 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12471 return c
12472 }
12473
12474
12475 func (c *ProjectsInstancesDatabasesOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstancesDatabasesOperationsDeleteCall {
12476 c.ctx_ = ctx
12477 return c
12478 }
12479
12480
12481
12482 func (c *ProjectsInstancesDatabasesOperationsDeleteCall) Header() http.Header {
12483 if c.header_ == nil {
12484 c.header_ = make(http.Header)
12485 }
12486 return c.header_
12487 }
12488
12489 func (c *ProjectsInstancesDatabasesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
12490 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12491 var body io.Reader = nil
12492 c.urlParams_.Set("alt", alt)
12493 c.urlParams_.Set("prettyPrint", "false")
12494 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12495 urls += "?" + c.urlParams_.Encode()
12496 req, err := http.NewRequest("DELETE", urls, body)
12497 if err != nil {
12498 return nil, err
12499 }
12500 req.Header = reqHeaders
12501 googleapi.Expand(req.URL, map[string]string{
12502 "name": c.name,
12503 })
12504 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12505 }
12506
12507
12508
12509
12510
12511
12512 func (c *ProjectsInstancesDatabasesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12513 gensupport.SetOptions(c.urlParams_, opts...)
12514 res, err := c.doRequest("json")
12515 if res != nil && res.StatusCode == http.StatusNotModified {
12516 if res.Body != nil {
12517 res.Body.Close()
12518 }
12519 return nil, gensupport.WrapError(&googleapi.Error{
12520 Code: res.StatusCode,
12521 Header: res.Header,
12522 })
12523 }
12524 if err != nil {
12525 return nil, err
12526 }
12527 defer googleapi.CloseBody(res)
12528 if err := googleapi.CheckResponse(res); err != nil {
12529 return nil, gensupport.WrapError(err)
12530 }
12531 ret := &Empty{
12532 ServerResponse: googleapi.ServerResponse{
12533 Header: res.Header,
12534 HTTPStatusCode: res.StatusCode,
12535 },
12536 }
12537 target := &ret
12538 if err := gensupport.DecodeResponse(target, res); err != nil {
12539 return nil, err
12540 }
12541 return ret, nil
12542 }
12543
12544 type ProjectsInstancesDatabasesOperationsGetCall struct {
12545 s *Service
12546 name string
12547 urlParams_ gensupport.URLParams
12548 ifNoneMatch_ string
12549 ctx_ context.Context
12550 header_ http.Header
12551 }
12552
12553
12554
12555
12556
12557
12558 func (r *ProjectsInstancesDatabasesOperationsService) Get(name string) *ProjectsInstancesDatabasesOperationsGetCall {
12559 c := &ProjectsInstancesDatabasesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12560 c.name = name
12561 return c
12562 }
12563
12564
12565
12566
12567 func (c *ProjectsInstancesDatabasesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesOperationsGetCall {
12568 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12569 return c
12570 }
12571
12572
12573
12574
12575 func (c *ProjectsInstancesDatabasesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesOperationsGetCall {
12576 c.ifNoneMatch_ = entityTag
12577 return c
12578 }
12579
12580
12581 func (c *ProjectsInstancesDatabasesOperationsGetCall) Context(ctx context.Context) *ProjectsInstancesDatabasesOperationsGetCall {
12582 c.ctx_ = ctx
12583 return c
12584 }
12585
12586
12587
12588 func (c *ProjectsInstancesDatabasesOperationsGetCall) Header() http.Header {
12589 if c.header_ == nil {
12590 c.header_ = make(http.Header)
12591 }
12592 return c.header_
12593 }
12594
12595 func (c *ProjectsInstancesDatabasesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
12596 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12597 if c.ifNoneMatch_ != "" {
12598 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12599 }
12600 var body io.Reader = nil
12601 c.urlParams_.Set("alt", alt)
12602 c.urlParams_.Set("prettyPrint", "false")
12603 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12604 urls += "?" + c.urlParams_.Encode()
12605 req, err := http.NewRequest("GET", urls, body)
12606 if err != nil {
12607 return nil, err
12608 }
12609 req.Header = reqHeaders
12610 googleapi.Expand(req.URL, map[string]string{
12611 "name": c.name,
12612 })
12613 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12614 }
12615
12616
12617
12618
12619
12620
12621 func (c *ProjectsInstancesDatabasesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12622 gensupport.SetOptions(c.urlParams_, opts...)
12623 res, err := c.doRequest("json")
12624 if res != nil && res.StatusCode == http.StatusNotModified {
12625 if res.Body != nil {
12626 res.Body.Close()
12627 }
12628 return nil, gensupport.WrapError(&googleapi.Error{
12629 Code: res.StatusCode,
12630 Header: res.Header,
12631 })
12632 }
12633 if err != nil {
12634 return nil, err
12635 }
12636 defer googleapi.CloseBody(res)
12637 if err := googleapi.CheckResponse(res); err != nil {
12638 return nil, gensupport.WrapError(err)
12639 }
12640 ret := &Operation{
12641 ServerResponse: googleapi.ServerResponse{
12642 Header: res.Header,
12643 HTTPStatusCode: res.StatusCode,
12644 },
12645 }
12646 target := &ret
12647 if err := gensupport.DecodeResponse(target, res); err != nil {
12648 return nil, err
12649 }
12650 return ret, nil
12651 }
12652
12653 type ProjectsInstancesDatabasesOperationsListCall struct {
12654 s *Service
12655 name string
12656 urlParams_ gensupport.URLParams
12657 ifNoneMatch_ string
12658 ctx_ context.Context
12659 header_ http.Header
12660 }
12661
12662
12663
12664
12665
12666 func (r *ProjectsInstancesDatabasesOperationsService) List(name string) *ProjectsInstancesDatabasesOperationsListCall {
12667 c := &ProjectsInstancesDatabasesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12668 c.name = name
12669 return c
12670 }
12671
12672
12673 func (c *ProjectsInstancesDatabasesOperationsListCall) Filter(filter string) *ProjectsInstancesDatabasesOperationsListCall {
12674 c.urlParams_.Set("filter", filter)
12675 return c
12676 }
12677
12678
12679
12680 func (c *ProjectsInstancesDatabasesOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesDatabasesOperationsListCall {
12681 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12682 return c
12683 }
12684
12685
12686
12687 func (c *ProjectsInstancesDatabasesOperationsListCall) PageToken(pageToken string) *ProjectsInstancesDatabasesOperationsListCall {
12688 c.urlParams_.Set("pageToken", pageToken)
12689 return c
12690 }
12691
12692
12693
12694
12695 func (c *ProjectsInstancesDatabasesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesOperationsListCall {
12696 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12697 return c
12698 }
12699
12700
12701
12702
12703 func (c *ProjectsInstancesDatabasesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesOperationsListCall {
12704 c.ifNoneMatch_ = entityTag
12705 return c
12706 }
12707
12708
12709 func (c *ProjectsInstancesDatabasesOperationsListCall) Context(ctx context.Context) *ProjectsInstancesDatabasesOperationsListCall {
12710 c.ctx_ = ctx
12711 return c
12712 }
12713
12714
12715
12716 func (c *ProjectsInstancesDatabasesOperationsListCall) Header() http.Header {
12717 if c.header_ == nil {
12718 c.header_ = make(http.Header)
12719 }
12720 return c.header_
12721 }
12722
12723 func (c *ProjectsInstancesDatabasesOperationsListCall) doRequest(alt string) (*http.Response, error) {
12724 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12725 if c.ifNoneMatch_ != "" {
12726 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12727 }
12728 var body io.Reader = nil
12729 c.urlParams_.Set("alt", alt)
12730 c.urlParams_.Set("prettyPrint", "false")
12731 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12732 urls += "?" + c.urlParams_.Encode()
12733 req, err := http.NewRequest("GET", urls, body)
12734 if err != nil {
12735 return nil, err
12736 }
12737 req.Header = reqHeaders
12738 googleapi.Expand(req.URL, map[string]string{
12739 "name": c.name,
12740 })
12741 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12742 }
12743
12744
12745
12746
12747
12748
12749
12750 func (c *ProjectsInstancesDatabasesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
12751 gensupport.SetOptions(c.urlParams_, opts...)
12752 res, err := c.doRequest("json")
12753 if res != nil && res.StatusCode == http.StatusNotModified {
12754 if res.Body != nil {
12755 res.Body.Close()
12756 }
12757 return nil, gensupport.WrapError(&googleapi.Error{
12758 Code: res.StatusCode,
12759 Header: res.Header,
12760 })
12761 }
12762 if err != nil {
12763 return nil, err
12764 }
12765 defer googleapi.CloseBody(res)
12766 if err := googleapi.CheckResponse(res); err != nil {
12767 return nil, gensupport.WrapError(err)
12768 }
12769 ret := &ListOperationsResponse{
12770 ServerResponse: googleapi.ServerResponse{
12771 Header: res.Header,
12772 HTTPStatusCode: res.StatusCode,
12773 },
12774 }
12775 target := &ret
12776 if err := gensupport.DecodeResponse(target, res); err != nil {
12777 return nil, err
12778 }
12779 return ret, nil
12780 }
12781
12782
12783
12784
12785 func (c *ProjectsInstancesDatabasesOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
12786 c.ctx_ = ctx
12787 defer c.PageToken(c.urlParams_.Get("pageToken"))
12788 for {
12789 x, err := c.Do()
12790 if err != nil {
12791 return err
12792 }
12793 if err := f(x); err != nil {
12794 return err
12795 }
12796 if x.NextPageToken == "" {
12797 return nil
12798 }
12799 c.PageToken(x.NextPageToken)
12800 }
12801 }
12802
12803 type ProjectsInstancesDatabasesSessionsBatchCreateCall struct {
12804 s *Service
12805 database string
12806 batchcreatesessionsrequest *BatchCreateSessionsRequest
12807 urlParams_ gensupport.URLParams
12808 ctx_ context.Context
12809 header_ http.Header
12810 }
12811
12812
12813
12814
12815
12816
12817 func (r *ProjectsInstancesDatabasesSessionsService) BatchCreate(database string, batchcreatesessionsrequest *BatchCreateSessionsRequest) *ProjectsInstancesDatabasesSessionsBatchCreateCall {
12818 c := &ProjectsInstancesDatabasesSessionsBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12819 c.database = database
12820 c.batchcreatesessionsrequest = batchcreatesessionsrequest
12821 return c
12822 }
12823
12824
12825
12826
12827 func (c *ProjectsInstancesDatabasesSessionsBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsBatchCreateCall {
12828 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12829 return c
12830 }
12831
12832
12833 func (c *ProjectsInstancesDatabasesSessionsBatchCreateCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsBatchCreateCall {
12834 c.ctx_ = ctx
12835 return c
12836 }
12837
12838
12839
12840 func (c *ProjectsInstancesDatabasesSessionsBatchCreateCall) Header() http.Header {
12841 if c.header_ == nil {
12842 c.header_ = make(http.Header)
12843 }
12844 return c.header_
12845 }
12846
12847 func (c *ProjectsInstancesDatabasesSessionsBatchCreateCall) doRequest(alt string) (*http.Response, error) {
12848 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12849 var body io.Reader = nil
12850 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreatesessionsrequest)
12851 if err != nil {
12852 return nil, err
12853 }
12854 c.urlParams_.Set("alt", alt)
12855 c.urlParams_.Set("prettyPrint", "false")
12856 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/sessions:batchCreate")
12857 urls += "?" + c.urlParams_.Encode()
12858 req, err := http.NewRequest("POST", urls, body)
12859 if err != nil {
12860 return nil, err
12861 }
12862 req.Header = reqHeaders
12863 googleapi.Expand(req.URL, map[string]string{
12864 "database": c.database,
12865 })
12866 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12867 }
12868
12869
12870
12871
12872
12873
12874
12875 func (c *ProjectsInstancesDatabasesSessionsBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreateSessionsResponse, error) {
12876 gensupport.SetOptions(c.urlParams_, opts...)
12877 res, err := c.doRequest("json")
12878 if res != nil && res.StatusCode == http.StatusNotModified {
12879 if res.Body != nil {
12880 res.Body.Close()
12881 }
12882 return nil, gensupport.WrapError(&googleapi.Error{
12883 Code: res.StatusCode,
12884 Header: res.Header,
12885 })
12886 }
12887 if err != nil {
12888 return nil, err
12889 }
12890 defer googleapi.CloseBody(res)
12891 if err := googleapi.CheckResponse(res); err != nil {
12892 return nil, gensupport.WrapError(err)
12893 }
12894 ret := &BatchCreateSessionsResponse{
12895 ServerResponse: googleapi.ServerResponse{
12896 Header: res.Header,
12897 HTTPStatusCode: res.StatusCode,
12898 },
12899 }
12900 target := &ret
12901 if err := gensupport.DecodeResponse(target, res); err != nil {
12902 return nil, err
12903 }
12904 return ret, nil
12905 }
12906
12907 type ProjectsInstancesDatabasesSessionsBatchWriteCall struct {
12908 s *Service
12909 session string
12910 batchwriterequest *BatchWriteRequest
12911 urlParams_ gensupport.URLParams
12912 ctx_ context.Context
12913 header_ http.Header
12914 }
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931 func (r *ProjectsInstancesDatabasesSessionsService) BatchWrite(session string, batchwriterequest *BatchWriteRequest) *ProjectsInstancesDatabasesSessionsBatchWriteCall {
12932 c := &ProjectsInstancesDatabasesSessionsBatchWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12933 c.session = session
12934 c.batchwriterequest = batchwriterequest
12935 return c
12936 }
12937
12938
12939
12940
12941 func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsBatchWriteCall {
12942 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12943 return c
12944 }
12945
12946
12947 func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsBatchWriteCall {
12948 c.ctx_ = ctx
12949 return c
12950 }
12951
12952
12953
12954 func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Header() http.Header {
12955 if c.header_ == nil {
12956 c.header_ = make(http.Header)
12957 }
12958 return c.header_
12959 }
12960
12961 func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) doRequest(alt string) (*http.Response, error) {
12962 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12963 var body io.Reader = nil
12964 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchwriterequest)
12965 if err != nil {
12966 return nil, err
12967 }
12968 c.urlParams_.Set("alt", alt)
12969 c.urlParams_.Set("prettyPrint", "false")
12970 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:batchWrite")
12971 urls += "?" + c.urlParams_.Encode()
12972 req, err := http.NewRequest("POST", urls, body)
12973 if err != nil {
12974 return nil, err
12975 }
12976 req.Header = reqHeaders
12977 googleapi.Expand(req.URL, map[string]string{
12978 "session": c.session,
12979 })
12980 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12981 }
12982
12983
12984
12985
12986
12987
12988
12989 func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Do(opts ...googleapi.CallOption) (*BatchWriteResponse, error) {
12990 gensupport.SetOptions(c.urlParams_, opts...)
12991 res, err := c.doRequest("json")
12992 if res != nil && res.StatusCode == http.StatusNotModified {
12993 if res.Body != nil {
12994 res.Body.Close()
12995 }
12996 return nil, gensupport.WrapError(&googleapi.Error{
12997 Code: res.StatusCode,
12998 Header: res.Header,
12999 })
13000 }
13001 if err != nil {
13002 return nil, err
13003 }
13004 defer googleapi.CloseBody(res)
13005 if err := googleapi.CheckResponse(res); err != nil {
13006 return nil, gensupport.WrapError(err)
13007 }
13008 ret := &BatchWriteResponse{
13009 ServerResponse: googleapi.ServerResponse{
13010 Header: res.Header,
13011 HTTPStatusCode: res.StatusCode,
13012 },
13013 }
13014 target := &ret
13015 if err := gensupport.DecodeResponse(target, res); err != nil {
13016 return nil, err
13017 }
13018 return ret, nil
13019 }
13020
13021 type ProjectsInstancesDatabasesSessionsBeginTransactionCall struct {
13022 s *Service
13023 session string
13024 begintransactionrequest *BeginTransactionRequest
13025 urlParams_ gensupport.URLParams
13026 ctx_ context.Context
13027 header_ http.Header
13028 }
13029
13030
13031
13032
13033
13034 func (r *ProjectsInstancesDatabasesSessionsService) BeginTransaction(session string, begintransactionrequest *BeginTransactionRequest) *ProjectsInstancesDatabasesSessionsBeginTransactionCall {
13035 c := &ProjectsInstancesDatabasesSessionsBeginTransactionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13036 c.session = session
13037 c.begintransactionrequest = begintransactionrequest
13038 return c
13039 }
13040
13041
13042
13043
13044 func (c *ProjectsInstancesDatabasesSessionsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsBeginTransactionCall {
13045 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13046 return c
13047 }
13048
13049
13050 func (c *ProjectsInstancesDatabasesSessionsBeginTransactionCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsBeginTransactionCall {
13051 c.ctx_ = ctx
13052 return c
13053 }
13054
13055
13056
13057 func (c *ProjectsInstancesDatabasesSessionsBeginTransactionCall) Header() http.Header {
13058 if c.header_ == nil {
13059 c.header_ = make(http.Header)
13060 }
13061 return c.header_
13062 }
13063
13064 func (c *ProjectsInstancesDatabasesSessionsBeginTransactionCall) doRequest(alt string) (*http.Response, error) {
13065 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13066 var body io.Reader = nil
13067 body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest)
13068 if err != nil {
13069 return nil, err
13070 }
13071 c.urlParams_.Set("alt", alt)
13072 c.urlParams_.Set("prettyPrint", "false")
13073 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:beginTransaction")
13074 urls += "?" + c.urlParams_.Encode()
13075 req, err := http.NewRequest("POST", urls, body)
13076 if err != nil {
13077 return nil, err
13078 }
13079 req.Header = reqHeaders
13080 googleapi.Expand(req.URL, map[string]string{
13081 "session": c.session,
13082 })
13083 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13084 }
13085
13086
13087
13088
13089
13090
13091 func (c *ProjectsInstancesDatabasesSessionsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*Transaction, error) {
13092 gensupport.SetOptions(c.urlParams_, opts...)
13093 res, err := c.doRequest("json")
13094 if res != nil && res.StatusCode == http.StatusNotModified {
13095 if res.Body != nil {
13096 res.Body.Close()
13097 }
13098 return nil, gensupport.WrapError(&googleapi.Error{
13099 Code: res.StatusCode,
13100 Header: res.Header,
13101 })
13102 }
13103 if err != nil {
13104 return nil, err
13105 }
13106 defer googleapi.CloseBody(res)
13107 if err := googleapi.CheckResponse(res); err != nil {
13108 return nil, gensupport.WrapError(err)
13109 }
13110 ret := &Transaction{
13111 ServerResponse: googleapi.ServerResponse{
13112 Header: res.Header,
13113 HTTPStatusCode: res.StatusCode,
13114 },
13115 }
13116 target := &ret
13117 if err := gensupport.DecodeResponse(target, res); err != nil {
13118 return nil, err
13119 }
13120 return ret, nil
13121 }
13122
13123 type ProjectsInstancesDatabasesSessionsCommitCall struct {
13124 s *Service
13125 session string
13126 commitrequest *CommitRequest
13127 urlParams_ gensupport.URLParams
13128 ctx_ context.Context
13129 header_ http.Header
13130 }
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144 func (r *ProjectsInstancesDatabasesSessionsService) Commit(session string, commitrequest *CommitRequest) *ProjectsInstancesDatabasesSessionsCommitCall {
13145 c := &ProjectsInstancesDatabasesSessionsCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13146 c.session = session
13147 c.commitrequest = commitrequest
13148 return c
13149 }
13150
13151
13152
13153
13154 func (c *ProjectsInstancesDatabasesSessionsCommitCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsCommitCall {
13155 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13156 return c
13157 }
13158
13159
13160 func (c *ProjectsInstancesDatabasesSessionsCommitCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsCommitCall {
13161 c.ctx_ = ctx
13162 return c
13163 }
13164
13165
13166
13167 func (c *ProjectsInstancesDatabasesSessionsCommitCall) Header() http.Header {
13168 if c.header_ == nil {
13169 c.header_ = make(http.Header)
13170 }
13171 return c.header_
13172 }
13173
13174 func (c *ProjectsInstancesDatabasesSessionsCommitCall) doRequest(alt string) (*http.Response, error) {
13175 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13176 var body io.Reader = nil
13177 body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest)
13178 if err != nil {
13179 return nil, err
13180 }
13181 c.urlParams_.Set("alt", alt)
13182 c.urlParams_.Set("prettyPrint", "false")
13183 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:commit")
13184 urls += "?" + c.urlParams_.Encode()
13185 req, err := http.NewRequest("POST", urls, body)
13186 if err != nil {
13187 return nil, err
13188 }
13189 req.Header = reqHeaders
13190 googleapi.Expand(req.URL, map[string]string{
13191 "session": c.session,
13192 })
13193 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13194 }
13195
13196
13197
13198
13199
13200
13201 func (c *ProjectsInstancesDatabasesSessionsCommitCall) Do(opts ...googleapi.CallOption) (*CommitResponse, error) {
13202 gensupport.SetOptions(c.urlParams_, opts...)
13203 res, err := c.doRequest("json")
13204 if res != nil && res.StatusCode == http.StatusNotModified {
13205 if res.Body != nil {
13206 res.Body.Close()
13207 }
13208 return nil, gensupport.WrapError(&googleapi.Error{
13209 Code: res.StatusCode,
13210 Header: res.Header,
13211 })
13212 }
13213 if err != nil {
13214 return nil, err
13215 }
13216 defer googleapi.CloseBody(res)
13217 if err := googleapi.CheckResponse(res); err != nil {
13218 return nil, gensupport.WrapError(err)
13219 }
13220 ret := &CommitResponse{
13221 ServerResponse: googleapi.ServerResponse{
13222 Header: res.Header,
13223 HTTPStatusCode: res.StatusCode,
13224 },
13225 }
13226 target := &ret
13227 if err := gensupport.DecodeResponse(target, res); err != nil {
13228 return nil, err
13229 }
13230 return ret, nil
13231 }
13232
13233 type ProjectsInstancesDatabasesSessionsCreateCall struct {
13234 s *Service
13235 database string
13236 createsessionrequest *CreateSessionRequest
13237 urlParams_ gensupport.URLParams
13238 ctx_ context.Context
13239 header_ http.Header
13240 }
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256 func (r *ProjectsInstancesDatabasesSessionsService) Create(database string, createsessionrequest *CreateSessionRequest) *ProjectsInstancesDatabasesSessionsCreateCall {
13257 c := &ProjectsInstancesDatabasesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13258 c.database = database
13259 c.createsessionrequest = createsessionrequest
13260 return c
13261 }
13262
13263
13264
13265
13266 func (c *ProjectsInstancesDatabasesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsCreateCall {
13267 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13268 return c
13269 }
13270
13271
13272 func (c *ProjectsInstancesDatabasesSessionsCreateCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsCreateCall {
13273 c.ctx_ = ctx
13274 return c
13275 }
13276
13277
13278
13279 func (c *ProjectsInstancesDatabasesSessionsCreateCall) Header() http.Header {
13280 if c.header_ == nil {
13281 c.header_ = make(http.Header)
13282 }
13283 return c.header_
13284 }
13285
13286 func (c *ProjectsInstancesDatabasesSessionsCreateCall) doRequest(alt string) (*http.Response, error) {
13287 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13288 var body io.Reader = nil
13289 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createsessionrequest)
13290 if err != nil {
13291 return nil, err
13292 }
13293 c.urlParams_.Set("alt", alt)
13294 c.urlParams_.Set("prettyPrint", "false")
13295 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/sessions")
13296 urls += "?" + c.urlParams_.Encode()
13297 req, err := http.NewRequest("POST", urls, body)
13298 if err != nil {
13299 return nil, err
13300 }
13301 req.Header = reqHeaders
13302 googleapi.Expand(req.URL, map[string]string{
13303 "database": c.database,
13304 })
13305 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13306 }
13307
13308
13309
13310
13311
13312
13313 func (c *ProjectsInstancesDatabasesSessionsCreateCall) Do(opts ...googleapi.CallOption) (*Session, error) {
13314 gensupport.SetOptions(c.urlParams_, opts...)
13315 res, err := c.doRequest("json")
13316 if res != nil && res.StatusCode == http.StatusNotModified {
13317 if res.Body != nil {
13318 res.Body.Close()
13319 }
13320 return nil, gensupport.WrapError(&googleapi.Error{
13321 Code: res.StatusCode,
13322 Header: res.Header,
13323 })
13324 }
13325 if err != nil {
13326 return nil, err
13327 }
13328 defer googleapi.CloseBody(res)
13329 if err := googleapi.CheckResponse(res); err != nil {
13330 return nil, gensupport.WrapError(err)
13331 }
13332 ret := &Session{
13333 ServerResponse: googleapi.ServerResponse{
13334 Header: res.Header,
13335 HTTPStatusCode: res.StatusCode,
13336 },
13337 }
13338 target := &ret
13339 if err := gensupport.DecodeResponse(target, res); err != nil {
13340 return nil, err
13341 }
13342 return ret, nil
13343 }
13344
13345 type ProjectsInstancesDatabasesSessionsDeleteCall struct {
13346 s *Service
13347 name string
13348 urlParams_ gensupport.URLParams
13349 ctx_ context.Context
13350 header_ http.Header
13351 }
13352
13353
13354
13355
13356
13357
13358 func (r *ProjectsInstancesDatabasesSessionsService) Delete(name string) *ProjectsInstancesDatabasesSessionsDeleteCall {
13359 c := &ProjectsInstancesDatabasesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13360 c.name = name
13361 return c
13362 }
13363
13364
13365
13366
13367 func (c *ProjectsInstancesDatabasesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsDeleteCall {
13368 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13369 return c
13370 }
13371
13372
13373 func (c *ProjectsInstancesDatabasesSessionsDeleteCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsDeleteCall {
13374 c.ctx_ = ctx
13375 return c
13376 }
13377
13378
13379
13380 func (c *ProjectsInstancesDatabasesSessionsDeleteCall) Header() http.Header {
13381 if c.header_ == nil {
13382 c.header_ = make(http.Header)
13383 }
13384 return c.header_
13385 }
13386
13387 func (c *ProjectsInstancesDatabasesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) {
13388 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13389 var body io.Reader = nil
13390 c.urlParams_.Set("alt", alt)
13391 c.urlParams_.Set("prettyPrint", "false")
13392 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13393 urls += "?" + c.urlParams_.Encode()
13394 req, err := http.NewRequest("DELETE", urls, body)
13395 if err != nil {
13396 return nil, err
13397 }
13398 req.Header = reqHeaders
13399 googleapi.Expand(req.URL, map[string]string{
13400 "name": c.name,
13401 })
13402 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13403 }
13404
13405
13406
13407
13408
13409
13410 func (c *ProjectsInstancesDatabasesSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
13411 gensupport.SetOptions(c.urlParams_, opts...)
13412 res, err := c.doRequest("json")
13413 if res != nil && res.StatusCode == http.StatusNotModified {
13414 if res.Body != nil {
13415 res.Body.Close()
13416 }
13417 return nil, gensupport.WrapError(&googleapi.Error{
13418 Code: res.StatusCode,
13419 Header: res.Header,
13420 })
13421 }
13422 if err != nil {
13423 return nil, err
13424 }
13425 defer googleapi.CloseBody(res)
13426 if err := googleapi.CheckResponse(res); err != nil {
13427 return nil, gensupport.WrapError(err)
13428 }
13429 ret := &Empty{
13430 ServerResponse: googleapi.ServerResponse{
13431 Header: res.Header,
13432 HTTPStatusCode: res.StatusCode,
13433 },
13434 }
13435 target := &ret
13436 if err := gensupport.DecodeResponse(target, res); err != nil {
13437 return nil, err
13438 }
13439 return ret, nil
13440 }
13441
13442 type ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall struct {
13443 s *Service
13444 session string
13445 executebatchdmlrequest *ExecuteBatchDmlRequest
13446 urlParams_ gensupport.URLParams
13447 ctx_ context.Context
13448 header_ http.Header
13449 }
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461 func (r *ProjectsInstancesDatabasesSessionsService) ExecuteBatchDml(session string, executebatchdmlrequest *ExecuteBatchDmlRequest) *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall {
13462 c := &ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13463 c.session = session
13464 c.executebatchdmlrequest = executebatchdmlrequest
13465 return c
13466 }
13467
13468
13469
13470
13471 func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall {
13472 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13473 return c
13474 }
13475
13476
13477 func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall {
13478 c.ctx_ = ctx
13479 return c
13480 }
13481
13482
13483
13484 func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Header() http.Header {
13485 if c.header_ == nil {
13486 c.header_ = make(http.Header)
13487 }
13488 return c.header_
13489 }
13490
13491 func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) doRequest(alt string) (*http.Response, error) {
13492 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13493 var body io.Reader = nil
13494 body, err := googleapi.WithoutDataWrapper.JSONReader(c.executebatchdmlrequest)
13495 if err != nil {
13496 return nil, err
13497 }
13498 c.urlParams_.Set("alt", alt)
13499 c.urlParams_.Set("prettyPrint", "false")
13500 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:executeBatchDml")
13501 urls += "?" + c.urlParams_.Encode()
13502 req, err := http.NewRequest("POST", urls, body)
13503 if err != nil {
13504 return nil, err
13505 }
13506 req.Header = reqHeaders
13507 googleapi.Expand(req.URL, map[string]string{
13508 "session": c.session,
13509 })
13510 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13511 }
13512
13513
13514
13515
13516
13517
13518
13519 func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Do(opts ...googleapi.CallOption) (*ExecuteBatchDmlResponse, error) {
13520 gensupport.SetOptions(c.urlParams_, opts...)
13521 res, err := c.doRequest("json")
13522 if res != nil && res.StatusCode == http.StatusNotModified {
13523 if res.Body != nil {
13524 res.Body.Close()
13525 }
13526 return nil, gensupport.WrapError(&googleapi.Error{
13527 Code: res.StatusCode,
13528 Header: res.Header,
13529 })
13530 }
13531 if err != nil {
13532 return nil, err
13533 }
13534 defer googleapi.CloseBody(res)
13535 if err := googleapi.CheckResponse(res); err != nil {
13536 return nil, gensupport.WrapError(err)
13537 }
13538 ret := &ExecuteBatchDmlResponse{
13539 ServerResponse: googleapi.ServerResponse{
13540 Header: res.Header,
13541 HTTPStatusCode: res.StatusCode,
13542 },
13543 }
13544 target := &ret
13545 if err := gensupport.DecodeResponse(target, res); err != nil {
13546 return nil, err
13547 }
13548 return ret, nil
13549 }
13550
13551 type ProjectsInstancesDatabasesSessionsExecuteSqlCall struct {
13552 s *Service
13553 session string
13554 executesqlrequest *ExecuteSqlRequest
13555 urlParams_ gensupport.URLParams
13556 ctx_ context.Context
13557 header_ http.Header
13558 }
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570 func (r *ProjectsInstancesDatabasesSessionsService) ExecuteSql(session string, executesqlrequest *ExecuteSqlRequest) *ProjectsInstancesDatabasesSessionsExecuteSqlCall {
13571 c := &ProjectsInstancesDatabasesSessionsExecuteSqlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13572 c.session = session
13573 c.executesqlrequest = executesqlrequest
13574 return c
13575 }
13576
13577
13578
13579
13580 func (c *ProjectsInstancesDatabasesSessionsExecuteSqlCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsExecuteSqlCall {
13581 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13582 return c
13583 }
13584
13585
13586 func (c *ProjectsInstancesDatabasesSessionsExecuteSqlCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsExecuteSqlCall {
13587 c.ctx_ = ctx
13588 return c
13589 }
13590
13591
13592
13593 func (c *ProjectsInstancesDatabasesSessionsExecuteSqlCall) Header() http.Header {
13594 if c.header_ == nil {
13595 c.header_ = make(http.Header)
13596 }
13597 return c.header_
13598 }
13599
13600 func (c *ProjectsInstancesDatabasesSessionsExecuteSqlCall) doRequest(alt string) (*http.Response, error) {
13601 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13602 var body io.Reader = nil
13603 body, err := googleapi.WithoutDataWrapper.JSONReader(c.executesqlrequest)
13604 if err != nil {
13605 return nil, err
13606 }
13607 c.urlParams_.Set("alt", alt)
13608 c.urlParams_.Set("prettyPrint", "false")
13609 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:executeSql")
13610 urls += "?" + c.urlParams_.Encode()
13611 req, err := http.NewRequest("POST", urls, body)
13612 if err != nil {
13613 return nil, err
13614 }
13615 req.Header = reqHeaders
13616 googleapi.Expand(req.URL, map[string]string{
13617 "session": c.session,
13618 })
13619 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13620 }
13621
13622
13623
13624
13625
13626
13627 func (c *ProjectsInstancesDatabasesSessionsExecuteSqlCall) Do(opts ...googleapi.CallOption) (*ResultSet, error) {
13628 gensupport.SetOptions(c.urlParams_, opts...)
13629 res, err := c.doRequest("json")
13630 if res != nil && res.StatusCode == http.StatusNotModified {
13631 if res.Body != nil {
13632 res.Body.Close()
13633 }
13634 return nil, gensupport.WrapError(&googleapi.Error{
13635 Code: res.StatusCode,
13636 Header: res.Header,
13637 })
13638 }
13639 if err != nil {
13640 return nil, err
13641 }
13642 defer googleapi.CloseBody(res)
13643 if err := googleapi.CheckResponse(res); err != nil {
13644 return nil, gensupport.WrapError(err)
13645 }
13646 ret := &ResultSet{
13647 ServerResponse: googleapi.ServerResponse{
13648 Header: res.Header,
13649 HTTPStatusCode: res.StatusCode,
13650 },
13651 }
13652 target := &ret
13653 if err := gensupport.DecodeResponse(target, res); err != nil {
13654 return nil, err
13655 }
13656 return ret, nil
13657 }
13658
13659 type ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall struct {
13660 s *Service
13661 session string
13662 executesqlrequest *ExecuteSqlRequest
13663 urlParams_ gensupport.URLParams
13664 ctx_ context.Context
13665 header_ http.Header
13666 }
13667
13668
13669
13670
13671
13672
13673
13674 func (r *ProjectsInstancesDatabasesSessionsService) ExecuteStreamingSql(session string, executesqlrequest *ExecuteSqlRequest) *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall {
13675 c := &ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13676 c.session = session
13677 c.executesqlrequest = executesqlrequest
13678 return c
13679 }
13680
13681
13682
13683
13684 func (c *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall {
13685 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13686 return c
13687 }
13688
13689
13690 func (c *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall {
13691 c.ctx_ = ctx
13692 return c
13693 }
13694
13695
13696
13697 func (c *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall) Header() http.Header {
13698 if c.header_ == nil {
13699 c.header_ = make(http.Header)
13700 }
13701 return c.header_
13702 }
13703
13704 func (c *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall) doRequest(alt string) (*http.Response, error) {
13705 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13706 var body io.Reader = nil
13707 body, err := googleapi.WithoutDataWrapper.JSONReader(c.executesqlrequest)
13708 if err != nil {
13709 return nil, err
13710 }
13711 c.urlParams_.Set("alt", alt)
13712 c.urlParams_.Set("prettyPrint", "false")
13713 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:executeStreamingSql")
13714 urls += "?" + c.urlParams_.Encode()
13715 req, err := http.NewRequest("POST", urls, body)
13716 if err != nil {
13717 return nil, err
13718 }
13719 req.Header = reqHeaders
13720 googleapi.Expand(req.URL, map[string]string{
13721 "session": c.session,
13722 })
13723 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13724 }
13725
13726
13727
13728
13729
13730
13731
13732 func (c *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall) Do(opts ...googleapi.CallOption) (*PartialResultSet, error) {
13733 gensupport.SetOptions(c.urlParams_, opts...)
13734 res, err := c.doRequest("json")
13735 if res != nil && res.StatusCode == http.StatusNotModified {
13736 if res.Body != nil {
13737 res.Body.Close()
13738 }
13739 return nil, gensupport.WrapError(&googleapi.Error{
13740 Code: res.StatusCode,
13741 Header: res.Header,
13742 })
13743 }
13744 if err != nil {
13745 return nil, err
13746 }
13747 defer googleapi.CloseBody(res)
13748 if err := googleapi.CheckResponse(res); err != nil {
13749 return nil, gensupport.WrapError(err)
13750 }
13751 ret := &PartialResultSet{
13752 ServerResponse: googleapi.ServerResponse{
13753 Header: res.Header,
13754 HTTPStatusCode: res.StatusCode,
13755 },
13756 }
13757 target := &ret
13758 if err := gensupport.DecodeResponse(target, res); err != nil {
13759 return nil, err
13760 }
13761 return ret, nil
13762 }
13763
13764 type ProjectsInstancesDatabasesSessionsGetCall struct {
13765 s *Service
13766 name string
13767 urlParams_ gensupport.URLParams
13768 ifNoneMatch_ string
13769 ctx_ context.Context
13770 header_ http.Header
13771 }
13772
13773
13774
13775
13776
13777 func (r *ProjectsInstancesDatabasesSessionsService) Get(name string) *ProjectsInstancesDatabasesSessionsGetCall {
13778 c := &ProjectsInstancesDatabasesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13779 c.name = name
13780 return c
13781 }
13782
13783
13784
13785
13786 func (c *ProjectsInstancesDatabasesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsGetCall {
13787 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13788 return c
13789 }
13790
13791
13792
13793
13794 func (c *ProjectsInstancesDatabasesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesSessionsGetCall {
13795 c.ifNoneMatch_ = entityTag
13796 return c
13797 }
13798
13799
13800 func (c *ProjectsInstancesDatabasesSessionsGetCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsGetCall {
13801 c.ctx_ = ctx
13802 return c
13803 }
13804
13805
13806
13807 func (c *ProjectsInstancesDatabasesSessionsGetCall) Header() http.Header {
13808 if c.header_ == nil {
13809 c.header_ = make(http.Header)
13810 }
13811 return c.header_
13812 }
13813
13814 func (c *ProjectsInstancesDatabasesSessionsGetCall) doRequest(alt string) (*http.Response, error) {
13815 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13816 if c.ifNoneMatch_ != "" {
13817 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13818 }
13819 var body io.Reader = nil
13820 c.urlParams_.Set("alt", alt)
13821 c.urlParams_.Set("prettyPrint", "false")
13822 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13823 urls += "?" + c.urlParams_.Encode()
13824 req, err := http.NewRequest("GET", urls, body)
13825 if err != nil {
13826 return nil, err
13827 }
13828 req.Header = reqHeaders
13829 googleapi.Expand(req.URL, map[string]string{
13830 "name": c.name,
13831 })
13832 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13833 }
13834
13835
13836
13837
13838
13839
13840 func (c *ProjectsInstancesDatabasesSessionsGetCall) Do(opts ...googleapi.CallOption) (*Session, error) {
13841 gensupport.SetOptions(c.urlParams_, opts...)
13842 res, err := c.doRequest("json")
13843 if res != nil && res.StatusCode == http.StatusNotModified {
13844 if res.Body != nil {
13845 res.Body.Close()
13846 }
13847 return nil, gensupport.WrapError(&googleapi.Error{
13848 Code: res.StatusCode,
13849 Header: res.Header,
13850 })
13851 }
13852 if err != nil {
13853 return nil, err
13854 }
13855 defer googleapi.CloseBody(res)
13856 if err := googleapi.CheckResponse(res); err != nil {
13857 return nil, gensupport.WrapError(err)
13858 }
13859 ret := &Session{
13860 ServerResponse: googleapi.ServerResponse{
13861 Header: res.Header,
13862 HTTPStatusCode: res.StatusCode,
13863 },
13864 }
13865 target := &ret
13866 if err := gensupport.DecodeResponse(target, res); err != nil {
13867 return nil, err
13868 }
13869 return ret, nil
13870 }
13871
13872 type ProjectsInstancesDatabasesSessionsListCall struct {
13873 s *Service
13874 database string
13875 urlParams_ gensupport.URLParams
13876 ifNoneMatch_ string
13877 ctx_ context.Context
13878 header_ http.Header
13879 }
13880
13881
13882
13883
13884 func (r *ProjectsInstancesDatabasesSessionsService) List(database string) *ProjectsInstancesDatabasesSessionsListCall {
13885 c := &ProjectsInstancesDatabasesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13886 c.database = database
13887 return c
13888 }
13889
13890
13891
13892
13893
13894
13895
13896 func (c *ProjectsInstancesDatabasesSessionsListCall) Filter(filter string) *ProjectsInstancesDatabasesSessionsListCall {
13897 c.urlParams_.Set("filter", filter)
13898 return c
13899 }
13900
13901
13902
13903
13904 func (c *ProjectsInstancesDatabasesSessionsListCall) PageSize(pageSize int64) *ProjectsInstancesDatabasesSessionsListCall {
13905 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13906 return c
13907 }
13908
13909
13910
13911
13912 func (c *ProjectsInstancesDatabasesSessionsListCall) PageToken(pageToken string) *ProjectsInstancesDatabasesSessionsListCall {
13913 c.urlParams_.Set("pageToken", pageToken)
13914 return c
13915 }
13916
13917
13918
13919
13920 func (c *ProjectsInstancesDatabasesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsListCall {
13921 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13922 return c
13923 }
13924
13925
13926
13927
13928 func (c *ProjectsInstancesDatabasesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesSessionsListCall {
13929 c.ifNoneMatch_ = entityTag
13930 return c
13931 }
13932
13933
13934 func (c *ProjectsInstancesDatabasesSessionsListCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsListCall {
13935 c.ctx_ = ctx
13936 return c
13937 }
13938
13939
13940
13941 func (c *ProjectsInstancesDatabasesSessionsListCall) Header() http.Header {
13942 if c.header_ == nil {
13943 c.header_ = make(http.Header)
13944 }
13945 return c.header_
13946 }
13947
13948 func (c *ProjectsInstancesDatabasesSessionsListCall) doRequest(alt string) (*http.Response, error) {
13949 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13950 if c.ifNoneMatch_ != "" {
13951 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13952 }
13953 var body io.Reader = nil
13954 c.urlParams_.Set("alt", alt)
13955 c.urlParams_.Set("prettyPrint", "false")
13956 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/sessions")
13957 urls += "?" + c.urlParams_.Encode()
13958 req, err := http.NewRequest("GET", urls, body)
13959 if err != nil {
13960 return nil, err
13961 }
13962 req.Header = reqHeaders
13963 googleapi.Expand(req.URL, map[string]string{
13964 "database": c.database,
13965 })
13966 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13967 }
13968
13969
13970
13971
13972
13973
13974
13975 func (c *ProjectsInstancesDatabasesSessionsListCall) Do(opts ...googleapi.CallOption) (*ListSessionsResponse, error) {
13976 gensupport.SetOptions(c.urlParams_, opts...)
13977 res, err := c.doRequest("json")
13978 if res != nil && res.StatusCode == http.StatusNotModified {
13979 if res.Body != nil {
13980 res.Body.Close()
13981 }
13982 return nil, gensupport.WrapError(&googleapi.Error{
13983 Code: res.StatusCode,
13984 Header: res.Header,
13985 })
13986 }
13987 if err != nil {
13988 return nil, err
13989 }
13990 defer googleapi.CloseBody(res)
13991 if err := googleapi.CheckResponse(res); err != nil {
13992 return nil, gensupport.WrapError(err)
13993 }
13994 ret := &ListSessionsResponse{
13995 ServerResponse: googleapi.ServerResponse{
13996 Header: res.Header,
13997 HTTPStatusCode: res.StatusCode,
13998 },
13999 }
14000 target := &ret
14001 if err := gensupport.DecodeResponse(target, res); err != nil {
14002 return nil, err
14003 }
14004 return ret, nil
14005 }
14006
14007
14008
14009
14010 func (c *ProjectsInstancesDatabasesSessionsListCall) Pages(ctx context.Context, f func(*ListSessionsResponse) error) error {
14011 c.ctx_ = ctx
14012 defer c.PageToken(c.urlParams_.Get("pageToken"))
14013 for {
14014 x, err := c.Do()
14015 if err != nil {
14016 return err
14017 }
14018 if err := f(x); err != nil {
14019 return err
14020 }
14021 if x.NextPageToken == "" {
14022 return nil
14023 }
14024 c.PageToken(x.NextPageToken)
14025 }
14026 }
14027
14028 type ProjectsInstancesDatabasesSessionsPartitionQueryCall struct {
14029 s *Service
14030 session string
14031 partitionqueryrequest *PartitionQueryRequest
14032 urlParams_ gensupport.URLParams
14033 ctx_ context.Context
14034 header_ http.Header
14035 }
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049 func (r *ProjectsInstancesDatabasesSessionsService) PartitionQuery(session string, partitionqueryrequest *PartitionQueryRequest) *ProjectsInstancesDatabasesSessionsPartitionQueryCall {
14050 c := &ProjectsInstancesDatabasesSessionsPartitionQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14051 c.session = session
14052 c.partitionqueryrequest = partitionqueryrequest
14053 return c
14054 }
14055
14056
14057
14058
14059 func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsPartitionQueryCall {
14060 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14061 return c
14062 }
14063
14064
14065 func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsPartitionQueryCall {
14066 c.ctx_ = ctx
14067 return c
14068 }
14069
14070
14071
14072 func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) Header() http.Header {
14073 if c.header_ == nil {
14074 c.header_ = make(http.Header)
14075 }
14076 return c.header_
14077 }
14078
14079 func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) doRequest(alt string) (*http.Response, error) {
14080 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14081 var body io.Reader = nil
14082 body, err := googleapi.WithoutDataWrapper.JSONReader(c.partitionqueryrequest)
14083 if err != nil {
14084 return nil, err
14085 }
14086 c.urlParams_.Set("alt", alt)
14087 c.urlParams_.Set("prettyPrint", "false")
14088 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:partitionQuery")
14089 urls += "?" + c.urlParams_.Encode()
14090 req, err := http.NewRequest("POST", urls, body)
14091 if err != nil {
14092 return nil, err
14093 }
14094 req.Header = reqHeaders
14095 googleapi.Expand(req.URL, map[string]string{
14096 "session": c.session,
14097 })
14098 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14099 }
14100
14101
14102
14103
14104
14105
14106
14107 func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) Do(opts ...googleapi.CallOption) (*PartitionResponse, error) {
14108 gensupport.SetOptions(c.urlParams_, opts...)
14109 res, err := c.doRequest("json")
14110 if res != nil && res.StatusCode == http.StatusNotModified {
14111 if res.Body != nil {
14112 res.Body.Close()
14113 }
14114 return nil, gensupport.WrapError(&googleapi.Error{
14115 Code: res.StatusCode,
14116 Header: res.Header,
14117 })
14118 }
14119 if err != nil {
14120 return nil, err
14121 }
14122 defer googleapi.CloseBody(res)
14123 if err := googleapi.CheckResponse(res); err != nil {
14124 return nil, gensupport.WrapError(err)
14125 }
14126 ret := &PartitionResponse{
14127 ServerResponse: googleapi.ServerResponse{
14128 Header: res.Header,
14129 HTTPStatusCode: res.StatusCode,
14130 },
14131 }
14132 target := &ret
14133 if err := gensupport.DecodeResponse(target, res); err != nil {
14134 return nil, err
14135 }
14136 return ret, nil
14137 }
14138
14139 type ProjectsInstancesDatabasesSessionsPartitionReadCall struct {
14140 s *Service
14141 session string
14142 partitionreadrequest *PartitionReadRequest
14143 urlParams_ gensupport.URLParams
14144 ctx_ context.Context
14145 header_ http.Header
14146 }
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162 func (r *ProjectsInstancesDatabasesSessionsService) PartitionRead(session string, partitionreadrequest *PartitionReadRequest) *ProjectsInstancesDatabasesSessionsPartitionReadCall {
14163 c := &ProjectsInstancesDatabasesSessionsPartitionReadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14164 c.session = session
14165 c.partitionreadrequest = partitionreadrequest
14166 return c
14167 }
14168
14169
14170
14171
14172 func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsPartitionReadCall {
14173 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14174 return c
14175 }
14176
14177
14178 func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsPartitionReadCall {
14179 c.ctx_ = ctx
14180 return c
14181 }
14182
14183
14184
14185 func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) Header() http.Header {
14186 if c.header_ == nil {
14187 c.header_ = make(http.Header)
14188 }
14189 return c.header_
14190 }
14191
14192 func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) doRequest(alt string) (*http.Response, error) {
14193 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14194 var body io.Reader = nil
14195 body, err := googleapi.WithoutDataWrapper.JSONReader(c.partitionreadrequest)
14196 if err != nil {
14197 return nil, err
14198 }
14199 c.urlParams_.Set("alt", alt)
14200 c.urlParams_.Set("prettyPrint", "false")
14201 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:partitionRead")
14202 urls += "?" + c.urlParams_.Encode()
14203 req, err := http.NewRequest("POST", urls, body)
14204 if err != nil {
14205 return nil, err
14206 }
14207 req.Header = reqHeaders
14208 googleapi.Expand(req.URL, map[string]string{
14209 "session": c.session,
14210 })
14211 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14212 }
14213
14214
14215
14216
14217
14218
14219
14220 func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) Do(opts ...googleapi.CallOption) (*PartitionResponse, error) {
14221 gensupport.SetOptions(c.urlParams_, opts...)
14222 res, err := c.doRequest("json")
14223 if res != nil && res.StatusCode == http.StatusNotModified {
14224 if res.Body != nil {
14225 res.Body.Close()
14226 }
14227 return nil, gensupport.WrapError(&googleapi.Error{
14228 Code: res.StatusCode,
14229 Header: res.Header,
14230 })
14231 }
14232 if err != nil {
14233 return nil, err
14234 }
14235 defer googleapi.CloseBody(res)
14236 if err := googleapi.CheckResponse(res); err != nil {
14237 return nil, gensupport.WrapError(err)
14238 }
14239 ret := &PartitionResponse{
14240 ServerResponse: googleapi.ServerResponse{
14241 Header: res.Header,
14242 HTTPStatusCode: res.StatusCode,
14243 },
14244 }
14245 target := &ret
14246 if err := gensupport.DecodeResponse(target, res); err != nil {
14247 return nil, err
14248 }
14249 return ret, nil
14250 }
14251
14252 type ProjectsInstancesDatabasesSessionsReadCall struct {
14253 s *Service
14254 session string
14255 readrequest *ReadRequest
14256 urlParams_ gensupport.URLParams
14257 ctx_ context.Context
14258 header_ http.Header
14259 }
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271 func (r *ProjectsInstancesDatabasesSessionsService) Read(session string, readrequest *ReadRequest) *ProjectsInstancesDatabasesSessionsReadCall {
14272 c := &ProjectsInstancesDatabasesSessionsReadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14273 c.session = session
14274 c.readrequest = readrequest
14275 return c
14276 }
14277
14278
14279
14280
14281 func (c *ProjectsInstancesDatabasesSessionsReadCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsReadCall {
14282 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14283 return c
14284 }
14285
14286
14287 func (c *ProjectsInstancesDatabasesSessionsReadCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsReadCall {
14288 c.ctx_ = ctx
14289 return c
14290 }
14291
14292
14293
14294 func (c *ProjectsInstancesDatabasesSessionsReadCall) Header() http.Header {
14295 if c.header_ == nil {
14296 c.header_ = make(http.Header)
14297 }
14298 return c.header_
14299 }
14300
14301 func (c *ProjectsInstancesDatabasesSessionsReadCall) doRequest(alt string) (*http.Response, error) {
14302 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14303 var body io.Reader = nil
14304 body, err := googleapi.WithoutDataWrapper.JSONReader(c.readrequest)
14305 if err != nil {
14306 return nil, err
14307 }
14308 c.urlParams_.Set("alt", alt)
14309 c.urlParams_.Set("prettyPrint", "false")
14310 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:read")
14311 urls += "?" + c.urlParams_.Encode()
14312 req, err := http.NewRequest("POST", urls, body)
14313 if err != nil {
14314 return nil, err
14315 }
14316 req.Header = reqHeaders
14317 googleapi.Expand(req.URL, map[string]string{
14318 "session": c.session,
14319 })
14320 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14321 }
14322
14323
14324
14325
14326
14327
14328 func (c *ProjectsInstancesDatabasesSessionsReadCall) Do(opts ...googleapi.CallOption) (*ResultSet, error) {
14329 gensupport.SetOptions(c.urlParams_, opts...)
14330 res, err := c.doRequest("json")
14331 if res != nil && res.StatusCode == http.StatusNotModified {
14332 if res.Body != nil {
14333 res.Body.Close()
14334 }
14335 return nil, gensupport.WrapError(&googleapi.Error{
14336 Code: res.StatusCode,
14337 Header: res.Header,
14338 })
14339 }
14340 if err != nil {
14341 return nil, err
14342 }
14343 defer googleapi.CloseBody(res)
14344 if err := googleapi.CheckResponse(res); err != nil {
14345 return nil, gensupport.WrapError(err)
14346 }
14347 ret := &ResultSet{
14348 ServerResponse: googleapi.ServerResponse{
14349 Header: res.Header,
14350 HTTPStatusCode: res.StatusCode,
14351 },
14352 }
14353 target := &ret
14354 if err := gensupport.DecodeResponse(target, res); err != nil {
14355 return nil, err
14356 }
14357 return ret, nil
14358 }
14359
14360 type ProjectsInstancesDatabasesSessionsRollbackCall struct {
14361 s *Service
14362 session string
14363 rollbackrequest *RollbackRequest
14364 urlParams_ gensupport.URLParams
14365 ctx_ context.Context
14366 header_ http.Header
14367 }
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377 func (r *ProjectsInstancesDatabasesSessionsService) Rollback(session string, rollbackrequest *RollbackRequest) *ProjectsInstancesDatabasesSessionsRollbackCall {
14378 c := &ProjectsInstancesDatabasesSessionsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14379 c.session = session
14380 c.rollbackrequest = rollbackrequest
14381 return c
14382 }
14383
14384
14385
14386
14387 func (c *ProjectsInstancesDatabasesSessionsRollbackCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsRollbackCall {
14388 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14389 return c
14390 }
14391
14392
14393 func (c *ProjectsInstancesDatabasesSessionsRollbackCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsRollbackCall {
14394 c.ctx_ = ctx
14395 return c
14396 }
14397
14398
14399
14400 func (c *ProjectsInstancesDatabasesSessionsRollbackCall) Header() http.Header {
14401 if c.header_ == nil {
14402 c.header_ = make(http.Header)
14403 }
14404 return c.header_
14405 }
14406
14407 func (c *ProjectsInstancesDatabasesSessionsRollbackCall) doRequest(alt string) (*http.Response, error) {
14408 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14409 var body io.Reader = nil
14410 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest)
14411 if err != nil {
14412 return nil, err
14413 }
14414 c.urlParams_.Set("alt", alt)
14415 c.urlParams_.Set("prettyPrint", "false")
14416 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:rollback")
14417 urls += "?" + c.urlParams_.Encode()
14418 req, err := http.NewRequest("POST", urls, body)
14419 if err != nil {
14420 return nil, err
14421 }
14422 req.Header = reqHeaders
14423 googleapi.Expand(req.URL, map[string]string{
14424 "session": c.session,
14425 })
14426 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14427 }
14428
14429
14430
14431
14432
14433
14434 func (c *ProjectsInstancesDatabasesSessionsRollbackCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14435 gensupport.SetOptions(c.urlParams_, opts...)
14436 res, err := c.doRequest("json")
14437 if res != nil && res.StatusCode == http.StatusNotModified {
14438 if res.Body != nil {
14439 res.Body.Close()
14440 }
14441 return nil, gensupport.WrapError(&googleapi.Error{
14442 Code: res.StatusCode,
14443 Header: res.Header,
14444 })
14445 }
14446 if err != nil {
14447 return nil, err
14448 }
14449 defer googleapi.CloseBody(res)
14450 if err := googleapi.CheckResponse(res); err != nil {
14451 return nil, gensupport.WrapError(err)
14452 }
14453 ret := &Empty{
14454 ServerResponse: googleapi.ServerResponse{
14455 Header: res.Header,
14456 HTTPStatusCode: res.StatusCode,
14457 },
14458 }
14459 target := &ret
14460 if err := gensupport.DecodeResponse(target, res); err != nil {
14461 return nil, err
14462 }
14463 return ret, nil
14464 }
14465
14466 type ProjectsInstancesDatabasesSessionsStreamingReadCall struct {
14467 s *Service
14468 session string
14469 readrequest *ReadRequest
14470 urlParams_ gensupport.URLParams
14471 ctx_ context.Context
14472 header_ http.Header
14473 }
14474
14475
14476
14477
14478
14479
14480
14481 func (r *ProjectsInstancesDatabasesSessionsService) StreamingRead(session string, readrequest *ReadRequest) *ProjectsInstancesDatabasesSessionsStreamingReadCall {
14482 c := &ProjectsInstancesDatabasesSessionsStreamingReadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14483 c.session = session
14484 c.readrequest = readrequest
14485 return c
14486 }
14487
14488
14489
14490
14491 func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsStreamingReadCall {
14492 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14493 return c
14494 }
14495
14496
14497 func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsStreamingReadCall {
14498 c.ctx_ = ctx
14499 return c
14500 }
14501
14502
14503
14504 func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) Header() http.Header {
14505 if c.header_ == nil {
14506 c.header_ = make(http.Header)
14507 }
14508 return c.header_
14509 }
14510
14511 func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) doRequest(alt string) (*http.Response, error) {
14512 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14513 var body io.Reader = nil
14514 body, err := googleapi.WithoutDataWrapper.JSONReader(c.readrequest)
14515 if err != nil {
14516 return nil, err
14517 }
14518 c.urlParams_.Set("alt", alt)
14519 c.urlParams_.Set("prettyPrint", "false")
14520 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:streamingRead")
14521 urls += "?" + c.urlParams_.Encode()
14522 req, err := http.NewRequest("POST", urls, body)
14523 if err != nil {
14524 return nil, err
14525 }
14526 req.Header = reqHeaders
14527 googleapi.Expand(req.URL, map[string]string{
14528 "session": c.session,
14529 })
14530 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14531 }
14532
14533
14534
14535
14536
14537
14538
14539 func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) Do(opts ...googleapi.CallOption) (*PartialResultSet, error) {
14540 gensupport.SetOptions(c.urlParams_, opts...)
14541 res, err := c.doRequest("json")
14542 if res != nil && res.StatusCode == http.StatusNotModified {
14543 if res.Body != nil {
14544 res.Body.Close()
14545 }
14546 return nil, gensupport.WrapError(&googleapi.Error{
14547 Code: res.StatusCode,
14548 Header: res.Header,
14549 })
14550 }
14551 if err != nil {
14552 return nil, err
14553 }
14554 defer googleapi.CloseBody(res)
14555 if err := googleapi.CheckResponse(res); err != nil {
14556 return nil, gensupport.WrapError(err)
14557 }
14558 ret := &PartialResultSet{
14559 ServerResponse: googleapi.ServerResponse{
14560 Header: res.Header,
14561 HTTPStatusCode: res.StatusCode,
14562 },
14563 }
14564 target := &ret
14565 if err := gensupport.DecodeResponse(target, res); err != nil {
14566 return nil, err
14567 }
14568 return ret, nil
14569 }
14570
14571 type ProjectsInstancesInstancePartitionOperationsListCall struct {
14572 s *Service
14573 parent string
14574 urlParams_ gensupport.URLParams
14575 ifNoneMatch_ string
14576 ctx_ context.Context
14577 header_ http.Header
14578 }
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593 func (r *ProjectsInstancesInstancePartitionOperationsService) List(parent string) *ProjectsInstancesInstancePartitionOperationsListCall {
14594 c := &ProjectsInstancesInstancePartitionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14595 c.parent = parent
14596 return c
14597 }
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626 func (c *ProjectsInstancesInstancePartitionOperationsListCall) Filter(filter string) *ProjectsInstancesInstancePartitionOperationsListCall {
14627 c.urlParams_.Set("filter", filter)
14628 return c
14629 }
14630
14631
14632
14633
14634
14635
14636 func (c *ProjectsInstancesInstancePartitionOperationsListCall) InstancePartitionDeadline(instancePartitionDeadline string) *ProjectsInstancesInstancePartitionOperationsListCall {
14637 c.urlParams_.Set("instancePartitionDeadline", instancePartitionDeadline)
14638 return c
14639 }
14640
14641
14642
14643
14644 func (c *ProjectsInstancesInstancePartitionOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesInstancePartitionOperationsListCall {
14645 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14646 return c
14647 }
14648
14649
14650
14651
14652
14653 func (c *ProjectsInstancesInstancePartitionOperationsListCall) PageToken(pageToken string) *ProjectsInstancesInstancePartitionOperationsListCall {
14654 c.urlParams_.Set("pageToken", pageToken)
14655 return c
14656 }
14657
14658
14659
14660
14661 func (c *ProjectsInstancesInstancePartitionOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionOperationsListCall {
14662 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14663 return c
14664 }
14665
14666
14667
14668
14669 func (c *ProjectsInstancesInstancePartitionOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionOperationsListCall {
14670 c.ifNoneMatch_ = entityTag
14671 return c
14672 }
14673
14674
14675 func (c *ProjectsInstancesInstancePartitionOperationsListCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionOperationsListCall {
14676 c.ctx_ = ctx
14677 return c
14678 }
14679
14680
14681
14682 func (c *ProjectsInstancesInstancePartitionOperationsListCall) Header() http.Header {
14683 if c.header_ == nil {
14684 c.header_ = make(http.Header)
14685 }
14686 return c.header_
14687 }
14688
14689 func (c *ProjectsInstancesInstancePartitionOperationsListCall) doRequest(alt string) (*http.Response, error) {
14690 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14691 if c.ifNoneMatch_ != "" {
14692 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14693 }
14694 var body io.Reader = nil
14695 c.urlParams_.Set("alt", alt)
14696 c.urlParams_.Set("prettyPrint", "false")
14697 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instancePartitionOperations")
14698 urls += "?" + c.urlParams_.Encode()
14699 req, err := http.NewRequest("GET", urls, body)
14700 if err != nil {
14701 return nil, err
14702 }
14703 req.Header = reqHeaders
14704 googleapi.Expand(req.URL, map[string]string{
14705 "parent": c.parent,
14706 })
14707 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14708 }
14709
14710
14711
14712
14713
14714
14715
14716 func (c *ProjectsInstancesInstancePartitionOperationsListCall) Do(opts ...googleapi.CallOption) (*ListInstancePartitionOperationsResponse, error) {
14717 gensupport.SetOptions(c.urlParams_, opts...)
14718 res, err := c.doRequest("json")
14719 if res != nil && res.StatusCode == http.StatusNotModified {
14720 if res.Body != nil {
14721 res.Body.Close()
14722 }
14723 return nil, gensupport.WrapError(&googleapi.Error{
14724 Code: res.StatusCode,
14725 Header: res.Header,
14726 })
14727 }
14728 if err != nil {
14729 return nil, err
14730 }
14731 defer googleapi.CloseBody(res)
14732 if err := googleapi.CheckResponse(res); err != nil {
14733 return nil, gensupport.WrapError(err)
14734 }
14735 ret := &ListInstancePartitionOperationsResponse{
14736 ServerResponse: googleapi.ServerResponse{
14737 Header: res.Header,
14738 HTTPStatusCode: res.StatusCode,
14739 },
14740 }
14741 target := &ret
14742 if err := gensupport.DecodeResponse(target, res); err != nil {
14743 return nil, err
14744 }
14745 return ret, nil
14746 }
14747
14748
14749
14750
14751 func (c *ProjectsInstancesInstancePartitionOperationsListCall) Pages(ctx context.Context, f func(*ListInstancePartitionOperationsResponse) error) error {
14752 c.ctx_ = ctx
14753 defer c.PageToken(c.urlParams_.Get("pageToken"))
14754 for {
14755 x, err := c.Do()
14756 if err != nil {
14757 return err
14758 }
14759 if err := f(x); err != nil {
14760 return err
14761 }
14762 if x.NextPageToken == "" {
14763 return nil
14764 }
14765 c.PageToken(x.NextPageToken)
14766 }
14767 }
14768
14769 type ProjectsInstancesInstancePartitionsCreateCall struct {
14770 s *Service
14771 parent string
14772 createinstancepartitionrequest *CreateInstancePartitionRequest
14773 urlParams_ gensupport.URLParams
14774 ctx_ context.Context
14775 header_ http.Header
14776 }
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800 func (r *ProjectsInstancesInstancePartitionsService) Create(parent string, createinstancepartitionrequest *CreateInstancePartitionRequest) *ProjectsInstancesInstancePartitionsCreateCall {
14801 c := &ProjectsInstancesInstancePartitionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14802 c.parent = parent
14803 c.createinstancepartitionrequest = createinstancepartitionrequest
14804 return c
14805 }
14806
14807
14808
14809
14810 func (c *ProjectsInstancesInstancePartitionsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsCreateCall {
14811 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14812 return c
14813 }
14814
14815
14816 func (c *ProjectsInstancesInstancePartitionsCreateCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsCreateCall {
14817 c.ctx_ = ctx
14818 return c
14819 }
14820
14821
14822
14823 func (c *ProjectsInstancesInstancePartitionsCreateCall) Header() http.Header {
14824 if c.header_ == nil {
14825 c.header_ = make(http.Header)
14826 }
14827 return c.header_
14828 }
14829
14830 func (c *ProjectsInstancesInstancePartitionsCreateCall) doRequest(alt string) (*http.Response, error) {
14831 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14832 var body io.Reader = nil
14833 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createinstancepartitionrequest)
14834 if err != nil {
14835 return nil, err
14836 }
14837 c.urlParams_.Set("alt", alt)
14838 c.urlParams_.Set("prettyPrint", "false")
14839 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instancePartitions")
14840 urls += "?" + c.urlParams_.Encode()
14841 req, err := http.NewRequest("POST", urls, body)
14842 if err != nil {
14843 return nil, err
14844 }
14845 req.Header = reqHeaders
14846 googleapi.Expand(req.URL, map[string]string{
14847 "parent": c.parent,
14848 })
14849 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14850 }
14851
14852
14853
14854
14855
14856
14857 func (c *ProjectsInstancesInstancePartitionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14858 gensupport.SetOptions(c.urlParams_, opts...)
14859 res, err := c.doRequest("json")
14860 if res != nil && res.StatusCode == http.StatusNotModified {
14861 if res.Body != nil {
14862 res.Body.Close()
14863 }
14864 return nil, gensupport.WrapError(&googleapi.Error{
14865 Code: res.StatusCode,
14866 Header: res.Header,
14867 })
14868 }
14869 if err != nil {
14870 return nil, err
14871 }
14872 defer googleapi.CloseBody(res)
14873 if err := googleapi.CheckResponse(res); err != nil {
14874 return nil, gensupport.WrapError(err)
14875 }
14876 ret := &Operation{
14877 ServerResponse: googleapi.ServerResponse{
14878 Header: res.Header,
14879 HTTPStatusCode: res.StatusCode,
14880 },
14881 }
14882 target := &ret
14883 if err := gensupport.DecodeResponse(target, res); err != nil {
14884 return nil, err
14885 }
14886 return ret, nil
14887 }
14888
14889 type ProjectsInstancesInstancePartitionsDeleteCall struct {
14890 s *Service
14891 name string
14892 urlParams_ gensupport.URLParams
14893 ctx_ context.Context
14894 header_ http.Header
14895 }
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906 func (r *ProjectsInstancesInstancePartitionsService) Delete(name string) *ProjectsInstancesInstancePartitionsDeleteCall {
14907 c := &ProjectsInstancesInstancePartitionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14908 c.name = name
14909 return c
14910 }
14911
14912
14913
14914
14915
14916 func (c *ProjectsInstancesInstancePartitionsDeleteCall) Etag(etag string) *ProjectsInstancesInstancePartitionsDeleteCall {
14917 c.urlParams_.Set("etag", etag)
14918 return c
14919 }
14920
14921
14922
14923
14924 func (c *ProjectsInstancesInstancePartitionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsDeleteCall {
14925 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14926 return c
14927 }
14928
14929
14930 func (c *ProjectsInstancesInstancePartitionsDeleteCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsDeleteCall {
14931 c.ctx_ = ctx
14932 return c
14933 }
14934
14935
14936
14937 func (c *ProjectsInstancesInstancePartitionsDeleteCall) Header() http.Header {
14938 if c.header_ == nil {
14939 c.header_ = make(http.Header)
14940 }
14941 return c.header_
14942 }
14943
14944 func (c *ProjectsInstancesInstancePartitionsDeleteCall) doRequest(alt string) (*http.Response, error) {
14945 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14946 var body io.Reader = nil
14947 c.urlParams_.Set("alt", alt)
14948 c.urlParams_.Set("prettyPrint", "false")
14949 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14950 urls += "?" + c.urlParams_.Encode()
14951 req, err := http.NewRequest("DELETE", urls, body)
14952 if err != nil {
14953 return nil, err
14954 }
14955 req.Header = reqHeaders
14956 googleapi.Expand(req.URL, map[string]string{
14957 "name": c.name,
14958 })
14959 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14960 }
14961
14962
14963
14964
14965
14966
14967 func (c *ProjectsInstancesInstancePartitionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14968 gensupport.SetOptions(c.urlParams_, opts...)
14969 res, err := c.doRequest("json")
14970 if res != nil && res.StatusCode == http.StatusNotModified {
14971 if res.Body != nil {
14972 res.Body.Close()
14973 }
14974 return nil, gensupport.WrapError(&googleapi.Error{
14975 Code: res.StatusCode,
14976 Header: res.Header,
14977 })
14978 }
14979 if err != nil {
14980 return nil, err
14981 }
14982 defer googleapi.CloseBody(res)
14983 if err := googleapi.CheckResponse(res); err != nil {
14984 return nil, gensupport.WrapError(err)
14985 }
14986 ret := &Empty{
14987 ServerResponse: googleapi.ServerResponse{
14988 Header: res.Header,
14989 HTTPStatusCode: res.StatusCode,
14990 },
14991 }
14992 target := &ret
14993 if err := gensupport.DecodeResponse(target, res); err != nil {
14994 return nil, err
14995 }
14996 return ret, nil
14997 }
14998
14999 type ProjectsInstancesInstancePartitionsGetCall struct {
15000 s *Service
15001 name string
15002 urlParams_ gensupport.URLParams
15003 ifNoneMatch_ string
15004 ctx_ context.Context
15005 header_ http.Header
15006 }
15007
15008
15009
15010
15011
15012
15013 func (r *ProjectsInstancesInstancePartitionsService) Get(name string) *ProjectsInstancesInstancePartitionsGetCall {
15014 c := &ProjectsInstancesInstancePartitionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15015 c.name = name
15016 return c
15017 }
15018
15019
15020
15021
15022 func (c *ProjectsInstancesInstancePartitionsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsGetCall {
15023 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15024 return c
15025 }
15026
15027
15028
15029
15030 func (c *ProjectsInstancesInstancePartitionsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionsGetCall {
15031 c.ifNoneMatch_ = entityTag
15032 return c
15033 }
15034
15035
15036 func (c *ProjectsInstancesInstancePartitionsGetCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsGetCall {
15037 c.ctx_ = ctx
15038 return c
15039 }
15040
15041
15042
15043 func (c *ProjectsInstancesInstancePartitionsGetCall) Header() http.Header {
15044 if c.header_ == nil {
15045 c.header_ = make(http.Header)
15046 }
15047 return c.header_
15048 }
15049
15050 func (c *ProjectsInstancesInstancePartitionsGetCall) doRequest(alt string) (*http.Response, error) {
15051 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15052 if c.ifNoneMatch_ != "" {
15053 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15054 }
15055 var body io.Reader = nil
15056 c.urlParams_.Set("alt", alt)
15057 c.urlParams_.Set("prettyPrint", "false")
15058 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15059 urls += "?" + c.urlParams_.Encode()
15060 req, err := http.NewRequest("GET", urls, body)
15061 if err != nil {
15062 return nil, err
15063 }
15064 req.Header = reqHeaders
15065 googleapi.Expand(req.URL, map[string]string{
15066 "name": c.name,
15067 })
15068 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15069 }
15070
15071
15072
15073
15074
15075
15076
15077 func (c *ProjectsInstancesInstancePartitionsGetCall) Do(opts ...googleapi.CallOption) (*InstancePartition, error) {
15078 gensupport.SetOptions(c.urlParams_, opts...)
15079 res, err := c.doRequest("json")
15080 if res != nil && res.StatusCode == http.StatusNotModified {
15081 if res.Body != nil {
15082 res.Body.Close()
15083 }
15084 return nil, gensupport.WrapError(&googleapi.Error{
15085 Code: res.StatusCode,
15086 Header: res.Header,
15087 })
15088 }
15089 if err != nil {
15090 return nil, err
15091 }
15092 defer googleapi.CloseBody(res)
15093 if err := googleapi.CheckResponse(res); err != nil {
15094 return nil, gensupport.WrapError(err)
15095 }
15096 ret := &InstancePartition{
15097 ServerResponse: googleapi.ServerResponse{
15098 Header: res.Header,
15099 HTTPStatusCode: res.StatusCode,
15100 },
15101 }
15102 target := &ret
15103 if err := gensupport.DecodeResponse(target, res); err != nil {
15104 return nil, err
15105 }
15106 return ret, nil
15107 }
15108
15109 type ProjectsInstancesInstancePartitionsListCall struct {
15110 s *Service
15111 parent string
15112 urlParams_ gensupport.URLParams
15113 ifNoneMatch_ string
15114 ctx_ context.Context
15115 header_ http.Header
15116 }
15117
15118
15119
15120
15121
15122 func (r *ProjectsInstancesInstancePartitionsService) List(parent string) *ProjectsInstancesInstancePartitionsListCall {
15123 c := &ProjectsInstancesInstancePartitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15124 c.parent = parent
15125 return c
15126 }
15127
15128
15129
15130
15131
15132
15133 func (c *ProjectsInstancesInstancePartitionsListCall) InstancePartitionDeadline(instancePartitionDeadline string) *ProjectsInstancesInstancePartitionsListCall {
15134 c.urlParams_.Set("instancePartitionDeadline", instancePartitionDeadline)
15135 return c
15136 }
15137
15138
15139
15140
15141 func (c *ProjectsInstancesInstancePartitionsListCall) PageSize(pageSize int64) *ProjectsInstancesInstancePartitionsListCall {
15142 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15143 return c
15144 }
15145
15146
15147
15148
15149 func (c *ProjectsInstancesInstancePartitionsListCall) PageToken(pageToken string) *ProjectsInstancesInstancePartitionsListCall {
15150 c.urlParams_.Set("pageToken", pageToken)
15151 return c
15152 }
15153
15154
15155
15156
15157 func (c *ProjectsInstancesInstancePartitionsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsListCall {
15158 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15159 return c
15160 }
15161
15162
15163
15164
15165 func (c *ProjectsInstancesInstancePartitionsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionsListCall {
15166 c.ifNoneMatch_ = entityTag
15167 return c
15168 }
15169
15170
15171 func (c *ProjectsInstancesInstancePartitionsListCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsListCall {
15172 c.ctx_ = ctx
15173 return c
15174 }
15175
15176
15177
15178 func (c *ProjectsInstancesInstancePartitionsListCall) Header() http.Header {
15179 if c.header_ == nil {
15180 c.header_ = make(http.Header)
15181 }
15182 return c.header_
15183 }
15184
15185 func (c *ProjectsInstancesInstancePartitionsListCall) doRequest(alt string) (*http.Response, error) {
15186 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15187 if c.ifNoneMatch_ != "" {
15188 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15189 }
15190 var body io.Reader = nil
15191 c.urlParams_.Set("alt", alt)
15192 c.urlParams_.Set("prettyPrint", "false")
15193 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instancePartitions")
15194 urls += "?" + c.urlParams_.Encode()
15195 req, err := http.NewRequest("GET", urls, body)
15196 if err != nil {
15197 return nil, err
15198 }
15199 req.Header = reqHeaders
15200 googleapi.Expand(req.URL, map[string]string{
15201 "parent": c.parent,
15202 })
15203 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15204 }
15205
15206
15207
15208
15209
15210
15211
15212 func (c *ProjectsInstancesInstancePartitionsListCall) Do(opts ...googleapi.CallOption) (*ListInstancePartitionsResponse, error) {
15213 gensupport.SetOptions(c.urlParams_, opts...)
15214 res, err := c.doRequest("json")
15215 if res != nil && res.StatusCode == http.StatusNotModified {
15216 if res.Body != nil {
15217 res.Body.Close()
15218 }
15219 return nil, gensupport.WrapError(&googleapi.Error{
15220 Code: res.StatusCode,
15221 Header: res.Header,
15222 })
15223 }
15224 if err != nil {
15225 return nil, err
15226 }
15227 defer googleapi.CloseBody(res)
15228 if err := googleapi.CheckResponse(res); err != nil {
15229 return nil, gensupport.WrapError(err)
15230 }
15231 ret := &ListInstancePartitionsResponse{
15232 ServerResponse: googleapi.ServerResponse{
15233 Header: res.Header,
15234 HTTPStatusCode: res.StatusCode,
15235 },
15236 }
15237 target := &ret
15238 if err := gensupport.DecodeResponse(target, res); err != nil {
15239 return nil, err
15240 }
15241 return ret, nil
15242 }
15243
15244
15245
15246
15247 func (c *ProjectsInstancesInstancePartitionsListCall) Pages(ctx context.Context, f func(*ListInstancePartitionsResponse) error) error {
15248 c.ctx_ = ctx
15249 defer c.PageToken(c.urlParams_.Get("pageToken"))
15250 for {
15251 x, err := c.Do()
15252 if err != nil {
15253 return err
15254 }
15255 if err := f(x); err != nil {
15256 return err
15257 }
15258 if x.NextPageToken == "" {
15259 return nil
15260 }
15261 c.PageToken(x.NextPageToken)
15262 }
15263 }
15264
15265 type ProjectsInstancesInstancePartitionsPatchCall struct {
15266 s *Service
15267 nameid string
15268 updateinstancepartitionrequest *UpdateInstancePartitionRequest
15269 urlParams_ gensupport.URLParams
15270 ctx_ context.Context
15271 header_ http.Header
15272 }
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302 func (r *ProjectsInstancesInstancePartitionsService) Patch(nameid string, updateinstancepartitionrequest *UpdateInstancePartitionRequest) *ProjectsInstancesInstancePartitionsPatchCall {
15303 c := &ProjectsInstancesInstancePartitionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15304 c.nameid = nameid
15305 c.updateinstancepartitionrequest = updateinstancepartitionrequest
15306 return c
15307 }
15308
15309
15310
15311
15312 func (c *ProjectsInstancesInstancePartitionsPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsPatchCall {
15313 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15314 return c
15315 }
15316
15317
15318 func (c *ProjectsInstancesInstancePartitionsPatchCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsPatchCall {
15319 c.ctx_ = ctx
15320 return c
15321 }
15322
15323
15324
15325 func (c *ProjectsInstancesInstancePartitionsPatchCall) Header() http.Header {
15326 if c.header_ == nil {
15327 c.header_ = make(http.Header)
15328 }
15329 return c.header_
15330 }
15331
15332 func (c *ProjectsInstancesInstancePartitionsPatchCall) doRequest(alt string) (*http.Response, error) {
15333 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15334 var body io.Reader = nil
15335 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateinstancepartitionrequest)
15336 if err != nil {
15337 return nil, err
15338 }
15339 c.urlParams_.Set("alt", alt)
15340 c.urlParams_.Set("prettyPrint", "false")
15341 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15342 urls += "?" + c.urlParams_.Encode()
15343 req, err := http.NewRequest("PATCH", urls, body)
15344 if err != nil {
15345 return nil, err
15346 }
15347 req.Header = reqHeaders
15348 googleapi.Expand(req.URL, map[string]string{
15349 "name": c.nameid,
15350 })
15351 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15352 }
15353
15354
15355
15356
15357
15358
15359 func (c *ProjectsInstancesInstancePartitionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15360 gensupport.SetOptions(c.urlParams_, opts...)
15361 res, err := c.doRequest("json")
15362 if res != nil && res.StatusCode == http.StatusNotModified {
15363 if res.Body != nil {
15364 res.Body.Close()
15365 }
15366 return nil, gensupport.WrapError(&googleapi.Error{
15367 Code: res.StatusCode,
15368 Header: res.Header,
15369 })
15370 }
15371 if err != nil {
15372 return nil, err
15373 }
15374 defer googleapi.CloseBody(res)
15375 if err := googleapi.CheckResponse(res); err != nil {
15376 return nil, gensupport.WrapError(err)
15377 }
15378 ret := &Operation{
15379 ServerResponse: googleapi.ServerResponse{
15380 Header: res.Header,
15381 HTTPStatusCode: res.StatusCode,
15382 },
15383 }
15384 target := &ret
15385 if err := gensupport.DecodeResponse(target, res); err != nil {
15386 return nil, err
15387 }
15388 return ret, nil
15389 }
15390
15391 type ProjectsInstancesInstancePartitionsOperationsCancelCall struct {
15392 s *Service
15393 name string
15394 urlParams_ gensupport.URLParams
15395 ctx_ context.Context
15396 header_ http.Header
15397 }
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410 func (r *ProjectsInstancesInstancePartitionsOperationsService) Cancel(name string) *ProjectsInstancesInstancePartitionsOperationsCancelCall {
15411 c := &ProjectsInstancesInstancePartitionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15412 c.name = name
15413 return c
15414 }
15415
15416
15417
15418
15419 func (c *ProjectsInstancesInstancePartitionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsOperationsCancelCall {
15420 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15421 return c
15422 }
15423
15424
15425 func (c *ProjectsInstancesInstancePartitionsOperationsCancelCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsOperationsCancelCall {
15426 c.ctx_ = ctx
15427 return c
15428 }
15429
15430
15431
15432 func (c *ProjectsInstancesInstancePartitionsOperationsCancelCall) Header() http.Header {
15433 if c.header_ == nil {
15434 c.header_ = make(http.Header)
15435 }
15436 return c.header_
15437 }
15438
15439 func (c *ProjectsInstancesInstancePartitionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
15440 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15441 var body io.Reader = nil
15442 c.urlParams_.Set("alt", alt)
15443 c.urlParams_.Set("prettyPrint", "false")
15444 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
15445 urls += "?" + c.urlParams_.Encode()
15446 req, err := http.NewRequest("POST", urls, body)
15447 if err != nil {
15448 return nil, err
15449 }
15450 req.Header = reqHeaders
15451 googleapi.Expand(req.URL, map[string]string{
15452 "name": c.name,
15453 })
15454 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15455 }
15456
15457
15458
15459
15460
15461
15462 func (c *ProjectsInstancesInstancePartitionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
15463 gensupport.SetOptions(c.urlParams_, opts...)
15464 res, err := c.doRequest("json")
15465 if res != nil && res.StatusCode == http.StatusNotModified {
15466 if res.Body != nil {
15467 res.Body.Close()
15468 }
15469 return nil, gensupport.WrapError(&googleapi.Error{
15470 Code: res.StatusCode,
15471 Header: res.Header,
15472 })
15473 }
15474 if err != nil {
15475 return nil, err
15476 }
15477 defer googleapi.CloseBody(res)
15478 if err := googleapi.CheckResponse(res); err != nil {
15479 return nil, gensupport.WrapError(err)
15480 }
15481 ret := &Empty{
15482 ServerResponse: googleapi.ServerResponse{
15483 Header: res.Header,
15484 HTTPStatusCode: res.StatusCode,
15485 },
15486 }
15487 target := &ret
15488 if err := gensupport.DecodeResponse(target, res); err != nil {
15489 return nil, err
15490 }
15491 return ret, nil
15492 }
15493
15494 type ProjectsInstancesInstancePartitionsOperationsDeleteCall struct {
15495 s *Service
15496 name string
15497 urlParams_ gensupport.URLParams
15498 ctx_ context.Context
15499 header_ http.Header
15500 }
15501
15502
15503
15504
15505
15506
15507
15508 func (r *ProjectsInstancesInstancePartitionsOperationsService) Delete(name string) *ProjectsInstancesInstancePartitionsOperationsDeleteCall {
15509 c := &ProjectsInstancesInstancePartitionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15510 c.name = name
15511 return c
15512 }
15513
15514
15515
15516
15517 func (c *ProjectsInstancesInstancePartitionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsOperationsDeleteCall {
15518 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15519 return c
15520 }
15521
15522
15523 func (c *ProjectsInstancesInstancePartitionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsOperationsDeleteCall {
15524 c.ctx_ = ctx
15525 return c
15526 }
15527
15528
15529
15530 func (c *ProjectsInstancesInstancePartitionsOperationsDeleteCall) Header() http.Header {
15531 if c.header_ == nil {
15532 c.header_ = make(http.Header)
15533 }
15534 return c.header_
15535 }
15536
15537 func (c *ProjectsInstancesInstancePartitionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
15538 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15539 var body io.Reader = nil
15540 c.urlParams_.Set("alt", alt)
15541 c.urlParams_.Set("prettyPrint", "false")
15542 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15543 urls += "?" + c.urlParams_.Encode()
15544 req, err := http.NewRequest("DELETE", urls, body)
15545 if err != nil {
15546 return nil, err
15547 }
15548 req.Header = reqHeaders
15549 googleapi.Expand(req.URL, map[string]string{
15550 "name": c.name,
15551 })
15552 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15553 }
15554
15555
15556
15557
15558
15559
15560 func (c *ProjectsInstancesInstancePartitionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
15561 gensupport.SetOptions(c.urlParams_, opts...)
15562 res, err := c.doRequest("json")
15563 if res != nil && res.StatusCode == http.StatusNotModified {
15564 if res.Body != nil {
15565 res.Body.Close()
15566 }
15567 return nil, gensupport.WrapError(&googleapi.Error{
15568 Code: res.StatusCode,
15569 Header: res.Header,
15570 })
15571 }
15572 if err != nil {
15573 return nil, err
15574 }
15575 defer googleapi.CloseBody(res)
15576 if err := googleapi.CheckResponse(res); err != nil {
15577 return nil, gensupport.WrapError(err)
15578 }
15579 ret := &Empty{
15580 ServerResponse: googleapi.ServerResponse{
15581 Header: res.Header,
15582 HTTPStatusCode: res.StatusCode,
15583 },
15584 }
15585 target := &ret
15586 if err := gensupport.DecodeResponse(target, res); err != nil {
15587 return nil, err
15588 }
15589 return ret, nil
15590 }
15591
15592 type ProjectsInstancesInstancePartitionsOperationsGetCall struct {
15593 s *Service
15594 name string
15595 urlParams_ gensupport.URLParams
15596 ifNoneMatch_ string
15597 ctx_ context.Context
15598 header_ http.Header
15599 }
15600
15601
15602
15603
15604
15605
15606 func (r *ProjectsInstancesInstancePartitionsOperationsService) Get(name string) *ProjectsInstancesInstancePartitionsOperationsGetCall {
15607 c := &ProjectsInstancesInstancePartitionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15608 c.name = name
15609 return c
15610 }
15611
15612
15613
15614
15615 func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsOperationsGetCall {
15616 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15617 return c
15618 }
15619
15620
15621
15622
15623 func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionsOperationsGetCall {
15624 c.ifNoneMatch_ = entityTag
15625 return c
15626 }
15627
15628
15629 func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsOperationsGetCall {
15630 c.ctx_ = ctx
15631 return c
15632 }
15633
15634
15635
15636 func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) Header() http.Header {
15637 if c.header_ == nil {
15638 c.header_ = make(http.Header)
15639 }
15640 return c.header_
15641 }
15642
15643 func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
15644 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15645 if c.ifNoneMatch_ != "" {
15646 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15647 }
15648 var body io.Reader = nil
15649 c.urlParams_.Set("alt", alt)
15650 c.urlParams_.Set("prettyPrint", "false")
15651 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15652 urls += "?" + c.urlParams_.Encode()
15653 req, err := http.NewRequest("GET", urls, body)
15654 if err != nil {
15655 return nil, err
15656 }
15657 req.Header = reqHeaders
15658 googleapi.Expand(req.URL, map[string]string{
15659 "name": c.name,
15660 })
15661 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15662 }
15663
15664
15665
15666
15667
15668
15669 func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15670 gensupport.SetOptions(c.urlParams_, opts...)
15671 res, err := c.doRequest("json")
15672 if res != nil && res.StatusCode == http.StatusNotModified {
15673 if res.Body != nil {
15674 res.Body.Close()
15675 }
15676 return nil, gensupport.WrapError(&googleapi.Error{
15677 Code: res.StatusCode,
15678 Header: res.Header,
15679 })
15680 }
15681 if err != nil {
15682 return nil, err
15683 }
15684 defer googleapi.CloseBody(res)
15685 if err := googleapi.CheckResponse(res); err != nil {
15686 return nil, gensupport.WrapError(err)
15687 }
15688 ret := &Operation{
15689 ServerResponse: googleapi.ServerResponse{
15690 Header: res.Header,
15691 HTTPStatusCode: res.StatusCode,
15692 },
15693 }
15694 target := &ret
15695 if err := gensupport.DecodeResponse(target, res); err != nil {
15696 return nil, err
15697 }
15698 return ret, nil
15699 }
15700
15701 type ProjectsInstancesInstancePartitionsOperationsListCall struct {
15702 s *Service
15703 name string
15704 urlParams_ gensupport.URLParams
15705 ifNoneMatch_ string
15706 ctx_ context.Context
15707 header_ http.Header
15708 }
15709
15710
15711
15712
15713
15714 func (r *ProjectsInstancesInstancePartitionsOperationsService) List(name string) *ProjectsInstancesInstancePartitionsOperationsListCall {
15715 c := &ProjectsInstancesInstancePartitionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15716 c.name = name
15717 return c
15718 }
15719
15720
15721 func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Filter(filter string) *ProjectsInstancesInstancePartitionsOperationsListCall {
15722 c.urlParams_.Set("filter", filter)
15723 return c
15724 }
15725
15726
15727
15728 func (c *ProjectsInstancesInstancePartitionsOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesInstancePartitionsOperationsListCall {
15729 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15730 return c
15731 }
15732
15733
15734
15735 func (c *ProjectsInstancesInstancePartitionsOperationsListCall) PageToken(pageToken string) *ProjectsInstancesInstancePartitionsOperationsListCall {
15736 c.urlParams_.Set("pageToken", pageToken)
15737 return c
15738 }
15739
15740
15741
15742
15743 func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsOperationsListCall {
15744 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15745 return c
15746 }
15747
15748
15749
15750
15751 func (c *ProjectsInstancesInstancePartitionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionsOperationsListCall {
15752 c.ifNoneMatch_ = entityTag
15753 return c
15754 }
15755
15756
15757 func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsOperationsListCall {
15758 c.ctx_ = ctx
15759 return c
15760 }
15761
15762
15763
15764 func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Header() http.Header {
15765 if c.header_ == nil {
15766 c.header_ = make(http.Header)
15767 }
15768 return c.header_
15769 }
15770
15771 func (c *ProjectsInstancesInstancePartitionsOperationsListCall) doRequest(alt string) (*http.Response, error) {
15772 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15773 if c.ifNoneMatch_ != "" {
15774 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15775 }
15776 var body io.Reader = nil
15777 c.urlParams_.Set("alt", alt)
15778 c.urlParams_.Set("prettyPrint", "false")
15779 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15780 urls += "?" + c.urlParams_.Encode()
15781 req, err := http.NewRequest("GET", urls, body)
15782 if err != nil {
15783 return nil, err
15784 }
15785 req.Header = reqHeaders
15786 googleapi.Expand(req.URL, map[string]string{
15787 "name": c.name,
15788 })
15789 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15790 }
15791
15792
15793
15794
15795
15796
15797
15798 func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
15799 gensupport.SetOptions(c.urlParams_, opts...)
15800 res, err := c.doRequest("json")
15801 if res != nil && res.StatusCode == http.StatusNotModified {
15802 if res.Body != nil {
15803 res.Body.Close()
15804 }
15805 return nil, gensupport.WrapError(&googleapi.Error{
15806 Code: res.StatusCode,
15807 Header: res.Header,
15808 })
15809 }
15810 if err != nil {
15811 return nil, err
15812 }
15813 defer googleapi.CloseBody(res)
15814 if err := googleapi.CheckResponse(res); err != nil {
15815 return nil, gensupport.WrapError(err)
15816 }
15817 ret := &ListOperationsResponse{
15818 ServerResponse: googleapi.ServerResponse{
15819 Header: res.Header,
15820 HTTPStatusCode: res.StatusCode,
15821 },
15822 }
15823 target := &ret
15824 if err := gensupport.DecodeResponse(target, res); err != nil {
15825 return nil, err
15826 }
15827 return ret, nil
15828 }
15829
15830
15831
15832
15833 func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
15834 c.ctx_ = ctx
15835 defer c.PageToken(c.urlParams_.Get("pageToken"))
15836 for {
15837 x, err := c.Do()
15838 if err != nil {
15839 return err
15840 }
15841 if err := f(x); err != nil {
15842 return err
15843 }
15844 if x.NextPageToken == "" {
15845 return nil
15846 }
15847 c.PageToken(x.NextPageToken)
15848 }
15849 }
15850
15851 type ProjectsInstancesOperationsCancelCall struct {
15852 s *Service
15853 name string
15854 urlParams_ gensupport.URLParams
15855 ctx_ context.Context
15856 header_ http.Header
15857 }
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870 func (r *ProjectsInstancesOperationsService) Cancel(name string) *ProjectsInstancesOperationsCancelCall {
15871 c := &ProjectsInstancesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15872 c.name = name
15873 return c
15874 }
15875
15876
15877
15878
15879 func (c *ProjectsInstancesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstancesOperationsCancelCall {
15880 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15881 return c
15882 }
15883
15884
15885 func (c *ProjectsInstancesOperationsCancelCall) Context(ctx context.Context) *ProjectsInstancesOperationsCancelCall {
15886 c.ctx_ = ctx
15887 return c
15888 }
15889
15890
15891
15892 func (c *ProjectsInstancesOperationsCancelCall) Header() http.Header {
15893 if c.header_ == nil {
15894 c.header_ = make(http.Header)
15895 }
15896 return c.header_
15897 }
15898
15899 func (c *ProjectsInstancesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
15900 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15901 var body io.Reader = nil
15902 c.urlParams_.Set("alt", alt)
15903 c.urlParams_.Set("prettyPrint", "false")
15904 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
15905 urls += "?" + c.urlParams_.Encode()
15906 req, err := http.NewRequest("POST", urls, body)
15907 if err != nil {
15908 return nil, err
15909 }
15910 req.Header = reqHeaders
15911 googleapi.Expand(req.URL, map[string]string{
15912 "name": c.name,
15913 })
15914 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15915 }
15916
15917
15918
15919
15920
15921
15922 func (c *ProjectsInstancesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
15923 gensupport.SetOptions(c.urlParams_, opts...)
15924 res, err := c.doRequest("json")
15925 if res != nil && res.StatusCode == http.StatusNotModified {
15926 if res.Body != nil {
15927 res.Body.Close()
15928 }
15929 return nil, gensupport.WrapError(&googleapi.Error{
15930 Code: res.StatusCode,
15931 Header: res.Header,
15932 })
15933 }
15934 if err != nil {
15935 return nil, err
15936 }
15937 defer googleapi.CloseBody(res)
15938 if err := googleapi.CheckResponse(res); err != nil {
15939 return nil, gensupport.WrapError(err)
15940 }
15941 ret := &Empty{
15942 ServerResponse: googleapi.ServerResponse{
15943 Header: res.Header,
15944 HTTPStatusCode: res.StatusCode,
15945 },
15946 }
15947 target := &ret
15948 if err := gensupport.DecodeResponse(target, res); err != nil {
15949 return nil, err
15950 }
15951 return ret, nil
15952 }
15953
15954 type ProjectsInstancesOperationsDeleteCall struct {
15955 s *Service
15956 name string
15957 urlParams_ gensupport.URLParams
15958 ctx_ context.Context
15959 header_ http.Header
15960 }
15961
15962
15963
15964
15965
15966
15967
15968 func (r *ProjectsInstancesOperationsService) Delete(name string) *ProjectsInstancesOperationsDeleteCall {
15969 c := &ProjectsInstancesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15970 c.name = name
15971 return c
15972 }
15973
15974
15975
15976
15977 func (c *ProjectsInstancesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesOperationsDeleteCall {
15978 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15979 return c
15980 }
15981
15982
15983 func (c *ProjectsInstancesOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstancesOperationsDeleteCall {
15984 c.ctx_ = ctx
15985 return c
15986 }
15987
15988
15989
15990 func (c *ProjectsInstancesOperationsDeleteCall) Header() http.Header {
15991 if c.header_ == nil {
15992 c.header_ = make(http.Header)
15993 }
15994 return c.header_
15995 }
15996
15997 func (c *ProjectsInstancesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
15998 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15999 var body io.Reader = nil
16000 c.urlParams_.Set("alt", alt)
16001 c.urlParams_.Set("prettyPrint", "false")
16002 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
16003 urls += "?" + c.urlParams_.Encode()
16004 req, err := http.NewRequest("DELETE", urls, body)
16005 if err != nil {
16006 return nil, err
16007 }
16008 req.Header = reqHeaders
16009 googleapi.Expand(req.URL, map[string]string{
16010 "name": c.name,
16011 })
16012 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16013 }
16014
16015
16016
16017
16018
16019
16020 func (c *ProjectsInstancesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
16021 gensupport.SetOptions(c.urlParams_, opts...)
16022 res, err := c.doRequest("json")
16023 if res != nil && res.StatusCode == http.StatusNotModified {
16024 if res.Body != nil {
16025 res.Body.Close()
16026 }
16027 return nil, gensupport.WrapError(&googleapi.Error{
16028 Code: res.StatusCode,
16029 Header: res.Header,
16030 })
16031 }
16032 if err != nil {
16033 return nil, err
16034 }
16035 defer googleapi.CloseBody(res)
16036 if err := googleapi.CheckResponse(res); err != nil {
16037 return nil, gensupport.WrapError(err)
16038 }
16039 ret := &Empty{
16040 ServerResponse: googleapi.ServerResponse{
16041 Header: res.Header,
16042 HTTPStatusCode: res.StatusCode,
16043 },
16044 }
16045 target := &ret
16046 if err := gensupport.DecodeResponse(target, res); err != nil {
16047 return nil, err
16048 }
16049 return ret, nil
16050 }
16051
16052 type ProjectsInstancesOperationsGetCall struct {
16053 s *Service
16054 name string
16055 urlParams_ gensupport.URLParams
16056 ifNoneMatch_ string
16057 ctx_ context.Context
16058 header_ http.Header
16059 }
16060
16061
16062
16063
16064
16065
16066 func (r *ProjectsInstancesOperationsService) Get(name string) *ProjectsInstancesOperationsGetCall {
16067 c := &ProjectsInstancesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16068 c.name = name
16069 return c
16070 }
16071
16072
16073
16074
16075 func (c *ProjectsInstancesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesOperationsGetCall {
16076 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16077 return c
16078 }
16079
16080
16081
16082
16083 func (c *ProjectsInstancesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesOperationsGetCall {
16084 c.ifNoneMatch_ = entityTag
16085 return c
16086 }
16087
16088
16089 func (c *ProjectsInstancesOperationsGetCall) Context(ctx context.Context) *ProjectsInstancesOperationsGetCall {
16090 c.ctx_ = ctx
16091 return c
16092 }
16093
16094
16095
16096 func (c *ProjectsInstancesOperationsGetCall) Header() http.Header {
16097 if c.header_ == nil {
16098 c.header_ = make(http.Header)
16099 }
16100 return c.header_
16101 }
16102
16103 func (c *ProjectsInstancesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
16104 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16105 if c.ifNoneMatch_ != "" {
16106 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16107 }
16108 var body io.Reader = nil
16109 c.urlParams_.Set("alt", alt)
16110 c.urlParams_.Set("prettyPrint", "false")
16111 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
16112 urls += "?" + c.urlParams_.Encode()
16113 req, err := http.NewRequest("GET", urls, body)
16114 if err != nil {
16115 return nil, err
16116 }
16117 req.Header = reqHeaders
16118 googleapi.Expand(req.URL, map[string]string{
16119 "name": c.name,
16120 })
16121 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16122 }
16123
16124
16125
16126
16127
16128
16129 func (c *ProjectsInstancesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16130 gensupport.SetOptions(c.urlParams_, opts...)
16131 res, err := c.doRequest("json")
16132 if res != nil && res.StatusCode == http.StatusNotModified {
16133 if res.Body != nil {
16134 res.Body.Close()
16135 }
16136 return nil, gensupport.WrapError(&googleapi.Error{
16137 Code: res.StatusCode,
16138 Header: res.Header,
16139 })
16140 }
16141 if err != nil {
16142 return nil, err
16143 }
16144 defer googleapi.CloseBody(res)
16145 if err := googleapi.CheckResponse(res); err != nil {
16146 return nil, gensupport.WrapError(err)
16147 }
16148 ret := &Operation{
16149 ServerResponse: googleapi.ServerResponse{
16150 Header: res.Header,
16151 HTTPStatusCode: res.StatusCode,
16152 },
16153 }
16154 target := &ret
16155 if err := gensupport.DecodeResponse(target, res); err != nil {
16156 return nil, err
16157 }
16158 return ret, nil
16159 }
16160
16161 type ProjectsInstancesOperationsListCall struct {
16162 s *Service
16163 name string
16164 urlParams_ gensupport.URLParams
16165 ifNoneMatch_ string
16166 ctx_ context.Context
16167 header_ http.Header
16168 }
16169
16170
16171
16172
16173
16174 func (r *ProjectsInstancesOperationsService) List(name string) *ProjectsInstancesOperationsListCall {
16175 c := &ProjectsInstancesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16176 c.name = name
16177 return c
16178 }
16179
16180
16181 func (c *ProjectsInstancesOperationsListCall) Filter(filter string) *ProjectsInstancesOperationsListCall {
16182 c.urlParams_.Set("filter", filter)
16183 return c
16184 }
16185
16186
16187
16188 func (c *ProjectsInstancesOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesOperationsListCall {
16189 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16190 return c
16191 }
16192
16193
16194
16195 func (c *ProjectsInstancesOperationsListCall) PageToken(pageToken string) *ProjectsInstancesOperationsListCall {
16196 c.urlParams_.Set("pageToken", pageToken)
16197 return c
16198 }
16199
16200
16201
16202
16203 func (c *ProjectsInstancesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesOperationsListCall {
16204 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16205 return c
16206 }
16207
16208
16209
16210
16211 func (c *ProjectsInstancesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesOperationsListCall {
16212 c.ifNoneMatch_ = entityTag
16213 return c
16214 }
16215
16216
16217 func (c *ProjectsInstancesOperationsListCall) Context(ctx context.Context) *ProjectsInstancesOperationsListCall {
16218 c.ctx_ = ctx
16219 return c
16220 }
16221
16222
16223
16224 func (c *ProjectsInstancesOperationsListCall) Header() http.Header {
16225 if c.header_ == nil {
16226 c.header_ = make(http.Header)
16227 }
16228 return c.header_
16229 }
16230
16231 func (c *ProjectsInstancesOperationsListCall) doRequest(alt string) (*http.Response, error) {
16232 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16233 if c.ifNoneMatch_ != "" {
16234 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16235 }
16236 var body io.Reader = nil
16237 c.urlParams_.Set("alt", alt)
16238 c.urlParams_.Set("prettyPrint", "false")
16239 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
16240 urls += "?" + c.urlParams_.Encode()
16241 req, err := http.NewRequest("GET", urls, body)
16242 if err != nil {
16243 return nil, err
16244 }
16245 req.Header = reqHeaders
16246 googleapi.Expand(req.URL, map[string]string{
16247 "name": c.name,
16248 })
16249 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16250 }
16251
16252
16253
16254
16255
16256
16257
16258 func (c *ProjectsInstancesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
16259 gensupport.SetOptions(c.urlParams_, opts...)
16260 res, err := c.doRequest("json")
16261 if res != nil && res.StatusCode == http.StatusNotModified {
16262 if res.Body != nil {
16263 res.Body.Close()
16264 }
16265 return nil, gensupport.WrapError(&googleapi.Error{
16266 Code: res.StatusCode,
16267 Header: res.Header,
16268 })
16269 }
16270 if err != nil {
16271 return nil, err
16272 }
16273 defer googleapi.CloseBody(res)
16274 if err := googleapi.CheckResponse(res); err != nil {
16275 return nil, gensupport.WrapError(err)
16276 }
16277 ret := &ListOperationsResponse{
16278 ServerResponse: googleapi.ServerResponse{
16279 Header: res.Header,
16280 HTTPStatusCode: res.StatusCode,
16281 },
16282 }
16283 target := &ret
16284 if err := gensupport.DecodeResponse(target, res); err != nil {
16285 return nil, err
16286 }
16287 return ret, nil
16288 }
16289
16290
16291
16292
16293 func (c *ProjectsInstancesOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
16294 c.ctx_ = ctx
16295 defer c.PageToken(c.urlParams_.Get("pageToken"))
16296 for {
16297 x, err := c.Do()
16298 if err != nil {
16299 return err
16300 }
16301 if err := f(x); err != nil {
16302 return err
16303 }
16304 if x.NextPageToken == "" {
16305 return nil
16306 }
16307 c.PageToken(x.NextPageToken)
16308 }
16309 }
16310
16311 type ScansListCall struct {
16312 s *Service
16313 parent string
16314 urlParams_ gensupport.URLParams
16315 ifNoneMatch_ string
16316 ctx_ context.Context
16317 header_ http.Header
16318 }
16319
16320
16321
16322
16323
16324 func (r *ScansService) List(parent string) *ScansListCall {
16325 c := &ScansListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16326 c.parent = parent
16327 return c
16328 }
16329
16330
16331
16332
16333 func (c *ScansListCall) Filter(filter string) *ScansListCall {
16334 c.urlParams_.Set("filter", filter)
16335 return c
16336 }
16337
16338
16339
16340 func (c *ScansListCall) PageSize(pageSize int64) *ScansListCall {
16341 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16342 return c
16343 }
16344
16345
16346
16347 func (c *ScansListCall) PageToken(pageToken string) *ScansListCall {
16348 c.urlParams_.Set("pageToken", pageToken)
16349 return c
16350 }
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367 func (c *ScansListCall) View(view string) *ScansListCall {
16368 c.urlParams_.Set("view", view)
16369 return c
16370 }
16371
16372
16373
16374
16375 func (c *ScansListCall) Fields(s ...googleapi.Field) *ScansListCall {
16376 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16377 return c
16378 }
16379
16380
16381
16382
16383 func (c *ScansListCall) IfNoneMatch(entityTag string) *ScansListCall {
16384 c.ifNoneMatch_ = entityTag
16385 return c
16386 }
16387
16388
16389 func (c *ScansListCall) Context(ctx context.Context) *ScansListCall {
16390 c.ctx_ = ctx
16391 return c
16392 }
16393
16394
16395
16396 func (c *ScansListCall) Header() http.Header {
16397 if c.header_ == nil {
16398 c.header_ = make(http.Header)
16399 }
16400 return c.header_
16401 }
16402
16403 func (c *ScansListCall) doRequest(alt string) (*http.Response, error) {
16404 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16405 if c.ifNoneMatch_ != "" {
16406 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16407 }
16408 var body io.Reader = nil
16409 c.urlParams_.Set("alt", alt)
16410 c.urlParams_.Set("prettyPrint", "false")
16411 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}")
16412 urls += "?" + c.urlParams_.Encode()
16413 req, err := http.NewRequest("GET", urls, body)
16414 if err != nil {
16415 return nil, err
16416 }
16417 req.Header = reqHeaders
16418 googleapi.Expand(req.URL, map[string]string{
16419 "parent": c.parent,
16420 })
16421 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16422 }
16423
16424
16425
16426
16427
16428
16429
16430 func (c *ScansListCall) Do(opts ...googleapi.CallOption) (*ListScansResponse, error) {
16431 gensupport.SetOptions(c.urlParams_, opts...)
16432 res, err := c.doRequest("json")
16433 if res != nil && res.StatusCode == http.StatusNotModified {
16434 if res.Body != nil {
16435 res.Body.Close()
16436 }
16437 return nil, gensupport.WrapError(&googleapi.Error{
16438 Code: res.StatusCode,
16439 Header: res.Header,
16440 })
16441 }
16442 if err != nil {
16443 return nil, err
16444 }
16445 defer googleapi.CloseBody(res)
16446 if err := googleapi.CheckResponse(res); err != nil {
16447 return nil, gensupport.WrapError(err)
16448 }
16449 ret := &ListScansResponse{
16450 ServerResponse: googleapi.ServerResponse{
16451 Header: res.Header,
16452 HTTPStatusCode: res.StatusCode,
16453 },
16454 }
16455 target := &ret
16456 if err := gensupport.DecodeResponse(target, res); err != nil {
16457 return nil, err
16458 }
16459 return ret, nil
16460 }
16461
16462
16463
16464
16465 func (c *ScansListCall) Pages(ctx context.Context, f func(*ListScansResponse) error) error {
16466 c.ctx_ = ctx
16467 defer c.PageToken(c.urlParams_.Get("pageToken"))
16468 for {
16469 x, err := c.Do()
16470 if err != nil {
16471 return err
16472 }
16473 if err := f(x); err != nil {
16474 return err
16475 }
16476 if x.NextPageToken == "" {
16477 return nil
16478 }
16479 c.PageToken(x.NextPageToken)
16480 }
16481 }
16482
View as plain text