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