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 package sqladmin
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "net/http"
66 "net/url"
67 "strconv"
68 "strings"
69
70 googleapi "google.golang.org/api/googleapi"
71 internal "google.golang.org/api/internal"
72 gensupport "google.golang.org/api/internal/gensupport"
73 option "google.golang.org/api/option"
74 internaloption "google.golang.org/api/option/internaloption"
75 htransport "google.golang.org/api/transport/http"
76 )
77
78
79
80 var _ = bytes.NewBuffer
81 var _ = strconv.Itoa
82 var _ = fmt.Sprintf
83 var _ = json.NewDecoder
84 var _ = io.Copy
85 var _ = url.Parse
86 var _ = gensupport.MarshalJSON
87 var _ = googleapi.Version
88 var _ = errors.New
89 var _ = strings.Replace
90 var _ = context.Canceled
91 var _ = internaloption.WithDefaultEndpoint
92 var _ = internal.Version
93
94 const apiId = "sqladmin:v1"
95 const apiName = "sqladmin"
96 const apiVersion = "v1"
97 const basePath = "https://sqladmin.googleapis.com/"
98 const basePathTemplate = "https://sqladmin.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://sqladmin.mtls.googleapis.com/"
100
101
102 const (
103
104
105 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
106
107
108 SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservice.admin"
109 )
110
111
112 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
113 scopesOption := internaloption.WithDefaultScopes(
114 "https://www.googleapis.com/auth/cloud-platform",
115 "https://www.googleapis.com/auth/sqlservice.admin",
116 )
117
118 opts = append([]option.ClientOption{scopesOption}, opts...)
119 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
120 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
121 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
122 opts = append(opts, internaloption.EnableNewAuthLibrary())
123 client, endpoint, err := htransport.NewClient(ctx, opts...)
124 if err != nil {
125 return nil, err
126 }
127 s, err := New(client)
128 if err != nil {
129 return nil, err
130 }
131 if endpoint != "" {
132 s.BasePath = endpoint
133 }
134 return s, nil
135 }
136
137
138
139
140
141
142 func New(client *http.Client) (*Service, error) {
143 if client == nil {
144 return nil, errors.New("client is nil")
145 }
146 s := &Service{client: client, BasePath: basePath}
147 s.BackupRuns = NewBackupRunsService(s)
148 s.Connect = NewConnectService(s)
149 s.Databases = NewDatabasesService(s)
150 s.Flags = NewFlagsService(s)
151 s.Instances = NewInstancesService(s)
152 s.Operations = NewOperationsService(s)
153 s.Projects = NewProjectsService(s)
154 s.SslCerts = NewSslCertsService(s)
155 s.Tiers = NewTiersService(s)
156 s.Users = NewUsersService(s)
157 return s, nil
158 }
159
160 type Service struct {
161 client *http.Client
162 BasePath string
163 UserAgent string
164
165 BackupRuns *BackupRunsService
166
167 Connect *ConnectService
168
169 Databases *DatabasesService
170
171 Flags *FlagsService
172
173 Instances *InstancesService
174
175 Operations *OperationsService
176
177 Projects *ProjectsService
178
179 SslCerts *SslCertsService
180
181 Tiers *TiersService
182
183 Users *UsersService
184 }
185
186 func (s *Service) userAgent() string {
187 if s.UserAgent == "" {
188 return googleapi.UserAgent
189 }
190 return googleapi.UserAgent + " " + s.UserAgent
191 }
192
193 func NewBackupRunsService(s *Service) *BackupRunsService {
194 rs := &BackupRunsService{s: s}
195 return rs
196 }
197
198 type BackupRunsService struct {
199 s *Service
200 }
201
202 func NewConnectService(s *Service) *ConnectService {
203 rs := &ConnectService{s: s}
204 return rs
205 }
206
207 type ConnectService struct {
208 s *Service
209 }
210
211 func NewDatabasesService(s *Service) *DatabasesService {
212 rs := &DatabasesService{s: s}
213 return rs
214 }
215
216 type DatabasesService struct {
217 s *Service
218 }
219
220 func NewFlagsService(s *Service) *FlagsService {
221 rs := &FlagsService{s: s}
222 return rs
223 }
224
225 type FlagsService struct {
226 s *Service
227 }
228
229 func NewInstancesService(s *Service) *InstancesService {
230 rs := &InstancesService{s: s}
231 return rs
232 }
233
234 type InstancesService struct {
235 s *Service
236 }
237
238 func NewOperationsService(s *Service) *OperationsService {
239 rs := &OperationsService{s: s}
240 return rs
241 }
242
243 type OperationsService struct {
244 s *Service
245 }
246
247 func NewProjectsService(s *Service) *ProjectsService {
248 rs := &ProjectsService{s: s}
249 rs.Instances = NewProjectsInstancesService(s)
250 return rs
251 }
252
253 type ProjectsService struct {
254 s *Service
255
256 Instances *ProjectsInstancesService
257 }
258
259 func NewProjectsInstancesService(s *Service) *ProjectsInstancesService {
260 rs := &ProjectsInstancesService{s: s}
261 return rs
262 }
263
264 type ProjectsInstancesService struct {
265 s *Service
266 }
267
268 func NewSslCertsService(s *Service) *SslCertsService {
269 rs := &SslCertsService{s: s}
270 return rs
271 }
272
273 type SslCertsService struct {
274 s *Service
275 }
276
277 func NewTiersService(s *Service) *TiersService {
278 rs := &TiersService{s: s}
279 return rs
280 }
281
282 type TiersService struct {
283 s *Service
284 }
285
286 func NewUsersService(s *Service) *UsersService {
287 rs := &UsersService{s: s}
288 return rs
289 }
290
291 type UsersService struct {
292 s *Service
293 }
294
295
296 type AclEntry struct {
297
298
299
300 ExpirationTime string `json:"expirationTime,omitempty"`
301
302 Kind string `json:"kind,omitempty"`
303
304 Name string `json:"name,omitempty"`
305
306 Value string `json:"value,omitempty"`
307
308
309
310
311
312 ForceSendFields []string `json:"-"`
313
314
315
316
317 NullFields []string `json:"-"`
318 }
319
320 func (s *AclEntry) MarshalJSON() ([]byte, error) {
321 type NoMethod AclEntry
322 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
323 }
324
325
326 type AcquireSsrsLeaseContext struct {
327
328 Duration string `json:"duration,omitempty"`
329
330 ReportDatabase string `json:"reportDatabase,omitempty"`
331
332
333 ServiceLogin string `json:"serviceLogin,omitempty"`
334
335
336 SetupLogin string `json:"setupLogin,omitempty"`
337
338
339
340
341
342 ForceSendFields []string `json:"-"`
343
344
345
346
347 NullFields []string `json:"-"`
348 }
349
350 func (s *AcquireSsrsLeaseContext) MarshalJSON() ([]byte, error) {
351 type NoMethod AcquireSsrsLeaseContext
352 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
353 }
354
355
356
357 type AdvancedMachineFeatures struct {
358
359 ThreadsPerCore int64 `json:"threadsPerCore,omitempty"`
360
361
362
363
364
365 ForceSendFields []string `json:"-"`
366
367
368
369
370 NullFields []string `json:"-"`
371 }
372
373 func (s *AdvancedMachineFeatures) MarshalJSON() ([]byte, error) {
374 type NoMethod AdvancedMachineFeatures
375 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
376 }
377
378
379 type ApiWarning struct {
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394 Code string `json:"code,omitempty"`
395
396 Message string `json:"message,omitempty"`
397
398 Region string `json:"region,omitempty"`
399
400
401
402
403
404 ForceSendFields []string `json:"-"`
405
406
407
408
409 NullFields []string `json:"-"`
410 }
411
412 func (s *ApiWarning) MarshalJSON() ([]byte, error) {
413 type NoMethod ApiWarning
414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
415 }
416
417
418 type BackupConfiguration struct {
419
420 BackupRetentionSettings *BackupRetentionSettings `json:"backupRetentionSettings,omitempty"`
421
422
423 BinaryLogEnabled bool `json:"binaryLogEnabled,omitempty"`
424
425 Enabled bool `json:"enabled,omitempty"`
426
427 Kind string `json:"kind,omitempty"`
428
429 Location string `json:"location,omitempty"`
430
431 PointInTimeRecoveryEnabled bool `json:"pointInTimeRecoveryEnabled,omitempty"`
432
433 ReplicationLogArchivingEnabled bool `json:"replicationLogArchivingEnabled,omitempty"`
434
435
436 StartTime string `json:"startTime,omitempty"`
437
438
439 TransactionLogRetentionDays int64 `json:"transactionLogRetentionDays,omitempty"`
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456 TransactionalLogStorageState string `json:"transactionalLogStorageState,omitempty"`
457
458
459
460
461
462 ForceSendFields []string `json:"-"`
463
464
465
466
467 NullFields []string `json:"-"`
468 }
469
470 func (s *BackupConfiguration) MarshalJSON() ([]byte, error) {
471 type NoMethod BackupConfiguration
472 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
473 }
474
475
476 type BackupContext struct {
477
478 BackupId int64 `json:"backupId,omitempty,string"`
479
480 Kind string `json:"kind,omitempty"`
481
482
483
484
485
486 ForceSendFields []string `json:"-"`
487
488
489
490
491 NullFields []string `json:"-"`
492 }
493
494 func (s *BackupContext) MarshalJSON() ([]byte, error) {
495 type NoMethod BackupContext
496 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
497 }
498
499
500 type BackupReencryptionConfig struct {
501
502 BackupLimit int64 `json:"backupLimit,omitempty"`
503
504
505
506
507
508
509
510 BackupType string `json:"backupType,omitempty"`
511
512
513
514
515
516 ForceSendFields []string `json:"-"`
517
518
519
520
521 NullFields []string `json:"-"`
522 }
523
524 func (s *BackupReencryptionConfig) MarshalJSON() ([]byte, error) {
525 type NoMethod BackupReencryptionConfig
526 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
527 }
528
529
530
531 type BackupRetentionSettings struct {
532
533
534
535 RetainedBackups int64 `json:"retainedBackups,omitempty"`
536
537
538
539
540
541
542
543 RetentionUnit string `json:"retentionUnit,omitempty"`
544
545
546
547
548
549 ForceSendFields []string `json:"-"`
550
551
552
553
554 NullFields []string `json:"-"`
555 }
556
557 func (s *BackupRetentionSettings) MarshalJSON() ([]byte, error) {
558 type NoMethod BackupRetentionSettings
559 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
560 }
561
562
563 type BackupRun struct {
564
565
566
567
568
569
570 BackupKind string `json:"backupKind,omitempty"`
571
572
573 Description string `json:"description,omitempty"`
574
575 DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"`
576
577 DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"`
578
579
580
581 EndTime string `json:"endTime,omitempty"`
582
583
584
585 EnqueuedTime string `json:"enqueuedTime,omitempty"`
586
587
588 Error *OperationError `json:"error,omitempty"`
589
590
591 Id int64 `json:"id,omitempty,string"`
592
593 Instance string `json:"instance,omitempty"`
594
595 Kind string `json:"kind,omitempty"`
596
597 Location string `json:"location,omitempty"`
598
599 SelfLink string `json:"selfLink,omitempty"`
600
601
602
603 StartTime string `json:"startTime,omitempty"`
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620 Status string `json:"status,omitempty"`
621
622
623 TimeZone string `json:"timeZone,omitempty"`
624
625
626
627
628
629
630
631
632 Type string `json:"type,omitempty"`
633
634
635
636 WindowStartTime string `json:"windowStartTime,omitempty"`
637
638
639 googleapi.ServerResponse `json:"-"`
640
641
642
643
644
645 ForceSendFields []string `json:"-"`
646
647
648
649
650 NullFields []string `json:"-"`
651 }
652
653 func (s *BackupRun) MarshalJSON() ([]byte, error) {
654 type NoMethod BackupRun
655 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
656 }
657
658
659 type BackupRunsListResponse struct {
660
661
662 Items []*BackupRun `json:"items,omitempty"`
663
664 Kind string `json:"kind,omitempty"`
665
666
667
668 NextPageToken string `json:"nextPageToken,omitempty"`
669
670
671 googleapi.ServerResponse `json:"-"`
672
673
674
675
676
677 ForceSendFields []string `json:"-"`
678
679
680
681
682 NullFields []string `json:"-"`
683 }
684
685 func (s *BackupRunsListResponse) MarshalJSON() ([]byte, error) {
686 type NoMethod BackupRunsListResponse
687 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
688 }
689
690
691 type BinLogCoordinates struct {
692
693 BinLogFileName string `json:"binLogFileName,omitempty"`
694
695 BinLogPosition int64 `json:"binLogPosition,omitempty,string"`
696
697 Kind string `json:"kind,omitempty"`
698
699
700
701
702
703 ForceSendFields []string `json:"-"`
704
705
706
707
708 NullFields []string `json:"-"`
709 }
710
711 func (s *BinLogCoordinates) MarshalJSON() ([]byte, error) {
712 type NoMethod BinLogCoordinates
713 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
714 }
715
716
717 type CloneContext struct {
718
719
720
721
722
723
724 AllocatedIpRange string `json:"allocatedIpRange,omitempty"`
725
726
727
728 BinLogCoordinates *BinLogCoordinates `json:"binLogCoordinates,omitempty"`
729
730
731 DatabaseNames []string `json:"databaseNames,omitempty"`
732
733
734 DestinationInstanceName string `json:"destinationInstanceName,omitempty"`
735
736 Kind string `json:"kind,omitempty"`
737
738 PitrTimestampMs int64 `json:"pitrTimestampMs,omitempty,string"`
739
740
741 PointInTime string `json:"pointInTime,omitempty"`
742
743
744
745 PreferredZone string `json:"preferredZone,omitempty"`
746
747
748
749
750
751 ForceSendFields []string `json:"-"`
752
753
754
755
756 NullFields []string `json:"-"`
757 }
758
759 func (s *CloneContext) MarshalJSON() ([]byte, error) {
760 type NoMethod CloneContext
761 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
762 }
763
764
765 type ConnectSettings struct {
766
767
768
769
770
771
772
773
774
775
776
777 BackendType string `json:"backendType,omitempty"`
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855 DatabaseVersion string `json:"databaseVersion,omitempty"`
856
857 DnsName string `json:"dnsName,omitempty"`
858
859 IpAddresses []*IpMapping `json:"ipAddresses,omitempty"`
860
861 Kind string `json:"kind,omitempty"`
862
863 PscEnabled bool `json:"pscEnabled,omitempty"`
864
865
866 Region string `json:"region,omitempty"`
867
868 ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
869
870
871 googleapi.ServerResponse `json:"-"`
872
873
874
875
876
877 ForceSendFields []string `json:"-"`
878
879
880
881
882 NullFields []string `json:"-"`
883 }
884
885 func (s *ConnectSettings) MarshalJSON() ([]byte, error) {
886 type NoMethod ConnectSettings
887 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
888 }
889
890
891 type DataCacheConfig struct {
892
893 DataCacheEnabled bool `json:"dataCacheEnabled,omitempty"`
894
895
896
897
898
899 ForceSendFields []string `json:"-"`
900
901
902
903
904 NullFields []string `json:"-"`
905 }
906
907 func (s *DataCacheConfig) MarshalJSON() ([]byte, error) {
908 type NoMethod DataCacheConfig
909 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
910 }
911
912
913 type Database struct {
914
915 Charset string `json:"charset,omitempty"`
916
917 Collation string `json:"collation,omitempty"`
918
919
920 Etag string `json:"etag,omitempty"`
921
922
923 Instance string `json:"instance,omitempty"`
924
925 Kind string `json:"kind,omitempty"`
926
927
928 Name string `json:"name,omitempty"`
929
930
931 Project string `json:"project,omitempty"`
932
933 SelfLink string `json:"selfLink,omitempty"`
934 SqlserverDatabaseDetails *SqlServerDatabaseDetails `json:"sqlserverDatabaseDetails,omitempty"`
935
936
937 googleapi.ServerResponse `json:"-"`
938
939
940
941
942
943 ForceSendFields []string `json:"-"`
944
945
946
947
948 NullFields []string `json:"-"`
949 }
950
951 func (s *Database) MarshalJSON() ([]byte, error) {
952 type NoMethod Database
953 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
954 }
955
956
957 type DatabaseFlags struct {
958
959
960
961
962
963 Name string `json:"name,omitempty"`
964
965
966
967 Value string `json:"value,omitempty"`
968
969
970
971
972
973 ForceSendFields []string `json:"-"`
974
975
976
977
978 NullFields []string `json:"-"`
979 }
980
981 func (s *DatabaseFlags) MarshalJSON() ([]byte, error) {
982 type NoMethod DatabaseFlags
983 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
984 }
985
986
987 type DatabaseInstance struct {
988
989
990 AvailableMaintenanceVersions []string `json:"availableMaintenanceVersions,omitempty"`
991
992
993
994
995
996
997
998
999
1000
1001
1002 BackendType string `json:"backendType,omitempty"`
1003
1004
1005 ConnectionName string `json:"connectionName,omitempty"`
1006
1007
1008
1009 CreateTime string `json:"createTime,omitempty"`
1010
1011
1012
1013
1014
1015
1016 CurrentDiskSize int64 `json:"currentDiskSize,omitempty,string"`
1017
1018
1019 DatabaseInstalledVersion string `json:"databaseInstalledVersion,omitempty"`
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090 DatabaseVersion string `json:"databaseVersion,omitempty"`
1091
1092
1093 DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"`
1094
1095 DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"`
1096
1097 DnsName string `json:"dnsName,omitempty"`
1098
1099
1100 Etag string `json:"etag,omitempty"`
1101
1102 FailoverReplica *DatabaseInstanceFailoverReplica `json:"failoverReplica,omitempty"`
1103
1104
1105
1106
1107 GceZone string `json:"gceZone,omitempty"`
1108
1109 GeminiConfig *GeminiInstanceConfig `json:"geminiConfig,omitempty"`
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120 InstanceType string `json:"instanceType,omitempty"`
1121
1122 IpAddresses []*IpMapping `json:"ipAddresses,omitempty"`
1123
1124
1125 Ipv6Address string `json:"ipv6Address,omitempty"`
1126
1127 Kind string `json:"kind,omitempty"`
1128
1129 MaintenanceVersion string `json:"maintenanceVersion,omitempty"`
1130
1131
1132 MasterInstanceName string `json:"masterInstanceName,omitempty"`
1133
1134 MaxDiskSize int64 `json:"maxDiskSize,omitempty,string"`
1135
1136 Name string `json:"name,omitempty"`
1137
1138 OnPremisesConfiguration *OnPremisesConfiguration `json:"onPremisesConfiguration,omitempty"`
1139
1140
1141
1142
1143 OutOfDiskReport *SqlOutOfDiskReport `json:"outOfDiskReport,omitempty"`
1144
1145 PrimaryDnsName string `json:"primaryDnsName,omitempty"`
1146
1147
1148 Project string `json:"project,omitempty"`
1149
1150
1151 PscServiceAttachmentLink string `json:"pscServiceAttachmentLink,omitempty"`
1152
1153
1154
1155
1156 Region string `json:"region,omitempty"`
1157
1158
1159 ReplicaConfiguration *ReplicaConfiguration `json:"replicaConfiguration,omitempty"`
1160
1161 ReplicaNames []string `json:"replicaNames,omitempty"`
1162
1163
1164
1165
1166 ReplicationCluster *ReplicationCluster `json:"replicationCluster,omitempty"`
1167
1168
1169 RootPassword string `json:"rootPassword,omitempty"`
1170
1171
1172 SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
1173
1174
1175 ScheduledMaintenance *SqlScheduledMaintenance `json:"scheduledMaintenance,omitempty"`
1176
1177
1178
1179
1180 SecondaryGceZone string `json:"secondaryGceZone,omitempty"`
1181
1182 SelfLink string `json:"selfLink,omitempty"`
1183
1184 ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
1185
1186
1187 ServiceAccountEmailAddress string `json:"serviceAccountEmailAddress,omitempty"`
1188
1189 Settings *Settings `json:"settings,omitempty"`
1190
1191
1192
1193
1194
1195
1196 SqlNetworkArchitecture string `json:"sqlNetworkArchitecture,omitempty"`
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210 State string `json:"state,omitempty"`
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225 SuspensionReason []string `json:"suspensionReason,omitempty"`
1226
1227
1228 WriteEndpoint string `json:"writeEndpoint,omitempty"`
1229
1230
1231 googleapi.ServerResponse `json:"-"`
1232
1233
1234
1235
1236
1237 ForceSendFields []string `json:"-"`
1238
1239
1240
1241
1242 NullFields []string `json:"-"`
1243 }
1244
1245 func (s *DatabaseInstance) MarshalJSON() ([]byte, error) {
1246 type NoMethod DatabaseInstance
1247 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1248 }
1249
1250
1251
1252 type DatabaseInstanceFailoverReplica struct {
1253
1254
1255
1256 Available bool `json:"available,omitempty"`
1257
1258
1259
1260 Name string `json:"name,omitempty"`
1261
1262
1263
1264
1265
1266 ForceSendFields []string `json:"-"`
1267
1268
1269
1270
1271 NullFields []string `json:"-"`
1272 }
1273
1274 func (s *DatabaseInstanceFailoverReplica) MarshalJSON() ([]byte, error) {
1275 type NoMethod DatabaseInstanceFailoverReplica
1276 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1277 }
1278
1279
1280 type DatabasesListResponse struct {
1281
1282 Items []*Database `json:"items,omitempty"`
1283
1284 Kind string `json:"kind,omitempty"`
1285
1286
1287 googleapi.ServerResponse `json:"-"`
1288
1289
1290
1291
1292
1293 ForceSendFields []string `json:"-"`
1294
1295
1296
1297
1298 NullFields []string `json:"-"`
1299 }
1300
1301 func (s *DatabasesListResponse) MarshalJSON() ([]byte, error) {
1302 type NoMethod DatabasesListResponse
1303 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1304 }
1305
1306
1307
1308 type DemoteContext struct {
1309
1310 Kind string `json:"kind,omitempty"`
1311
1312
1313 SourceRepresentativeInstanceName string `json:"sourceRepresentativeInstanceName,omitempty"`
1314
1315
1316
1317
1318
1319 ForceSendFields []string `json:"-"`
1320
1321
1322
1323
1324 NullFields []string `json:"-"`
1325 }
1326
1327 func (s *DemoteContext) MarshalJSON() ([]byte, error) {
1328 type NoMethod DemoteContext
1329 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1330 }
1331
1332
1333
1334 type DemoteMasterConfiguration struct {
1335
1336 Kind string `json:"kind,omitempty"`
1337
1338
1339
1340
1341
1342
1343 MysqlReplicaConfiguration *DemoteMasterMySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`
1344
1345
1346
1347
1348
1349 ForceSendFields []string `json:"-"`
1350
1351
1352
1353
1354 NullFields []string `json:"-"`
1355 }
1356
1357 func (s *DemoteMasterConfiguration) MarshalJSON() ([]byte, error) {
1358 type NoMethod DemoteMasterConfiguration
1359 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1360 }
1361
1362
1363 type DemoteMasterContext struct {
1364
1365 Kind string `json:"kind,omitempty"`
1366
1367
1368 MasterInstanceName string `json:"masterInstanceName,omitempty"`
1369
1370
1371 ReplicaConfiguration *DemoteMasterConfiguration `json:"replicaConfiguration,omitempty"`
1372
1373 SkipReplicationSetup bool `json:"skipReplicationSetup,omitempty"`
1374
1375
1376
1377
1378
1379
1380
1381 VerifyGtidConsistency bool `json:"verifyGtidConsistency,omitempty"`
1382
1383
1384
1385
1386
1387 ForceSendFields []string `json:"-"`
1388
1389
1390
1391
1392 NullFields []string `json:"-"`
1393 }
1394
1395 func (s *DemoteMasterContext) MarshalJSON() ([]byte, error) {
1396 type NoMethod DemoteMasterContext
1397 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1398 }
1399
1400
1401
1402 type DemoteMasterMySqlReplicaConfiguration struct {
1403
1404 CaCertificate string `json:"caCertificate,omitempty"`
1405
1406 ClientCertificate string `json:"clientCertificate,omitempty"`
1407
1408
1409
1410 ClientKey string `json:"clientKey,omitempty"`
1411
1412 Kind string `json:"kind,omitempty"`
1413
1414 Password string `json:"password,omitempty"`
1415
1416 Username string `json:"username,omitempty"`
1417
1418
1419
1420
1421
1422 ForceSendFields []string `json:"-"`
1423
1424
1425
1426
1427 NullFields []string `json:"-"`
1428 }
1429
1430 func (s *DemoteMasterMySqlReplicaConfiguration) MarshalJSON() ([]byte, error) {
1431 type NoMethod DemoteMasterMySqlReplicaConfiguration
1432 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1433 }
1434
1435
1436
1437 type DenyMaintenancePeriod struct {
1438
1439
1440
1441
1442 EndDate string `json:"endDate,omitempty"`
1443
1444
1445
1446
1447 StartDate string `json:"startDate,omitempty"`
1448
1449
1450 Time string `json:"time,omitempty"`
1451
1452
1453
1454
1455
1456 ForceSendFields []string `json:"-"`
1457
1458
1459
1460
1461 NullFields []string `json:"-"`
1462 }
1463
1464 func (s *DenyMaintenancePeriod) MarshalJSON() ([]byte, error) {
1465 type NoMethod DenyMaintenancePeriod
1466 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1467 }
1468
1469
1470 type DiskEncryptionConfiguration struct {
1471
1472 Kind string `json:"kind,omitempty"`
1473
1474 KmsKeyName string `json:"kmsKeyName,omitempty"`
1475
1476
1477
1478
1479
1480 ForceSendFields []string `json:"-"`
1481
1482
1483
1484
1485 NullFields []string `json:"-"`
1486 }
1487
1488 func (s *DiskEncryptionConfiguration) MarshalJSON() ([]byte, error) {
1489 type NoMethod DiskEncryptionConfiguration
1490 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1491 }
1492
1493
1494 type DiskEncryptionStatus struct {
1495
1496 Kind string `json:"kind,omitempty"`
1497
1498
1499 KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"`
1500
1501
1502
1503
1504
1505 ForceSendFields []string `json:"-"`
1506
1507
1508
1509
1510 NullFields []string `json:"-"`
1511 }
1512
1513 func (s *DiskEncryptionStatus) MarshalJSON() ([]byte, error) {
1514 type NoMethod DiskEncryptionStatus
1515 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1516 }
1517
1518
1519
1520
1521
1522 type Empty struct {
1523
1524 googleapi.ServerResponse `json:"-"`
1525 }
1526
1527
1528 type ExportContext struct {
1529
1530 BakExportOptions *ExportContextBakExportOptions `json:"bakExportOptions,omitempty"`
1531
1532
1533 CsvExportOptions *ExportContextCsvExportOptions `json:"csvExportOptions,omitempty"`
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543 Databases []string `json:"databases,omitempty"`
1544
1545
1546
1547
1548
1549
1550
1551 FileType string `json:"fileType,omitempty"`
1552
1553 Kind string `json:"kind,omitempty"`
1554
1555 Offload bool `json:"offload,omitempty"`
1556
1557 SqlExportOptions *ExportContextSqlExportOptions `json:"sqlExportOptions,omitempty"`
1558
1559
1560
1561
1562 Uri string `json:"uri,omitempty"`
1563
1564
1565
1566
1567
1568 ForceSendFields []string `json:"-"`
1569
1570
1571
1572
1573 NullFields []string `json:"-"`
1574 }
1575
1576 func (s *ExportContext) MarshalJSON() ([]byte, error) {
1577 type NoMethod ExportContext
1578 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1579 }
1580
1581
1582
1583 type ExportContextBakExportOptions struct {
1584
1585
1586
1587
1588
1589
1590
1591 BakType string `json:"bakType,omitempty"`
1592
1593 CopyOnly bool `json:"copyOnly,omitempty"`
1594
1595
1596 DifferentialBase bool `json:"differentialBase,omitempty"`
1597
1598
1599
1600 StripeCount int64 `json:"stripeCount,omitempty"`
1601
1602 Striped bool `json:"striped,omitempty"`
1603
1604
1605
1606
1607
1608 ForceSendFields []string `json:"-"`
1609
1610
1611
1612
1613 NullFields []string `json:"-"`
1614 }
1615
1616 func (s *ExportContextBakExportOptions) MarshalJSON() ([]byte, error) {
1617 type NoMethod ExportContextBakExportOptions
1618 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1619 }
1620
1621
1622
1623 type ExportContextCsvExportOptions struct {
1624
1625
1626 EscapeCharacter string `json:"escapeCharacter,omitempty"`
1627
1628
1629 FieldsTerminatedBy string `json:"fieldsTerminatedBy,omitempty"`
1630
1631
1632 LinesTerminatedBy string `json:"linesTerminatedBy,omitempty"`
1633
1634
1635 QuoteCharacter string `json:"quoteCharacter,omitempty"`
1636
1637 SelectQuery string `json:"selectQuery,omitempty"`
1638
1639
1640
1641
1642
1643 ForceSendFields []string `json:"-"`
1644
1645
1646
1647
1648 NullFields []string `json:"-"`
1649 }
1650
1651 func (s *ExportContextCsvExportOptions) MarshalJSON() ([]byte, error) {
1652 type NoMethod ExportContextCsvExportOptions
1653 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1654 }
1655
1656
1657 type ExportContextSqlExportOptions struct {
1658
1659 MysqlExportOptions *ExportContextSqlExportOptionsMysqlExportOptions `json:"mysqlExportOptions,omitempty"`
1660
1661 Parallel bool `json:"parallel,omitempty"`
1662
1663 SchemaOnly bool `json:"schemaOnly,omitempty"`
1664
1665
1666
1667 Tables []string `json:"tables,omitempty"`
1668
1669 Threads int64 `json:"threads,omitempty"`
1670
1671
1672
1673
1674
1675 ForceSendFields []string `json:"-"`
1676
1677
1678
1679
1680 NullFields []string `json:"-"`
1681 }
1682
1683 func (s *ExportContextSqlExportOptions) MarshalJSON() ([]byte, error) {
1684 type NoMethod ExportContextSqlExportOptions
1685 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1686 }
1687
1688
1689
1690 type ExportContextSqlExportOptionsMysqlExportOptions struct {
1691
1692
1693
1694
1695
1696 MasterData int64 `json:"masterData,omitempty"`
1697
1698
1699
1700
1701
1702 ForceSendFields []string `json:"-"`
1703
1704
1705
1706
1707 NullFields []string `json:"-"`
1708 }
1709
1710 func (s *ExportContextSqlExportOptionsMysqlExportOptions) MarshalJSON() ([]byte, error) {
1711 type NoMethod ExportContextSqlExportOptionsMysqlExportOptions
1712 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1713 }
1714
1715
1716 type FailoverContext struct {
1717
1718 Kind string `json:"kind,omitempty"`
1719
1720
1721 SettingsVersion int64 `json:"settingsVersion,omitempty,string"`
1722
1723
1724
1725
1726
1727 ForceSendFields []string `json:"-"`
1728
1729
1730
1731
1732 NullFields []string `json:"-"`
1733 }
1734
1735 func (s *FailoverContext) MarshalJSON() ([]byte, error) {
1736 type NoMethod FailoverContext
1737 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1738 }
1739
1740
1741 type Flag struct {
1742
1743
1744 AllowedIntValues googleapi.Int64s `json:"allowedIntValues,omitempty"`
1745
1746
1747 AllowedStringValues []string `json:"allowedStringValues,omitempty"`
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825 AppliesTo []string `json:"appliesTo,omitempty"`
1826
1827 InBeta bool `json:"inBeta,omitempty"`
1828
1829 Kind string `json:"kind,omitempty"`
1830
1831 MaxValue int64 `json:"maxValue,omitempty,string"`
1832
1833 MinValue int64 `json:"minValue,omitempty,string"`
1834
1835
1836 Name string `json:"name,omitempty"`
1837
1838
1839 RequiresRestart bool `json:"requiresRestart,omitempty"`
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855 Type string `json:"type,omitempty"`
1856
1857
1858
1859
1860
1861 ForceSendFields []string `json:"-"`
1862
1863
1864
1865
1866 NullFields []string `json:"-"`
1867 }
1868
1869 func (s *Flag) MarshalJSON() ([]byte, error) {
1870 type NoMethod Flag
1871 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1872 }
1873
1874
1875 type FlagsListResponse struct {
1876
1877 Items []*Flag `json:"items,omitempty"`
1878
1879 Kind string `json:"kind,omitempty"`
1880
1881
1882 googleapi.ServerResponse `json:"-"`
1883
1884
1885
1886
1887
1888 ForceSendFields []string `json:"-"`
1889
1890
1891
1892
1893 NullFields []string `json:"-"`
1894 }
1895
1896 func (s *FlagsListResponse) MarshalJSON() ([]byte, error) {
1897 type NoMethod FlagsListResponse
1898 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1899 }
1900
1901
1902 type GeminiInstanceConfig struct {
1903
1904 ActiveQueryEnabled bool `json:"activeQueryEnabled,omitempty"`
1905
1906 Entitled bool `json:"entitled,omitempty"`
1907
1908
1909 FlagRecommenderEnabled bool `json:"flagRecommenderEnabled,omitempty"`
1910
1911
1912 GoogleVacuumMgmtEnabled bool `json:"googleVacuumMgmtEnabled,omitempty"`
1913
1914 IndexAdvisorEnabled bool `json:"indexAdvisorEnabled,omitempty"`
1915
1916
1917 OomSessionCancelEnabled bool `json:"oomSessionCancelEnabled,omitempty"`
1918
1919
1920
1921
1922
1923 ForceSendFields []string `json:"-"`
1924
1925
1926
1927
1928 NullFields []string `json:"-"`
1929 }
1930
1931 func (s *GeminiInstanceConfig) MarshalJSON() ([]byte, error) {
1932 type NoMethod GeminiInstanceConfig
1933 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1934 }
1935
1936
1937 type GenerateEphemeralCertRequest struct {
1938
1939 AccessToken string `json:"access_token,omitempty"`
1940
1941 PublicKey string `json:"public_key,omitempty"`
1942
1943
1944 ReadTime string `json:"readTime,omitempty"`
1945
1946 ValidDuration string `json:"validDuration,omitempty"`
1947
1948
1949
1950
1951
1952 ForceSendFields []string `json:"-"`
1953
1954
1955
1956
1957 NullFields []string `json:"-"`
1958 }
1959
1960 func (s *GenerateEphemeralCertRequest) MarshalJSON() ([]byte, error) {
1961 type NoMethod GenerateEphemeralCertRequest
1962 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1963 }
1964
1965
1966 type GenerateEphemeralCertResponse struct {
1967
1968 EphemeralCert *SslCert `json:"ephemeralCert,omitempty"`
1969
1970
1971 googleapi.ServerResponse `json:"-"`
1972
1973
1974
1975
1976
1977 ForceSendFields []string `json:"-"`
1978
1979
1980
1981
1982 NullFields []string `json:"-"`
1983 }
1984
1985 func (s *GenerateEphemeralCertResponse) MarshalJSON() ([]byte, error) {
1986 type NoMethod GenerateEphemeralCertResponse
1987 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1988 }
1989
1990
1991 type ImportContext struct {
1992
1993 BakImportOptions *ImportContextBakImportOptions `json:"bakImportOptions,omitempty"`
1994
1995 CsvImportOptions *ImportContextCsvImportOptions `json:"csvImportOptions,omitempty"`
1996
1997
1998
1999
2000 Database string `json:"database,omitempty"`
2001
2002
2003
2004
2005
2006
2007
2008
2009 FileType string `json:"fileType,omitempty"`
2010
2011
2012 ImportUser string `json:"importUser,omitempty"`
2013
2014 Kind string `json:"kind,omitempty"`
2015
2016 SqlImportOptions *ImportContextSqlImportOptions `json:"sqlImportOptions,omitempty"`
2017
2018
2019
2020
2021 Uri string `json:"uri,omitempty"`
2022
2023
2024
2025
2026
2027 ForceSendFields []string `json:"-"`
2028
2029
2030
2031
2032 NullFields []string `json:"-"`
2033 }
2034
2035 func (s *ImportContext) MarshalJSON() ([]byte, error) {
2036 type NoMethod ImportContext
2037 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2038 }
2039
2040
2041
2042 type ImportContextBakImportOptions struct {
2043
2044
2045
2046
2047
2048
2049
2050 BakType string `json:"bakType,omitempty"`
2051 EncryptionOptions *ImportContextBakImportOptionsEncryptionOptions `json:"encryptionOptions,omitempty"`
2052
2053
2054 NoRecovery bool `json:"noRecovery,omitempty"`
2055
2056
2057
2058
2059 RecoveryOnly bool `json:"recoveryOnly,omitempty"`
2060
2061
2062
2063
2064 StopAt string `json:"stopAt,omitempty"`
2065
2066
2067
2068 StopAtMark string `json:"stopAtMark,omitempty"`
2069
2070
2071 Striped bool `json:"striped,omitempty"`
2072
2073
2074
2075
2076
2077 ForceSendFields []string `json:"-"`
2078
2079
2080
2081
2082 NullFields []string `json:"-"`
2083 }
2084
2085 func (s *ImportContextBakImportOptions) MarshalJSON() ([]byte, error) {
2086 type NoMethod ImportContextBakImportOptions
2087 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2088 }
2089
2090 type ImportContextBakImportOptionsEncryptionOptions struct {
2091
2092
2093
2094 CertPath string `json:"certPath,omitempty"`
2095
2096 PvkPassword string `json:"pvkPassword,omitempty"`
2097
2098
2099
2100 PvkPath string `json:"pvkPath,omitempty"`
2101
2102
2103
2104
2105
2106 ForceSendFields []string `json:"-"`
2107
2108
2109
2110
2111 NullFields []string `json:"-"`
2112 }
2113
2114 func (s *ImportContextBakImportOptionsEncryptionOptions) MarshalJSON() ([]byte, error) {
2115 type NoMethod ImportContextBakImportOptionsEncryptionOptions
2116 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2117 }
2118
2119
2120 type ImportContextCsvImportOptions struct {
2121
2122
2123 Columns []string `json:"columns,omitempty"`
2124
2125
2126 EscapeCharacter string `json:"escapeCharacter,omitempty"`
2127
2128
2129 FieldsTerminatedBy string `json:"fieldsTerminatedBy,omitempty"`
2130
2131
2132 LinesTerminatedBy string `json:"linesTerminatedBy,omitempty"`
2133
2134
2135 QuoteCharacter string `json:"quoteCharacter,omitempty"`
2136
2137 Table string `json:"table,omitempty"`
2138
2139
2140
2141
2142
2143 ForceSendFields []string `json:"-"`
2144
2145
2146
2147
2148 NullFields []string `json:"-"`
2149 }
2150
2151 func (s *ImportContextCsvImportOptions) MarshalJSON() ([]byte, error) {
2152 type NoMethod ImportContextCsvImportOptions
2153 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2154 }
2155
2156
2157
2158 type ImportContextSqlImportOptions struct {
2159
2160 Parallel bool `json:"parallel,omitempty"`
2161
2162 Threads int64 `json:"threads,omitempty"`
2163
2164
2165
2166
2167
2168 ForceSendFields []string `json:"-"`
2169
2170
2171
2172
2173 NullFields []string `json:"-"`
2174 }
2175
2176 func (s *ImportContextSqlImportOptions) MarshalJSON() ([]byte, error) {
2177 type NoMethod ImportContextSqlImportOptions
2178 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2179 }
2180
2181
2182
2183 type InsightsConfig struct {
2184
2185 QueryInsightsEnabled bool `json:"queryInsightsEnabled,omitempty"`
2186
2187
2188 QueryPlansPerMinute int64 `json:"queryPlansPerMinute,omitempty"`
2189
2190
2191
2192
2193 QueryStringLength int64 `json:"queryStringLength,omitempty"`
2194
2195
2196 RecordApplicationTags bool `json:"recordApplicationTags,omitempty"`
2197
2198
2199 RecordClientAddress bool `json:"recordClientAddress,omitempty"`
2200
2201
2202
2203
2204
2205 ForceSendFields []string `json:"-"`
2206
2207
2208
2209
2210 NullFields []string `json:"-"`
2211 }
2212
2213 func (s *InsightsConfig) MarshalJSON() ([]byte, error) {
2214 type NoMethod InsightsConfig
2215 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2216 }
2217
2218
2219 type InstanceReference struct {
2220
2221
2222 Name string `json:"name,omitempty"`
2223
2224
2225 Project string `json:"project,omitempty"`
2226
2227 Region string `json:"region,omitempty"`
2228
2229
2230
2231
2232
2233 ForceSendFields []string `json:"-"`
2234
2235
2236
2237
2238 NullFields []string `json:"-"`
2239 }
2240
2241 func (s *InstanceReference) MarshalJSON() ([]byte, error) {
2242 type NoMethod InstanceReference
2243 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2244 }
2245
2246
2247 type InstancesAcquireSsrsLeaseRequest struct {
2248
2249
2250 AcquireSsrsLeaseContext *AcquireSsrsLeaseContext `json:"acquireSsrsLeaseContext,omitempty"`
2251
2252
2253
2254
2255
2256 ForceSendFields []string `json:"-"`
2257
2258
2259
2260
2261 NullFields []string `json:"-"`
2262 }
2263
2264 func (s *InstancesAcquireSsrsLeaseRequest) MarshalJSON() ([]byte, error) {
2265 type NoMethod InstancesAcquireSsrsLeaseRequest
2266 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2267 }
2268
2269
2270 type InstancesCloneRequest struct {
2271
2272 CloneContext *CloneContext `json:"cloneContext,omitempty"`
2273
2274
2275
2276
2277
2278 ForceSendFields []string `json:"-"`
2279
2280
2281
2282
2283 NullFields []string `json:"-"`
2284 }
2285
2286 func (s *InstancesCloneRequest) MarshalJSON() ([]byte, error) {
2287 type NoMethod InstancesCloneRequest
2288 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2289 }
2290
2291
2292 type InstancesDemoteMasterRequest struct {
2293
2294 DemoteMasterContext *DemoteMasterContext `json:"demoteMasterContext,omitempty"`
2295
2296
2297
2298
2299
2300 ForceSendFields []string `json:"-"`
2301
2302
2303
2304
2305 NullFields []string `json:"-"`
2306 }
2307
2308 func (s *InstancesDemoteMasterRequest) MarshalJSON() ([]byte, error) {
2309 type NoMethod InstancesDemoteMasterRequest
2310 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2311 }
2312
2313
2314
2315
2316 type InstancesDemoteRequest struct {
2317
2318 DemoteContext *DemoteContext `json:"demoteContext,omitempty"`
2319
2320
2321
2322
2323
2324 ForceSendFields []string `json:"-"`
2325
2326
2327
2328
2329 NullFields []string `json:"-"`
2330 }
2331
2332 func (s *InstancesDemoteRequest) MarshalJSON() ([]byte, error) {
2333 type NoMethod InstancesDemoteRequest
2334 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2335 }
2336
2337
2338 type InstancesExportRequest struct {
2339
2340 ExportContext *ExportContext `json:"exportContext,omitempty"`
2341
2342
2343
2344
2345
2346 ForceSendFields []string `json:"-"`
2347
2348
2349
2350
2351 NullFields []string `json:"-"`
2352 }
2353
2354 func (s *InstancesExportRequest) MarshalJSON() ([]byte, error) {
2355 type NoMethod InstancesExportRequest
2356 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2357 }
2358
2359
2360 type InstancesFailoverRequest struct {
2361
2362 FailoverContext *FailoverContext `json:"failoverContext,omitempty"`
2363
2364
2365
2366
2367
2368 ForceSendFields []string `json:"-"`
2369
2370
2371
2372
2373 NullFields []string `json:"-"`
2374 }
2375
2376 func (s *InstancesFailoverRequest) MarshalJSON() ([]byte, error) {
2377 type NoMethod InstancesFailoverRequest
2378 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2379 }
2380
2381
2382 type InstancesImportRequest struct {
2383
2384 ImportContext *ImportContext `json:"importContext,omitempty"`
2385
2386
2387
2388
2389
2390 ForceSendFields []string `json:"-"`
2391
2392
2393
2394
2395 NullFields []string `json:"-"`
2396 }
2397
2398 func (s *InstancesImportRequest) MarshalJSON() ([]byte, error) {
2399 type NoMethod InstancesImportRequest
2400 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2401 }
2402
2403
2404 type InstancesListResponse struct {
2405
2406 Items []*DatabaseInstance `json:"items,omitempty"`
2407
2408 Kind string `json:"kind,omitempty"`
2409
2410
2411
2412 NextPageToken string `json:"nextPageToken,omitempty"`
2413
2414 Warnings []*ApiWarning `json:"warnings,omitempty"`
2415
2416
2417 googleapi.ServerResponse `json:"-"`
2418
2419
2420
2421
2422
2423 ForceSendFields []string `json:"-"`
2424
2425
2426
2427
2428 NullFields []string `json:"-"`
2429 }
2430
2431 func (s *InstancesListResponse) MarshalJSON() ([]byte, error) {
2432 type NoMethod InstancesListResponse
2433 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2434 }
2435
2436
2437 type InstancesListServerCasResponse struct {
2438 ActiveVersion string `json:"activeVersion,omitempty"`
2439
2440 Certs []*SslCert `json:"certs,omitempty"`
2441
2442 Kind string `json:"kind,omitempty"`
2443
2444
2445 googleapi.ServerResponse `json:"-"`
2446
2447
2448
2449
2450
2451 ForceSendFields []string `json:"-"`
2452
2453
2454
2455
2456 NullFields []string `json:"-"`
2457 }
2458
2459 func (s *InstancesListServerCasResponse) MarshalJSON() ([]byte, error) {
2460 type NoMethod InstancesListServerCasResponse
2461 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2462 }
2463
2464
2465 type InstancesReencryptRequest struct {
2466
2467 BackupReencryptionConfig *BackupReencryptionConfig `json:"backupReencryptionConfig,omitempty"`
2468
2469
2470
2471
2472
2473 ForceSendFields []string `json:"-"`
2474
2475
2476
2477
2478 NullFields []string `json:"-"`
2479 }
2480
2481 func (s *InstancesReencryptRequest) MarshalJSON() ([]byte, error) {
2482 type NoMethod InstancesReencryptRequest
2483 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2484 }
2485
2486
2487 type InstancesRestoreBackupRequest struct {
2488
2489
2490 RestoreBackupContext *RestoreBackupContext `json:"restoreBackupContext,omitempty"`
2491
2492
2493
2494
2495
2496 ForceSendFields []string `json:"-"`
2497
2498
2499
2500
2501 NullFields []string `json:"-"`
2502 }
2503
2504 func (s *InstancesRestoreBackupRequest) MarshalJSON() ([]byte, error) {
2505 type NoMethod InstancesRestoreBackupRequest
2506 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2507 }
2508
2509
2510 type InstancesRotateServerCaRequest struct {
2511
2512
2513 RotateServerCaContext *RotateServerCaContext `json:"rotateServerCaContext,omitempty"`
2514
2515
2516
2517
2518
2519 ForceSendFields []string `json:"-"`
2520
2521
2522
2523
2524 NullFields []string `json:"-"`
2525 }
2526
2527 func (s *InstancesRotateServerCaRequest) MarshalJSON() ([]byte, error) {
2528 type NoMethod InstancesRotateServerCaRequest
2529 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2530 }
2531
2532
2533 type InstancesTruncateLogRequest struct {
2534
2535 TruncateLogContext *TruncateLogContext `json:"truncateLogContext,omitempty"`
2536
2537
2538
2539
2540
2541 ForceSendFields []string `json:"-"`
2542
2543
2544
2545
2546 NullFields []string `json:"-"`
2547 }
2548
2549 func (s *InstancesTruncateLogRequest) MarshalJSON() ([]byte, error) {
2550 type NoMethod InstancesTruncateLogRequest
2551 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2552 }
2553
2554
2555 type IpConfiguration struct {
2556
2557
2558
2559
2560
2561
2562 AllocatedIpRange string `json:"allocatedIpRange,omitempty"`
2563
2564
2565
2566 AuthorizedNetworks []*AclEntry `json:"authorizedNetworks,omitempty"`
2567
2568
2569 EnablePrivatePathForGoogleCloudServices bool `json:"enablePrivatePathForGoogleCloudServices,omitempty"`
2570
2571 Ipv4Enabled bool `json:"ipv4Enabled,omitempty"`
2572
2573
2574
2575
2576 PrivateNetwork string `json:"privateNetwork,omitempty"`
2577
2578 PscConfig *PscConfig `json:"pscConfig,omitempty"`
2579
2580
2581
2582
2583
2584
2585
2586 RequireSsl bool `json:"requireSsl,omitempty"`
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623 SslMode string `json:"sslMode,omitempty"`
2624
2625
2626
2627
2628
2629 ForceSendFields []string `json:"-"`
2630
2631
2632
2633
2634 NullFields []string `json:"-"`
2635 }
2636
2637 func (s *IpConfiguration) MarshalJSON() ([]byte, error) {
2638 type NoMethod IpConfiguration
2639 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2640 }
2641
2642
2643 type IpMapping struct {
2644
2645 IpAddress string `json:"ipAddress,omitempty"`
2646
2647
2648
2649
2650 TimeToRetire string `json:"timeToRetire,omitempty"`
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668 Type string `json:"type,omitempty"`
2669
2670
2671
2672
2673
2674 ForceSendFields []string `json:"-"`
2675
2676
2677
2678
2679 NullFields []string `json:"-"`
2680 }
2681
2682 func (s *IpMapping) MarshalJSON() ([]byte, error) {
2683 type NoMethod IpMapping
2684 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2685 }
2686
2687
2688
2689
2690
2691 type LocationPreference struct {
2692
2693
2694
2695 FollowGaeApplication string `json:"followGaeApplication,omitempty"`
2696
2697 Kind string `json:"kind,omitempty"`
2698
2699
2700
2701 SecondaryZone string `json:"secondaryZone,omitempty"`
2702
2703
2704 Zone string `json:"zone,omitempty"`
2705
2706
2707
2708
2709
2710 ForceSendFields []string `json:"-"`
2711
2712
2713
2714
2715 NullFields []string `json:"-"`
2716 }
2717
2718 func (s *LocationPreference) MarshalJSON() ([]byte, error) {
2719 type NoMethod LocationPreference
2720 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2721 }
2722
2723
2724
2725 type MaintenanceWindow struct {
2726
2727 Day int64 `json:"day,omitempty"`
2728
2729 Hour int64 `json:"hour,omitempty"`
2730
2731 Kind string `json:"kind,omitempty"`
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749 UpdateTrack string `json:"updateTrack,omitempty"`
2750
2751
2752
2753
2754
2755 ForceSendFields []string `json:"-"`
2756
2757
2758
2759
2760 NullFields []string `json:"-"`
2761 }
2762
2763 func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
2764 type NoMethod MaintenanceWindow
2765 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2766 }
2767
2768
2769
2770 type MySqlReplicaConfiguration struct {
2771
2772 CaCertificate string `json:"caCertificate,omitempty"`
2773
2774 ClientCertificate string `json:"clientCertificate,omitempty"`
2775
2776
2777 ClientKey string `json:"clientKey,omitempty"`
2778
2779
2780 ConnectRetryInterval int64 `json:"connectRetryInterval,omitempty"`
2781
2782
2783
2784
2785
2786 DumpFilePath string `json:"dumpFilePath,omitempty"`
2787
2788 Kind string `json:"kind,omitempty"`
2789
2790
2791 MasterHeartbeatPeriod int64 `json:"masterHeartbeatPeriod,omitempty,string"`
2792
2793 Password string `json:"password,omitempty"`
2794
2795 SslCipher string `json:"sslCipher,omitempty"`
2796
2797 Username string `json:"username,omitempty"`
2798
2799
2800 VerifyServerCertificate bool `json:"verifyServerCertificate,omitempty"`
2801
2802
2803
2804
2805
2806 ForceSendFields []string `json:"-"`
2807
2808
2809
2810
2811 NullFields []string `json:"-"`
2812 }
2813
2814 func (s *MySqlReplicaConfiguration) MarshalJSON() ([]byte, error) {
2815 type NoMethod MySqlReplicaConfiguration
2816 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2817 }
2818
2819
2820 type MySqlSyncConfig struct {
2821
2822 InitialSyncFlags []*SyncFlags `json:"initialSyncFlags,omitempty"`
2823
2824
2825
2826
2827
2828 ForceSendFields []string `json:"-"`
2829
2830
2831
2832
2833 NullFields []string `json:"-"`
2834 }
2835
2836 func (s *MySqlSyncConfig) MarshalJSON() ([]byte, error) {
2837 type NoMethod MySqlSyncConfig
2838 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2839 }
2840
2841
2842 type OnPremisesConfiguration struct {
2843
2844 CaCertificate string `json:"caCertificate,omitempty"`
2845
2846 ClientCertificate string `json:"clientCertificate,omitempty"`
2847
2848
2849 ClientKey string `json:"clientKey,omitempty"`
2850
2851 DumpFilePath string `json:"dumpFilePath,omitempty"`
2852
2853 HostPort string `json:"hostPort,omitempty"`
2854
2855 Kind string `json:"kind,omitempty"`
2856
2857 Password string `json:"password,omitempty"`
2858
2859
2860 SourceInstance *InstanceReference `json:"sourceInstance,omitempty"`
2861
2862 Username string `json:"username,omitempty"`
2863
2864
2865
2866
2867
2868 ForceSendFields []string `json:"-"`
2869
2870
2871
2872
2873 NullFields []string `json:"-"`
2874 }
2875
2876 func (s *OnPremisesConfiguration) MarshalJSON() ([]byte, error) {
2877 type NoMethod OnPremisesConfiguration
2878 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2879 }
2880
2881
2882
2883
2884 type Operation struct {
2885
2886
2887 AcquireSsrsLeaseContext *AcquireSsrsLeaseContext `json:"acquireSsrsLeaseContext,omitempty"`
2888
2889 ApiWarning *ApiWarning `json:"apiWarning,omitempty"`
2890
2891 BackupContext *BackupContext `json:"backupContext,omitempty"`
2892
2893
2894
2895 EndTime string `json:"endTime,omitempty"`
2896
2897
2898 Error *OperationErrors `json:"error,omitempty"`
2899
2900 ExportContext *ExportContext `json:"exportContext,omitempty"`
2901
2902 ImportContext *ImportContext `json:"importContext,omitempty"`
2903
2904
2905
2906 InsertTime string `json:"insertTime,omitempty"`
2907
2908 Kind string `json:"kind,omitempty"`
2909
2910
2911
2912 Name string `json:"name,omitempty"`
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973 OperationType string `json:"operationType,omitempty"`
2974
2975 SelfLink string `json:"selfLink,omitempty"`
2976
2977
2978
2979 StartTime string `json:"startTime,omitempty"`
2980
2981
2982
2983
2984
2985
2986
2987
2988 Status string `json:"status,omitempty"`
2989
2990 TargetId string `json:"targetId,omitempty"`
2991 TargetLink string `json:"targetLink,omitempty"`
2992
2993
2994 TargetProject string `json:"targetProject,omitempty"`
2995
2996 User string `json:"user,omitempty"`
2997
2998
2999 googleapi.ServerResponse `json:"-"`
3000
3001
3002
3003
3004
3005 ForceSendFields []string `json:"-"`
3006
3007
3008
3009
3010 NullFields []string `json:"-"`
3011 }
3012
3013 func (s *Operation) MarshalJSON() ([]byte, error) {
3014 type NoMethod Operation
3015 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3016 }
3017
3018
3019 type OperationError struct {
3020
3021 Code string `json:"code,omitempty"`
3022
3023 Kind string `json:"kind,omitempty"`
3024
3025 Message string `json:"message,omitempty"`
3026
3027
3028
3029
3030
3031 ForceSendFields []string `json:"-"`
3032
3033
3034
3035
3036 NullFields []string `json:"-"`
3037 }
3038
3039 func (s *OperationError) MarshalJSON() ([]byte, error) {
3040 type NoMethod OperationError
3041 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3042 }
3043
3044
3045 type OperationErrors struct {
3046
3047 Errors []*OperationError `json:"errors,omitempty"`
3048
3049 Kind string `json:"kind,omitempty"`
3050
3051
3052
3053
3054
3055 ForceSendFields []string `json:"-"`
3056
3057
3058
3059
3060 NullFields []string `json:"-"`
3061 }
3062
3063 func (s *OperationErrors) MarshalJSON() ([]byte, error) {
3064 type NoMethod OperationErrors
3065 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3066 }
3067
3068
3069 type OperationMetadata struct {
3070
3071 ApiVersion string `json:"apiVersion,omitempty"`
3072
3073
3074
3075
3076 CancelRequested bool `json:"cancelRequested,omitempty"`
3077
3078 CreateTime string `json:"createTime,omitempty"`
3079
3080 EndTime string `json:"endTime,omitempty"`
3081
3082 StatusDetail string `json:"statusDetail,omitempty"`
3083
3084
3085 Target string `json:"target,omitempty"`
3086
3087 Verb string `json:"verb,omitempty"`
3088
3089
3090
3091
3092
3093 ForceSendFields []string `json:"-"`
3094
3095
3096
3097
3098 NullFields []string `json:"-"`
3099 }
3100
3101 func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
3102 type NoMethod OperationMetadata
3103 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3104 }
3105
3106
3107 type OperationsListResponse struct {
3108
3109 Items []*Operation `json:"items,omitempty"`
3110
3111 Kind string `json:"kind,omitempty"`
3112
3113
3114
3115 NextPageToken string `json:"nextPageToken,omitempty"`
3116
3117
3118 googleapi.ServerResponse `json:"-"`
3119
3120
3121
3122
3123
3124 ForceSendFields []string `json:"-"`
3125
3126
3127
3128
3129 NullFields []string `json:"-"`
3130 }
3131
3132 func (s *OperationsListResponse) MarshalJSON() ([]byte, error) {
3133 type NoMethod OperationsListResponse
3134 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3135 }
3136
3137
3138 type PasswordStatus struct {
3139
3140 Locked bool `json:"locked,omitempty"`
3141
3142 PasswordExpirationTime string `json:"passwordExpirationTime,omitempty"`
3143
3144
3145
3146
3147
3148 ForceSendFields []string `json:"-"`
3149
3150
3151
3152
3153 NullFields []string `json:"-"`
3154 }
3155
3156 func (s *PasswordStatus) MarshalJSON() ([]byte, error) {
3157 type NoMethod PasswordStatus
3158 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3159 }
3160
3161
3162
3163 type PasswordValidationPolicy struct {
3164
3165
3166
3167
3168
3169
3170 Complexity string `json:"complexity,omitempty"`
3171
3172
3173 DisallowCompromisedCredentials bool `json:"disallowCompromisedCredentials,omitempty"`
3174
3175 DisallowUsernameSubstring bool `json:"disallowUsernameSubstring,omitempty"`
3176
3177 EnablePasswordPolicy bool `json:"enablePasswordPolicy,omitempty"`
3178
3179 MinLength int64 `json:"minLength,omitempty"`
3180
3181
3182 PasswordChangeInterval string `json:"passwordChangeInterval,omitempty"`
3183
3184 ReuseInterval int64 `json:"reuseInterval,omitempty"`
3185
3186
3187
3188
3189
3190 ForceSendFields []string `json:"-"`
3191
3192
3193
3194
3195 NullFields []string `json:"-"`
3196 }
3197
3198 func (s *PasswordValidationPolicy) MarshalJSON() ([]byte, error) {
3199 type NoMethod PasswordValidationPolicy
3200 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3201 }
3202
3203
3204 type PerformDiskShrinkContext struct {
3205
3206 TargetSizeGb int64 `json:"targetSizeGb,omitempty,string"`
3207
3208
3209
3210
3211
3212 ForceSendFields []string `json:"-"`
3213
3214
3215
3216
3217 NullFields []string `json:"-"`
3218 }
3219
3220 func (s *PerformDiskShrinkContext) MarshalJSON() ([]byte, error) {
3221 type NoMethod PerformDiskShrinkContext
3222 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3223 }
3224
3225
3226 type PscConfig struct {
3227
3228
3229
3230
3231
3232 AllowedConsumerProjects []string `json:"allowedConsumerProjects,omitempty"`
3233
3234 PscEnabled bool `json:"pscEnabled,omitempty"`
3235
3236
3237
3238
3239
3240 ForceSendFields []string `json:"-"`
3241
3242
3243
3244
3245 NullFields []string `json:"-"`
3246 }
3247
3248 func (s *PscConfig) MarshalJSON() ([]byte, error) {
3249 type NoMethod PscConfig
3250 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3251 }
3252
3253
3254
3255 type ReplicaConfiguration struct {
3256
3257
3258
3259 CascadableReplica bool `json:"cascadableReplica,omitempty"`
3260
3261
3262
3263
3264
3265
3266 FailoverTarget bool `json:"failoverTarget,omitempty"`
3267
3268 Kind string `json:"kind,omitempty"`
3269
3270
3271
3272
3273
3274
3275 MysqlReplicaConfiguration *MySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`
3276
3277
3278
3279
3280
3281 ForceSendFields []string `json:"-"`
3282
3283
3284
3285
3286 NullFields []string `json:"-"`
3287 }
3288
3289 func (s *ReplicaConfiguration) MarshalJSON() ([]byte, error) {
3290 type NoMethod ReplicaConfiguration
3291 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3292 }
3293
3294
3295
3296
3297
3298 type ReplicationCluster struct {
3299
3300
3301
3302 DrReplica bool `json:"drReplica,omitempty"`
3303
3304
3305
3306
3307
3308
3309 FailoverDrReplicaName string `json:"failoverDrReplicaName,omitempty"`
3310
3311
3312
3313
3314
3315 ForceSendFields []string `json:"-"`
3316
3317
3318
3319
3320 NullFields []string `json:"-"`
3321 }
3322
3323 func (s *ReplicationCluster) MarshalJSON() ([]byte, error) {
3324 type NoMethod ReplicationCluster
3325 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3326 }
3327
3328 type Reschedule struct {
3329
3330
3331
3332
3333
3334
3335
3336
3337 RescheduleType string `json:"rescheduleType,omitempty"`
3338
3339
3340
3341
3342 ScheduleTime string `json:"scheduleTime,omitempty"`
3343
3344
3345
3346
3347
3348 ForceSendFields []string `json:"-"`
3349
3350
3351
3352
3353 NullFields []string `json:"-"`
3354 }
3355
3356 func (s *Reschedule) MarshalJSON() ([]byte, error) {
3357 type NoMethod Reschedule
3358 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3359 }
3360
3361
3362
3363 type RestoreBackupContext struct {
3364
3365 BackupRunId int64 `json:"backupRunId,omitempty,string"`
3366
3367 InstanceId string `json:"instanceId,omitempty"`
3368
3369 Kind string `json:"kind,omitempty"`
3370
3371 Project string `json:"project,omitempty"`
3372
3373
3374
3375
3376
3377 ForceSendFields []string `json:"-"`
3378
3379
3380
3381
3382 NullFields []string `json:"-"`
3383 }
3384
3385 func (s *RestoreBackupContext) MarshalJSON() ([]byte, error) {
3386 type NoMethod RestoreBackupContext
3387 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3388 }
3389
3390
3391 type RotateServerCaContext struct {
3392
3393 Kind string `json:"kind,omitempty"`
3394
3395
3396 NextVersion string `json:"nextVersion,omitempty"`
3397
3398
3399
3400
3401
3402 ForceSendFields []string `json:"-"`
3403
3404
3405
3406
3407 NullFields []string `json:"-"`
3408 }
3409
3410 func (s *RotateServerCaContext) MarshalJSON() ([]byte, error) {
3411 type NoMethod RotateServerCaContext
3412 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3413 }
3414
3415
3416 type Settings struct {
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428 ActivationPolicy string `json:"activationPolicy,omitempty"`
3429
3430
3431 ActiveDirectoryConfig *SqlActiveDirectoryConfig `json:"activeDirectoryConfig,omitempty"`
3432
3433
3434 AdvancedMachineFeatures *AdvancedMachineFeatures `json:"advancedMachineFeatures,omitempty"`
3435
3436
3437 AuthorizedGaeApplications []string `json:"authorizedGaeApplications,omitempty"`
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450 AvailabilityType string `json:"availabilityType,omitempty"`
3451
3452 BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`
3453
3454 Collation string `json:"collation,omitempty"`
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471 ConnectorEnforcement string `json:"connectorEnforcement,omitempty"`
3472
3473
3474
3475 CrashSafeReplicationEnabled bool `json:"crashSafeReplicationEnabled,omitempty"`
3476
3477 DataCacheConfig *DataCacheConfig `json:"dataCacheConfig,omitempty"`
3478
3479
3480 DataDiskSizeGb int64 `json:"dataDiskSizeGb,omitempty,string"`
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490 DataDiskType string `json:"dataDiskType,omitempty"`
3491
3492 DatabaseFlags []*DatabaseFlags `json:"databaseFlags,omitempty"`
3493
3494
3495
3496 DatabaseReplicationEnabled bool `json:"databaseReplicationEnabled,omitempty"`
3497
3498
3499 DeletionProtectionEnabled bool `json:"deletionProtectionEnabled,omitempty"`
3500
3501 DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"`
3502
3503
3504
3505
3506
3507
3508 Edition string `json:"edition,omitempty"`
3509
3510
3511
3512
3513 EnableGoogleMlIntegration bool `json:"enableGoogleMlIntegration,omitempty"`
3514
3515 InsightsConfig *InsightsConfig `json:"insightsConfig,omitempty"`
3516
3517
3518
3519
3520 IpConfiguration *IpConfiguration `json:"ipConfiguration,omitempty"`
3521
3522 Kind string `json:"kind,omitempty"`
3523
3524
3525
3526
3527 LocationPreference *LocationPreference `json:"locationPreference,omitempty"`
3528
3529
3530 MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
3531
3532
3533 PasswordValidationPolicy *PasswordValidationPolicy `json:"passwordValidationPolicy,omitempty"`
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543 PricingPlan string `json:"pricingPlan,omitempty"`
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557 ReplicationType string `json:"replicationType,omitempty"`
3558
3559
3560
3561
3562 SettingsVersion int64 `json:"settingsVersion,omitempty,string"`
3563
3564 SqlServerAuditConfig *SqlServerAuditConfig `json:"sqlServerAuditConfig,omitempty"`
3565
3566
3567 StorageAutoResize *bool `json:"storageAutoResize,omitempty"`
3568
3569
3570
3571 StorageAutoResizeLimit int64 `json:"storageAutoResizeLimit,omitempty,string"`
3572
3573
3574 Tier string `json:"tier,omitempty"`
3575
3576 TimeZone string `json:"timeZone,omitempty"`
3577
3578
3579 UserLabels map[string]string `json:"userLabels,omitempty"`
3580
3581
3582
3583
3584
3585 ForceSendFields []string `json:"-"`
3586
3587
3588
3589
3590 NullFields []string `json:"-"`
3591 }
3592
3593 func (s *Settings) MarshalJSON() ([]byte, error) {
3594 type NoMethod Settings
3595 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3596 }
3597
3598
3599
3600 type SqlActiveDirectoryConfig struct {
3601
3602 Domain string `json:"domain,omitempty"`
3603
3604 Kind string `json:"kind,omitempty"`
3605
3606
3607
3608
3609
3610 ForceSendFields []string `json:"-"`
3611
3612
3613
3614
3615 NullFields []string `json:"-"`
3616 }
3617
3618 func (s *SqlActiveDirectoryConfig) MarshalJSON() ([]byte, error) {
3619 type NoMethod SqlActiveDirectoryConfig
3620 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3621 }
3622
3623
3624
3625 type SqlExternalSyncSettingError struct {
3626
3627 Detail string `json:"detail,omitempty"`
3628
3629
3630 Kind string `json:"kind,omitempty"`
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721 Type string `json:"type,omitempty"`
3722
3723
3724
3725
3726
3727 ForceSendFields []string `json:"-"`
3728
3729
3730
3731
3732 NullFields []string `json:"-"`
3733 }
3734
3735 func (s *SqlExternalSyncSettingError) MarshalJSON() ([]byte, error) {
3736 type NoMethod SqlExternalSyncSettingError
3737 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3738 }
3739
3740
3741
3742 type SqlInstancesAcquireSsrsLeaseResponse struct {
3743
3744 OperationId string `json:"operationId,omitempty"`
3745
3746
3747 googleapi.ServerResponse `json:"-"`
3748
3749
3750
3751
3752
3753 ForceSendFields []string `json:"-"`
3754
3755
3756
3757
3758 NullFields []string `json:"-"`
3759 }
3760
3761 func (s *SqlInstancesAcquireSsrsLeaseResponse) MarshalJSON() ([]byte, error) {
3762 type NoMethod SqlInstancesAcquireSsrsLeaseResponse
3763 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3764 }
3765
3766
3767
3768 type SqlInstancesGetDiskShrinkConfigResponse struct {
3769
3770 Kind string `json:"kind,omitempty"`
3771
3772 Message string `json:"message,omitempty"`
3773
3774
3775 MinimalTargetSizeGb int64 `json:"minimalTargetSizeGb,omitempty,string"`
3776
3777
3778 googleapi.ServerResponse `json:"-"`
3779
3780
3781
3782
3783
3784 ForceSendFields []string `json:"-"`
3785
3786
3787
3788
3789 NullFields []string `json:"-"`
3790 }
3791
3792 func (s *SqlInstancesGetDiskShrinkConfigResponse) MarshalJSON() ([]byte, error) {
3793 type NoMethod SqlInstancesGetDiskShrinkConfigResponse
3794 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3795 }
3796
3797
3798
3799 type SqlInstancesGetLatestRecoveryTimeResponse struct {
3800
3801 Kind string `json:"kind,omitempty"`
3802
3803
3804 LatestRecoveryTime string `json:"latestRecoveryTime,omitempty"`
3805
3806
3807 googleapi.ServerResponse `json:"-"`
3808
3809
3810
3811
3812
3813 ForceSendFields []string `json:"-"`
3814
3815
3816
3817
3818 NullFields []string `json:"-"`
3819 }
3820
3821 func (s *SqlInstancesGetLatestRecoveryTimeResponse) MarshalJSON() ([]byte, error) {
3822 type NoMethod SqlInstancesGetLatestRecoveryTimeResponse
3823 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3824 }
3825
3826
3827
3828 type SqlInstancesReleaseSsrsLeaseResponse struct {
3829
3830 OperationId string `json:"operationId,omitempty"`
3831
3832
3833 googleapi.ServerResponse `json:"-"`
3834
3835
3836
3837
3838
3839 ForceSendFields []string `json:"-"`
3840
3841
3842
3843
3844 NullFields []string `json:"-"`
3845 }
3846
3847 func (s *SqlInstancesReleaseSsrsLeaseResponse) MarshalJSON() ([]byte, error) {
3848 type NoMethod SqlInstancesReleaseSsrsLeaseResponse
3849 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3850 }
3851
3852
3853
3854 type SqlInstancesRescheduleMaintenanceRequestBody struct {
3855
3856 Reschedule *Reschedule `json:"reschedule,omitempty"`
3857
3858
3859
3860
3861
3862 ForceSendFields []string `json:"-"`
3863
3864
3865
3866
3867 NullFields []string `json:"-"`
3868 }
3869
3870 func (s *SqlInstancesRescheduleMaintenanceRequestBody) MarshalJSON() ([]byte, error) {
3871 type NoMethod SqlInstancesRescheduleMaintenanceRequestBody
3872 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3873 }
3874
3875
3876 type SqlInstancesResetReplicaSizeRequest struct {
3877 }
3878
3879
3880 type SqlInstancesStartExternalSyncRequest struct {
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891 MigrationType string `json:"migrationType,omitempty"`
3892
3893 MysqlSyncConfig *MySqlSyncConfig `json:"mysqlSyncConfig,omitempty"`
3894
3895 SkipVerification bool `json:"skipVerification,omitempty"`
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905 SyncMode string `json:"syncMode,omitempty"`
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915 SyncParallelLevel string `json:"syncParallelLevel,omitempty"`
3916
3917
3918
3919
3920
3921 ForceSendFields []string `json:"-"`
3922
3923
3924
3925
3926 NullFields []string `json:"-"`
3927 }
3928
3929 func (s *SqlInstancesStartExternalSyncRequest) MarshalJSON() ([]byte, error) {
3930 type NoMethod SqlInstancesStartExternalSyncRequest
3931 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3932 }
3933
3934
3935
3936 type SqlInstancesVerifyExternalSyncSettingsRequest struct {
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947 MigrationType string `json:"migrationType,omitempty"`
3948
3949 MysqlSyncConfig *MySqlSyncConfig `json:"mysqlSyncConfig,omitempty"`
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959 SyncMode string `json:"syncMode,omitempty"`
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969 SyncParallelLevel string `json:"syncParallelLevel,omitempty"`
3970
3971 VerifyConnectionOnly bool `json:"verifyConnectionOnly,omitempty"`
3972
3973
3974 VerifyReplicationOnly bool `json:"verifyReplicationOnly,omitempty"`
3975
3976
3977
3978
3979
3980 ForceSendFields []string `json:"-"`
3981
3982
3983
3984
3985 NullFields []string `json:"-"`
3986 }
3987
3988 func (s *SqlInstancesVerifyExternalSyncSettingsRequest) MarshalJSON() ([]byte, error) {
3989 type NoMethod SqlInstancesVerifyExternalSyncSettingsRequest
3990 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3991 }
3992
3993
3994
3995 type SqlInstancesVerifyExternalSyncSettingsResponse struct {
3996
3997 Errors []*SqlExternalSyncSettingError `json:"errors,omitempty"`
3998
3999 Kind string `json:"kind,omitempty"`
4000
4001 Warnings []*SqlExternalSyncSettingError `json:"warnings,omitempty"`
4002
4003
4004 googleapi.ServerResponse `json:"-"`
4005
4006
4007
4008
4009
4010 ForceSendFields []string `json:"-"`
4011
4012
4013
4014
4015 NullFields []string `json:"-"`
4016 }
4017
4018 func (s *SqlInstancesVerifyExternalSyncSettingsResponse) MarshalJSON() ([]byte, error) {
4019 type NoMethod SqlInstancesVerifyExternalSyncSettingsResponse
4020 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4021 }
4022
4023
4024
4025 type SqlOutOfDiskReport struct {
4026
4027
4028
4029 SqlMinRecommendedIncreaseSizeGb int64 `json:"sqlMinRecommendedIncreaseSizeGb,omitempty"`
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040 SqlOutOfDiskState string `json:"sqlOutOfDiskState,omitempty"`
4041
4042
4043
4044
4045
4046
4047 ForceSendFields []string `json:"-"`
4048
4049
4050
4051
4052 NullFields []string `json:"-"`
4053 }
4054
4055 func (s *SqlOutOfDiskReport) MarshalJSON() ([]byte, error) {
4056 type NoMethod SqlOutOfDiskReport
4057 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4058 }
4059
4060
4061 type SqlScheduledMaintenance struct {
4062 CanDefer bool `json:"canDefer,omitempty"`
4063
4064 CanReschedule bool `json:"canReschedule,omitempty"`
4065
4066
4067 ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"`
4068
4069
4070 StartTime string `json:"startTime,omitempty"`
4071
4072
4073
4074
4075
4076 ForceSendFields []string `json:"-"`
4077
4078
4079
4080
4081 NullFields []string `json:"-"`
4082 }
4083
4084 func (s *SqlScheduledMaintenance) MarshalJSON() ([]byte, error) {
4085 type NoMethod SqlScheduledMaintenance
4086 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4087 }
4088
4089
4090 type SqlServerAuditConfig struct {
4091
4092 Bucket string `json:"bucket,omitempty"`
4093
4094 Kind string `json:"kind,omitempty"`
4095
4096 RetentionInterval string `json:"retentionInterval,omitempty"`
4097
4098 UploadInterval string `json:"uploadInterval,omitempty"`
4099
4100
4101
4102
4103
4104 ForceSendFields []string `json:"-"`
4105
4106
4107
4108
4109 NullFields []string `json:"-"`
4110 }
4111
4112 func (s *SqlServerAuditConfig) MarshalJSON() ([]byte, error) {
4113 type NoMethod SqlServerAuditConfig
4114 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4115 }
4116
4117
4118
4119 type SqlServerDatabaseDetails struct {
4120
4121
4122 CompatibilityLevel int64 `json:"compatibilityLevel,omitempty"`
4123
4124 RecoveryModel string `json:"recoveryModel,omitempty"`
4125
4126
4127
4128
4129
4130 ForceSendFields []string `json:"-"`
4131
4132
4133
4134
4135 NullFields []string `json:"-"`
4136 }
4137
4138 func (s *SqlServerDatabaseDetails) MarshalJSON() ([]byte, error) {
4139 type NoMethod SqlServerDatabaseDetails
4140 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4141 }
4142
4143
4144
4145 type SqlServerUserDetails struct {
4146
4147 Disabled bool `json:"disabled,omitempty"`
4148
4149 ServerRoles []string `json:"serverRoles,omitempty"`
4150
4151
4152
4153
4154
4155 ForceSendFields []string `json:"-"`
4156
4157
4158
4159
4160 NullFields []string `json:"-"`
4161 }
4162
4163 func (s *SqlServerUserDetails) MarshalJSON() ([]byte, error) {
4164 type NoMethod SqlServerUserDetails
4165 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4166 }
4167
4168
4169 type SslCert struct {
4170
4171 Cert string `json:"cert,omitempty"`
4172
4173 CertSerialNumber string `json:"certSerialNumber,omitempty"`
4174
4175 CommonName string `json:"commonName,omitempty"`
4176
4177
4178
4179 CreateTime string `json:"createTime,omitempty"`
4180
4181
4182
4183 ExpirationTime string `json:"expirationTime,omitempty"`
4184
4185 Instance string `json:"instance,omitempty"`
4186
4187 Kind string `json:"kind,omitempty"`
4188
4189 SelfLink string `json:"selfLink,omitempty"`
4190
4191 Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"`
4192
4193
4194 googleapi.ServerResponse `json:"-"`
4195
4196
4197
4198
4199
4200 ForceSendFields []string `json:"-"`
4201
4202
4203
4204
4205 NullFields []string `json:"-"`
4206 }
4207
4208 func (s *SslCert) MarshalJSON() ([]byte, error) {
4209 type NoMethod SslCert
4210 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4211 }
4212
4213
4214 type SslCertDetail struct {
4215
4216 CertInfo *SslCert `json:"certInfo,omitempty"`
4217
4218
4219 CertPrivateKey string `json:"certPrivateKey,omitempty"`
4220
4221
4222
4223
4224
4225 ForceSendFields []string `json:"-"`
4226
4227
4228
4229
4230 NullFields []string `json:"-"`
4231 }
4232
4233 func (s *SslCertDetail) MarshalJSON() ([]byte, error) {
4234 type NoMethod SslCertDetail
4235 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4236 }
4237
4238
4239
4240 type SslCertsCreateEphemeralRequest struct {
4241
4242 AccessToken string `json:"access_token,omitempty"`
4243
4244 PublicKey string `json:"public_key,omitempty"`
4245
4246
4247
4248
4249
4250 ForceSendFields []string `json:"-"`
4251
4252
4253
4254
4255 NullFields []string `json:"-"`
4256 }
4257
4258 func (s *SslCertsCreateEphemeralRequest) MarshalJSON() ([]byte, error) {
4259 type NoMethod SslCertsCreateEphemeralRequest
4260 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4261 }
4262
4263
4264 type SslCertsInsertRequest struct {
4265
4266
4267 CommonName string `json:"commonName,omitempty"`
4268
4269
4270
4271
4272
4273 ForceSendFields []string `json:"-"`
4274
4275
4276
4277
4278 NullFields []string `json:"-"`
4279 }
4280
4281 func (s *SslCertsInsertRequest) MarshalJSON() ([]byte, error) {
4282 type NoMethod SslCertsInsertRequest
4283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4284 }
4285
4286
4287 type SslCertsInsertResponse struct {
4288
4289 ClientCert *SslCertDetail `json:"clientCert,omitempty"`
4290
4291 Kind string `json:"kind,omitempty"`
4292
4293 Operation *Operation `json:"operation,omitempty"`
4294
4295
4296
4297 ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
4298
4299
4300 googleapi.ServerResponse `json:"-"`
4301
4302
4303
4304
4305
4306 ForceSendFields []string `json:"-"`
4307
4308
4309
4310
4311 NullFields []string `json:"-"`
4312 }
4313
4314 func (s *SslCertsInsertResponse) MarshalJSON() ([]byte, error) {
4315 type NoMethod SslCertsInsertResponse
4316 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4317 }
4318
4319
4320 type SslCertsListResponse struct {
4321
4322 Items []*SslCert `json:"items,omitempty"`
4323
4324 Kind string `json:"kind,omitempty"`
4325
4326
4327 googleapi.ServerResponse `json:"-"`
4328
4329
4330
4331
4332
4333 ForceSendFields []string `json:"-"`
4334
4335
4336
4337
4338 NullFields []string `json:"-"`
4339 }
4340
4341 func (s *SslCertsListResponse) MarshalJSON() ([]byte, error) {
4342 type NoMethod SslCertsListResponse
4343 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4344 }
4345
4346
4347
4348 type SyncFlags struct {
4349
4350 Name string `json:"name,omitempty"`
4351
4352
4353 Value string `json:"value,omitempty"`
4354
4355
4356
4357
4358
4359 ForceSendFields []string `json:"-"`
4360
4361
4362
4363
4364 NullFields []string `json:"-"`
4365 }
4366
4367 func (s *SyncFlags) MarshalJSON() ([]byte, error) {
4368 type NoMethod SyncFlags
4369 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4370 }
4371
4372
4373 type Tier struct {
4374
4375 DiskQuota int64 `json:"DiskQuota,omitempty,string"`
4376
4377 RAM int64 `json:"RAM,omitempty,string"`
4378
4379 Kind string `json:"kind,omitempty"`
4380
4381 Region []string `json:"region,omitempty"`
4382
4383
4384 Tier string `json:"tier,omitempty"`
4385
4386
4387
4388
4389
4390 ForceSendFields []string `json:"-"`
4391
4392
4393
4394
4395 NullFields []string `json:"-"`
4396 }
4397
4398 func (s *Tier) MarshalJSON() ([]byte, error) {
4399 type NoMethod Tier
4400 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4401 }
4402
4403
4404 type TiersListResponse struct {
4405
4406 Items []*Tier `json:"items,omitempty"`
4407
4408 Kind string `json:"kind,omitempty"`
4409
4410
4411 googleapi.ServerResponse `json:"-"`
4412
4413
4414
4415
4416
4417 ForceSendFields []string `json:"-"`
4418
4419
4420
4421
4422 NullFields []string `json:"-"`
4423 }
4424
4425 func (s *TiersListResponse) MarshalJSON() ([]byte, error) {
4426 type NoMethod TiersListResponse
4427 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4428 }
4429
4430
4431 type TruncateLogContext struct {
4432
4433 Kind string `json:"kind,omitempty"`
4434
4435
4436 LogType string `json:"logType,omitempty"`
4437
4438
4439
4440
4441
4442 ForceSendFields []string `json:"-"`
4443
4444
4445
4446
4447 NullFields []string `json:"-"`
4448 }
4449
4450 func (s *TruncateLogContext) MarshalJSON() ([]byte, error) {
4451 type NoMethod TruncateLogContext
4452 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4453 }
4454
4455
4456 type User struct {
4457
4458
4459
4460
4461
4462
4463
4464
4465 DualPasswordType string `json:"dualPasswordType,omitempty"`
4466
4467
4468 Etag string `json:"etag,omitempty"`
4469
4470
4471
4472
4473
4474 Host string `json:"host,omitempty"`
4475
4476
4477
4478 Instance string `json:"instance,omitempty"`
4479
4480 Kind string `json:"kind,omitempty"`
4481
4482
4483 Name string `json:"name,omitempty"`
4484
4485 Password string `json:"password,omitempty"`
4486
4487 PasswordPolicy *UserPasswordValidationPolicy `json:"passwordPolicy,omitempty"`
4488
4489
4490
4491 Project string `json:"project,omitempty"`
4492 SqlserverUserDetails *SqlServerUserDetails `json:"sqlserverUserDetails,omitempty"`
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503 Type string `json:"type,omitempty"`
4504
4505
4506 googleapi.ServerResponse `json:"-"`
4507
4508
4509
4510
4511
4512 ForceSendFields []string `json:"-"`
4513
4514
4515
4516
4517 NullFields []string `json:"-"`
4518 }
4519
4520 func (s *User) MarshalJSON() ([]byte, error) {
4521 type NoMethod User
4522 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4523 }
4524
4525
4526 type UserPasswordValidationPolicy struct {
4527
4528
4529 AllowedFailedAttempts int64 `json:"allowedFailedAttempts,omitempty"`
4530
4531
4532 EnableFailedAttemptsCheck bool `json:"enableFailedAttemptsCheck,omitempty"`
4533
4534
4535
4536 EnablePasswordVerification bool `json:"enablePasswordVerification,omitempty"`
4537
4538 PasswordExpirationDuration string `json:"passwordExpirationDuration,omitempty"`
4539
4540 Status *PasswordStatus `json:"status,omitempty"`
4541
4542
4543
4544
4545
4546 ForceSendFields []string `json:"-"`
4547
4548
4549
4550
4551 NullFields []string `json:"-"`
4552 }
4553
4554 func (s *UserPasswordValidationPolicy) MarshalJSON() ([]byte, error) {
4555 type NoMethod UserPasswordValidationPolicy
4556 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4557 }
4558
4559
4560 type UsersListResponse struct {
4561
4562 Items []*User `json:"items,omitempty"`
4563
4564 Kind string `json:"kind,omitempty"`
4565
4566 NextPageToken string `json:"nextPageToken,omitempty"`
4567
4568
4569 googleapi.ServerResponse `json:"-"`
4570
4571
4572
4573
4574
4575 ForceSendFields []string `json:"-"`
4576
4577
4578
4579
4580 NullFields []string `json:"-"`
4581 }
4582
4583 func (s *UsersListResponse) MarshalJSON() ([]byte, error) {
4584 type NoMethod UsersListResponse
4585 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4586 }
4587
4588 type BackupRunsDeleteCall struct {
4589 s *Service
4590 project string
4591 instance string
4592 id int64
4593 urlParams_ gensupport.URLParams
4594 ctx_ context.Context
4595 header_ http.Header
4596 }
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606 func (r *BackupRunsService) Delete(project string, instance string, id int64) *BackupRunsDeleteCall {
4607 c := &BackupRunsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4608 c.project = project
4609 c.instance = instance
4610 c.id = id
4611 return c
4612 }
4613
4614
4615
4616
4617 func (c *BackupRunsDeleteCall) Fields(s ...googleapi.Field) *BackupRunsDeleteCall {
4618 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4619 return c
4620 }
4621
4622
4623 func (c *BackupRunsDeleteCall) Context(ctx context.Context) *BackupRunsDeleteCall {
4624 c.ctx_ = ctx
4625 return c
4626 }
4627
4628
4629
4630 func (c *BackupRunsDeleteCall) Header() http.Header {
4631 if c.header_ == nil {
4632 c.header_ = make(http.Header)
4633 }
4634 return c.header_
4635 }
4636
4637 func (c *BackupRunsDeleteCall) doRequest(alt string) (*http.Response, error) {
4638 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4639 var body io.Reader = nil
4640 c.urlParams_.Set("alt", alt)
4641 c.urlParams_.Set("prettyPrint", "false")
4642 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns/{id}")
4643 urls += "?" + c.urlParams_.Encode()
4644 req, err := http.NewRequest("DELETE", urls, body)
4645 if err != nil {
4646 return nil, err
4647 }
4648 req.Header = reqHeaders
4649 googleapi.Expand(req.URL, map[string]string{
4650 "project": c.project,
4651 "instance": c.instance,
4652 "id": strconv.FormatInt(c.id, 10),
4653 })
4654 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4655 }
4656
4657
4658
4659
4660
4661
4662 func (c *BackupRunsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4663 gensupport.SetOptions(c.urlParams_, opts...)
4664 res, err := c.doRequest("json")
4665 if res != nil && res.StatusCode == http.StatusNotModified {
4666 if res.Body != nil {
4667 res.Body.Close()
4668 }
4669 return nil, gensupport.WrapError(&googleapi.Error{
4670 Code: res.StatusCode,
4671 Header: res.Header,
4672 })
4673 }
4674 if err != nil {
4675 return nil, err
4676 }
4677 defer googleapi.CloseBody(res)
4678 if err := googleapi.CheckResponse(res); err != nil {
4679 return nil, gensupport.WrapError(err)
4680 }
4681 ret := &Operation{
4682 ServerResponse: googleapi.ServerResponse{
4683 Header: res.Header,
4684 HTTPStatusCode: res.StatusCode,
4685 },
4686 }
4687 target := &ret
4688 if err := gensupport.DecodeResponse(target, res); err != nil {
4689 return nil, err
4690 }
4691 return ret, nil
4692 }
4693
4694 type BackupRunsGetCall struct {
4695 s *Service
4696 project string
4697 instance string
4698 id int64
4699 urlParams_ gensupport.URLParams
4700 ifNoneMatch_ string
4701 ctx_ context.Context
4702 header_ http.Header
4703 }
4704
4705
4706
4707
4708
4709
4710 func (r *BackupRunsService) Get(project string, instance string, id int64) *BackupRunsGetCall {
4711 c := &BackupRunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4712 c.project = project
4713 c.instance = instance
4714 c.id = id
4715 return c
4716 }
4717
4718
4719
4720
4721 func (c *BackupRunsGetCall) Fields(s ...googleapi.Field) *BackupRunsGetCall {
4722 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4723 return c
4724 }
4725
4726
4727
4728
4729 func (c *BackupRunsGetCall) IfNoneMatch(entityTag string) *BackupRunsGetCall {
4730 c.ifNoneMatch_ = entityTag
4731 return c
4732 }
4733
4734
4735 func (c *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall {
4736 c.ctx_ = ctx
4737 return c
4738 }
4739
4740
4741
4742 func (c *BackupRunsGetCall) Header() http.Header {
4743 if c.header_ == nil {
4744 c.header_ = make(http.Header)
4745 }
4746 return c.header_
4747 }
4748
4749 func (c *BackupRunsGetCall) doRequest(alt string) (*http.Response, error) {
4750 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4751 if c.ifNoneMatch_ != "" {
4752 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4753 }
4754 var body io.Reader = nil
4755 c.urlParams_.Set("alt", alt)
4756 c.urlParams_.Set("prettyPrint", "false")
4757 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns/{id}")
4758 urls += "?" + c.urlParams_.Encode()
4759 req, err := http.NewRequest("GET", urls, body)
4760 if err != nil {
4761 return nil, err
4762 }
4763 req.Header = reqHeaders
4764 googleapi.Expand(req.URL, map[string]string{
4765 "project": c.project,
4766 "instance": c.instance,
4767 "id": strconv.FormatInt(c.id, 10),
4768 })
4769 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4770 }
4771
4772
4773
4774
4775
4776
4777 func (c *BackupRunsGetCall) Do(opts ...googleapi.CallOption) (*BackupRun, error) {
4778 gensupport.SetOptions(c.urlParams_, opts...)
4779 res, err := c.doRequest("json")
4780 if res != nil && res.StatusCode == http.StatusNotModified {
4781 if res.Body != nil {
4782 res.Body.Close()
4783 }
4784 return nil, gensupport.WrapError(&googleapi.Error{
4785 Code: res.StatusCode,
4786 Header: res.Header,
4787 })
4788 }
4789 if err != nil {
4790 return nil, err
4791 }
4792 defer googleapi.CloseBody(res)
4793 if err := googleapi.CheckResponse(res); err != nil {
4794 return nil, gensupport.WrapError(err)
4795 }
4796 ret := &BackupRun{
4797 ServerResponse: googleapi.ServerResponse{
4798 Header: res.Header,
4799 HTTPStatusCode: res.StatusCode,
4800 },
4801 }
4802 target := &ret
4803 if err := gensupport.DecodeResponse(target, res); err != nil {
4804 return nil, err
4805 }
4806 return ret, nil
4807 }
4808
4809 type BackupRunsInsertCall struct {
4810 s *Service
4811 project string
4812 instance string
4813 backuprun *BackupRun
4814 urlParams_ gensupport.URLParams
4815 ctx_ context.Context
4816 header_ http.Header
4817 }
4818
4819
4820
4821
4822
4823 func (r *BackupRunsService) Insert(project string, instance string, backuprun *BackupRun) *BackupRunsInsertCall {
4824 c := &BackupRunsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4825 c.project = project
4826 c.instance = instance
4827 c.backuprun = backuprun
4828 return c
4829 }
4830
4831
4832
4833
4834 func (c *BackupRunsInsertCall) Fields(s ...googleapi.Field) *BackupRunsInsertCall {
4835 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4836 return c
4837 }
4838
4839
4840 func (c *BackupRunsInsertCall) Context(ctx context.Context) *BackupRunsInsertCall {
4841 c.ctx_ = ctx
4842 return c
4843 }
4844
4845
4846
4847 func (c *BackupRunsInsertCall) Header() http.Header {
4848 if c.header_ == nil {
4849 c.header_ = make(http.Header)
4850 }
4851 return c.header_
4852 }
4853
4854 func (c *BackupRunsInsertCall) doRequest(alt string) (*http.Response, error) {
4855 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4856 var body io.Reader = nil
4857 body, err := googleapi.WithoutDataWrapper.JSONReader(c.backuprun)
4858 if err != nil {
4859 return nil, err
4860 }
4861 c.urlParams_.Set("alt", alt)
4862 c.urlParams_.Set("prettyPrint", "false")
4863 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns")
4864 urls += "?" + c.urlParams_.Encode()
4865 req, err := http.NewRequest("POST", urls, body)
4866 if err != nil {
4867 return nil, err
4868 }
4869 req.Header = reqHeaders
4870 googleapi.Expand(req.URL, map[string]string{
4871 "project": c.project,
4872 "instance": c.instance,
4873 })
4874 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4875 }
4876
4877
4878
4879
4880
4881
4882 func (c *BackupRunsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4883 gensupport.SetOptions(c.urlParams_, opts...)
4884 res, err := c.doRequest("json")
4885 if res != nil && res.StatusCode == http.StatusNotModified {
4886 if res.Body != nil {
4887 res.Body.Close()
4888 }
4889 return nil, gensupport.WrapError(&googleapi.Error{
4890 Code: res.StatusCode,
4891 Header: res.Header,
4892 })
4893 }
4894 if err != nil {
4895 return nil, err
4896 }
4897 defer googleapi.CloseBody(res)
4898 if err := googleapi.CheckResponse(res); err != nil {
4899 return nil, gensupport.WrapError(err)
4900 }
4901 ret := &Operation{
4902 ServerResponse: googleapi.ServerResponse{
4903 Header: res.Header,
4904 HTTPStatusCode: res.StatusCode,
4905 },
4906 }
4907 target := &ret
4908 if err := gensupport.DecodeResponse(target, res); err != nil {
4909 return nil, err
4910 }
4911 return ret, nil
4912 }
4913
4914 type BackupRunsListCall struct {
4915 s *Service
4916 project string
4917 instance string
4918 urlParams_ gensupport.URLParams
4919 ifNoneMatch_ string
4920 ctx_ context.Context
4921 header_ http.Header
4922 }
4923
4924
4925
4926
4927
4928
4929
4930
4931 func (r *BackupRunsService) List(project string, instance string) *BackupRunsListCall {
4932 c := &BackupRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4933 c.project = project
4934 c.instance = instance
4935 return c
4936 }
4937
4938
4939
4940 func (c *BackupRunsListCall) MaxResults(maxResults int64) *BackupRunsListCall {
4941 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4942 return c
4943 }
4944
4945
4946
4947 func (c *BackupRunsListCall) PageToken(pageToken string) *BackupRunsListCall {
4948 c.urlParams_.Set("pageToken", pageToken)
4949 return c
4950 }
4951
4952
4953
4954
4955 func (c *BackupRunsListCall) Fields(s ...googleapi.Field) *BackupRunsListCall {
4956 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4957 return c
4958 }
4959
4960
4961
4962
4963 func (c *BackupRunsListCall) IfNoneMatch(entityTag string) *BackupRunsListCall {
4964 c.ifNoneMatch_ = entityTag
4965 return c
4966 }
4967
4968
4969 func (c *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall {
4970 c.ctx_ = ctx
4971 return c
4972 }
4973
4974
4975
4976 func (c *BackupRunsListCall) Header() http.Header {
4977 if c.header_ == nil {
4978 c.header_ = make(http.Header)
4979 }
4980 return c.header_
4981 }
4982
4983 func (c *BackupRunsListCall) doRequest(alt string) (*http.Response, error) {
4984 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4985 if c.ifNoneMatch_ != "" {
4986 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4987 }
4988 var body io.Reader = nil
4989 c.urlParams_.Set("alt", alt)
4990 c.urlParams_.Set("prettyPrint", "false")
4991 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns")
4992 urls += "?" + c.urlParams_.Encode()
4993 req, err := http.NewRequest("GET", urls, body)
4994 if err != nil {
4995 return nil, err
4996 }
4997 req.Header = reqHeaders
4998 googleapi.Expand(req.URL, map[string]string{
4999 "project": c.project,
5000 "instance": c.instance,
5001 })
5002 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5003 }
5004
5005
5006
5007
5008
5009
5010
5011 func (c *BackupRunsListCall) Do(opts ...googleapi.CallOption) (*BackupRunsListResponse, error) {
5012 gensupport.SetOptions(c.urlParams_, opts...)
5013 res, err := c.doRequest("json")
5014 if res != nil && res.StatusCode == http.StatusNotModified {
5015 if res.Body != nil {
5016 res.Body.Close()
5017 }
5018 return nil, gensupport.WrapError(&googleapi.Error{
5019 Code: res.StatusCode,
5020 Header: res.Header,
5021 })
5022 }
5023 if err != nil {
5024 return nil, err
5025 }
5026 defer googleapi.CloseBody(res)
5027 if err := googleapi.CheckResponse(res); err != nil {
5028 return nil, gensupport.WrapError(err)
5029 }
5030 ret := &BackupRunsListResponse{
5031 ServerResponse: googleapi.ServerResponse{
5032 Header: res.Header,
5033 HTTPStatusCode: res.StatusCode,
5034 },
5035 }
5036 target := &ret
5037 if err := gensupport.DecodeResponse(target, res); err != nil {
5038 return nil, err
5039 }
5040 return ret, nil
5041 }
5042
5043
5044
5045
5046 func (c *BackupRunsListCall) Pages(ctx context.Context, f func(*BackupRunsListResponse) error) error {
5047 c.ctx_ = ctx
5048 defer c.PageToken(c.urlParams_.Get("pageToken"))
5049 for {
5050 x, err := c.Do()
5051 if err != nil {
5052 return err
5053 }
5054 if err := f(x); err != nil {
5055 return err
5056 }
5057 if x.NextPageToken == "" {
5058 return nil
5059 }
5060 c.PageToken(x.NextPageToken)
5061 }
5062 }
5063
5064 type ConnectGenerateEphemeralCertCall struct {
5065 s *Service
5066 project string
5067 instance string
5068 generateephemeralcertrequest *GenerateEphemeralCertRequest
5069 urlParams_ gensupport.URLParams
5070 ctx_ context.Context
5071 header_ http.Header
5072 }
5073
5074
5075
5076
5077
5078
5079
5080
5081 func (r *ConnectService) GenerateEphemeralCert(project string, instance string, generateephemeralcertrequest *GenerateEphemeralCertRequest) *ConnectGenerateEphemeralCertCall {
5082 c := &ConnectGenerateEphemeralCertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5083 c.project = project
5084 c.instance = instance
5085 c.generateephemeralcertrequest = generateephemeralcertrequest
5086 return c
5087 }
5088
5089
5090
5091
5092 func (c *ConnectGenerateEphemeralCertCall) Fields(s ...googleapi.Field) *ConnectGenerateEphemeralCertCall {
5093 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5094 return c
5095 }
5096
5097
5098 func (c *ConnectGenerateEphemeralCertCall) Context(ctx context.Context) *ConnectGenerateEphemeralCertCall {
5099 c.ctx_ = ctx
5100 return c
5101 }
5102
5103
5104
5105 func (c *ConnectGenerateEphemeralCertCall) Header() http.Header {
5106 if c.header_ == nil {
5107 c.header_ = make(http.Header)
5108 }
5109 return c.header_
5110 }
5111
5112 func (c *ConnectGenerateEphemeralCertCall) doRequest(alt string) (*http.Response, error) {
5113 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5114 var body io.Reader = nil
5115 body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateephemeralcertrequest)
5116 if err != nil {
5117 return nil, err
5118 }
5119 c.urlParams_.Set("alt", alt)
5120 c.urlParams_.Set("prettyPrint", "false")
5121 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}:generateEphemeralCert")
5122 urls += "?" + c.urlParams_.Encode()
5123 req, err := http.NewRequest("POST", urls, body)
5124 if err != nil {
5125 return nil, err
5126 }
5127 req.Header = reqHeaders
5128 googleapi.Expand(req.URL, map[string]string{
5129 "project": c.project,
5130 "instance": c.instance,
5131 })
5132 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5133 }
5134
5135
5136
5137
5138
5139
5140
5141 func (c *ConnectGenerateEphemeralCertCall) Do(opts ...googleapi.CallOption) (*GenerateEphemeralCertResponse, error) {
5142 gensupport.SetOptions(c.urlParams_, opts...)
5143 res, err := c.doRequest("json")
5144 if res != nil && res.StatusCode == http.StatusNotModified {
5145 if res.Body != nil {
5146 res.Body.Close()
5147 }
5148 return nil, gensupport.WrapError(&googleapi.Error{
5149 Code: res.StatusCode,
5150 Header: res.Header,
5151 })
5152 }
5153 if err != nil {
5154 return nil, err
5155 }
5156 defer googleapi.CloseBody(res)
5157 if err := googleapi.CheckResponse(res); err != nil {
5158 return nil, gensupport.WrapError(err)
5159 }
5160 ret := &GenerateEphemeralCertResponse{
5161 ServerResponse: googleapi.ServerResponse{
5162 Header: res.Header,
5163 HTTPStatusCode: res.StatusCode,
5164 },
5165 }
5166 target := &ret
5167 if err := gensupport.DecodeResponse(target, res); err != nil {
5168 return nil, err
5169 }
5170 return ret, nil
5171 }
5172
5173 type ConnectGetCall struct {
5174 s *Service
5175 project string
5176 instance string
5177 urlParams_ gensupport.URLParams
5178 ifNoneMatch_ string
5179 ctx_ context.Context
5180 header_ http.Header
5181 }
5182
5183
5184
5185
5186
5187 func (r *ConnectService) Get(project string, instance string) *ConnectGetCall {
5188 c := &ConnectGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5189 c.project = project
5190 c.instance = instance
5191 return c
5192 }
5193
5194
5195
5196 func (c *ConnectGetCall) ReadTime(readTime string) *ConnectGetCall {
5197 c.urlParams_.Set("readTime", readTime)
5198 return c
5199 }
5200
5201
5202
5203
5204 func (c *ConnectGetCall) Fields(s ...googleapi.Field) *ConnectGetCall {
5205 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5206 return c
5207 }
5208
5209
5210
5211
5212 func (c *ConnectGetCall) IfNoneMatch(entityTag string) *ConnectGetCall {
5213 c.ifNoneMatch_ = entityTag
5214 return c
5215 }
5216
5217
5218 func (c *ConnectGetCall) Context(ctx context.Context) *ConnectGetCall {
5219 c.ctx_ = ctx
5220 return c
5221 }
5222
5223
5224
5225 func (c *ConnectGetCall) Header() http.Header {
5226 if c.header_ == nil {
5227 c.header_ = make(http.Header)
5228 }
5229 return c.header_
5230 }
5231
5232 func (c *ConnectGetCall) doRequest(alt string) (*http.Response, error) {
5233 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5234 if c.ifNoneMatch_ != "" {
5235 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5236 }
5237 var body io.Reader = nil
5238 c.urlParams_.Set("alt", alt)
5239 c.urlParams_.Set("prettyPrint", "false")
5240 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/connectSettings")
5241 urls += "?" + c.urlParams_.Encode()
5242 req, err := http.NewRequest("GET", urls, body)
5243 if err != nil {
5244 return nil, err
5245 }
5246 req.Header = reqHeaders
5247 googleapi.Expand(req.URL, map[string]string{
5248 "project": c.project,
5249 "instance": c.instance,
5250 })
5251 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5252 }
5253
5254
5255
5256
5257
5258
5259
5260 func (c *ConnectGetCall) Do(opts ...googleapi.CallOption) (*ConnectSettings, error) {
5261 gensupport.SetOptions(c.urlParams_, opts...)
5262 res, err := c.doRequest("json")
5263 if res != nil && res.StatusCode == http.StatusNotModified {
5264 if res.Body != nil {
5265 res.Body.Close()
5266 }
5267 return nil, gensupport.WrapError(&googleapi.Error{
5268 Code: res.StatusCode,
5269 Header: res.Header,
5270 })
5271 }
5272 if err != nil {
5273 return nil, err
5274 }
5275 defer googleapi.CloseBody(res)
5276 if err := googleapi.CheckResponse(res); err != nil {
5277 return nil, gensupport.WrapError(err)
5278 }
5279 ret := &ConnectSettings{
5280 ServerResponse: googleapi.ServerResponse{
5281 Header: res.Header,
5282 HTTPStatusCode: res.StatusCode,
5283 },
5284 }
5285 target := &ret
5286 if err := gensupport.DecodeResponse(target, res); err != nil {
5287 return nil, err
5288 }
5289 return ret, nil
5290 }
5291
5292 type DatabasesDeleteCall struct {
5293 s *Service
5294 project string
5295 instance string
5296 database string
5297 urlParams_ gensupport.URLParams
5298 ctx_ context.Context
5299 header_ http.Header
5300 }
5301
5302
5303
5304
5305
5306
5307 func (r *DatabasesService) Delete(project string, instance string, database string) *DatabasesDeleteCall {
5308 c := &DatabasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5309 c.project = project
5310 c.instance = instance
5311 c.database = database
5312 return c
5313 }
5314
5315
5316
5317
5318 func (c *DatabasesDeleteCall) Fields(s ...googleapi.Field) *DatabasesDeleteCall {
5319 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5320 return c
5321 }
5322
5323
5324 func (c *DatabasesDeleteCall) Context(ctx context.Context) *DatabasesDeleteCall {
5325 c.ctx_ = ctx
5326 return c
5327 }
5328
5329
5330
5331 func (c *DatabasesDeleteCall) Header() http.Header {
5332 if c.header_ == nil {
5333 c.header_ = make(http.Header)
5334 }
5335 return c.header_
5336 }
5337
5338 func (c *DatabasesDeleteCall) doRequest(alt string) (*http.Response, error) {
5339 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5340 var body io.Reader = nil
5341 c.urlParams_.Set("alt", alt)
5342 c.urlParams_.Set("prettyPrint", "false")
5343 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
5344 urls += "?" + c.urlParams_.Encode()
5345 req, err := http.NewRequest("DELETE", urls, body)
5346 if err != nil {
5347 return nil, err
5348 }
5349 req.Header = reqHeaders
5350 googleapi.Expand(req.URL, map[string]string{
5351 "project": c.project,
5352 "instance": c.instance,
5353 "database": c.database,
5354 })
5355 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5356 }
5357
5358
5359
5360
5361
5362
5363 func (c *DatabasesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5364 gensupport.SetOptions(c.urlParams_, opts...)
5365 res, err := c.doRequest("json")
5366 if res != nil && res.StatusCode == http.StatusNotModified {
5367 if res.Body != nil {
5368 res.Body.Close()
5369 }
5370 return nil, gensupport.WrapError(&googleapi.Error{
5371 Code: res.StatusCode,
5372 Header: res.Header,
5373 })
5374 }
5375 if err != nil {
5376 return nil, err
5377 }
5378 defer googleapi.CloseBody(res)
5379 if err := googleapi.CheckResponse(res); err != nil {
5380 return nil, gensupport.WrapError(err)
5381 }
5382 ret := &Operation{
5383 ServerResponse: googleapi.ServerResponse{
5384 Header: res.Header,
5385 HTTPStatusCode: res.StatusCode,
5386 },
5387 }
5388 target := &ret
5389 if err := gensupport.DecodeResponse(target, res); err != nil {
5390 return nil, err
5391 }
5392 return ret, nil
5393 }
5394
5395 type DatabasesGetCall struct {
5396 s *Service
5397 project string
5398 instance string
5399 database string
5400 urlParams_ gensupport.URLParams
5401 ifNoneMatch_ string
5402 ctx_ context.Context
5403 header_ http.Header
5404 }
5405
5406
5407
5408
5409
5410
5411
5412 func (r *DatabasesService) Get(project string, instance string, database string) *DatabasesGetCall {
5413 c := &DatabasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5414 c.project = project
5415 c.instance = instance
5416 c.database = database
5417 return c
5418 }
5419
5420
5421
5422
5423 func (c *DatabasesGetCall) Fields(s ...googleapi.Field) *DatabasesGetCall {
5424 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5425 return c
5426 }
5427
5428
5429
5430
5431 func (c *DatabasesGetCall) IfNoneMatch(entityTag string) *DatabasesGetCall {
5432 c.ifNoneMatch_ = entityTag
5433 return c
5434 }
5435
5436
5437 func (c *DatabasesGetCall) Context(ctx context.Context) *DatabasesGetCall {
5438 c.ctx_ = ctx
5439 return c
5440 }
5441
5442
5443
5444 func (c *DatabasesGetCall) Header() http.Header {
5445 if c.header_ == nil {
5446 c.header_ = make(http.Header)
5447 }
5448 return c.header_
5449 }
5450
5451 func (c *DatabasesGetCall) doRequest(alt string) (*http.Response, error) {
5452 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5453 if c.ifNoneMatch_ != "" {
5454 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5455 }
5456 var body io.Reader = nil
5457 c.urlParams_.Set("alt", alt)
5458 c.urlParams_.Set("prettyPrint", "false")
5459 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
5460 urls += "?" + c.urlParams_.Encode()
5461 req, err := http.NewRequest("GET", urls, body)
5462 if err != nil {
5463 return nil, err
5464 }
5465 req.Header = reqHeaders
5466 googleapi.Expand(req.URL, map[string]string{
5467 "project": c.project,
5468 "instance": c.instance,
5469 "database": c.database,
5470 })
5471 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5472 }
5473
5474
5475
5476
5477
5478
5479 func (c *DatabasesGetCall) Do(opts ...googleapi.CallOption) (*Database, error) {
5480 gensupport.SetOptions(c.urlParams_, opts...)
5481 res, err := c.doRequest("json")
5482 if res != nil && res.StatusCode == http.StatusNotModified {
5483 if res.Body != nil {
5484 res.Body.Close()
5485 }
5486 return nil, gensupport.WrapError(&googleapi.Error{
5487 Code: res.StatusCode,
5488 Header: res.Header,
5489 })
5490 }
5491 if err != nil {
5492 return nil, err
5493 }
5494 defer googleapi.CloseBody(res)
5495 if err := googleapi.CheckResponse(res); err != nil {
5496 return nil, gensupport.WrapError(err)
5497 }
5498 ret := &Database{
5499 ServerResponse: googleapi.ServerResponse{
5500 Header: res.Header,
5501 HTTPStatusCode: res.StatusCode,
5502 },
5503 }
5504 target := &ret
5505 if err := gensupport.DecodeResponse(target, res); err != nil {
5506 return nil, err
5507 }
5508 return ret, nil
5509 }
5510
5511 type DatabasesInsertCall struct {
5512 s *Service
5513 project string
5514 instance string
5515 database *Database
5516 urlParams_ gensupport.URLParams
5517 ctx_ context.Context
5518 header_ http.Header
5519 }
5520
5521
5522
5523
5524
5525
5526
5527 func (r *DatabasesService) Insert(project string, instance string, database *Database) *DatabasesInsertCall {
5528 c := &DatabasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5529 c.project = project
5530 c.instance = instance
5531 c.database = database
5532 return c
5533 }
5534
5535
5536
5537
5538 func (c *DatabasesInsertCall) Fields(s ...googleapi.Field) *DatabasesInsertCall {
5539 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5540 return c
5541 }
5542
5543
5544 func (c *DatabasesInsertCall) Context(ctx context.Context) *DatabasesInsertCall {
5545 c.ctx_ = ctx
5546 return c
5547 }
5548
5549
5550
5551 func (c *DatabasesInsertCall) Header() http.Header {
5552 if c.header_ == nil {
5553 c.header_ = make(http.Header)
5554 }
5555 return c.header_
5556 }
5557
5558 func (c *DatabasesInsertCall) doRequest(alt string) (*http.Response, error) {
5559 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5560 var body io.Reader = nil
5561 body, err := googleapi.WithoutDataWrapper.JSONReader(c.database)
5562 if err != nil {
5563 return nil, err
5564 }
5565 c.urlParams_.Set("alt", alt)
5566 c.urlParams_.Set("prettyPrint", "false")
5567 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases")
5568 urls += "?" + c.urlParams_.Encode()
5569 req, err := http.NewRequest("POST", urls, body)
5570 if err != nil {
5571 return nil, err
5572 }
5573 req.Header = reqHeaders
5574 googleapi.Expand(req.URL, map[string]string{
5575 "project": c.project,
5576 "instance": c.instance,
5577 })
5578 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5579 }
5580
5581
5582
5583
5584
5585
5586 func (c *DatabasesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5587 gensupport.SetOptions(c.urlParams_, opts...)
5588 res, err := c.doRequest("json")
5589 if res != nil && res.StatusCode == http.StatusNotModified {
5590 if res.Body != nil {
5591 res.Body.Close()
5592 }
5593 return nil, gensupport.WrapError(&googleapi.Error{
5594 Code: res.StatusCode,
5595 Header: res.Header,
5596 })
5597 }
5598 if err != nil {
5599 return nil, err
5600 }
5601 defer googleapi.CloseBody(res)
5602 if err := googleapi.CheckResponse(res); err != nil {
5603 return nil, gensupport.WrapError(err)
5604 }
5605 ret := &Operation{
5606 ServerResponse: googleapi.ServerResponse{
5607 Header: res.Header,
5608 HTTPStatusCode: res.StatusCode,
5609 },
5610 }
5611 target := &ret
5612 if err := gensupport.DecodeResponse(target, res); err != nil {
5613 return nil, err
5614 }
5615 return ret, nil
5616 }
5617
5618 type DatabasesListCall struct {
5619 s *Service
5620 project string
5621 instance string
5622 urlParams_ gensupport.URLParams
5623 ifNoneMatch_ string
5624 ctx_ context.Context
5625 header_ http.Header
5626 }
5627
5628
5629
5630
5631
5632 func (r *DatabasesService) List(project string, instance string) *DatabasesListCall {
5633 c := &DatabasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5634 c.project = project
5635 c.instance = instance
5636 return c
5637 }
5638
5639
5640
5641
5642 func (c *DatabasesListCall) Fields(s ...googleapi.Field) *DatabasesListCall {
5643 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5644 return c
5645 }
5646
5647
5648
5649
5650 func (c *DatabasesListCall) IfNoneMatch(entityTag string) *DatabasesListCall {
5651 c.ifNoneMatch_ = entityTag
5652 return c
5653 }
5654
5655
5656 func (c *DatabasesListCall) Context(ctx context.Context) *DatabasesListCall {
5657 c.ctx_ = ctx
5658 return c
5659 }
5660
5661
5662
5663 func (c *DatabasesListCall) Header() http.Header {
5664 if c.header_ == nil {
5665 c.header_ = make(http.Header)
5666 }
5667 return c.header_
5668 }
5669
5670 func (c *DatabasesListCall) doRequest(alt string) (*http.Response, error) {
5671 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5672 if c.ifNoneMatch_ != "" {
5673 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5674 }
5675 var body io.Reader = nil
5676 c.urlParams_.Set("alt", alt)
5677 c.urlParams_.Set("prettyPrint", "false")
5678 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases")
5679 urls += "?" + c.urlParams_.Encode()
5680 req, err := http.NewRequest("GET", urls, body)
5681 if err != nil {
5682 return nil, err
5683 }
5684 req.Header = reqHeaders
5685 googleapi.Expand(req.URL, map[string]string{
5686 "project": c.project,
5687 "instance": c.instance,
5688 })
5689 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5690 }
5691
5692
5693
5694
5695
5696
5697
5698 func (c *DatabasesListCall) Do(opts ...googleapi.CallOption) (*DatabasesListResponse, error) {
5699 gensupport.SetOptions(c.urlParams_, opts...)
5700 res, err := c.doRequest("json")
5701 if res != nil && res.StatusCode == http.StatusNotModified {
5702 if res.Body != nil {
5703 res.Body.Close()
5704 }
5705 return nil, gensupport.WrapError(&googleapi.Error{
5706 Code: res.StatusCode,
5707 Header: res.Header,
5708 })
5709 }
5710 if err != nil {
5711 return nil, err
5712 }
5713 defer googleapi.CloseBody(res)
5714 if err := googleapi.CheckResponse(res); err != nil {
5715 return nil, gensupport.WrapError(err)
5716 }
5717 ret := &DatabasesListResponse{
5718 ServerResponse: googleapi.ServerResponse{
5719 Header: res.Header,
5720 HTTPStatusCode: res.StatusCode,
5721 },
5722 }
5723 target := &ret
5724 if err := gensupport.DecodeResponse(target, res); err != nil {
5725 return nil, err
5726 }
5727 return ret, nil
5728 }
5729
5730 type DatabasesPatchCall struct {
5731 s *Service
5732 project string
5733 instance string
5734 database string
5735 database2 *Database
5736 urlParams_ gensupport.URLParams
5737 ctx_ context.Context
5738 header_ http.Header
5739 }
5740
5741
5742
5743
5744
5745
5746
5747 func (r *DatabasesService) Patch(project string, instance string, database string, database2 *Database) *DatabasesPatchCall {
5748 c := &DatabasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5749 c.project = project
5750 c.instance = instance
5751 c.database = database
5752 c.database2 = database2
5753 return c
5754 }
5755
5756
5757
5758
5759 func (c *DatabasesPatchCall) Fields(s ...googleapi.Field) *DatabasesPatchCall {
5760 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5761 return c
5762 }
5763
5764
5765 func (c *DatabasesPatchCall) Context(ctx context.Context) *DatabasesPatchCall {
5766 c.ctx_ = ctx
5767 return c
5768 }
5769
5770
5771
5772 func (c *DatabasesPatchCall) Header() http.Header {
5773 if c.header_ == nil {
5774 c.header_ = make(http.Header)
5775 }
5776 return c.header_
5777 }
5778
5779 func (c *DatabasesPatchCall) doRequest(alt string) (*http.Response, error) {
5780 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5781 var body io.Reader = nil
5782 body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2)
5783 if err != nil {
5784 return nil, err
5785 }
5786 c.urlParams_.Set("alt", alt)
5787 c.urlParams_.Set("prettyPrint", "false")
5788 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
5789 urls += "?" + c.urlParams_.Encode()
5790 req, err := http.NewRequest("PATCH", urls, body)
5791 if err != nil {
5792 return nil, err
5793 }
5794 req.Header = reqHeaders
5795 googleapi.Expand(req.URL, map[string]string{
5796 "project": c.project,
5797 "instance": c.instance,
5798 "database": c.database,
5799 })
5800 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5801 }
5802
5803
5804
5805
5806
5807
5808 func (c *DatabasesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5809 gensupport.SetOptions(c.urlParams_, opts...)
5810 res, err := c.doRequest("json")
5811 if res != nil && res.StatusCode == http.StatusNotModified {
5812 if res.Body != nil {
5813 res.Body.Close()
5814 }
5815 return nil, gensupport.WrapError(&googleapi.Error{
5816 Code: res.StatusCode,
5817 Header: res.Header,
5818 })
5819 }
5820 if err != nil {
5821 return nil, err
5822 }
5823 defer googleapi.CloseBody(res)
5824 if err := googleapi.CheckResponse(res); err != nil {
5825 return nil, gensupport.WrapError(err)
5826 }
5827 ret := &Operation{
5828 ServerResponse: googleapi.ServerResponse{
5829 Header: res.Header,
5830 HTTPStatusCode: res.StatusCode,
5831 },
5832 }
5833 target := &ret
5834 if err := gensupport.DecodeResponse(target, res); err != nil {
5835 return nil, err
5836 }
5837 return ret, nil
5838 }
5839
5840 type DatabasesUpdateCall struct {
5841 s *Service
5842 project string
5843 instance string
5844 database string
5845 database2 *Database
5846 urlParams_ gensupport.URLParams
5847 ctx_ context.Context
5848 header_ http.Header
5849 }
5850
5851
5852
5853
5854
5855
5856
5857 func (r *DatabasesService) Update(project string, instance string, database string, database2 *Database) *DatabasesUpdateCall {
5858 c := &DatabasesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5859 c.project = project
5860 c.instance = instance
5861 c.database = database
5862 c.database2 = database2
5863 return c
5864 }
5865
5866
5867
5868
5869 func (c *DatabasesUpdateCall) Fields(s ...googleapi.Field) *DatabasesUpdateCall {
5870 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5871 return c
5872 }
5873
5874
5875 func (c *DatabasesUpdateCall) Context(ctx context.Context) *DatabasesUpdateCall {
5876 c.ctx_ = ctx
5877 return c
5878 }
5879
5880
5881
5882 func (c *DatabasesUpdateCall) Header() http.Header {
5883 if c.header_ == nil {
5884 c.header_ = make(http.Header)
5885 }
5886 return c.header_
5887 }
5888
5889 func (c *DatabasesUpdateCall) doRequest(alt string) (*http.Response, error) {
5890 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5891 var body io.Reader = nil
5892 body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2)
5893 if err != nil {
5894 return nil, err
5895 }
5896 c.urlParams_.Set("alt", alt)
5897 c.urlParams_.Set("prettyPrint", "false")
5898 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
5899 urls += "?" + c.urlParams_.Encode()
5900 req, err := http.NewRequest("PUT", urls, body)
5901 if err != nil {
5902 return nil, err
5903 }
5904 req.Header = reqHeaders
5905 googleapi.Expand(req.URL, map[string]string{
5906 "project": c.project,
5907 "instance": c.instance,
5908 "database": c.database,
5909 })
5910 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5911 }
5912
5913
5914
5915
5916
5917
5918 func (c *DatabasesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5919 gensupport.SetOptions(c.urlParams_, opts...)
5920 res, err := c.doRequest("json")
5921 if res != nil && res.StatusCode == http.StatusNotModified {
5922 if res.Body != nil {
5923 res.Body.Close()
5924 }
5925 return nil, gensupport.WrapError(&googleapi.Error{
5926 Code: res.StatusCode,
5927 Header: res.Header,
5928 })
5929 }
5930 if err != nil {
5931 return nil, err
5932 }
5933 defer googleapi.CloseBody(res)
5934 if err := googleapi.CheckResponse(res); err != nil {
5935 return nil, gensupport.WrapError(err)
5936 }
5937 ret := &Operation{
5938 ServerResponse: googleapi.ServerResponse{
5939 Header: res.Header,
5940 HTTPStatusCode: res.StatusCode,
5941 },
5942 }
5943 target := &ret
5944 if err := gensupport.DecodeResponse(target, res); err != nil {
5945 return nil, err
5946 }
5947 return ret, nil
5948 }
5949
5950 type FlagsListCall struct {
5951 s *Service
5952 urlParams_ gensupport.URLParams
5953 ifNoneMatch_ string
5954 ctx_ context.Context
5955 header_ http.Header
5956 }
5957
5958
5959 func (r *FlagsService) List() *FlagsListCall {
5960 c := &FlagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5961 return c
5962 }
5963
5964
5965
5966
5967 func (c *FlagsListCall) DatabaseVersion(databaseVersion string) *FlagsListCall {
5968 c.urlParams_.Set("databaseVersion", databaseVersion)
5969 return c
5970 }
5971
5972
5973
5974
5975 func (c *FlagsListCall) Fields(s ...googleapi.Field) *FlagsListCall {
5976 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5977 return c
5978 }
5979
5980
5981
5982
5983 func (c *FlagsListCall) IfNoneMatch(entityTag string) *FlagsListCall {
5984 c.ifNoneMatch_ = entityTag
5985 return c
5986 }
5987
5988
5989 func (c *FlagsListCall) Context(ctx context.Context) *FlagsListCall {
5990 c.ctx_ = ctx
5991 return c
5992 }
5993
5994
5995
5996 func (c *FlagsListCall) Header() http.Header {
5997 if c.header_ == nil {
5998 c.header_ = make(http.Header)
5999 }
6000 return c.header_
6001 }
6002
6003 func (c *FlagsListCall) doRequest(alt string) (*http.Response, error) {
6004 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6005 if c.ifNoneMatch_ != "" {
6006 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6007 }
6008 var body io.Reader = nil
6009 c.urlParams_.Set("alt", alt)
6010 c.urlParams_.Set("prettyPrint", "false")
6011 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/flags")
6012 urls += "?" + c.urlParams_.Encode()
6013 req, err := http.NewRequest("GET", urls, body)
6014 if err != nil {
6015 return nil, err
6016 }
6017 req.Header = reqHeaders
6018 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6019 }
6020
6021
6022
6023
6024
6025
6026
6027 func (c *FlagsListCall) Do(opts ...googleapi.CallOption) (*FlagsListResponse, error) {
6028 gensupport.SetOptions(c.urlParams_, opts...)
6029 res, err := c.doRequest("json")
6030 if res != nil && res.StatusCode == http.StatusNotModified {
6031 if res.Body != nil {
6032 res.Body.Close()
6033 }
6034 return nil, gensupport.WrapError(&googleapi.Error{
6035 Code: res.StatusCode,
6036 Header: res.Header,
6037 })
6038 }
6039 if err != nil {
6040 return nil, err
6041 }
6042 defer googleapi.CloseBody(res)
6043 if err := googleapi.CheckResponse(res); err != nil {
6044 return nil, gensupport.WrapError(err)
6045 }
6046 ret := &FlagsListResponse{
6047 ServerResponse: googleapi.ServerResponse{
6048 Header: res.Header,
6049 HTTPStatusCode: res.StatusCode,
6050 },
6051 }
6052 target := &ret
6053 if err := gensupport.DecodeResponse(target, res); err != nil {
6054 return nil, err
6055 }
6056 return ret, nil
6057 }
6058
6059 type InstancesAcquireSsrsLeaseCall struct {
6060 s *Service
6061 project string
6062 instance string
6063 instancesacquiressrsleaserequest *InstancesAcquireSsrsLeaseRequest
6064 urlParams_ gensupport.URLParams
6065 ctx_ context.Context
6066 header_ http.Header
6067 }
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078 func (r *InstancesService) AcquireSsrsLease(project string, instance string, instancesacquiressrsleaserequest *InstancesAcquireSsrsLeaseRequest) *InstancesAcquireSsrsLeaseCall {
6079 c := &InstancesAcquireSsrsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6080 c.project = project
6081 c.instance = instance
6082 c.instancesacquiressrsleaserequest = instancesacquiressrsleaserequest
6083 return c
6084 }
6085
6086
6087
6088
6089 func (c *InstancesAcquireSsrsLeaseCall) Fields(s ...googleapi.Field) *InstancesAcquireSsrsLeaseCall {
6090 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6091 return c
6092 }
6093
6094
6095 func (c *InstancesAcquireSsrsLeaseCall) Context(ctx context.Context) *InstancesAcquireSsrsLeaseCall {
6096 c.ctx_ = ctx
6097 return c
6098 }
6099
6100
6101
6102 func (c *InstancesAcquireSsrsLeaseCall) Header() http.Header {
6103 if c.header_ == nil {
6104 c.header_ = make(http.Header)
6105 }
6106 return c.header_
6107 }
6108
6109 func (c *InstancesAcquireSsrsLeaseCall) doRequest(alt string) (*http.Response, error) {
6110 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6111 var body io.Reader = nil
6112 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesacquiressrsleaserequest)
6113 if err != nil {
6114 return nil, err
6115 }
6116 c.urlParams_.Set("alt", alt)
6117 c.urlParams_.Set("prettyPrint", "false")
6118 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/acquireSsrsLease")
6119 urls += "?" + c.urlParams_.Encode()
6120 req, err := http.NewRequest("POST", urls, body)
6121 if err != nil {
6122 return nil, err
6123 }
6124 req.Header = reqHeaders
6125 googleapi.Expand(req.URL, map[string]string{
6126 "project": c.project,
6127 "instance": c.instance,
6128 })
6129 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6130 }
6131
6132
6133
6134
6135
6136
6137
6138 func (c *InstancesAcquireSsrsLeaseCall) Do(opts ...googleapi.CallOption) (*SqlInstancesAcquireSsrsLeaseResponse, error) {
6139 gensupport.SetOptions(c.urlParams_, opts...)
6140 res, err := c.doRequest("json")
6141 if res != nil && res.StatusCode == http.StatusNotModified {
6142 if res.Body != nil {
6143 res.Body.Close()
6144 }
6145 return nil, gensupport.WrapError(&googleapi.Error{
6146 Code: res.StatusCode,
6147 Header: res.Header,
6148 })
6149 }
6150 if err != nil {
6151 return nil, err
6152 }
6153 defer googleapi.CloseBody(res)
6154 if err := googleapi.CheckResponse(res); err != nil {
6155 return nil, gensupport.WrapError(err)
6156 }
6157 ret := &SqlInstancesAcquireSsrsLeaseResponse{
6158 ServerResponse: googleapi.ServerResponse{
6159 Header: res.Header,
6160 HTTPStatusCode: res.StatusCode,
6161 },
6162 }
6163 target := &ret
6164 if err := gensupport.DecodeResponse(target, res); err != nil {
6165 return nil, err
6166 }
6167 return ret, nil
6168 }
6169
6170 type InstancesAddServerCaCall struct {
6171 s *Service
6172 project string
6173 instance string
6174 urlParams_ gensupport.URLParams
6175 ctx_ context.Context
6176 header_ http.Header
6177 }
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187 func (r *InstancesService) AddServerCa(project string, instance string) *InstancesAddServerCaCall {
6188 c := &InstancesAddServerCaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6189 c.project = project
6190 c.instance = instance
6191 return c
6192 }
6193
6194
6195
6196
6197 func (c *InstancesAddServerCaCall) Fields(s ...googleapi.Field) *InstancesAddServerCaCall {
6198 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6199 return c
6200 }
6201
6202
6203 func (c *InstancesAddServerCaCall) Context(ctx context.Context) *InstancesAddServerCaCall {
6204 c.ctx_ = ctx
6205 return c
6206 }
6207
6208
6209
6210 func (c *InstancesAddServerCaCall) Header() http.Header {
6211 if c.header_ == nil {
6212 c.header_ = make(http.Header)
6213 }
6214 return c.header_
6215 }
6216
6217 func (c *InstancesAddServerCaCall) doRequest(alt string) (*http.Response, error) {
6218 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6219 var body io.Reader = nil
6220 c.urlParams_.Set("alt", alt)
6221 c.urlParams_.Set("prettyPrint", "false")
6222 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/addServerCa")
6223 urls += "?" + c.urlParams_.Encode()
6224 req, err := http.NewRequest("POST", urls, body)
6225 if err != nil {
6226 return nil, err
6227 }
6228 req.Header = reqHeaders
6229 googleapi.Expand(req.URL, map[string]string{
6230 "project": c.project,
6231 "instance": c.instance,
6232 })
6233 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6234 }
6235
6236
6237
6238
6239
6240
6241 func (c *InstancesAddServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6242 gensupport.SetOptions(c.urlParams_, opts...)
6243 res, err := c.doRequest("json")
6244 if res != nil && res.StatusCode == http.StatusNotModified {
6245 if res.Body != nil {
6246 res.Body.Close()
6247 }
6248 return nil, gensupport.WrapError(&googleapi.Error{
6249 Code: res.StatusCode,
6250 Header: res.Header,
6251 })
6252 }
6253 if err != nil {
6254 return nil, err
6255 }
6256 defer googleapi.CloseBody(res)
6257 if err := googleapi.CheckResponse(res); err != nil {
6258 return nil, gensupport.WrapError(err)
6259 }
6260 ret := &Operation{
6261 ServerResponse: googleapi.ServerResponse{
6262 Header: res.Header,
6263 HTTPStatusCode: res.StatusCode,
6264 },
6265 }
6266 target := &ret
6267 if err := gensupport.DecodeResponse(target, res); err != nil {
6268 return nil, err
6269 }
6270 return ret, nil
6271 }
6272
6273 type InstancesCloneCall struct {
6274 s *Service
6275 project string
6276 instance string
6277 instancesclonerequest *InstancesCloneRequest
6278 urlParams_ gensupport.URLParams
6279 ctx_ context.Context
6280 header_ http.Header
6281 }
6282
6283
6284
6285
6286
6287
6288
6289 func (r *InstancesService) Clone(project string, instance string, instancesclonerequest *InstancesCloneRequest) *InstancesCloneCall {
6290 c := &InstancesCloneCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6291 c.project = project
6292 c.instance = instance
6293 c.instancesclonerequest = instancesclonerequest
6294 return c
6295 }
6296
6297
6298
6299
6300 func (c *InstancesCloneCall) Fields(s ...googleapi.Field) *InstancesCloneCall {
6301 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6302 return c
6303 }
6304
6305
6306 func (c *InstancesCloneCall) Context(ctx context.Context) *InstancesCloneCall {
6307 c.ctx_ = ctx
6308 return c
6309 }
6310
6311
6312
6313 func (c *InstancesCloneCall) Header() http.Header {
6314 if c.header_ == nil {
6315 c.header_ = make(http.Header)
6316 }
6317 return c.header_
6318 }
6319
6320 func (c *InstancesCloneCall) doRequest(alt string) (*http.Response, error) {
6321 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6322 var body io.Reader = nil
6323 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesclonerequest)
6324 if err != nil {
6325 return nil, err
6326 }
6327 c.urlParams_.Set("alt", alt)
6328 c.urlParams_.Set("prettyPrint", "false")
6329 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/clone")
6330 urls += "?" + c.urlParams_.Encode()
6331 req, err := http.NewRequest("POST", urls, body)
6332 if err != nil {
6333 return nil, err
6334 }
6335 req.Header = reqHeaders
6336 googleapi.Expand(req.URL, map[string]string{
6337 "project": c.project,
6338 "instance": c.instance,
6339 })
6340 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6341 }
6342
6343
6344
6345
6346
6347
6348 func (c *InstancesCloneCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{
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 InstancesDeleteCall struct {
6381 s *Service
6382 project string
6383 instance string
6384 urlParams_ gensupport.URLParams
6385 ctx_ context.Context
6386 header_ http.Header
6387 }
6388
6389
6390
6391
6392
6393
6394 func (r *InstancesService) Delete(project string, instance string) *InstancesDeleteCall {
6395 c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6396 c.project = project
6397 c.instance = instance
6398 return c
6399 }
6400
6401
6402
6403
6404 func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall {
6405 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6406 return c
6407 }
6408
6409
6410 func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall {
6411 c.ctx_ = ctx
6412 return c
6413 }
6414
6415
6416
6417 func (c *InstancesDeleteCall) Header() http.Header {
6418 if c.header_ == nil {
6419 c.header_ = make(http.Header)
6420 }
6421 return c.header_
6422 }
6423
6424 func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
6425 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6426 var body io.Reader = nil
6427 c.urlParams_.Set("alt", alt)
6428 c.urlParams_.Set("prettyPrint", "false")
6429 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
6430 urls += "?" + c.urlParams_.Encode()
6431 req, err := http.NewRequest("DELETE", urls, body)
6432 if err != nil {
6433 return nil, err
6434 }
6435 req.Header = reqHeaders
6436 googleapi.Expand(req.URL, map[string]string{
6437 "project": c.project,
6438 "instance": c.instance,
6439 })
6440 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6441 }
6442
6443
6444
6445
6446
6447
6448 func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6449 gensupport.SetOptions(c.urlParams_, opts...)
6450 res, err := c.doRequest("json")
6451 if res != nil && res.StatusCode == http.StatusNotModified {
6452 if res.Body != nil {
6453 res.Body.Close()
6454 }
6455 return nil, gensupport.WrapError(&googleapi.Error{
6456 Code: res.StatusCode,
6457 Header: res.Header,
6458 })
6459 }
6460 if err != nil {
6461 return nil, err
6462 }
6463 defer googleapi.CloseBody(res)
6464 if err := googleapi.CheckResponse(res); err != nil {
6465 return nil, gensupport.WrapError(err)
6466 }
6467 ret := &Operation{
6468 ServerResponse: googleapi.ServerResponse{
6469 Header: res.Header,
6470 HTTPStatusCode: res.StatusCode,
6471 },
6472 }
6473 target := &ret
6474 if err := gensupport.DecodeResponse(target, res); err != nil {
6475 return nil, err
6476 }
6477 return ret, nil
6478 }
6479
6480 type InstancesDemoteCall struct {
6481 s *Service
6482 project string
6483 instance string
6484 instancesdemoterequest *InstancesDemoteRequest
6485 urlParams_ gensupport.URLParams
6486 ctx_ context.Context
6487 header_ http.Header
6488 }
6489
6490
6491
6492
6493
6494
6495 func (r *InstancesService) Demote(project string, instance string, instancesdemoterequest *InstancesDemoteRequest) *InstancesDemoteCall {
6496 c := &InstancesDemoteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6497 c.project = project
6498 c.instance = instance
6499 c.instancesdemoterequest = instancesdemoterequest
6500 return c
6501 }
6502
6503
6504
6505
6506 func (c *InstancesDemoteCall) Fields(s ...googleapi.Field) *InstancesDemoteCall {
6507 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6508 return c
6509 }
6510
6511
6512 func (c *InstancesDemoteCall) Context(ctx context.Context) *InstancesDemoteCall {
6513 c.ctx_ = ctx
6514 return c
6515 }
6516
6517
6518
6519 func (c *InstancesDemoteCall) Header() http.Header {
6520 if c.header_ == nil {
6521 c.header_ = make(http.Header)
6522 }
6523 return c.header_
6524 }
6525
6526 func (c *InstancesDemoteCall) doRequest(alt string) (*http.Response, error) {
6527 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6528 var body io.Reader = nil
6529 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesdemoterequest)
6530 if err != nil {
6531 return nil, err
6532 }
6533 c.urlParams_.Set("alt", alt)
6534 c.urlParams_.Set("prettyPrint", "false")
6535 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/demote")
6536 urls += "?" + c.urlParams_.Encode()
6537 req, err := http.NewRequest("POST", urls, body)
6538 if err != nil {
6539 return nil, err
6540 }
6541 req.Header = reqHeaders
6542 googleapi.Expand(req.URL, map[string]string{
6543 "project": c.project,
6544 "instance": c.instance,
6545 })
6546 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6547 }
6548
6549
6550
6551
6552
6553
6554 func (c *InstancesDemoteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6555 gensupport.SetOptions(c.urlParams_, opts...)
6556 res, err := c.doRequest("json")
6557 if res != nil && res.StatusCode == http.StatusNotModified {
6558 if res.Body != nil {
6559 res.Body.Close()
6560 }
6561 return nil, gensupport.WrapError(&googleapi.Error{
6562 Code: res.StatusCode,
6563 Header: res.Header,
6564 })
6565 }
6566 if err != nil {
6567 return nil, err
6568 }
6569 defer googleapi.CloseBody(res)
6570 if err := googleapi.CheckResponse(res); err != nil {
6571 return nil, gensupport.WrapError(err)
6572 }
6573 ret := &Operation{
6574 ServerResponse: googleapi.ServerResponse{
6575 Header: res.Header,
6576 HTTPStatusCode: res.StatusCode,
6577 },
6578 }
6579 target := &ret
6580 if err := gensupport.DecodeResponse(target, res); err != nil {
6581 return nil, err
6582 }
6583 return ret, nil
6584 }
6585
6586 type InstancesDemoteMasterCall struct {
6587 s *Service
6588 project string
6589 instance string
6590 instancesdemotemasterrequest *InstancesDemoteMasterRequest
6591 urlParams_ gensupport.URLParams
6592 ctx_ context.Context
6593 header_ http.Header
6594 }
6595
6596
6597
6598
6599
6600
6601 func (r *InstancesService) DemoteMaster(project string, instance string, instancesdemotemasterrequest *InstancesDemoteMasterRequest) *InstancesDemoteMasterCall {
6602 c := &InstancesDemoteMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6603 c.project = project
6604 c.instance = instance
6605 c.instancesdemotemasterrequest = instancesdemotemasterrequest
6606 return c
6607 }
6608
6609
6610
6611
6612 func (c *InstancesDemoteMasterCall) Fields(s ...googleapi.Field) *InstancesDemoteMasterCall {
6613 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6614 return c
6615 }
6616
6617
6618 func (c *InstancesDemoteMasterCall) Context(ctx context.Context) *InstancesDemoteMasterCall {
6619 c.ctx_ = ctx
6620 return c
6621 }
6622
6623
6624
6625 func (c *InstancesDemoteMasterCall) Header() http.Header {
6626 if c.header_ == nil {
6627 c.header_ = make(http.Header)
6628 }
6629 return c.header_
6630 }
6631
6632 func (c *InstancesDemoteMasterCall) doRequest(alt string) (*http.Response, error) {
6633 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6634 var body io.Reader = nil
6635 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesdemotemasterrequest)
6636 if err != nil {
6637 return nil, err
6638 }
6639 c.urlParams_.Set("alt", alt)
6640 c.urlParams_.Set("prettyPrint", "false")
6641 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/demoteMaster")
6642 urls += "?" + c.urlParams_.Encode()
6643 req, err := http.NewRequest("POST", urls, body)
6644 if err != nil {
6645 return nil, err
6646 }
6647 req.Header = reqHeaders
6648 googleapi.Expand(req.URL, map[string]string{
6649 "project": c.project,
6650 "instance": c.instance,
6651 })
6652 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6653 }
6654
6655
6656
6657
6658
6659
6660 func (c *InstancesDemoteMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6661 gensupport.SetOptions(c.urlParams_, opts...)
6662 res, err := c.doRequest("json")
6663 if res != nil && res.StatusCode == http.StatusNotModified {
6664 if res.Body != nil {
6665 res.Body.Close()
6666 }
6667 return nil, gensupport.WrapError(&googleapi.Error{
6668 Code: res.StatusCode,
6669 Header: res.Header,
6670 })
6671 }
6672 if err != nil {
6673 return nil, err
6674 }
6675 defer googleapi.CloseBody(res)
6676 if err := googleapi.CheckResponse(res); err != nil {
6677 return nil, gensupport.WrapError(err)
6678 }
6679 ret := &Operation{
6680 ServerResponse: googleapi.ServerResponse{
6681 Header: res.Header,
6682 HTTPStatusCode: res.StatusCode,
6683 },
6684 }
6685 target := &ret
6686 if err := gensupport.DecodeResponse(target, res); err != nil {
6687 return nil, err
6688 }
6689 return ret, nil
6690 }
6691
6692 type InstancesExportCall struct {
6693 s *Service
6694 project string
6695 instance string
6696 instancesexportrequest *InstancesExportRequest
6697 urlParams_ gensupport.URLParams
6698 ctx_ context.Context
6699 header_ http.Header
6700 }
6701
6702
6703
6704
6705
6706
6707
6708 func (r *InstancesService) Export(project string, instance string, instancesexportrequest *InstancesExportRequest) *InstancesExportCall {
6709 c := &InstancesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6710 c.project = project
6711 c.instance = instance
6712 c.instancesexportrequest = instancesexportrequest
6713 return c
6714 }
6715
6716
6717
6718
6719 func (c *InstancesExportCall) Fields(s ...googleapi.Field) *InstancesExportCall {
6720 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6721 return c
6722 }
6723
6724
6725 func (c *InstancesExportCall) Context(ctx context.Context) *InstancesExportCall {
6726 c.ctx_ = ctx
6727 return c
6728 }
6729
6730
6731
6732 func (c *InstancesExportCall) Header() http.Header {
6733 if c.header_ == nil {
6734 c.header_ = make(http.Header)
6735 }
6736 return c.header_
6737 }
6738
6739 func (c *InstancesExportCall) doRequest(alt string) (*http.Response, error) {
6740 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6741 var body io.Reader = nil
6742 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesexportrequest)
6743 if err != nil {
6744 return nil, err
6745 }
6746 c.urlParams_.Set("alt", alt)
6747 c.urlParams_.Set("prettyPrint", "false")
6748 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/export")
6749 urls += "?" + c.urlParams_.Encode()
6750 req, err := http.NewRequest("POST", urls, body)
6751 if err != nil {
6752 return nil, err
6753 }
6754 req.Header = reqHeaders
6755 googleapi.Expand(req.URL, map[string]string{
6756 "project": c.project,
6757 "instance": c.instance,
6758 })
6759 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6760 }
6761
6762
6763
6764
6765
6766
6767 func (c *InstancesExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6768 gensupport.SetOptions(c.urlParams_, opts...)
6769 res, err := c.doRequest("json")
6770 if res != nil && res.StatusCode == http.StatusNotModified {
6771 if res.Body != nil {
6772 res.Body.Close()
6773 }
6774 return nil, gensupport.WrapError(&googleapi.Error{
6775 Code: res.StatusCode,
6776 Header: res.Header,
6777 })
6778 }
6779 if err != nil {
6780 return nil, err
6781 }
6782 defer googleapi.CloseBody(res)
6783 if err := googleapi.CheckResponse(res); err != nil {
6784 return nil, gensupport.WrapError(err)
6785 }
6786 ret := &Operation{
6787 ServerResponse: googleapi.ServerResponse{
6788 Header: res.Header,
6789 HTTPStatusCode: res.StatusCode,
6790 },
6791 }
6792 target := &ret
6793 if err := gensupport.DecodeResponse(target, res); err != nil {
6794 return nil, err
6795 }
6796 return ret, nil
6797 }
6798
6799 type InstancesFailoverCall struct {
6800 s *Service
6801 project string
6802 instance string
6803 instancesfailoverrequest *InstancesFailoverRequest
6804 urlParams_ gensupport.URLParams
6805 ctx_ context.Context
6806 header_ http.Header
6807 }
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819 func (r *InstancesService) Failover(project string, instance string, instancesfailoverrequest *InstancesFailoverRequest) *InstancesFailoverCall {
6820 c := &InstancesFailoverCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6821 c.project = project
6822 c.instance = instance
6823 c.instancesfailoverrequest = instancesfailoverrequest
6824 return c
6825 }
6826
6827
6828
6829
6830 func (c *InstancesFailoverCall) Fields(s ...googleapi.Field) *InstancesFailoverCall {
6831 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6832 return c
6833 }
6834
6835
6836 func (c *InstancesFailoverCall) Context(ctx context.Context) *InstancesFailoverCall {
6837 c.ctx_ = ctx
6838 return c
6839 }
6840
6841
6842
6843 func (c *InstancesFailoverCall) Header() http.Header {
6844 if c.header_ == nil {
6845 c.header_ = make(http.Header)
6846 }
6847 return c.header_
6848 }
6849
6850 func (c *InstancesFailoverCall) doRequest(alt string) (*http.Response, error) {
6851 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6852 var body io.Reader = nil
6853 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesfailoverrequest)
6854 if err != nil {
6855 return nil, err
6856 }
6857 c.urlParams_.Set("alt", alt)
6858 c.urlParams_.Set("prettyPrint", "false")
6859 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/failover")
6860 urls += "?" + c.urlParams_.Encode()
6861 req, err := http.NewRequest("POST", urls, body)
6862 if err != nil {
6863 return nil, err
6864 }
6865 req.Header = reqHeaders
6866 googleapi.Expand(req.URL, map[string]string{
6867 "project": c.project,
6868 "instance": c.instance,
6869 })
6870 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6871 }
6872
6873
6874
6875
6876
6877
6878 func (c *InstancesFailoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6879 gensupport.SetOptions(c.urlParams_, opts...)
6880 res, err := c.doRequest("json")
6881 if res != nil && res.StatusCode == http.StatusNotModified {
6882 if res.Body != nil {
6883 res.Body.Close()
6884 }
6885 return nil, gensupport.WrapError(&googleapi.Error{
6886 Code: res.StatusCode,
6887 Header: res.Header,
6888 })
6889 }
6890 if err != nil {
6891 return nil, err
6892 }
6893 defer googleapi.CloseBody(res)
6894 if err := googleapi.CheckResponse(res); err != nil {
6895 return nil, gensupport.WrapError(err)
6896 }
6897 ret := &Operation{
6898 ServerResponse: googleapi.ServerResponse{
6899 Header: res.Header,
6900 HTTPStatusCode: res.StatusCode,
6901 },
6902 }
6903 target := &ret
6904 if err := gensupport.DecodeResponse(target, res); err != nil {
6905 return nil, err
6906 }
6907 return ret, nil
6908 }
6909
6910 type InstancesGetCall struct {
6911 s *Service
6912 project string
6913 instance string
6914 urlParams_ gensupport.URLParams
6915 ifNoneMatch_ string
6916 ctx_ context.Context
6917 header_ http.Header
6918 }
6919
6920
6921
6922
6923
6924 func (r *InstancesService) Get(project string, instance string) *InstancesGetCall {
6925 c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6926 c.project = project
6927 c.instance = instance
6928 return c
6929 }
6930
6931
6932
6933
6934 func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall {
6935 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6936 return c
6937 }
6938
6939
6940
6941
6942 func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall {
6943 c.ifNoneMatch_ = entityTag
6944 return c
6945 }
6946
6947
6948 func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall {
6949 c.ctx_ = ctx
6950 return c
6951 }
6952
6953
6954
6955 func (c *InstancesGetCall) Header() http.Header {
6956 if c.header_ == nil {
6957 c.header_ = make(http.Header)
6958 }
6959 return c.header_
6960 }
6961
6962 func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) {
6963 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6964 if c.ifNoneMatch_ != "" {
6965 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6966 }
6967 var body io.Reader = nil
6968 c.urlParams_.Set("alt", alt)
6969 c.urlParams_.Set("prettyPrint", "false")
6970 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
6971 urls += "?" + c.urlParams_.Encode()
6972 req, err := http.NewRequest("GET", urls, body)
6973 if err != nil {
6974 return nil, err
6975 }
6976 req.Header = reqHeaders
6977 googleapi.Expand(req.URL, map[string]string{
6978 "project": c.project,
6979 "instance": c.instance,
6980 })
6981 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6982 }
6983
6984
6985
6986
6987
6988
6989
6990 func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*DatabaseInstance, error) {
6991 gensupport.SetOptions(c.urlParams_, opts...)
6992 res, err := c.doRequest("json")
6993 if res != nil && res.StatusCode == http.StatusNotModified {
6994 if res.Body != nil {
6995 res.Body.Close()
6996 }
6997 return nil, gensupport.WrapError(&googleapi.Error{
6998 Code: res.StatusCode,
6999 Header: res.Header,
7000 })
7001 }
7002 if err != nil {
7003 return nil, err
7004 }
7005 defer googleapi.CloseBody(res)
7006 if err := googleapi.CheckResponse(res); err != nil {
7007 return nil, gensupport.WrapError(err)
7008 }
7009 ret := &DatabaseInstance{
7010 ServerResponse: googleapi.ServerResponse{
7011 Header: res.Header,
7012 HTTPStatusCode: res.StatusCode,
7013 },
7014 }
7015 target := &ret
7016 if err := gensupport.DecodeResponse(target, res); err != nil {
7017 return nil, err
7018 }
7019 return ret, nil
7020 }
7021
7022 type InstancesImportCall struct {
7023 s *Service
7024 project string
7025 instance string
7026 instancesimportrequest *InstancesImportRequest
7027 urlParams_ gensupport.URLParams
7028 ctx_ context.Context
7029 header_ http.Header
7030 }
7031
7032
7033
7034
7035
7036
7037 func (r *InstancesService) Import(project string, instance string, instancesimportrequest *InstancesImportRequest) *InstancesImportCall {
7038 c := &InstancesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7039 c.project = project
7040 c.instance = instance
7041 c.instancesimportrequest = instancesimportrequest
7042 return c
7043 }
7044
7045
7046
7047
7048 func (c *InstancesImportCall) Fields(s ...googleapi.Field) *InstancesImportCall {
7049 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7050 return c
7051 }
7052
7053
7054 func (c *InstancesImportCall) Context(ctx context.Context) *InstancesImportCall {
7055 c.ctx_ = ctx
7056 return c
7057 }
7058
7059
7060
7061 func (c *InstancesImportCall) Header() http.Header {
7062 if c.header_ == nil {
7063 c.header_ = make(http.Header)
7064 }
7065 return c.header_
7066 }
7067
7068 func (c *InstancesImportCall) doRequest(alt string) (*http.Response, error) {
7069 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7070 var body io.Reader = nil
7071 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesimportrequest)
7072 if err != nil {
7073 return nil, err
7074 }
7075 c.urlParams_.Set("alt", alt)
7076 c.urlParams_.Set("prettyPrint", "false")
7077 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/import")
7078 urls += "?" + c.urlParams_.Encode()
7079 req, err := http.NewRequest("POST", urls, body)
7080 if err != nil {
7081 return nil, err
7082 }
7083 req.Header = reqHeaders
7084 googleapi.Expand(req.URL, map[string]string{
7085 "project": c.project,
7086 "instance": c.instance,
7087 })
7088 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7089 }
7090
7091
7092
7093
7094
7095
7096 func (c *InstancesImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7097 gensupport.SetOptions(c.urlParams_, opts...)
7098 res, err := c.doRequest("json")
7099 if res != nil && res.StatusCode == http.StatusNotModified {
7100 if res.Body != nil {
7101 res.Body.Close()
7102 }
7103 return nil, gensupport.WrapError(&googleapi.Error{
7104 Code: res.StatusCode,
7105 Header: res.Header,
7106 })
7107 }
7108 if err != nil {
7109 return nil, err
7110 }
7111 defer googleapi.CloseBody(res)
7112 if err := googleapi.CheckResponse(res); err != nil {
7113 return nil, gensupport.WrapError(err)
7114 }
7115 ret := &Operation{
7116 ServerResponse: googleapi.ServerResponse{
7117 Header: res.Header,
7118 HTTPStatusCode: res.StatusCode,
7119 },
7120 }
7121 target := &ret
7122 if err := gensupport.DecodeResponse(target, res); err != nil {
7123 return nil, err
7124 }
7125 return ret, nil
7126 }
7127
7128 type InstancesInsertCall struct {
7129 s *Service
7130 project string
7131 databaseinstance *DatabaseInstance
7132 urlParams_ gensupport.URLParams
7133 ctx_ context.Context
7134 header_ http.Header
7135 }
7136
7137
7138
7139
7140
7141 func (r *InstancesService) Insert(project string, databaseinstance *DatabaseInstance) *InstancesInsertCall {
7142 c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7143 c.project = project
7144 c.databaseinstance = databaseinstance
7145 return c
7146 }
7147
7148
7149
7150
7151 func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall {
7152 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7153 return c
7154 }
7155
7156
7157 func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall {
7158 c.ctx_ = ctx
7159 return c
7160 }
7161
7162
7163
7164 func (c *InstancesInsertCall) Header() http.Header {
7165 if c.header_ == nil {
7166 c.header_ = make(http.Header)
7167 }
7168 return c.header_
7169 }
7170
7171 func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) {
7172 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7173 var body io.Reader = nil
7174 body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
7175 if err != nil {
7176 return nil, err
7177 }
7178 c.urlParams_.Set("alt", alt)
7179 c.urlParams_.Set("prettyPrint", "false")
7180 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances")
7181 urls += "?" + c.urlParams_.Encode()
7182 req, err := http.NewRequest("POST", urls, body)
7183 if err != nil {
7184 return nil, err
7185 }
7186 req.Header = reqHeaders
7187 googleapi.Expand(req.URL, map[string]string{
7188 "project": c.project,
7189 })
7190 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7191 }
7192
7193
7194
7195
7196
7197
7198 func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7199 gensupport.SetOptions(c.urlParams_, opts...)
7200 res, err := c.doRequest("json")
7201 if res != nil && res.StatusCode == http.StatusNotModified {
7202 if res.Body != nil {
7203 res.Body.Close()
7204 }
7205 return nil, gensupport.WrapError(&googleapi.Error{
7206 Code: res.StatusCode,
7207 Header: res.Header,
7208 })
7209 }
7210 if err != nil {
7211 return nil, err
7212 }
7213 defer googleapi.CloseBody(res)
7214 if err := googleapi.CheckResponse(res); err != nil {
7215 return nil, gensupport.WrapError(err)
7216 }
7217 ret := &Operation{
7218 ServerResponse: googleapi.ServerResponse{
7219 Header: res.Header,
7220 HTTPStatusCode: res.StatusCode,
7221 },
7222 }
7223 target := &ret
7224 if err := gensupport.DecodeResponse(target, res); err != nil {
7225 return nil, err
7226 }
7227 return ret, nil
7228 }
7229
7230 type InstancesListCall struct {
7231 s *Service
7232 project string
7233 urlParams_ gensupport.URLParams
7234 ifNoneMatch_ string
7235 ctx_ context.Context
7236 header_ http.Header
7237 }
7238
7239
7240
7241
7242 func (r *InstancesService) List(project string) *InstancesListCall {
7243 c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7244 c.project = project
7245 return c
7246 }
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256 func (c *InstancesListCall) Filter(filter string) *InstancesListCall {
7257 c.urlParams_.Set("filter", filter)
7258 return c
7259 }
7260
7261
7262
7263
7264
7265 func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall {
7266 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7267 return c
7268 }
7269
7270
7271
7272 func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall {
7273 c.urlParams_.Set("pageToken", pageToken)
7274 return c
7275 }
7276
7277
7278
7279
7280 func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall {
7281 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7282 return c
7283 }
7284
7285
7286
7287
7288 func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall {
7289 c.ifNoneMatch_ = entityTag
7290 return c
7291 }
7292
7293
7294 func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall {
7295 c.ctx_ = ctx
7296 return c
7297 }
7298
7299
7300
7301 func (c *InstancesListCall) Header() http.Header {
7302 if c.header_ == nil {
7303 c.header_ = make(http.Header)
7304 }
7305 return c.header_
7306 }
7307
7308 func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) {
7309 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7310 if c.ifNoneMatch_ != "" {
7311 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7312 }
7313 var body io.Reader = nil
7314 c.urlParams_.Set("alt", alt)
7315 c.urlParams_.Set("prettyPrint", "false")
7316 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances")
7317 urls += "?" + c.urlParams_.Encode()
7318 req, err := http.NewRequest("GET", urls, body)
7319 if err != nil {
7320 return nil, err
7321 }
7322 req.Header = reqHeaders
7323 googleapi.Expand(req.URL, map[string]string{
7324 "project": c.project,
7325 })
7326 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7327 }
7328
7329
7330
7331
7332
7333
7334
7335 func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResponse, error) {
7336 gensupport.SetOptions(c.urlParams_, opts...)
7337 res, err := c.doRequest("json")
7338 if res != nil && res.StatusCode == http.StatusNotModified {
7339 if res.Body != nil {
7340 res.Body.Close()
7341 }
7342 return nil, gensupport.WrapError(&googleapi.Error{
7343 Code: res.StatusCode,
7344 Header: res.Header,
7345 })
7346 }
7347 if err != nil {
7348 return nil, err
7349 }
7350 defer googleapi.CloseBody(res)
7351 if err := googleapi.CheckResponse(res); err != nil {
7352 return nil, gensupport.WrapError(err)
7353 }
7354 ret := &InstancesListResponse{
7355 ServerResponse: googleapi.ServerResponse{
7356 Header: res.Header,
7357 HTTPStatusCode: res.StatusCode,
7358 },
7359 }
7360 target := &ret
7361 if err := gensupport.DecodeResponse(target, res); err != nil {
7362 return nil, err
7363 }
7364 return ret, nil
7365 }
7366
7367
7368
7369
7370 func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstancesListResponse) error) error {
7371 c.ctx_ = ctx
7372 defer c.PageToken(c.urlParams_.Get("pageToken"))
7373 for {
7374 x, err := c.Do()
7375 if err != nil {
7376 return err
7377 }
7378 if err := f(x); err != nil {
7379 return err
7380 }
7381 if x.NextPageToken == "" {
7382 return nil
7383 }
7384 c.PageToken(x.NextPageToken)
7385 }
7386 }
7387
7388 type InstancesListServerCasCall struct {
7389 s *Service
7390 project string
7391 instance string
7392 urlParams_ gensupport.URLParams
7393 ifNoneMatch_ string
7394 ctx_ context.Context
7395 header_ http.Header
7396 }
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406 func (r *InstancesService) ListServerCas(project string, instance string) *InstancesListServerCasCall {
7407 c := &InstancesListServerCasCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7408 c.project = project
7409 c.instance = instance
7410 return c
7411 }
7412
7413
7414
7415
7416 func (c *InstancesListServerCasCall) Fields(s ...googleapi.Field) *InstancesListServerCasCall {
7417 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7418 return c
7419 }
7420
7421
7422
7423
7424 func (c *InstancesListServerCasCall) IfNoneMatch(entityTag string) *InstancesListServerCasCall {
7425 c.ifNoneMatch_ = entityTag
7426 return c
7427 }
7428
7429
7430 func (c *InstancesListServerCasCall) Context(ctx context.Context) *InstancesListServerCasCall {
7431 c.ctx_ = ctx
7432 return c
7433 }
7434
7435
7436
7437 func (c *InstancesListServerCasCall) Header() http.Header {
7438 if c.header_ == nil {
7439 c.header_ = make(http.Header)
7440 }
7441 return c.header_
7442 }
7443
7444 func (c *InstancesListServerCasCall) doRequest(alt string) (*http.Response, error) {
7445 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7446 if c.ifNoneMatch_ != "" {
7447 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7448 }
7449 var body io.Reader = nil
7450 c.urlParams_.Set("alt", alt)
7451 c.urlParams_.Set("prettyPrint", "false")
7452 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/listServerCas")
7453 urls += "?" + c.urlParams_.Encode()
7454 req, err := http.NewRequest("GET", urls, body)
7455 if err != nil {
7456 return nil, err
7457 }
7458 req.Header = reqHeaders
7459 googleapi.Expand(req.URL, map[string]string{
7460 "project": c.project,
7461 "instance": c.instance,
7462 })
7463 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7464 }
7465
7466
7467
7468
7469
7470
7471
7472 func (c *InstancesListServerCasCall) Do(opts ...googleapi.CallOption) (*InstancesListServerCasResponse, error) {
7473 gensupport.SetOptions(c.urlParams_, opts...)
7474 res, err := c.doRequest("json")
7475 if res != nil && res.StatusCode == http.StatusNotModified {
7476 if res.Body != nil {
7477 res.Body.Close()
7478 }
7479 return nil, gensupport.WrapError(&googleapi.Error{
7480 Code: res.StatusCode,
7481 Header: res.Header,
7482 })
7483 }
7484 if err != nil {
7485 return nil, err
7486 }
7487 defer googleapi.CloseBody(res)
7488 if err := googleapi.CheckResponse(res); err != nil {
7489 return nil, gensupport.WrapError(err)
7490 }
7491 ret := &InstancesListServerCasResponse{
7492 ServerResponse: googleapi.ServerResponse{
7493 Header: res.Header,
7494 HTTPStatusCode: res.StatusCode,
7495 },
7496 }
7497 target := &ret
7498 if err := gensupport.DecodeResponse(target, res); err != nil {
7499 return nil, err
7500 }
7501 return ret, nil
7502 }
7503
7504 type InstancesPatchCall struct {
7505 s *Service
7506 project string
7507 instance string
7508 databaseinstance *DatabaseInstance
7509 urlParams_ gensupport.URLParams
7510 ctx_ context.Context
7511 header_ http.Header
7512 }
7513
7514
7515
7516
7517
7518
7519
7520 func (r *InstancesService) Patch(project string, instance string, databaseinstance *DatabaseInstance) *InstancesPatchCall {
7521 c := &InstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7522 c.project = project
7523 c.instance = instance
7524 c.databaseinstance = databaseinstance
7525 return c
7526 }
7527
7528
7529
7530
7531 func (c *InstancesPatchCall) Fields(s ...googleapi.Field) *InstancesPatchCall {
7532 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7533 return c
7534 }
7535
7536
7537 func (c *InstancesPatchCall) Context(ctx context.Context) *InstancesPatchCall {
7538 c.ctx_ = ctx
7539 return c
7540 }
7541
7542
7543
7544 func (c *InstancesPatchCall) Header() http.Header {
7545 if c.header_ == nil {
7546 c.header_ = make(http.Header)
7547 }
7548 return c.header_
7549 }
7550
7551 func (c *InstancesPatchCall) doRequest(alt string) (*http.Response, error) {
7552 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7553 var body io.Reader = nil
7554 body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
7555 if err != nil {
7556 return nil, err
7557 }
7558 c.urlParams_.Set("alt", alt)
7559 c.urlParams_.Set("prettyPrint", "false")
7560 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
7561 urls += "?" + c.urlParams_.Encode()
7562 req, err := http.NewRequest("PATCH", urls, body)
7563 if err != nil {
7564 return nil, err
7565 }
7566 req.Header = reqHeaders
7567 googleapi.Expand(req.URL, map[string]string{
7568 "project": c.project,
7569 "instance": c.instance,
7570 })
7571 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7572 }
7573
7574
7575
7576
7577
7578
7579 func (c *InstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7580 gensupport.SetOptions(c.urlParams_, opts...)
7581 res, err := c.doRequest("json")
7582 if res != nil && res.StatusCode == http.StatusNotModified {
7583 if res.Body != nil {
7584 res.Body.Close()
7585 }
7586 return nil, gensupport.WrapError(&googleapi.Error{
7587 Code: res.StatusCode,
7588 Header: res.Header,
7589 })
7590 }
7591 if err != nil {
7592 return nil, err
7593 }
7594 defer googleapi.CloseBody(res)
7595 if err := googleapi.CheckResponse(res); err != nil {
7596 return nil, gensupport.WrapError(err)
7597 }
7598 ret := &Operation{
7599 ServerResponse: googleapi.ServerResponse{
7600 Header: res.Header,
7601 HTTPStatusCode: res.StatusCode,
7602 },
7603 }
7604 target := &ret
7605 if err := gensupport.DecodeResponse(target, res); err != nil {
7606 return nil, err
7607 }
7608 return ret, nil
7609 }
7610
7611 type InstancesPromoteReplicaCall struct {
7612 s *Service
7613 project string
7614 instance string
7615 urlParams_ gensupport.URLParams
7616 ctx_ context.Context
7617 header_ http.Header
7618 }
7619
7620
7621
7622
7623
7624
7625
7626 func (r *InstancesService) PromoteReplica(project string, instance string) *InstancesPromoteReplicaCall {
7627 c := &InstancesPromoteReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7628 c.project = project
7629 c.instance = instance
7630 return c
7631 }
7632
7633
7634
7635
7636
7637
7638
7639
7640 func (c *InstancesPromoteReplicaCall) Failover(failover bool) *InstancesPromoteReplicaCall {
7641 c.urlParams_.Set("failover", fmt.Sprint(failover))
7642 return c
7643 }
7644
7645
7646
7647
7648 func (c *InstancesPromoteReplicaCall) Fields(s ...googleapi.Field) *InstancesPromoteReplicaCall {
7649 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7650 return c
7651 }
7652
7653
7654 func (c *InstancesPromoteReplicaCall) Context(ctx context.Context) *InstancesPromoteReplicaCall {
7655 c.ctx_ = ctx
7656 return c
7657 }
7658
7659
7660
7661 func (c *InstancesPromoteReplicaCall) Header() http.Header {
7662 if c.header_ == nil {
7663 c.header_ = make(http.Header)
7664 }
7665 return c.header_
7666 }
7667
7668 func (c *InstancesPromoteReplicaCall) doRequest(alt string) (*http.Response, error) {
7669 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7670 var body io.Reader = nil
7671 c.urlParams_.Set("alt", alt)
7672 c.urlParams_.Set("prettyPrint", "false")
7673 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/promoteReplica")
7674 urls += "?" + c.urlParams_.Encode()
7675 req, err := http.NewRequest("POST", urls, body)
7676 if err != nil {
7677 return nil, err
7678 }
7679 req.Header = reqHeaders
7680 googleapi.Expand(req.URL, map[string]string{
7681 "project": c.project,
7682 "instance": c.instance,
7683 })
7684 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7685 }
7686
7687
7688
7689
7690
7691
7692 func (c *InstancesPromoteReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7693 gensupport.SetOptions(c.urlParams_, opts...)
7694 res, err := c.doRequest("json")
7695 if res != nil && res.StatusCode == http.StatusNotModified {
7696 if res.Body != nil {
7697 res.Body.Close()
7698 }
7699 return nil, gensupport.WrapError(&googleapi.Error{
7700 Code: res.StatusCode,
7701 Header: res.Header,
7702 })
7703 }
7704 if err != nil {
7705 return nil, err
7706 }
7707 defer googleapi.CloseBody(res)
7708 if err := googleapi.CheckResponse(res); err != nil {
7709 return nil, gensupport.WrapError(err)
7710 }
7711 ret := &Operation{
7712 ServerResponse: googleapi.ServerResponse{
7713 Header: res.Header,
7714 HTTPStatusCode: res.StatusCode,
7715 },
7716 }
7717 target := &ret
7718 if err := gensupport.DecodeResponse(target, res); err != nil {
7719 return nil, err
7720 }
7721 return ret, nil
7722 }
7723
7724 type InstancesReencryptCall struct {
7725 s *Service
7726 project string
7727 instance string
7728 instancesreencryptrequest *InstancesReencryptRequest
7729 urlParams_ gensupport.URLParams
7730 ctx_ context.Context
7731 header_ http.Header
7732 }
7733
7734
7735
7736
7737
7738 func (r *InstancesService) Reencrypt(project string, instance string, instancesreencryptrequest *InstancesReencryptRequest) *InstancesReencryptCall {
7739 c := &InstancesReencryptCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7740 c.project = project
7741 c.instance = instance
7742 c.instancesreencryptrequest = instancesreencryptrequest
7743 return c
7744 }
7745
7746
7747
7748
7749 func (c *InstancesReencryptCall) Fields(s ...googleapi.Field) *InstancesReencryptCall {
7750 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7751 return c
7752 }
7753
7754
7755 func (c *InstancesReencryptCall) Context(ctx context.Context) *InstancesReencryptCall {
7756 c.ctx_ = ctx
7757 return c
7758 }
7759
7760
7761
7762 func (c *InstancesReencryptCall) Header() http.Header {
7763 if c.header_ == nil {
7764 c.header_ = make(http.Header)
7765 }
7766 return c.header_
7767 }
7768
7769 func (c *InstancesReencryptCall) doRequest(alt string) (*http.Response, error) {
7770 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7771 var body io.Reader = nil
7772 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesreencryptrequest)
7773 if err != nil {
7774 return nil, err
7775 }
7776 c.urlParams_.Set("alt", alt)
7777 c.urlParams_.Set("prettyPrint", "false")
7778 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/reencrypt")
7779 urls += "?" + c.urlParams_.Encode()
7780 req, err := http.NewRequest("POST", urls, body)
7781 if err != nil {
7782 return nil, err
7783 }
7784 req.Header = reqHeaders
7785 googleapi.Expand(req.URL, map[string]string{
7786 "project": c.project,
7787 "instance": c.instance,
7788 })
7789 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7790 }
7791
7792
7793
7794
7795
7796
7797 func (c *InstancesReencryptCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7798 gensupport.SetOptions(c.urlParams_, opts...)
7799 res, err := c.doRequest("json")
7800 if res != nil && res.StatusCode == http.StatusNotModified {
7801 if res.Body != nil {
7802 res.Body.Close()
7803 }
7804 return nil, gensupport.WrapError(&googleapi.Error{
7805 Code: res.StatusCode,
7806 Header: res.Header,
7807 })
7808 }
7809 if err != nil {
7810 return nil, err
7811 }
7812 defer googleapi.CloseBody(res)
7813 if err := googleapi.CheckResponse(res); err != nil {
7814 return nil, gensupport.WrapError(err)
7815 }
7816 ret := &Operation{
7817 ServerResponse: googleapi.ServerResponse{
7818 Header: res.Header,
7819 HTTPStatusCode: res.StatusCode,
7820 },
7821 }
7822 target := &ret
7823 if err := gensupport.DecodeResponse(target, res); err != nil {
7824 return nil, err
7825 }
7826 return ret, nil
7827 }
7828
7829 type InstancesReleaseSsrsLeaseCall struct {
7830 s *Service
7831 project string
7832 instance string
7833 urlParams_ gensupport.URLParams
7834 ctx_ context.Context
7835 header_ http.Header
7836 }
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846 func (r *InstancesService) ReleaseSsrsLease(project string, instance string) *InstancesReleaseSsrsLeaseCall {
7847 c := &InstancesReleaseSsrsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7848 c.project = project
7849 c.instance = instance
7850 return c
7851 }
7852
7853
7854
7855
7856 func (c *InstancesReleaseSsrsLeaseCall) Fields(s ...googleapi.Field) *InstancesReleaseSsrsLeaseCall {
7857 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7858 return c
7859 }
7860
7861
7862 func (c *InstancesReleaseSsrsLeaseCall) Context(ctx context.Context) *InstancesReleaseSsrsLeaseCall {
7863 c.ctx_ = ctx
7864 return c
7865 }
7866
7867
7868
7869 func (c *InstancesReleaseSsrsLeaseCall) Header() http.Header {
7870 if c.header_ == nil {
7871 c.header_ = make(http.Header)
7872 }
7873 return c.header_
7874 }
7875
7876 func (c *InstancesReleaseSsrsLeaseCall) doRequest(alt string) (*http.Response, error) {
7877 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7878 var body io.Reader = nil
7879 c.urlParams_.Set("alt", alt)
7880 c.urlParams_.Set("prettyPrint", "false")
7881 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/releaseSsrsLease")
7882 urls += "?" + c.urlParams_.Encode()
7883 req, err := http.NewRequest("POST", urls, body)
7884 if err != nil {
7885 return nil, err
7886 }
7887 req.Header = reqHeaders
7888 googleapi.Expand(req.URL, map[string]string{
7889 "project": c.project,
7890 "instance": c.instance,
7891 })
7892 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7893 }
7894
7895
7896
7897
7898
7899
7900
7901 func (c *InstancesReleaseSsrsLeaseCall) Do(opts ...googleapi.CallOption) (*SqlInstancesReleaseSsrsLeaseResponse, error) {
7902 gensupport.SetOptions(c.urlParams_, opts...)
7903 res, err := c.doRequest("json")
7904 if res != nil && res.StatusCode == http.StatusNotModified {
7905 if res.Body != nil {
7906 res.Body.Close()
7907 }
7908 return nil, gensupport.WrapError(&googleapi.Error{
7909 Code: res.StatusCode,
7910 Header: res.Header,
7911 })
7912 }
7913 if err != nil {
7914 return nil, err
7915 }
7916 defer googleapi.CloseBody(res)
7917 if err := googleapi.CheckResponse(res); err != nil {
7918 return nil, gensupport.WrapError(err)
7919 }
7920 ret := &SqlInstancesReleaseSsrsLeaseResponse{
7921 ServerResponse: googleapi.ServerResponse{
7922 Header: res.Header,
7923 HTTPStatusCode: res.StatusCode,
7924 },
7925 }
7926 target := &ret
7927 if err := gensupport.DecodeResponse(target, res); err != nil {
7928 return nil, err
7929 }
7930 return ret, nil
7931 }
7932
7933 type InstancesResetSslConfigCall struct {
7934 s *Service
7935 project string
7936 instance string
7937 urlParams_ gensupport.URLParams
7938 ctx_ context.Context
7939 header_ http.Header
7940 }
7941
7942
7943
7944
7945
7946
7947 func (r *InstancesService) ResetSslConfig(project string, instance string) *InstancesResetSslConfigCall {
7948 c := &InstancesResetSslConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7949 c.project = project
7950 c.instance = instance
7951 return c
7952 }
7953
7954
7955
7956
7957 func (c *InstancesResetSslConfigCall) Fields(s ...googleapi.Field) *InstancesResetSslConfigCall {
7958 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7959 return c
7960 }
7961
7962
7963 func (c *InstancesResetSslConfigCall) Context(ctx context.Context) *InstancesResetSslConfigCall {
7964 c.ctx_ = ctx
7965 return c
7966 }
7967
7968
7969
7970 func (c *InstancesResetSslConfigCall) Header() http.Header {
7971 if c.header_ == nil {
7972 c.header_ = make(http.Header)
7973 }
7974 return c.header_
7975 }
7976
7977 func (c *InstancesResetSslConfigCall) doRequest(alt string) (*http.Response, error) {
7978 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7979 var body io.Reader = nil
7980 c.urlParams_.Set("alt", alt)
7981 c.urlParams_.Set("prettyPrint", "false")
7982 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/resetSslConfig")
7983 urls += "?" + c.urlParams_.Encode()
7984 req, err := http.NewRequest("POST", urls, body)
7985 if err != nil {
7986 return nil, err
7987 }
7988 req.Header = reqHeaders
7989 googleapi.Expand(req.URL, map[string]string{
7990 "project": c.project,
7991 "instance": c.instance,
7992 })
7993 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7994 }
7995
7996
7997
7998
7999
8000
8001 func (c *InstancesResetSslConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8002 gensupport.SetOptions(c.urlParams_, opts...)
8003 res, err := c.doRequest("json")
8004 if res != nil && res.StatusCode == http.StatusNotModified {
8005 if res.Body != nil {
8006 res.Body.Close()
8007 }
8008 return nil, gensupport.WrapError(&googleapi.Error{
8009 Code: res.StatusCode,
8010 Header: res.Header,
8011 })
8012 }
8013 if err != nil {
8014 return nil, err
8015 }
8016 defer googleapi.CloseBody(res)
8017 if err := googleapi.CheckResponse(res); err != nil {
8018 return nil, gensupport.WrapError(err)
8019 }
8020 ret := &Operation{
8021 ServerResponse: googleapi.ServerResponse{
8022 Header: res.Header,
8023 HTTPStatusCode: res.StatusCode,
8024 },
8025 }
8026 target := &ret
8027 if err := gensupport.DecodeResponse(target, res); err != nil {
8028 return nil, err
8029 }
8030 return ret, nil
8031 }
8032
8033 type InstancesRestartCall struct {
8034 s *Service
8035 project string
8036 instance string
8037 urlParams_ gensupport.URLParams
8038 ctx_ context.Context
8039 header_ http.Header
8040 }
8041
8042
8043
8044
8045
8046
8047 func (r *InstancesService) Restart(project string, instance string) *InstancesRestartCall {
8048 c := &InstancesRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8049 c.project = project
8050 c.instance = instance
8051 return c
8052 }
8053
8054
8055
8056
8057 func (c *InstancesRestartCall) Fields(s ...googleapi.Field) *InstancesRestartCall {
8058 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8059 return c
8060 }
8061
8062
8063 func (c *InstancesRestartCall) Context(ctx context.Context) *InstancesRestartCall {
8064 c.ctx_ = ctx
8065 return c
8066 }
8067
8068
8069
8070 func (c *InstancesRestartCall) Header() http.Header {
8071 if c.header_ == nil {
8072 c.header_ = make(http.Header)
8073 }
8074 return c.header_
8075 }
8076
8077 func (c *InstancesRestartCall) doRequest(alt string) (*http.Response, error) {
8078 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8079 var body io.Reader = nil
8080 c.urlParams_.Set("alt", alt)
8081 c.urlParams_.Set("prettyPrint", "false")
8082 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/restart")
8083 urls += "?" + c.urlParams_.Encode()
8084 req, err := http.NewRequest("POST", urls, body)
8085 if err != nil {
8086 return nil, err
8087 }
8088 req.Header = reqHeaders
8089 googleapi.Expand(req.URL, map[string]string{
8090 "project": c.project,
8091 "instance": c.instance,
8092 })
8093 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8094 }
8095
8096
8097
8098
8099
8100
8101 func (c *InstancesRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8102 gensupport.SetOptions(c.urlParams_, opts...)
8103 res, err := c.doRequest("json")
8104 if res != nil && res.StatusCode == http.StatusNotModified {
8105 if res.Body != nil {
8106 res.Body.Close()
8107 }
8108 return nil, gensupport.WrapError(&googleapi.Error{
8109 Code: res.StatusCode,
8110 Header: res.Header,
8111 })
8112 }
8113 if err != nil {
8114 return nil, err
8115 }
8116 defer googleapi.CloseBody(res)
8117 if err := googleapi.CheckResponse(res); err != nil {
8118 return nil, gensupport.WrapError(err)
8119 }
8120 ret := &Operation{
8121 ServerResponse: googleapi.ServerResponse{
8122 Header: res.Header,
8123 HTTPStatusCode: res.StatusCode,
8124 },
8125 }
8126 target := &ret
8127 if err := gensupport.DecodeResponse(target, res); err != nil {
8128 return nil, err
8129 }
8130 return ret, nil
8131 }
8132
8133 type InstancesRestoreBackupCall struct {
8134 s *Service
8135 project string
8136 instance string
8137 instancesrestorebackuprequest *InstancesRestoreBackupRequest
8138 urlParams_ gensupport.URLParams
8139 ctx_ context.Context
8140 header_ http.Header
8141 }
8142
8143
8144
8145
8146
8147
8148 func (r *InstancesService) RestoreBackup(project string, instance string, instancesrestorebackuprequest *InstancesRestoreBackupRequest) *InstancesRestoreBackupCall {
8149 c := &InstancesRestoreBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8150 c.project = project
8151 c.instance = instance
8152 c.instancesrestorebackuprequest = instancesrestorebackuprequest
8153 return c
8154 }
8155
8156
8157
8158
8159 func (c *InstancesRestoreBackupCall) Fields(s ...googleapi.Field) *InstancesRestoreBackupCall {
8160 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8161 return c
8162 }
8163
8164
8165 func (c *InstancesRestoreBackupCall) Context(ctx context.Context) *InstancesRestoreBackupCall {
8166 c.ctx_ = ctx
8167 return c
8168 }
8169
8170
8171
8172 func (c *InstancesRestoreBackupCall) Header() http.Header {
8173 if c.header_ == nil {
8174 c.header_ = make(http.Header)
8175 }
8176 return c.header_
8177 }
8178
8179 func (c *InstancesRestoreBackupCall) doRequest(alt string) (*http.Response, error) {
8180 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8181 var body io.Reader = nil
8182 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesrestorebackuprequest)
8183 if err != nil {
8184 return nil, err
8185 }
8186 c.urlParams_.Set("alt", alt)
8187 c.urlParams_.Set("prettyPrint", "false")
8188 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/restoreBackup")
8189 urls += "?" + c.urlParams_.Encode()
8190 req, err := http.NewRequest("POST", urls, body)
8191 if err != nil {
8192 return nil, err
8193 }
8194 req.Header = reqHeaders
8195 googleapi.Expand(req.URL, map[string]string{
8196 "project": c.project,
8197 "instance": c.instance,
8198 })
8199 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8200 }
8201
8202
8203
8204
8205
8206
8207 func (c *InstancesRestoreBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8208 gensupport.SetOptions(c.urlParams_, opts...)
8209 res, err := c.doRequest("json")
8210 if res != nil && res.StatusCode == http.StatusNotModified {
8211 if res.Body != nil {
8212 res.Body.Close()
8213 }
8214 return nil, gensupport.WrapError(&googleapi.Error{
8215 Code: res.StatusCode,
8216 Header: res.Header,
8217 })
8218 }
8219 if err != nil {
8220 return nil, err
8221 }
8222 defer googleapi.CloseBody(res)
8223 if err := googleapi.CheckResponse(res); err != nil {
8224 return nil, gensupport.WrapError(err)
8225 }
8226 ret := &Operation{
8227 ServerResponse: googleapi.ServerResponse{
8228 Header: res.Header,
8229 HTTPStatusCode: res.StatusCode,
8230 },
8231 }
8232 target := &ret
8233 if err := gensupport.DecodeResponse(target, res); err != nil {
8234 return nil, err
8235 }
8236 return ret, nil
8237 }
8238
8239 type InstancesRotateServerCaCall struct {
8240 s *Service
8241 project string
8242 instance string
8243 instancesrotateservercarequest *InstancesRotateServerCaRequest
8244 urlParams_ gensupport.URLParams
8245 ctx_ context.Context
8246 header_ http.Header
8247 }
8248
8249
8250
8251
8252
8253
8254
8255 func (r *InstancesService) RotateServerCa(project string, instance string, instancesrotateservercarequest *InstancesRotateServerCaRequest) *InstancesRotateServerCaCall {
8256 c := &InstancesRotateServerCaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8257 c.project = project
8258 c.instance = instance
8259 c.instancesrotateservercarequest = instancesrotateservercarequest
8260 return c
8261 }
8262
8263
8264
8265
8266 func (c *InstancesRotateServerCaCall) Fields(s ...googleapi.Field) *InstancesRotateServerCaCall {
8267 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8268 return c
8269 }
8270
8271
8272 func (c *InstancesRotateServerCaCall) Context(ctx context.Context) *InstancesRotateServerCaCall {
8273 c.ctx_ = ctx
8274 return c
8275 }
8276
8277
8278
8279 func (c *InstancesRotateServerCaCall) Header() http.Header {
8280 if c.header_ == nil {
8281 c.header_ = make(http.Header)
8282 }
8283 return c.header_
8284 }
8285
8286 func (c *InstancesRotateServerCaCall) doRequest(alt string) (*http.Response, error) {
8287 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8288 var body io.Reader = nil
8289 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesrotateservercarequest)
8290 if err != nil {
8291 return nil, err
8292 }
8293 c.urlParams_.Set("alt", alt)
8294 c.urlParams_.Set("prettyPrint", "false")
8295 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/rotateServerCa")
8296 urls += "?" + c.urlParams_.Encode()
8297 req, err := http.NewRequest("POST", urls, body)
8298 if err != nil {
8299 return nil, err
8300 }
8301 req.Header = reqHeaders
8302 googleapi.Expand(req.URL, map[string]string{
8303 "project": c.project,
8304 "instance": c.instance,
8305 })
8306 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8307 }
8308
8309
8310
8311
8312
8313
8314 func (c *InstancesRotateServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8315 gensupport.SetOptions(c.urlParams_, opts...)
8316 res, err := c.doRequest("json")
8317 if res != nil && res.StatusCode == http.StatusNotModified {
8318 if res.Body != nil {
8319 res.Body.Close()
8320 }
8321 return nil, gensupport.WrapError(&googleapi.Error{
8322 Code: res.StatusCode,
8323 Header: res.Header,
8324 })
8325 }
8326 if err != nil {
8327 return nil, err
8328 }
8329 defer googleapi.CloseBody(res)
8330 if err := googleapi.CheckResponse(res); err != nil {
8331 return nil, gensupport.WrapError(err)
8332 }
8333 ret := &Operation{
8334 ServerResponse: googleapi.ServerResponse{
8335 Header: res.Header,
8336 HTTPStatusCode: res.StatusCode,
8337 },
8338 }
8339 target := &ret
8340 if err := gensupport.DecodeResponse(target, res); err != nil {
8341 return nil, err
8342 }
8343 return ret, nil
8344 }
8345
8346 type InstancesStartReplicaCall struct {
8347 s *Service
8348 project string
8349 instance string
8350 urlParams_ gensupport.URLParams
8351 ctx_ context.Context
8352 header_ http.Header
8353 }
8354
8355
8356
8357
8358
8359 func (r *InstancesService) StartReplica(project string, instance string) *InstancesStartReplicaCall {
8360 c := &InstancesStartReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8361 c.project = project
8362 c.instance = instance
8363 return c
8364 }
8365
8366
8367
8368
8369 func (c *InstancesStartReplicaCall) Fields(s ...googleapi.Field) *InstancesStartReplicaCall {
8370 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8371 return c
8372 }
8373
8374
8375 func (c *InstancesStartReplicaCall) Context(ctx context.Context) *InstancesStartReplicaCall {
8376 c.ctx_ = ctx
8377 return c
8378 }
8379
8380
8381
8382 func (c *InstancesStartReplicaCall) Header() http.Header {
8383 if c.header_ == nil {
8384 c.header_ = make(http.Header)
8385 }
8386 return c.header_
8387 }
8388
8389 func (c *InstancesStartReplicaCall) doRequest(alt string) (*http.Response, error) {
8390 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8391 var body io.Reader = nil
8392 c.urlParams_.Set("alt", alt)
8393 c.urlParams_.Set("prettyPrint", "false")
8394 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/startReplica")
8395 urls += "?" + c.urlParams_.Encode()
8396 req, err := http.NewRequest("POST", urls, body)
8397 if err != nil {
8398 return nil, err
8399 }
8400 req.Header = reqHeaders
8401 googleapi.Expand(req.URL, map[string]string{
8402 "project": c.project,
8403 "instance": c.instance,
8404 })
8405 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8406 }
8407
8408
8409
8410
8411
8412
8413 func (c *InstancesStartReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8414 gensupport.SetOptions(c.urlParams_, opts...)
8415 res, err := c.doRequest("json")
8416 if res != nil && res.StatusCode == http.StatusNotModified {
8417 if res.Body != nil {
8418 res.Body.Close()
8419 }
8420 return nil, gensupport.WrapError(&googleapi.Error{
8421 Code: res.StatusCode,
8422 Header: res.Header,
8423 })
8424 }
8425 if err != nil {
8426 return nil, err
8427 }
8428 defer googleapi.CloseBody(res)
8429 if err := googleapi.CheckResponse(res); err != nil {
8430 return nil, gensupport.WrapError(err)
8431 }
8432 ret := &Operation{
8433 ServerResponse: googleapi.ServerResponse{
8434 Header: res.Header,
8435 HTTPStatusCode: res.StatusCode,
8436 },
8437 }
8438 target := &ret
8439 if err := gensupport.DecodeResponse(target, res); err != nil {
8440 return nil, err
8441 }
8442 return ret, nil
8443 }
8444
8445 type InstancesStopReplicaCall struct {
8446 s *Service
8447 project string
8448 instance string
8449 urlParams_ gensupport.URLParams
8450 ctx_ context.Context
8451 header_ http.Header
8452 }
8453
8454
8455
8456
8457
8458 func (r *InstancesService) StopReplica(project string, instance string) *InstancesStopReplicaCall {
8459 c := &InstancesStopReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8460 c.project = project
8461 c.instance = instance
8462 return c
8463 }
8464
8465
8466
8467
8468 func (c *InstancesStopReplicaCall) Fields(s ...googleapi.Field) *InstancesStopReplicaCall {
8469 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8470 return c
8471 }
8472
8473
8474 func (c *InstancesStopReplicaCall) Context(ctx context.Context) *InstancesStopReplicaCall {
8475 c.ctx_ = ctx
8476 return c
8477 }
8478
8479
8480
8481 func (c *InstancesStopReplicaCall) Header() http.Header {
8482 if c.header_ == nil {
8483 c.header_ = make(http.Header)
8484 }
8485 return c.header_
8486 }
8487
8488 func (c *InstancesStopReplicaCall) doRequest(alt string) (*http.Response, error) {
8489 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8490 var body io.Reader = nil
8491 c.urlParams_.Set("alt", alt)
8492 c.urlParams_.Set("prettyPrint", "false")
8493 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/stopReplica")
8494 urls += "?" + c.urlParams_.Encode()
8495 req, err := http.NewRequest("POST", urls, body)
8496 if err != nil {
8497 return nil, err
8498 }
8499 req.Header = reqHeaders
8500 googleapi.Expand(req.URL, map[string]string{
8501 "project": c.project,
8502 "instance": c.instance,
8503 })
8504 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8505 }
8506
8507
8508
8509
8510
8511
8512 func (c *InstancesStopReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8513 gensupport.SetOptions(c.urlParams_, opts...)
8514 res, err := c.doRequest("json")
8515 if res != nil && res.StatusCode == http.StatusNotModified {
8516 if res.Body != nil {
8517 res.Body.Close()
8518 }
8519 return nil, gensupport.WrapError(&googleapi.Error{
8520 Code: res.StatusCode,
8521 Header: res.Header,
8522 })
8523 }
8524 if err != nil {
8525 return nil, err
8526 }
8527 defer googleapi.CloseBody(res)
8528 if err := googleapi.CheckResponse(res); err != nil {
8529 return nil, gensupport.WrapError(err)
8530 }
8531 ret := &Operation{
8532 ServerResponse: googleapi.ServerResponse{
8533 Header: res.Header,
8534 HTTPStatusCode: res.StatusCode,
8535 },
8536 }
8537 target := &ret
8538 if err := gensupport.DecodeResponse(target, res); err != nil {
8539 return nil, err
8540 }
8541 return ret, nil
8542 }
8543
8544 type InstancesSwitchoverCall struct {
8545 s *Service
8546 project string
8547 instance string
8548 urlParams_ gensupport.URLParams
8549 ctx_ context.Context
8550 header_ http.Header
8551 }
8552
8553
8554
8555
8556
8557
8558 func (r *InstancesService) Switchover(project string, instance string) *InstancesSwitchoverCall {
8559 c := &InstancesSwitchoverCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8560 c.project = project
8561 c.instance = instance
8562 return c
8563 }
8564
8565
8566
8567
8568
8569 func (c *InstancesSwitchoverCall) DbTimeout(dbTimeout string) *InstancesSwitchoverCall {
8570 c.urlParams_.Set("dbTimeout", dbTimeout)
8571 return c
8572 }
8573
8574
8575
8576
8577 func (c *InstancesSwitchoverCall) Fields(s ...googleapi.Field) *InstancesSwitchoverCall {
8578 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8579 return c
8580 }
8581
8582
8583 func (c *InstancesSwitchoverCall) Context(ctx context.Context) *InstancesSwitchoverCall {
8584 c.ctx_ = ctx
8585 return c
8586 }
8587
8588
8589
8590 func (c *InstancesSwitchoverCall) Header() http.Header {
8591 if c.header_ == nil {
8592 c.header_ = make(http.Header)
8593 }
8594 return c.header_
8595 }
8596
8597 func (c *InstancesSwitchoverCall) doRequest(alt string) (*http.Response, error) {
8598 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8599 var body io.Reader = nil
8600 c.urlParams_.Set("alt", alt)
8601 c.urlParams_.Set("prettyPrint", "false")
8602 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/switchover")
8603 urls += "?" + c.urlParams_.Encode()
8604 req, err := http.NewRequest("POST", urls, body)
8605 if err != nil {
8606 return nil, err
8607 }
8608 req.Header = reqHeaders
8609 googleapi.Expand(req.URL, map[string]string{
8610 "project": c.project,
8611 "instance": c.instance,
8612 })
8613 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8614 }
8615
8616
8617
8618
8619
8620
8621 func (c *InstancesSwitchoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8622 gensupport.SetOptions(c.urlParams_, opts...)
8623 res, err := c.doRequest("json")
8624 if res != nil && res.StatusCode == http.StatusNotModified {
8625 if res.Body != nil {
8626 res.Body.Close()
8627 }
8628 return nil, gensupport.WrapError(&googleapi.Error{
8629 Code: res.StatusCode,
8630 Header: res.Header,
8631 })
8632 }
8633 if err != nil {
8634 return nil, err
8635 }
8636 defer googleapi.CloseBody(res)
8637 if err := googleapi.CheckResponse(res); err != nil {
8638 return nil, gensupport.WrapError(err)
8639 }
8640 ret := &Operation{
8641 ServerResponse: googleapi.ServerResponse{
8642 Header: res.Header,
8643 HTTPStatusCode: res.StatusCode,
8644 },
8645 }
8646 target := &ret
8647 if err := gensupport.DecodeResponse(target, res); err != nil {
8648 return nil, err
8649 }
8650 return ret, nil
8651 }
8652
8653 type InstancesTruncateLogCall struct {
8654 s *Service
8655 project string
8656 instance string
8657 instancestruncatelogrequest *InstancesTruncateLogRequest
8658 urlParams_ gensupport.URLParams
8659 ctx_ context.Context
8660 header_ http.Header
8661 }
8662
8663
8664
8665
8666
8667 func (r *InstancesService) TruncateLog(project string, instance string, instancestruncatelogrequest *InstancesTruncateLogRequest) *InstancesTruncateLogCall {
8668 c := &InstancesTruncateLogCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8669 c.project = project
8670 c.instance = instance
8671 c.instancestruncatelogrequest = instancestruncatelogrequest
8672 return c
8673 }
8674
8675
8676
8677
8678 func (c *InstancesTruncateLogCall) Fields(s ...googleapi.Field) *InstancesTruncateLogCall {
8679 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8680 return c
8681 }
8682
8683
8684 func (c *InstancesTruncateLogCall) Context(ctx context.Context) *InstancesTruncateLogCall {
8685 c.ctx_ = ctx
8686 return c
8687 }
8688
8689
8690
8691 func (c *InstancesTruncateLogCall) Header() http.Header {
8692 if c.header_ == nil {
8693 c.header_ = make(http.Header)
8694 }
8695 return c.header_
8696 }
8697
8698 func (c *InstancesTruncateLogCall) doRequest(alt string) (*http.Response, error) {
8699 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8700 var body io.Reader = nil
8701 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancestruncatelogrequest)
8702 if err != nil {
8703 return nil, err
8704 }
8705 c.urlParams_.Set("alt", alt)
8706 c.urlParams_.Set("prettyPrint", "false")
8707 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/truncateLog")
8708 urls += "?" + c.urlParams_.Encode()
8709 req, err := http.NewRequest("POST", urls, body)
8710 if err != nil {
8711 return nil, err
8712 }
8713 req.Header = reqHeaders
8714 googleapi.Expand(req.URL, map[string]string{
8715 "project": c.project,
8716 "instance": c.instance,
8717 })
8718 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8719 }
8720
8721
8722
8723
8724
8725
8726 func (c *InstancesTruncateLogCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8727 gensupport.SetOptions(c.urlParams_, opts...)
8728 res, err := c.doRequest("json")
8729 if res != nil && res.StatusCode == http.StatusNotModified {
8730 if res.Body != nil {
8731 res.Body.Close()
8732 }
8733 return nil, gensupport.WrapError(&googleapi.Error{
8734 Code: res.StatusCode,
8735 Header: res.Header,
8736 })
8737 }
8738 if err != nil {
8739 return nil, err
8740 }
8741 defer googleapi.CloseBody(res)
8742 if err := googleapi.CheckResponse(res); err != nil {
8743 return nil, gensupport.WrapError(err)
8744 }
8745 ret := &Operation{
8746 ServerResponse: googleapi.ServerResponse{
8747 Header: res.Header,
8748 HTTPStatusCode: res.StatusCode,
8749 },
8750 }
8751 target := &ret
8752 if err := gensupport.DecodeResponse(target, res); err != nil {
8753 return nil, err
8754 }
8755 return ret, nil
8756 }
8757
8758 type InstancesUpdateCall struct {
8759 s *Service
8760 project string
8761 instance string
8762 databaseinstance *DatabaseInstance
8763 urlParams_ gensupport.URLParams
8764 ctx_ context.Context
8765 header_ http.Header
8766 }
8767
8768
8769
8770
8771
8772
8773 func (r *InstancesService) Update(project string, instance string, databaseinstance *DatabaseInstance) *InstancesUpdateCall {
8774 c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8775 c.project = project
8776 c.instance = instance
8777 c.databaseinstance = databaseinstance
8778 return c
8779 }
8780
8781
8782
8783
8784 func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall {
8785 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8786 return c
8787 }
8788
8789
8790 func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall {
8791 c.ctx_ = ctx
8792 return c
8793 }
8794
8795
8796
8797 func (c *InstancesUpdateCall) Header() http.Header {
8798 if c.header_ == nil {
8799 c.header_ = make(http.Header)
8800 }
8801 return c.header_
8802 }
8803
8804 func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) {
8805 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8806 var body io.Reader = nil
8807 body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
8808 if err != nil {
8809 return nil, err
8810 }
8811 c.urlParams_.Set("alt", alt)
8812 c.urlParams_.Set("prettyPrint", "false")
8813 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
8814 urls += "?" + c.urlParams_.Encode()
8815 req, err := http.NewRequest("PUT", urls, body)
8816 if err != nil {
8817 return nil, err
8818 }
8819 req.Header = reqHeaders
8820 googleapi.Expand(req.URL, map[string]string{
8821 "project": c.project,
8822 "instance": c.instance,
8823 })
8824 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8825 }
8826
8827
8828
8829
8830
8831
8832 func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8833 gensupport.SetOptions(c.urlParams_, opts...)
8834 res, err := c.doRequest("json")
8835 if res != nil && res.StatusCode == http.StatusNotModified {
8836 if res.Body != nil {
8837 res.Body.Close()
8838 }
8839 return nil, gensupport.WrapError(&googleapi.Error{
8840 Code: res.StatusCode,
8841 Header: res.Header,
8842 })
8843 }
8844 if err != nil {
8845 return nil, err
8846 }
8847 defer googleapi.CloseBody(res)
8848 if err := googleapi.CheckResponse(res); err != nil {
8849 return nil, gensupport.WrapError(err)
8850 }
8851 ret := &Operation{
8852 ServerResponse: googleapi.ServerResponse{
8853 Header: res.Header,
8854 HTTPStatusCode: res.StatusCode,
8855 },
8856 }
8857 target := &ret
8858 if err := gensupport.DecodeResponse(target, res); err != nil {
8859 return nil, err
8860 }
8861 return ret, nil
8862 }
8863
8864 type OperationsCancelCall struct {
8865 s *Service
8866 project string
8867 operation string
8868 urlParams_ gensupport.URLParams
8869 ctx_ context.Context
8870 header_ http.Header
8871 }
8872
8873
8874
8875
8876
8877
8878 func (r *OperationsService) Cancel(project string, operation string) *OperationsCancelCall {
8879 c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8880 c.project = project
8881 c.operation = operation
8882 return c
8883 }
8884
8885
8886
8887
8888 func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
8889 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8890 return c
8891 }
8892
8893
8894 func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
8895 c.ctx_ = ctx
8896 return c
8897 }
8898
8899
8900
8901 func (c *OperationsCancelCall) Header() http.Header {
8902 if c.header_ == nil {
8903 c.header_ = make(http.Header)
8904 }
8905 return c.header_
8906 }
8907
8908 func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
8909 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8910 var body io.Reader = nil
8911 c.urlParams_.Set("alt", alt)
8912 c.urlParams_.Set("prettyPrint", "false")
8913 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/operations/{operation}/cancel")
8914 urls += "?" + c.urlParams_.Encode()
8915 req, err := http.NewRequest("POST", urls, body)
8916 if err != nil {
8917 return nil, err
8918 }
8919 req.Header = reqHeaders
8920 googleapi.Expand(req.URL, map[string]string{
8921 "project": c.project,
8922 "operation": c.operation,
8923 })
8924 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8925 }
8926
8927
8928
8929
8930
8931
8932 func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8933 gensupport.SetOptions(c.urlParams_, opts...)
8934 res, err := c.doRequest("json")
8935 if res != nil && res.StatusCode == http.StatusNotModified {
8936 if res.Body != nil {
8937 res.Body.Close()
8938 }
8939 return nil, gensupport.WrapError(&googleapi.Error{
8940 Code: res.StatusCode,
8941 Header: res.Header,
8942 })
8943 }
8944 if err != nil {
8945 return nil, err
8946 }
8947 defer googleapi.CloseBody(res)
8948 if err := googleapi.CheckResponse(res); err != nil {
8949 return nil, gensupport.WrapError(err)
8950 }
8951 ret := &Empty{
8952 ServerResponse: googleapi.ServerResponse{
8953 Header: res.Header,
8954 HTTPStatusCode: res.StatusCode,
8955 },
8956 }
8957 target := &ret
8958 if err := gensupport.DecodeResponse(target, res); err != nil {
8959 return nil, err
8960 }
8961 return ret, nil
8962 }
8963
8964 type OperationsGetCall struct {
8965 s *Service
8966 project string
8967 operation string
8968 urlParams_ gensupport.URLParams
8969 ifNoneMatch_ string
8970 ctx_ context.Context
8971 header_ http.Header
8972 }
8973
8974
8975
8976
8977
8978 func (r *OperationsService) Get(project string, operation string) *OperationsGetCall {
8979 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8980 c.project = project
8981 c.operation = operation
8982 return c
8983 }
8984
8985
8986
8987
8988 func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
8989 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8990 return c
8991 }
8992
8993
8994
8995
8996 func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
8997 c.ifNoneMatch_ = entityTag
8998 return c
8999 }
9000
9001
9002 func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
9003 c.ctx_ = ctx
9004 return c
9005 }
9006
9007
9008
9009 func (c *OperationsGetCall) Header() http.Header {
9010 if c.header_ == nil {
9011 c.header_ = make(http.Header)
9012 }
9013 return c.header_
9014 }
9015
9016 func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
9017 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9018 if c.ifNoneMatch_ != "" {
9019 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9020 }
9021 var body io.Reader = nil
9022 c.urlParams_.Set("alt", alt)
9023 c.urlParams_.Set("prettyPrint", "false")
9024 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/operations/{operation}")
9025 urls += "?" + c.urlParams_.Encode()
9026 req, err := http.NewRequest("GET", urls, body)
9027 if err != nil {
9028 return nil, err
9029 }
9030 req.Header = reqHeaders
9031 googleapi.Expand(req.URL, map[string]string{
9032 "project": c.project,
9033 "operation": c.operation,
9034 })
9035 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9036 }
9037
9038
9039
9040
9041
9042
9043 func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9044 gensupport.SetOptions(c.urlParams_, opts...)
9045 res, err := c.doRequest("json")
9046 if res != nil && res.StatusCode == http.StatusNotModified {
9047 if res.Body != nil {
9048 res.Body.Close()
9049 }
9050 return nil, gensupport.WrapError(&googleapi.Error{
9051 Code: res.StatusCode,
9052 Header: res.Header,
9053 })
9054 }
9055 if err != nil {
9056 return nil, err
9057 }
9058 defer googleapi.CloseBody(res)
9059 if err := googleapi.CheckResponse(res); err != nil {
9060 return nil, gensupport.WrapError(err)
9061 }
9062 ret := &Operation{
9063 ServerResponse: googleapi.ServerResponse{
9064 Header: res.Header,
9065 HTTPStatusCode: res.StatusCode,
9066 },
9067 }
9068 target := &ret
9069 if err := gensupport.DecodeResponse(target, res); err != nil {
9070 return nil, err
9071 }
9072 return ret, nil
9073 }
9074
9075 type OperationsListCall struct {
9076 s *Service
9077 project string
9078 urlParams_ gensupport.URLParams
9079 ifNoneMatch_ string
9080 ctx_ context.Context
9081 header_ http.Header
9082 }
9083
9084
9085
9086
9087
9088 func (r *OperationsService) List(project string) *OperationsListCall {
9089 c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9090 c.project = project
9091 return c
9092 }
9093
9094
9095
9096 func (c *OperationsListCall) Instance(instance string) *OperationsListCall {
9097 c.urlParams_.Set("instance", instance)
9098 return c
9099 }
9100
9101
9102
9103 func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall {
9104 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
9105 return c
9106 }
9107
9108
9109
9110 func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
9111 c.urlParams_.Set("pageToken", pageToken)
9112 return c
9113 }
9114
9115
9116
9117
9118 func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
9119 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9120 return c
9121 }
9122
9123
9124
9125
9126 func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
9127 c.ifNoneMatch_ = entityTag
9128 return c
9129 }
9130
9131
9132 func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
9133 c.ctx_ = ctx
9134 return c
9135 }
9136
9137
9138
9139 func (c *OperationsListCall) Header() http.Header {
9140 if c.header_ == nil {
9141 c.header_ = make(http.Header)
9142 }
9143 return c.header_
9144 }
9145
9146 func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
9147 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9148 if c.ifNoneMatch_ != "" {
9149 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9150 }
9151 var body io.Reader = nil
9152 c.urlParams_.Set("alt", alt)
9153 c.urlParams_.Set("prettyPrint", "false")
9154 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/operations")
9155 urls += "?" + c.urlParams_.Encode()
9156 req, err := http.NewRequest("GET", urls, body)
9157 if err != nil {
9158 return nil, err
9159 }
9160 req.Header = reqHeaders
9161 googleapi.Expand(req.URL, map[string]string{
9162 "project": c.project,
9163 })
9164 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9165 }
9166
9167
9168
9169
9170
9171
9172
9173 func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error) {
9174 gensupport.SetOptions(c.urlParams_, opts...)
9175 res, err := c.doRequest("json")
9176 if res != nil && res.StatusCode == http.StatusNotModified {
9177 if res.Body != nil {
9178 res.Body.Close()
9179 }
9180 return nil, gensupport.WrapError(&googleapi.Error{
9181 Code: res.StatusCode,
9182 Header: res.Header,
9183 })
9184 }
9185 if err != nil {
9186 return nil, err
9187 }
9188 defer googleapi.CloseBody(res)
9189 if err := googleapi.CheckResponse(res); err != nil {
9190 return nil, gensupport.WrapError(err)
9191 }
9192 ret := &OperationsListResponse{
9193 ServerResponse: googleapi.ServerResponse{
9194 Header: res.Header,
9195 HTTPStatusCode: res.StatusCode,
9196 },
9197 }
9198 target := &ret
9199 if err := gensupport.DecodeResponse(target, res); err != nil {
9200 return nil, err
9201 }
9202 return ret, nil
9203 }
9204
9205
9206
9207
9208 func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error {
9209 c.ctx_ = ctx
9210 defer c.PageToken(c.urlParams_.Get("pageToken"))
9211 for {
9212 x, err := c.Do()
9213 if err != nil {
9214 return err
9215 }
9216 if err := f(x); err != nil {
9217 return err
9218 }
9219 if x.NextPageToken == "" {
9220 return nil
9221 }
9222 c.PageToken(x.NextPageToken)
9223 }
9224 }
9225
9226 type ProjectsInstancesGetDiskShrinkConfigCall struct {
9227 s *Service
9228 project string
9229 instance string
9230 urlParams_ gensupport.URLParams
9231 ifNoneMatch_ string
9232 ctx_ context.Context
9233 header_ http.Header
9234 }
9235
9236
9237
9238
9239
9240 func (r *ProjectsInstancesService) GetDiskShrinkConfig(project string, instance string) *ProjectsInstancesGetDiskShrinkConfigCall {
9241 c := &ProjectsInstancesGetDiskShrinkConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9242 c.project = project
9243 c.instance = instance
9244 return c
9245 }
9246
9247
9248
9249
9250 func (c *ProjectsInstancesGetDiskShrinkConfigCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetDiskShrinkConfigCall {
9251 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9252 return c
9253 }
9254
9255
9256
9257
9258 func (c *ProjectsInstancesGetDiskShrinkConfigCall) IfNoneMatch(entityTag string) *ProjectsInstancesGetDiskShrinkConfigCall {
9259 c.ifNoneMatch_ = entityTag
9260 return c
9261 }
9262
9263
9264 func (c *ProjectsInstancesGetDiskShrinkConfigCall) Context(ctx context.Context) *ProjectsInstancesGetDiskShrinkConfigCall {
9265 c.ctx_ = ctx
9266 return c
9267 }
9268
9269
9270
9271 func (c *ProjectsInstancesGetDiskShrinkConfigCall) Header() http.Header {
9272 if c.header_ == nil {
9273 c.header_ = make(http.Header)
9274 }
9275 return c.header_
9276 }
9277
9278 func (c *ProjectsInstancesGetDiskShrinkConfigCall) doRequest(alt string) (*http.Response, error) {
9279 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9280 if c.ifNoneMatch_ != "" {
9281 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9282 }
9283 var body io.Reader = nil
9284 c.urlParams_.Set("alt", alt)
9285 c.urlParams_.Set("prettyPrint", "false")
9286 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/getDiskShrinkConfig")
9287 urls += "?" + c.urlParams_.Encode()
9288 req, err := http.NewRequest("GET", urls, body)
9289 if err != nil {
9290 return nil, err
9291 }
9292 req.Header = reqHeaders
9293 googleapi.Expand(req.URL, map[string]string{
9294 "project": c.project,
9295 "instance": c.instance,
9296 })
9297 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9298 }
9299
9300
9301
9302
9303
9304
9305
9306 func (c *ProjectsInstancesGetDiskShrinkConfigCall) Do(opts ...googleapi.CallOption) (*SqlInstancesGetDiskShrinkConfigResponse, error) {
9307 gensupport.SetOptions(c.urlParams_, opts...)
9308 res, err := c.doRequest("json")
9309 if res != nil && res.StatusCode == http.StatusNotModified {
9310 if res.Body != nil {
9311 res.Body.Close()
9312 }
9313 return nil, gensupport.WrapError(&googleapi.Error{
9314 Code: res.StatusCode,
9315 Header: res.Header,
9316 })
9317 }
9318 if err != nil {
9319 return nil, err
9320 }
9321 defer googleapi.CloseBody(res)
9322 if err := googleapi.CheckResponse(res); err != nil {
9323 return nil, gensupport.WrapError(err)
9324 }
9325 ret := &SqlInstancesGetDiskShrinkConfigResponse{
9326 ServerResponse: googleapi.ServerResponse{
9327 Header: res.Header,
9328 HTTPStatusCode: res.StatusCode,
9329 },
9330 }
9331 target := &ret
9332 if err := gensupport.DecodeResponse(target, res); err != nil {
9333 return nil, err
9334 }
9335 return ret, nil
9336 }
9337
9338 type ProjectsInstancesGetLatestRecoveryTimeCall struct {
9339 s *Service
9340 project string
9341 instance string
9342 urlParams_ gensupport.URLParams
9343 ifNoneMatch_ string
9344 ctx_ context.Context
9345 header_ http.Header
9346 }
9347
9348
9349
9350
9351
9352 func (r *ProjectsInstancesService) GetLatestRecoveryTime(project string, instance string) *ProjectsInstancesGetLatestRecoveryTimeCall {
9353 c := &ProjectsInstancesGetLatestRecoveryTimeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9354 c.project = project
9355 c.instance = instance
9356 return c
9357 }
9358
9359
9360
9361
9362 func (c *ProjectsInstancesGetLatestRecoveryTimeCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetLatestRecoveryTimeCall {
9363 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9364 return c
9365 }
9366
9367
9368
9369
9370 func (c *ProjectsInstancesGetLatestRecoveryTimeCall) IfNoneMatch(entityTag string) *ProjectsInstancesGetLatestRecoveryTimeCall {
9371 c.ifNoneMatch_ = entityTag
9372 return c
9373 }
9374
9375
9376 func (c *ProjectsInstancesGetLatestRecoveryTimeCall) Context(ctx context.Context) *ProjectsInstancesGetLatestRecoveryTimeCall {
9377 c.ctx_ = ctx
9378 return c
9379 }
9380
9381
9382
9383 func (c *ProjectsInstancesGetLatestRecoveryTimeCall) Header() http.Header {
9384 if c.header_ == nil {
9385 c.header_ = make(http.Header)
9386 }
9387 return c.header_
9388 }
9389
9390 func (c *ProjectsInstancesGetLatestRecoveryTimeCall) doRequest(alt string) (*http.Response, error) {
9391 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9392 if c.ifNoneMatch_ != "" {
9393 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9394 }
9395 var body io.Reader = nil
9396 c.urlParams_.Set("alt", alt)
9397 c.urlParams_.Set("prettyPrint", "false")
9398 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/getLatestRecoveryTime")
9399 urls += "?" + c.urlParams_.Encode()
9400 req, err := http.NewRequest("GET", urls, body)
9401 if err != nil {
9402 return nil, err
9403 }
9404 req.Header = reqHeaders
9405 googleapi.Expand(req.URL, map[string]string{
9406 "project": c.project,
9407 "instance": c.instance,
9408 })
9409 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9410 }
9411
9412
9413
9414
9415
9416
9417
9418 func (c *ProjectsInstancesGetLatestRecoveryTimeCall) Do(opts ...googleapi.CallOption) (*SqlInstancesGetLatestRecoveryTimeResponse, error) {
9419 gensupport.SetOptions(c.urlParams_, opts...)
9420 res, err := c.doRequest("json")
9421 if res != nil && res.StatusCode == http.StatusNotModified {
9422 if res.Body != nil {
9423 res.Body.Close()
9424 }
9425 return nil, gensupport.WrapError(&googleapi.Error{
9426 Code: res.StatusCode,
9427 Header: res.Header,
9428 })
9429 }
9430 if err != nil {
9431 return nil, err
9432 }
9433 defer googleapi.CloseBody(res)
9434 if err := googleapi.CheckResponse(res); err != nil {
9435 return nil, gensupport.WrapError(err)
9436 }
9437 ret := &SqlInstancesGetLatestRecoveryTimeResponse{
9438 ServerResponse: googleapi.ServerResponse{
9439 Header: res.Header,
9440 HTTPStatusCode: res.StatusCode,
9441 },
9442 }
9443 target := &ret
9444 if err := gensupport.DecodeResponse(target, res); err != nil {
9445 return nil, err
9446 }
9447 return ret, nil
9448 }
9449
9450 type ProjectsInstancesPerformDiskShrinkCall struct {
9451 s *Service
9452 project string
9453 instance string
9454 performdiskshrinkcontext *PerformDiskShrinkContext
9455 urlParams_ gensupport.URLParams
9456 ctx_ context.Context
9457 header_ http.Header
9458 }
9459
9460
9461
9462
9463
9464 func (r *ProjectsInstancesService) PerformDiskShrink(project string, instance string, performdiskshrinkcontext *PerformDiskShrinkContext) *ProjectsInstancesPerformDiskShrinkCall {
9465 c := &ProjectsInstancesPerformDiskShrinkCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9466 c.project = project
9467 c.instance = instance
9468 c.performdiskshrinkcontext = performdiskshrinkcontext
9469 return c
9470 }
9471
9472
9473
9474
9475 func (c *ProjectsInstancesPerformDiskShrinkCall) Fields(s ...googleapi.Field) *ProjectsInstancesPerformDiskShrinkCall {
9476 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9477 return c
9478 }
9479
9480
9481 func (c *ProjectsInstancesPerformDiskShrinkCall) Context(ctx context.Context) *ProjectsInstancesPerformDiskShrinkCall {
9482 c.ctx_ = ctx
9483 return c
9484 }
9485
9486
9487
9488 func (c *ProjectsInstancesPerformDiskShrinkCall) Header() http.Header {
9489 if c.header_ == nil {
9490 c.header_ = make(http.Header)
9491 }
9492 return c.header_
9493 }
9494
9495 func (c *ProjectsInstancesPerformDiskShrinkCall) doRequest(alt string) (*http.Response, error) {
9496 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9497 var body io.Reader = nil
9498 body, err := googleapi.WithoutDataWrapper.JSONReader(c.performdiskshrinkcontext)
9499 if err != nil {
9500 return nil, err
9501 }
9502 c.urlParams_.Set("alt", alt)
9503 c.urlParams_.Set("prettyPrint", "false")
9504 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/performDiskShrink")
9505 urls += "?" + c.urlParams_.Encode()
9506 req, err := http.NewRequest("POST", urls, body)
9507 if err != nil {
9508 return nil, err
9509 }
9510 req.Header = reqHeaders
9511 googleapi.Expand(req.URL, map[string]string{
9512 "project": c.project,
9513 "instance": c.instance,
9514 })
9515 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9516 }
9517
9518
9519
9520
9521
9522
9523 func (c *ProjectsInstancesPerformDiskShrinkCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9524 gensupport.SetOptions(c.urlParams_, opts...)
9525 res, err := c.doRequest("json")
9526 if res != nil && res.StatusCode == http.StatusNotModified {
9527 if res.Body != nil {
9528 res.Body.Close()
9529 }
9530 return nil, gensupport.WrapError(&googleapi.Error{
9531 Code: res.StatusCode,
9532 Header: res.Header,
9533 })
9534 }
9535 if err != nil {
9536 return nil, err
9537 }
9538 defer googleapi.CloseBody(res)
9539 if err := googleapi.CheckResponse(res); err != nil {
9540 return nil, gensupport.WrapError(err)
9541 }
9542 ret := &Operation{
9543 ServerResponse: googleapi.ServerResponse{
9544 Header: res.Header,
9545 HTTPStatusCode: res.StatusCode,
9546 },
9547 }
9548 target := &ret
9549 if err := gensupport.DecodeResponse(target, res); err != nil {
9550 return nil, err
9551 }
9552 return ret, nil
9553 }
9554
9555 type ProjectsInstancesRescheduleMaintenanceCall struct {
9556 s *Service
9557 project string
9558 instance string
9559 sqlinstancesreschedulemaintenancerequestbody *SqlInstancesRescheduleMaintenanceRequestBody
9560 urlParams_ gensupport.URLParams
9561 ctx_ context.Context
9562 header_ http.Header
9563 }
9564
9565
9566
9567
9568
9569 func (r *ProjectsInstancesService) RescheduleMaintenance(project string, instance string, sqlinstancesreschedulemaintenancerequestbody *SqlInstancesRescheduleMaintenanceRequestBody) *ProjectsInstancesRescheduleMaintenanceCall {
9570 c := &ProjectsInstancesRescheduleMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9571 c.project = project
9572 c.instance = instance
9573 c.sqlinstancesreschedulemaintenancerequestbody = sqlinstancesreschedulemaintenancerequestbody
9574 return c
9575 }
9576
9577
9578
9579
9580 func (c *ProjectsInstancesRescheduleMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsInstancesRescheduleMaintenanceCall {
9581 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9582 return c
9583 }
9584
9585
9586 func (c *ProjectsInstancesRescheduleMaintenanceCall) Context(ctx context.Context) *ProjectsInstancesRescheduleMaintenanceCall {
9587 c.ctx_ = ctx
9588 return c
9589 }
9590
9591
9592
9593 func (c *ProjectsInstancesRescheduleMaintenanceCall) Header() http.Header {
9594 if c.header_ == nil {
9595 c.header_ = make(http.Header)
9596 }
9597 return c.header_
9598 }
9599
9600 func (c *ProjectsInstancesRescheduleMaintenanceCall) doRequest(alt string) (*http.Response, error) {
9601 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9602 var body io.Reader = nil
9603 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sqlinstancesreschedulemaintenancerequestbody)
9604 if err != nil {
9605 return nil, err
9606 }
9607 c.urlParams_.Set("alt", alt)
9608 c.urlParams_.Set("prettyPrint", "false")
9609 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/rescheduleMaintenance")
9610 urls += "?" + c.urlParams_.Encode()
9611 req, err := http.NewRequest("POST", urls, body)
9612 if err != nil {
9613 return nil, err
9614 }
9615 req.Header = reqHeaders
9616 googleapi.Expand(req.URL, map[string]string{
9617 "project": c.project,
9618 "instance": c.instance,
9619 })
9620 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9621 }
9622
9623
9624
9625
9626
9627
9628 func (c *ProjectsInstancesRescheduleMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9629 gensupport.SetOptions(c.urlParams_, opts...)
9630 res, err := c.doRequest("json")
9631 if res != nil && res.StatusCode == http.StatusNotModified {
9632 if res.Body != nil {
9633 res.Body.Close()
9634 }
9635 return nil, gensupport.WrapError(&googleapi.Error{
9636 Code: res.StatusCode,
9637 Header: res.Header,
9638 })
9639 }
9640 if err != nil {
9641 return nil, err
9642 }
9643 defer googleapi.CloseBody(res)
9644 if err := googleapi.CheckResponse(res); err != nil {
9645 return nil, gensupport.WrapError(err)
9646 }
9647 ret := &Operation{
9648 ServerResponse: googleapi.ServerResponse{
9649 Header: res.Header,
9650 HTTPStatusCode: res.StatusCode,
9651 },
9652 }
9653 target := &ret
9654 if err := gensupport.DecodeResponse(target, res); err != nil {
9655 return nil, err
9656 }
9657 return ret, nil
9658 }
9659
9660 type ProjectsInstancesResetReplicaSizeCall struct {
9661 s *Service
9662 project string
9663 instance string
9664 sqlinstancesresetreplicasizerequest *SqlInstancesResetReplicaSizeRequest
9665 urlParams_ gensupport.URLParams
9666 ctx_ context.Context
9667 header_ http.Header
9668 }
9669
9670
9671
9672
9673
9674 func (r *ProjectsInstancesService) ResetReplicaSize(project string, instance string, sqlinstancesresetreplicasizerequest *SqlInstancesResetReplicaSizeRequest) *ProjectsInstancesResetReplicaSizeCall {
9675 c := &ProjectsInstancesResetReplicaSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9676 c.project = project
9677 c.instance = instance
9678 c.sqlinstancesresetreplicasizerequest = sqlinstancesresetreplicasizerequest
9679 return c
9680 }
9681
9682
9683
9684
9685 func (c *ProjectsInstancesResetReplicaSizeCall) Fields(s ...googleapi.Field) *ProjectsInstancesResetReplicaSizeCall {
9686 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9687 return c
9688 }
9689
9690
9691 func (c *ProjectsInstancesResetReplicaSizeCall) Context(ctx context.Context) *ProjectsInstancesResetReplicaSizeCall {
9692 c.ctx_ = ctx
9693 return c
9694 }
9695
9696
9697
9698 func (c *ProjectsInstancesResetReplicaSizeCall) Header() http.Header {
9699 if c.header_ == nil {
9700 c.header_ = make(http.Header)
9701 }
9702 return c.header_
9703 }
9704
9705 func (c *ProjectsInstancesResetReplicaSizeCall) doRequest(alt string) (*http.Response, error) {
9706 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9707 var body io.Reader = nil
9708 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sqlinstancesresetreplicasizerequest)
9709 if err != nil {
9710 return nil, err
9711 }
9712 c.urlParams_.Set("alt", alt)
9713 c.urlParams_.Set("prettyPrint", "false")
9714 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/resetReplicaSize")
9715 urls += "?" + c.urlParams_.Encode()
9716 req, err := http.NewRequest("POST", urls, body)
9717 if err != nil {
9718 return nil, err
9719 }
9720 req.Header = reqHeaders
9721 googleapi.Expand(req.URL, map[string]string{
9722 "project": c.project,
9723 "instance": c.instance,
9724 })
9725 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9726 }
9727
9728
9729
9730
9731
9732
9733 func (c *ProjectsInstancesResetReplicaSizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9734 gensupport.SetOptions(c.urlParams_, opts...)
9735 res, err := c.doRequest("json")
9736 if res != nil && res.StatusCode == http.StatusNotModified {
9737 if res.Body != nil {
9738 res.Body.Close()
9739 }
9740 return nil, gensupport.WrapError(&googleapi.Error{
9741 Code: res.StatusCode,
9742 Header: res.Header,
9743 })
9744 }
9745 if err != nil {
9746 return nil, err
9747 }
9748 defer googleapi.CloseBody(res)
9749 if err := googleapi.CheckResponse(res); err != nil {
9750 return nil, gensupport.WrapError(err)
9751 }
9752 ret := &Operation{
9753 ServerResponse: googleapi.ServerResponse{
9754 Header: res.Header,
9755 HTTPStatusCode: res.StatusCode,
9756 },
9757 }
9758 target := &ret
9759 if err := gensupport.DecodeResponse(target, res); err != nil {
9760 return nil, err
9761 }
9762 return ret, nil
9763 }
9764
9765 type ProjectsInstancesStartExternalSyncCall struct {
9766 s *Service
9767 project string
9768 instance string
9769 sqlinstancesstartexternalsyncrequest *SqlInstancesStartExternalSyncRequest
9770 urlParams_ gensupport.URLParams
9771 ctx_ context.Context
9772 header_ http.Header
9773 }
9774
9775
9776
9777
9778
9779 func (r *ProjectsInstancesService) StartExternalSync(project string, instance string, sqlinstancesstartexternalsyncrequest *SqlInstancesStartExternalSyncRequest) *ProjectsInstancesStartExternalSyncCall {
9780 c := &ProjectsInstancesStartExternalSyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9781 c.project = project
9782 c.instance = instance
9783 c.sqlinstancesstartexternalsyncrequest = sqlinstancesstartexternalsyncrequest
9784 return c
9785 }
9786
9787
9788
9789
9790 func (c *ProjectsInstancesStartExternalSyncCall) Fields(s ...googleapi.Field) *ProjectsInstancesStartExternalSyncCall {
9791 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9792 return c
9793 }
9794
9795
9796 func (c *ProjectsInstancesStartExternalSyncCall) Context(ctx context.Context) *ProjectsInstancesStartExternalSyncCall {
9797 c.ctx_ = ctx
9798 return c
9799 }
9800
9801
9802
9803 func (c *ProjectsInstancesStartExternalSyncCall) Header() http.Header {
9804 if c.header_ == nil {
9805 c.header_ = make(http.Header)
9806 }
9807 return c.header_
9808 }
9809
9810 func (c *ProjectsInstancesStartExternalSyncCall) doRequest(alt string) (*http.Response, error) {
9811 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9812 var body io.Reader = nil
9813 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sqlinstancesstartexternalsyncrequest)
9814 if err != nil {
9815 return nil, err
9816 }
9817 c.urlParams_.Set("alt", alt)
9818 c.urlParams_.Set("prettyPrint", "false")
9819 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/startExternalSync")
9820 urls += "?" + c.urlParams_.Encode()
9821 req, err := http.NewRequest("POST", urls, body)
9822 if err != nil {
9823 return nil, err
9824 }
9825 req.Header = reqHeaders
9826 googleapi.Expand(req.URL, map[string]string{
9827 "project": c.project,
9828 "instance": c.instance,
9829 })
9830 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9831 }
9832
9833
9834
9835
9836
9837
9838 func (c *ProjectsInstancesStartExternalSyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9839 gensupport.SetOptions(c.urlParams_, opts...)
9840 res, err := c.doRequest("json")
9841 if res != nil && res.StatusCode == http.StatusNotModified {
9842 if res.Body != nil {
9843 res.Body.Close()
9844 }
9845 return nil, gensupport.WrapError(&googleapi.Error{
9846 Code: res.StatusCode,
9847 Header: res.Header,
9848 })
9849 }
9850 if err != nil {
9851 return nil, err
9852 }
9853 defer googleapi.CloseBody(res)
9854 if err := googleapi.CheckResponse(res); err != nil {
9855 return nil, gensupport.WrapError(err)
9856 }
9857 ret := &Operation{
9858 ServerResponse: googleapi.ServerResponse{
9859 Header: res.Header,
9860 HTTPStatusCode: res.StatusCode,
9861 },
9862 }
9863 target := &ret
9864 if err := gensupport.DecodeResponse(target, res); err != nil {
9865 return nil, err
9866 }
9867 return ret, nil
9868 }
9869
9870 type ProjectsInstancesVerifyExternalSyncSettingsCall struct {
9871 s *Service
9872 project string
9873 instance string
9874 sqlinstancesverifyexternalsyncsettingsrequest *SqlInstancesVerifyExternalSyncSettingsRequest
9875 urlParams_ gensupport.URLParams
9876 ctx_ context.Context
9877 header_ http.Header
9878 }
9879
9880
9881
9882
9883
9884
9885 func (r *ProjectsInstancesService) VerifyExternalSyncSettings(project string, instance string, sqlinstancesverifyexternalsyncsettingsrequest *SqlInstancesVerifyExternalSyncSettingsRequest) *ProjectsInstancesVerifyExternalSyncSettingsCall {
9886 c := &ProjectsInstancesVerifyExternalSyncSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9887 c.project = project
9888 c.instance = instance
9889 c.sqlinstancesverifyexternalsyncsettingsrequest = sqlinstancesverifyexternalsyncsettingsrequest
9890 return c
9891 }
9892
9893
9894
9895
9896 func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Fields(s ...googleapi.Field) *ProjectsInstancesVerifyExternalSyncSettingsCall {
9897 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9898 return c
9899 }
9900
9901
9902 func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Context(ctx context.Context) *ProjectsInstancesVerifyExternalSyncSettingsCall {
9903 c.ctx_ = ctx
9904 return c
9905 }
9906
9907
9908
9909 func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Header() http.Header {
9910 if c.header_ == nil {
9911 c.header_ = make(http.Header)
9912 }
9913 return c.header_
9914 }
9915
9916 func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) doRequest(alt string) (*http.Response, error) {
9917 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9918 var body io.Reader = nil
9919 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sqlinstancesverifyexternalsyncsettingsrequest)
9920 if err != nil {
9921 return nil, err
9922 }
9923 c.urlParams_.Set("alt", alt)
9924 c.urlParams_.Set("prettyPrint", "false")
9925 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings")
9926 urls += "?" + c.urlParams_.Encode()
9927 req, err := http.NewRequest("POST", urls, body)
9928 if err != nil {
9929 return nil, err
9930 }
9931 req.Header = reqHeaders
9932 googleapi.Expand(req.URL, map[string]string{
9933 "project": c.project,
9934 "instance": c.instance,
9935 })
9936 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9937 }
9938
9939
9940
9941
9942
9943
9944
9945 func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Do(opts ...googleapi.CallOption) (*SqlInstancesVerifyExternalSyncSettingsResponse, error) {
9946 gensupport.SetOptions(c.urlParams_, opts...)
9947 res, err := c.doRequest("json")
9948 if res != nil && res.StatusCode == http.StatusNotModified {
9949 if res.Body != nil {
9950 res.Body.Close()
9951 }
9952 return nil, gensupport.WrapError(&googleapi.Error{
9953 Code: res.StatusCode,
9954 Header: res.Header,
9955 })
9956 }
9957 if err != nil {
9958 return nil, err
9959 }
9960 defer googleapi.CloseBody(res)
9961 if err := googleapi.CheckResponse(res); err != nil {
9962 return nil, gensupport.WrapError(err)
9963 }
9964 ret := &SqlInstancesVerifyExternalSyncSettingsResponse{
9965 ServerResponse: googleapi.ServerResponse{
9966 Header: res.Header,
9967 HTTPStatusCode: res.StatusCode,
9968 },
9969 }
9970 target := &ret
9971 if err := gensupport.DecodeResponse(target, res); err != nil {
9972 return nil, err
9973 }
9974 return ret, nil
9975 }
9976
9977 type SslCertsCreateEphemeralCall struct {
9978 s *Service
9979 project string
9980 instance string
9981 sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest
9982 urlParams_ gensupport.URLParams
9983 ctx_ context.Context
9984 header_ http.Header
9985 }
9986
9987
9988
9989
9990
9991
9992
9993
9994 func (r *SslCertsService) CreateEphemeral(project string, instance string, sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest) *SslCertsCreateEphemeralCall {
9995 c := &SslCertsCreateEphemeralCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9996 c.project = project
9997 c.instance = instance
9998 c.sslcertscreateephemeralrequest = sslcertscreateephemeralrequest
9999 return c
10000 }
10001
10002
10003
10004
10005 func (c *SslCertsCreateEphemeralCall) Fields(s ...googleapi.Field) *SslCertsCreateEphemeralCall {
10006 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10007 return c
10008 }
10009
10010
10011 func (c *SslCertsCreateEphemeralCall) Context(ctx context.Context) *SslCertsCreateEphemeralCall {
10012 c.ctx_ = ctx
10013 return c
10014 }
10015
10016
10017
10018 func (c *SslCertsCreateEphemeralCall) Header() http.Header {
10019 if c.header_ == nil {
10020 c.header_ = make(http.Header)
10021 }
10022 return c.header_
10023 }
10024
10025 func (c *SslCertsCreateEphemeralCall) doRequest(alt string) (*http.Response, error) {
10026 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10027 var body io.Reader = nil
10028 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertscreateephemeralrequest)
10029 if err != nil {
10030 return nil, err
10031 }
10032 c.urlParams_.Set("alt", alt)
10033 c.urlParams_.Set("prettyPrint", "false")
10034 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/createEphemeral")
10035 urls += "?" + c.urlParams_.Encode()
10036 req, err := http.NewRequest("POST", urls, body)
10037 if err != nil {
10038 return nil, err
10039 }
10040 req.Header = reqHeaders
10041 googleapi.Expand(req.URL, map[string]string{
10042 "project": c.project,
10043 "instance": c.instance,
10044 })
10045 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10046 }
10047
10048
10049
10050
10051
10052
10053 func (c *SslCertsCreateEphemeralCall) Do(opts ...googleapi.CallOption) (*SslCert, error) {
10054 gensupport.SetOptions(c.urlParams_, opts...)
10055 res, err := c.doRequest("json")
10056 if res != nil && res.StatusCode == http.StatusNotModified {
10057 if res.Body != nil {
10058 res.Body.Close()
10059 }
10060 return nil, gensupport.WrapError(&googleapi.Error{
10061 Code: res.StatusCode,
10062 Header: res.Header,
10063 })
10064 }
10065 if err != nil {
10066 return nil, err
10067 }
10068 defer googleapi.CloseBody(res)
10069 if err := googleapi.CheckResponse(res); err != nil {
10070 return nil, gensupport.WrapError(err)
10071 }
10072 ret := &SslCert{
10073 ServerResponse: googleapi.ServerResponse{
10074 Header: res.Header,
10075 HTTPStatusCode: res.StatusCode,
10076 },
10077 }
10078 target := &ret
10079 if err := gensupport.DecodeResponse(target, res); err != nil {
10080 return nil, err
10081 }
10082 return ret, nil
10083 }
10084
10085 type SslCertsDeleteCall struct {
10086 s *Service
10087 project string
10088 instance string
10089 sha1Fingerprint string
10090 urlParams_ gensupport.URLParams
10091 ctx_ context.Context
10092 header_ http.Header
10093 }
10094
10095
10096
10097
10098
10099
10100
10101 func (r *SslCertsService) Delete(project string, instance string, sha1Fingerprint string) *SslCertsDeleteCall {
10102 c := &SslCertsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10103 c.project = project
10104 c.instance = instance
10105 c.sha1Fingerprint = sha1Fingerprint
10106 return c
10107 }
10108
10109
10110
10111
10112 func (c *SslCertsDeleteCall) Fields(s ...googleapi.Field) *SslCertsDeleteCall {
10113 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10114 return c
10115 }
10116
10117
10118 func (c *SslCertsDeleteCall) Context(ctx context.Context) *SslCertsDeleteCall {
10119 c.ctx_ = ctx
10120 return c
10121 }
10122
10123
10124
10125 func (c *SslCertsDeleteCall) Header() http.Header {
10126 if c.header_ == nil {
10127 c.header_ = make(http.Header)
10128 }
10129 return c.header_
10130 }
10131
10132 func (c *SslCertsDeleteCall) doRequest(alt string) (*http.Response, error) {
10133 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10134 var body io.Reader = nil
10135 c.urlParams_.Set("alt", alt)
10136 c.urlParams_.Set("prettyPrint", "false")
10137 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}")
10138 urls += "?" + c.urlParams_.Encode()
10139 req, err := http.NewRequest("DELETE", urls, body)
10140 if err != nil {
10141 return nil, err
10142 }
10143 req.Header = reqHeaders
10144 googleapi.Expand(req.URL, map[string]string{
10145 "project": c.project,
10146 "instance": c.instance,
10147 "sha1Fingerprint": c.sha1Fingerprint,
10148 })
10149 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10150 }
10151
10152
10153
10154
10155
10156
10157 func (c *SslCertsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10158 gensupport.SetOptions(c.urlParams_, opts...)
10159 res, err := c.doRequest("json")
10160 if res != nil && res.StatusCode == http.StatusNotModified {
10161 if res.Body != nil {
10162 res.Body.Close()
10163 }
10164 return nil, gensupport.WrapError(&googleapi.Error{
10165 Code: res.StatusCode,
10166 Header: res.Header,
10167 })
10168 }
10169 if err != nil {
10170 return nil, err
10171 }
10172 defer googleapi.CloseBody(res)
10173 if err := googleapi.CheckResponse(res); err != nil {
10174 return nil, gensupport.WrapError(err)
10175 }
10176 ret := &Operation{
10177 ServerResponse: googleapi.ServerResponse{
10178 Header: res.Header,
10179 HTTPStatusCode: res.StatusCode,
10180 },
10181 }
10182 target := &ret
10183 if err := gensupport.DecodeResponse(target, res); err != nil {
10184 return nil, err
10185 }
10186 return ret, nil
10187 }
10188
10189 type SslCertsGetCall struct {
10190 s *Service
10191 project string
10192 instance string
10193 sha1Fingerprint string
10194 urlParams_ gensupport.URLParams
10195 ifNoneMatch_ string
10196 ctx_ context.Context
10197 header_ http.Header
10198 }
10199
10200
10201
10202
10203
10204
10205
10206
10207 func (r *SslCertsService) Get(project string, instance string, sha1Fingerprint string) *SslCertsGetCall {
10208 c := &SslCertsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10209 c.project = project
10210 c.instance = instance
10211 c.sha1Fingerprint = sha1Fingerprint
10212 return c
10213 }
10214
10215
10216
10217
10218 func (c *SslCertsGetCall) Fields(s ...googleapi.Field) *SslCertsGetCall {
10219 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10220 return c
10221 }
10222
10223
10224
10225
10226 func (c *SslCertsGetCall) IfNoneMatch(entityTag string) *SslCertsGetCall {
10227 c.ifNoneMatch_ = entityTag
10228 return c
10229 }
10230
10231
10232 func (c *SslCertsGetCall) Context(ctx context.Context) *SslCertsGetCall {
10233 c.ctx_ = ctx
10234 return c
10235 }
10236
10237
10238
10239 func (c *SslCertsGetCall) Header() http.Header {
10240 if c.header_ == nil {
10241 c.header_ = make(http.Header)
10242 }
10243 return c.header_
10244 }
10245
10246 func (c *SslCertsGetCall) doRequest(alt string) (*http.Response, error) {
10247 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10248 if c.ifNoneMatch_ != "" {
10249 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10250 }
10251 var body io.Reader = nil
10252 c.urlParams_.Set("alt", alt)
10253 c.urlParams_.Set("prettyPrint", "false")
10254 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}")
10255 urls += "?" + c.urlParams_.Encode()
10256 req, err := http.NewRequest("GET", urls, body)
10257 if err != nil {
10258 return nil, err
10259 }
10260 req.Header = reqHeaders
10261 googleapi.Expand(req.URL, map[string]string{
10262 "project": c.project,
10263 "instance": c.instance,
10264 "sha1Fingerprint": c.sha1Fingerprint,
10265 })
10266 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10267 }
10268
10269
10270
10271
10272
10273
10274 func (c *SslCertsGetCall) Do(opts ...googleapi.CallOption) (*SslCert, error) {
10275 gensupport.SetOptions(c.urlParams_, opts...)
10276 res, err := c.doRequest("json")
10277 if res != nil && res.StatusCode == http.StatusNotModified {
10278 if res.Body != nil {
10279 res.Body.Close()
10280 }
10281 return nil, gensupport.WrapError(&googleapi.Error{
10282 Code: res.StatusCode,
10283 Header: res.Header,
10284 })
10285 }
10286 if err != nil {
10287 return nil, err
10288 }
10289 defer googleapi.CloseBody(res)
10290 if err := googleapi.CheckResponse(res); err != nil {
10291 return nil, gensupport.WrapError(err)
10292 }
10293 ret := &SslCert{
10294 ServerResponse: googleapi.ServerResponse{
10295 Header: res.Header,
10296 HTTPStatusCode: res.StatusCode,
10297 },
10298 }
10299 target := &ret
10300 if err := gensupport.DecodeResponse(target, res); err != nil {
10301 return nil, err
10302 }
10303 return ret, nil
10304 }
10305
10306 type SslCertsInsertCall struct {
10307 s *Service
10308 project string
10309 instance string
10310 sslcertsinsertrequest *SslCertsInsertRequest
10311 urlParams_ gensupport.URLParams
10312 ctx_ context.Context
10313 header_ http.Header
10314 }
10315
10316
10317
10318
10319
10320
10321
10322 func (r *SslCertsService) Insert(project string, instance string, sslcertsinsertrequest *SslCertsInsertRequest) *SslCertsInsertCall {
10323 c := &SslCertsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10324 c.project = project
10325 c.instance = instance
10326 c.sslcertsinsertrequest = sslcertsinsertrequest
10327 return c
10328 }
10329
10330
10331
10332
10333 func (c *SslCertsInsertCall) Fields(s ...googleapi.Field) *SslCertsInsertCall {
10334 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10335 return c
10336 }
10337
10338
10339 func (c *SslCertsInsertCall) Context(ctx context.Context) *SslCertsInsertCall {
10340 c.ctx_ = ctx
10341 return c
10342 }
10343
10344
10345
10346 func (c *SslCertsInsertCall) Header() http.Header {
10347 if c.header_ == nil {
10348 c.header_ = make(http.Header)
10349 }
10350 return c.header_
10351 }
10352
10353 func (c *SslCertsInsertCall) doRequest(alt string) (*http.Response, error) {
10354 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10355 var body io.Reader = nil
10356 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertsinsertrequest)
10357 if err != nil {
10358 return nil, err
10359 }
10360 c.urlParams_.Set("alt", alt)
10361 c.urlParams_.Set("prettyPrint", "false")
10362 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts")
10363 urls += "?" + c.urlParams_.Encode()
10364 req, err := http.NewRequest("POST", urls, body)
10365 if err != nil {
10366 return nil, err
10367 }
10368 req.Header = reqHeaders
10369 googleapi.Expand(req.URL, map[string]string{
10370 "project": c.project,
10371 "instance": c.instance,
10372 })
10373 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10374 }
10375
10376
10377
10378
10379
10380
10381
10382 func (c *SslCertsInsertCall) Do(opts ...googleapi.CallOption) (*SslCertsInsertResponse, error) {
10383 gensupport.SetOptions(c.urlParams_, opts...)
10384 res, err := c.doRequest("json")
10385 if res != nil && res.StatusCode == http.StatusNotModified {
10386 if res.Body != nil {
10387 res.Body.Close()
10388 }
10389 return nil, gensupport.WrapError(&googleapi.Error{
10390 Code: res.StatusCode,
10391 Header: res.Header,
10392 })
10393 }
10394 if err != nil {
10395 return nil, err
10396 }
10397 defer googleapi.CloseBody(res)
10398 if err := googleapi.CheckResponse(res); err != nil {
10399 return nil, gensupport.WrapError(err)
10400 }
10401 ret := &SslCertsInsertResponse{
10402 ServerResponse: googleapi.ServerResponse{
10403 Header: res.Header,
10404 HTTPStatusCode: res.StatusCode,
10405 },
10406 }
10407 target := &ret
10408 if err := gensupport.DecodeResponse(target, res); err != nil {
10409 return nil, err
10410 }
10411 return ret, nil
10412 }
10413
10414 type SslCertsListCall struct {
10415 s *Service
10416 project string
10417 instance string
10418 urlParams_ gensupport.URLParams
10419 ifNoneMatch_ string
10420 ctx_ context.Context
10421 header_ http.Header
10422 }
10423
10424
10425
10426
10427
10428 func (r *SslCertsService) List(project string, instance string) *SslCertsListCall {
10429 c := &SslCertsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10430 c.project = project
10431 c.instance = instance
10432 return c
10433 }
10434
10435
10436
10437
10438 func (c *SslCertsListCall) Fields(s ...googleapi.Field) *SslCertsListCall {
10439 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10440 return c
10441 }
10442
10443
10444
10445
10446 func (c *SslCertsListCall) IfNoneMatch(entityTag string) *SslCertsListCall {
10447 c.ifNoneMatch_ = entityTag
10448 return c
10449 }
10450
10451
10452 func (c *SslCertsListCall) Context(ctx context.Context) *SslCertsListCall {
10453 c.ctx_ = ctx
10454 return c
10455 }
10456
10457
10458
10459 func (c *SslCertsListCall) Header() http.Header {
10460 if c.header_ == nil {
10461 c.header_ = make(http.Header)
10462 }
10463 return c.header_
10464 }
10465
10466 func (c *SslCertsListCall) doRequest(alt string) (*http.Response, error) {
10467 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10468 if c.ifNoneMatch_ != "" {
10469 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10470 }
10471 var body io.Reader = nil
10472 c.urlParams_.Set("alt", alt)
10473 c.urlParams_.Set("prettyPrint", "false")
10474 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts")
10475 urls += "?" + c.urlParams_.Encode()
10476 req, err := http.NewRequest("GET", urls, body)
10477 if err != nil {
10478 return nil, err
10479 }
10480 req.Header = reqHeaders
10481 googleapi.Expand(req.URL, map[string]string{
10482 "project": c.project,
10483 "instance": c.instance,
10484 })
10485 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10486 }
10487
10488
10489
10490
10491
10492
10493
10494 func (c *SslCertsListCall) Do(opts ...googleapi.CallOption) (*SslCertsListResponse, error) {
10495 gensupport.SetOptions(c.urlParams_, opts...)
10496 res, err := c.doRequest("json")
10497 if res != nil && res.StatusCode == http.StatusNotModified {
10498 if res.Body != nil {
10499 res.Body.Close()
10500 }
10501 return nil, gensupport.WrapError(&googleapi.Error{
10502 Code: res.StatusCode,
10503 Header: res.Header,
10504 })
10505 }
10506 if err != nil {
10507 return nil, err
10508 }
10509 defer googleapi.CloseBody(res)
10510 if err := googleapi.CheckResponse(res); err != nil {
10511 return nil, gensupport.WrapError(err)
10512 }
10513 ret := &SslCertsListResponse{
10514 ServerResponse: googleapi.ServerResponse{
10515 Header: res.Header,
10516 HTTPStatusCode: res.StatusCode,
10517 },
10518 }
10519 target := &ret
10520 if err := gensupport.DecodeResponse(target, res); err != nil {
10521 return nil, err
10522 }
10523 return ret, nil
10524 }
10525
10526 type TiersListCall struct {
10527 s *Service
10528 project string
10529 urlParams_ gensupport.URLParams
10530 ifNoneMatch_ string
10531 ctx_ context.Context
10532 header_ http.Header
10533 }
10534
10535
10536
10537
10538
10539
10540 func (r *TiersService) List(project string) *TiersListCall {
10541 c := &TiersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10542 c.project = project
10543 return c
10544 }
10545
10546
10547
10548
10549 func (c *TiersListCall) Fields(s ...googleapi.Field) *TiersListCall {
10550 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10551 return c
10552 }
10553
10554
10555
10556
10557 func (c *TiersListCall) IfNoneMatch(entityTag string) *TiersListCall {
10558 c.ifNoneMatch_ = entityTag
10559 return c
10560 }
10561
10562
10563 func (c *TiersListCall) Context(ctx context.Context) *TiersListCall {
10564 c.ctx_ = ctx
10565 return c
10566 }
10567
10568
10569
10570 func (c *TiersListCall) Header() http.Header {
10571 if c.header_ == nil {
10572 c.header_ = make(http.Header)
10573 }
10574 return c.header_
10575 }
10576
10577 func (c *TiersListCall) doRequest(alt string) (*http.Response, error) {
10578 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10579 if c.ifNoneMatch_ != "" {
10580 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10581 }
10582 var body io.Reader = nil
10583 c.urlParams_.Set("alt", alt)
10584 c.urlParams_.Set("prettyPrint", "false")
10585 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/tiers")
10586 urls += "?" + c.urlParams_.Encode()
10587 req, err := http.NewRequest("GET", urls, body)
10588 if err != nil {
10589 return nil, err
10590 }
10591 req.Header = reqHeaders
10592 googleapi.Expand(req.URL, map[string]string{
10593 "project": c.project,
10594 })
10595 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10596 }
10597
10598
10599
10600
10601
10602
10603
10604 func (c *TiersListCall) Do(opts ...googleapi.CallOption) (*TiersListResponse, error) {
10605 gensupport.SetOptions(c.urlParams_, opts...)
10606 res, err := c.doRequest("json")
10607 if res != nil && res.StatusCode == http.StatusNotModified {
10608 if res.Body != nil {
10609 res.Body.Close()
10610 }
10611 return nil, gensupport.WrapError(&googleapi.Error{
10612 Code: res.StatusCode,
10613 Header: res.Header,
10614 })
10615 }
10616 if err != nil {
10617 return nil, err
10618 }
10619 defer googleapi.CloseBody(res)
10620 if err := googleapi.CheckResponse(res); err != nil {
10621 return nil, gensupport.WrapError(err)
10622 }
10623 ret := &TiersListResponse{
10624 ServerResponse: googleapi.ServerResponse{
10625 Header: res.Header,
10626 HTTPStatusCode: res.StatusCode,
10627 },
10628 }
10629 target := &ret
10630 if err := gensupport.DecodeResponse(target, res); err != nil {
10631 return nil, err
10632 }
10633 return ret, nil
10634 }
10635
10636 type UsersDeleteCall struct {
10637 s *Service
10638 project string
10639 instance string
10640 urlParams_ gensupport.URLParams
10641 ctx_ context.Context
10642 header_ http.Header
10643 }
10644
10645
10646
10647
10648
10649 func (r *UsersService) Delete(project string, instance string) *UsersDeleteCall {
10650 c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10651 c.project = project
10652 c.instance = instance
10653 return c
10654 }
10655
10656
10657 func (c *UsersDeleteCall) Host(host string) *UsersDeleteCall {
10658 c.urlParams_.Set("host", host)
10659 return c
10660 }
10661
10662
10663 func (c *UsersDeleteCall) Name(name string) *UsersDeleteCall {
10664 c.urlParams_.Set("name", name)
10665 return c
10666 }
10667
10668
10669
10670
10671 func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall {
10672 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10673 return c
10674 }
10675
10676
10677 func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
10678 c.ctx_ = ctx
10679 return c
10680 }
10681
10682
10683
10684 func (c *UsersDeleteCall) Header() http.Header {
10685 if c.header_ == nil {
10686 c.header_ = make(http.Header)
10687 }
10688 return c.header_
10689 }
10690
10691 func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
10692 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10693 var body io.Reader = nil
10694 c.urlParams_.Set("alt", alt)
10695 c.urlParams_.Set("prettyPrint", "false")
10696 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
10697 urls += "?" + c.urlParams_.Encode()
10698 req, err := http.NewRequest("DELETE", urls, body)
10699 if err != nil {
10700 return nil, err
10701 }
10702 req.Header = reqHeaders
10703 googleapi.Expand(req.URL, map[string]string{
10704 "project": c.project,
10705 "instance": c.instance,
10706 })
10707 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10708 }
10709
10710
10711
10712
10713
10714
10715 func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10716 gensupport.SetOptions(c.urlParams_, opts...)
10717 res, err := c.doRequest("json")
10718 if res != nil && res.StatusCode == http.StatusNotModified {
10719 if res.Body != nil {
10720 res.Body.Close()
10721 }
10722 return nil, gensupport.WrapError(&googleapi.Error{
10723 Code: res.StatusCode,
10724 Header: res.Header,
10725 })
10726 }
10727 if err != nil {
10728 return nil, err
10729 }
10730 defer googleapi.CloseBody(res)
10731 if err := googleapi.CheckResponse(res); err != nil {
10732 return nil, gensupport.WrapError(err)
10733 }
10734 ret := &Operation{
10735 ServerResponse: googleapi.ServerResponse{
10736 Header: res.Header,
10737 HTTPStatusCode: res.StatusCode,
10738 },
10739 }
10740 target := &ret
10741 if err := gensupport.DecodeResponse(target, res); err != nil {
10742 return nil, err
10743 }
10744 return ret, nil
10745 }
10746
10747 type UsersGetCall struct {
10748 s *Service
10749 project string
10750 instance string
10751 name string
10752 urlParams_ gensupport.URLParams
10753 ifNoneMatch_ string
10754 ctx_ context.Context
10755 header_ http.Header
10756 }
10757
10758
10759
10760
10761
10762
10763 func (r *UsersService) Get(project string, instance string, name string) *UsersGetCall {
10764 c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10765 c.project = project
10766 c.instance = instance
10767 c.name = name
10768 return c
10769 }
10770
10771
10772 func (c *UsersGetCall) Host(host string) *UsersGetCall {
10773 c.urlParams_.Set("host", host)
10774 return c
10775 }
10776
10777
10778
10779
10780 func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
10781 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10782 return c
10783 }
10784
10785
10786
10787
10788 func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
10789 c.ifNoneMatch_ = entityTag
10790 return c
10791 }
10792
10793
10794 func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
10795 c.ctx_ = ctx
10796 return c
10797 }
10798
10799
10800
10801 func (c *UsersGetCall) Header() http.Header {
10802 if c.header_ == nil {
10803 c.header_ = make(http.Header)
10804 }
10805 return c.header_
10806 }
10807
10808 func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
10809 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10810 if c.ifNoneMatch_ != "" {
10811 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10812 }
10813 var body io.Reader = nil
10814 c.urlParams_.Set("alt", alt)
10815 c.urlParams_.Set("prettyPrint", "false")
10816 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users/{name}")
10817 urls += "?" + c.urlParams_.Encode()
10818 req, err := http.NewRequest("GET", urls, body)
10819 if err != nil {
10820 return nil, err
10821 }
10822 req.Header = reqHeaders
10823 googleapi.Expand(req.URL, map[string]string{
10824 "project": c.project,
10825 "instance": c.instance,
10826 "name": c.name,
10827 })
10828 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10829 }
10830
10831
10832
10833
10834
10835
10836 func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
10837 gensupport.SetOptions(c.urlParams_, opts...)
10838 res, err := c.doRequest("json")
10839 if res != nil && res.StatusCode == http.StatusNotModified {
10840 if res.Body != nil {
10841 res.Body.Close()
10842 }
10843 return nil, gensupport.WrapError(&googleapi.Error{
10844 Code: res.StatusCode,
10845 Header: res.Header,
10846 })
10847 }
10848 if err != nil {
10849 return nil, err
10850 }
10851 defer googleapi.CloseBody(res)
10852 if err := googleapi.CheckResponse(res); err != nil {
10853 return nil, gensupport.WrapError(err)
10854 }
10855 ret := &User{
10856 ServerResponse: googleapi.ServerResponse{
10857 Header: res.Header,
10858 HTTPStatusCode: res.StatusCode,
10859 },
10860 }
10861 target := &ret
10862 if err := gensupport.DecodeResponse(target, res); err != nil {
10863 return nil, err
10864 }
10865 return ret, nil
10866 }
10867
10868 type UsersInsertCall struct {
10869 s *Service
10870 project string
10871 instance string
10872 user *User
10873 urlParams_ gensupport.URLParams
10874 ctx_ context.Context
10875 header_ http.Header
10876 }
10877
10878
10879
10880
10881
10882 func (r *UsersService) Insert(project string, instance string, user *User) *UsersInsertCall {
10883 c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10884 c.project = project
10885 c.instance = instance
10886 c.user = user
10887 return c
10888 }
10889
10890
10891
10892
10893 func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall {
10894 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10895 return c
10896 }
10897
10898
10899 func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
10900 c.ctx_ = ctx
10901 return c
10902 }
10903
10904
10905
10906 func (c *UsersInsertCall) Header() http.Header {
10907 if c.header_ == nil {
10908 c.header_ = make(http.Header)
10909 }
10910 return c.header_
10911 }
10912
10913 func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
10914 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10915 var body io.Reader = nil
10916 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
10917 if err != nil {
10918 return nil, err
10919 }
10920 c.urlParams_.Set("alt", alt)
10921 c.urlParams_.Set("prettyPrint", "false")
10922 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
10923 urls += "?" + c.urlParams_.Encode()
10924 req, err := http.NewRequest("POST", urls, body)
10925 if err != nil {
10926 return nil, err
10927 }
10928 req.Header = reqHeaders
10929 googleapi.Expand(req.URL, map[string]string{
10930 "project": c.project,
10931 "instance": c.instance,
10932 })
10933 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10934 }
10935
10936
10937
10938
10939
10940
10941 func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10942 gensupport.SetOptions(c.urlParams_, opts...)
10943 res, err := c.doRequest("json")
10944 if res != nil && res.StatusCode == http.StatusNotModified {
10945 if res.Body != nil {
10946 res.Body.Close()
10947 }
10948 return nil, gensupport.WrapError(&googleapi.Error{
10949 Code: res.StatusCode,
10950 Header: res.Header,
10951 })
10952 }
10953 if err != nil {
10954 return nil, err
10955 }
10956 defer googleapi.CloseBody(res)
10957 if err := googleapi.CheckResponse(res); err != nil {
10958 return nil, gensupport.WrapError(err)
10959 }
10960 ret := &Operation{
10961 ServerResponse: googleapi.ServerResponse{
10962 Header: res.Header,
10963 HTTPStatusCode: res.StatusCode,
10964 },
10965 }
10966 target := &ret
10967 if err := gensupport.DecodeResponse(target, res); err != nil {
10968 return nil, err
10969 }
10970 return ret, nil
10971 }
10972
10973 type UsersListCall struct {
10974 s *Service
10975 project string
10976 instance string
10977 urlParams_ gensupport.URLParams
10978 ifNoneMatch_ string
10979 ctx_ context.Context
10980 header_ http.Header
10981 }
10982
10983
10984
10985
10986
10987 func (r *UsersService) List(project string, instance string) *UsersListCall {
10988 c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10989 c.project = project
10990 c.instance = instance
10991 return c
10992 }
10993
10994
10995
10996
10997 func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall {
10998 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10999 return c
11000 }
11001
11002
11003
11004
11005 func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall {
11006 c.ifNoneMatch_ = entityTag
11007 return c
11008 }
11009
11010
11011 func (c *UsersListCall) Context(ctx context.Context) *UsersListCall {
11012 c.ctx_ = ctx
11013 return c
11014 }
11015
11016
11017
11018 func (c *UsersListCall) Header() http.Header {
11019 if c.header_ == nil {
11020 c.header_ = make(http.Header)
11021 }
11022 return c.header_
11023 }
11024
11025 func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
11026 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11027 if c.ifNoneMatch_ != "" {
11028 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11029 }
11030 var body io.Reader = nil
11031 c.urlParams_.Set("alt", alt)
11032 c.urlParams_.Set("prettyPrint", "false")
11033 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
11034 urls += "?" + c.urlParams_.Encode()
11035 req, err := http.NewRequest("GET", urls, body)
11036 if err != nil {
11037 return nil, err
11038 }
11039 req.Header = reqHeaders
11040 googleapi.Expand(req.URL, map[string]string{
11041 "project": c.project,
11042 "instance": c.instance,
11043 })
11044 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11045 }
11046
11047
11048
11049
11050
11051
11052
11053 func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*UsersListResponse, error) {
11054 gensupport.SetOptions(c.urlParams_, opts...)
11055 res, err := c.doRequest("json")
11056 if res != nil && res.StatusCode == http.StatusNotModified {
11057 if res.Body != nil {
11058 res.Body.Close()
11059 }
11060 return nil, gensupport.WrapError(&googleapi.Error{
11061 Code: res.StatusCode,
11062 Header: res.Header,
11063 })
11064 }
11065 if err != nil {
11066 return nil, err
11067 }
11068 defer googleapi.CloseBody(res)
11069 if err := googleapi.CheckResponse(res); err != nil {
11070 return nil, gensupport.WrapError(err)
11071 }
11072 ret := &UsersListResponse{
11073 ServerResponse: googleapi.ServerResponse{
11074 Header: res.Header,
11075 HTTPStatusCode: res.StatusCode,
11076 },
11077 }
11078 target := &ret
11079 if err := gensupport.DecodeResponse(target, res); err != nil {
11080 return nil, err
11081 }
11082 return ret, nil
11083 }
11084
11085 type UsersUpdateCall struct {
11086 s *Service
11087 project string
11088 instance string
11089 user *User
11090 urlParams_ gensupport.URLParams
11091 ctx_ context.Context
11092 header_ http.Header
11093 }
11094
11095
11096
11097
11098
11099 func (r *UsersService) Update(project string, instance string, user *User) *UsersUpdateCall {
11100 c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11101 c.project = project
11102 c.instance = instance
11103 c.user = user
11104 return c
11105 }
11106
11107
11108 func (c *UsersUpdateCall) Host(host string) *UsersUpdateCall {
11109 c.urlParams_.Set("host", host)
11110 return c
11111 }
11112
11113
11114 func (c *UsersUpdateCall) Name(name string) *UsersUpdateCall {
11115 c.urlParams_.Set("name", name)
11116 return c
11117 }
11118
11119
11120
11121
11122 func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall {
11123 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11124 return c
11125 }
11126
11127
11128 func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall {
11129 c.ctx_ = ctx
11130 return c
11131 }
11132
11133
11134
11135 func (c *UsersUpdateCall) Header() http.Header {
11136 if c.header_ == nil {
11137 c.header_ = make(http.Header)
11138 }
11139 return c.header_
11140 }
11141
11142 func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) {
11143 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11144 var body io.Reader = nil
11145 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
11146 if err != nil {
11147 return nil, err
11148 }
11149 c.urlParams_.Set("alt", alt)
11150 c.urlParams_.Set("prettyPrint", "false")
11151 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
11152 urls += "?" + c.urlParams_.Encode()
11153 req, err := http.NewRequest("PUT", urls, body)
11154 if err != nil {
11155 return nil, err
11156 }
11157 req.Header = reqHeaders
11158 googleapi.Expand(req.URL, map[string]string{
11159 "project": c.project,
11160 "instance": c.instance,
11161 })
11162 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11163 }
11164
11165
11166
11167
11168
11169
11170 func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11171 gensupport.SetOptions(c.urlParams_, opts...)
11172 res, err := c.doRequest("json")
11173 if res != nil && res.StatusCode == http.StatusNotModified {
11174 if res.Body != nil {
11175 res.Body.Close()
11176 }
11177 return nil, gensupport.WrapError(&googleapi.Error{
11178 Code: res.StatusCode,
11179 Header: res.Header,
11180 })
11181 }
11182 if err != nil {
11183 return nil, err
11184 }
11185 defer googleapi.CloseBody(res)
11186 if err := googleapi.CheckResponse(res); err != nil {
11187 return nil, gensupport.WrapError(err)
11188 }
11189 ret := &Operation{
11190 ServerResponse: googleapi.ServerResponse{
11191 Header: res.Header,
11192 HTTPStatusCode: res.StatusCode,
11193 },
11194 }
11195 target := &ret
11196 if err := gensupport.DecodeResponse(target, res); err != nil {
11197 return nil, err
11198 }
11199 return ret, nil
11200 }
11201
View as plain text